Skip to content

Account for trace specific layoutAttributes when warning about attribute names #994

Open
@cpsievert

Description

@cpsievert

This shouldn't throw a warning

> plot_ly(ggplot2::diamonds, x = ~cut, y = ~price, color = ~clarity, type = "box") %>% layout(boxmode = "group")

Warning message:
'layout' objects don't have these attributes: 'boxmode'
Valid attributes include:
'font', 'title', 'titlefont', 'autosize', 'width', 'height', 'margin', 'paper_bgcolor', 'plot_bgcolor', 'separators', 'hidesources', 'smith', 'showlegend', 'dragmode', 'hovermode', 'xaxis', 'yaxis', 'ternary', 'scene', 'geo', 'mapbox', 'radialaxis', 'angularaxis', 'direction', 'orientation', 'legend', 'annotations', 'shapes', 'images', 'updatemenus', 'sliders', 'calendar', 'barmode', 'bargap', 'mapType'
> Schema$traces$box$layoutAttributes$boxmode
$valType
[1] "enumerated"

$values
[1] "group"   "overlay"

$dflt
[1] "overlay"

Originally posted in https://community.plot.ly/t/not-a-real-error-for-boxmode/2596

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions