Skip to content

Issue supplying rgba() codes to color arg #1233

Closed
@viniciusvgp

Description

@viniciusvgp

When using hoveron='fills' the custom hover text is not drawn. The hover shows only the split/fill variable.

Code example:

library(plotly)
data.frame(AA=c(2,3,3,2,NA, 6,7,7,6,NA),
           BB=c(2,2,3,2,NA, 6,6,7,6,NA),
           CC=c(rep('abc', 5), rep('xyz', 5)),
           LL=c(rep('A', 5), rep('B', 5))) %>%
    plot_ly() %>%
             add_trace(x=~AA,
                       y=~BB,
                       text=~paste('<br> <b>Example</b> of <em>custom</em> hover text <br>', LL, '<br>', CC, '<br>.'),
                       split=~LL, 
                       mode="lines", 
                       fill="toself", 
                       hoveron='fills',
                       type="scatter", 
                       color = I(c(rep(toRGB("black", 1), 5),
                                   rep(toRGB("red", 1), 5)))
                       )

Result:
wrong hover

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions