-
Notifications
You must be signed in to change notification settings - Fork 636
Closed
Description
When converting geom_tile with ggplotly, the warning 'heatmap' objects don't have these attributes: 'showlegend' is produced. I think this is just a mismatch in the internal API and should be an easy fix.
Seems to me that the issue arises here, where a value is assigned to it for all trace types. At least, if I comment this line out, the warning doesn't occur. https://github.com/ropensci/plotly/blob/e02a704d3743ef3dc59714af1b9fc6d3c248186e/R/ggplotly.R#L559
(link was out of date, I think the permalink is correct)
library("ggplot2")
library("reshape2")
library("plotly")
#> [startup msgs]
mdf <- melt(as.matrix(mtcars))
g <- ggplot(mdf, aes(x = Var1, y = Var2, fill = value)) + geom_tile()
ggplotly(g)
#> Warning: 'heatmap' objects don't have these attributes: 'showlegend'
#> Valid attributes include:
#> 'type', 'visible', 'opacity', 'name', 'uid', 'ids', 'customdata', 'meta', 'hoverinfo', 'hoverlabel', 'stream', 'transforms', 'uirevision', 'z', 'x', 'x0', 'dx', 'y', 'y0', 'dy', 'text', 'hovertext', 'transpose', 'xtype', 'ytype', 'zsmooth', 'connectgaps', 'xgap', 'ygap', 'zhoverformat', 'hovertemplate', 'zauto', 'zmin', 'zmax', 'zmid', 'colorscale', 'autocolorscale', 'reversescale', 'showscale', 'colorbar', 'coloraxis', 'xcalendar', 'ycalendar', 'xaxis', 'yaxis', 'idssrc', 'customdatasrc', 'metasrc', 'hoverinfosrc', 'zsrc', 'xsrc', 'ysrc', 'textsrc', 'hovertextsrc', 'hovertemplatesrc', 'key', 'set', 'frame', 'transforms', '_isNestedKey', '_isSimpleKey', '_isGraticule', '_bbox'Cheers
talgalili, kmalone7, olliecast, b8e5n, mnazarov and 1 more
Metadata
Metadata
Assignees
Labels
No labels
