plotly.R icon indicating copy to clipboard operation
plotly.R copied to clipboard

Add horizontal attribute for colorbars

Open ismirsehregal opened this issue 3 years ago • 1 comments

As of plotly JS v2.8.0 horizontal colorbars are available.

Plotly.R currently uses plotly.js v2.11.1 and the parameter is listed in the R Figure Reference, so it should be possible to make use of this feature.

However I can't find it in schema() and can't apply it:

library(plotly)

fig <- plot_ly(mtcars, x = ~wt, y = ~mpg, color = ~cyl, type = "scatter", mode = "markers")
fig1 <- colorbar(fig, len = 0.5, orientation = "h", bgcolor= "green")
fig1

fig2 <- layout(fig, title = "colorbar orientation", coloraxis = list(colorbar = list(orientation = "h", bgcolor= "green")))
fig2

ismirsehregal avatar Jun 17 '22 08:06 ismirsehregal

Is this feature available now?

deril2605 avatar Nov 18 '23 17:11 deril2605