Skip to content

Add horizontal attribute for colorbars #2147

Open
@ismirsehregal

Description

@ismirsehregal

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions