Skip to content

Interface: LayoutXaxisRangeselector ​

Range selector (plan E5.9): buttons over the chart that set the x range to a preset span ending at the current range end (last 6 months, year to date, all). Date axes only. The button whose range is in view shows as active.

Properties ​

PropertyTypeDefault valueDescription
activecolor?stringundefinedBackground of the active button (the one whose range is in view) and of hovered buttons. Defaults to bgcolor darkened (light colors) or lightened (dark colors).
bgcolor?string"#eee"Background of the buttons.
bordercolor?string"#444"Border color of the buttons.
borderwidth?number0Border width of the buttons, px. Minimum: 0
buttons?readonly LayoutXaxisRangeselectorButton[]undefinedThe buttons, left to right.
font?LayoutXaxisRangeselectorFontundefinedButton font. Defaults to layout.font.
visible?booleanundefinedShow the range selector. Defaults to true when it has buttons.
x?numberundefinedHorizontal position in paper coordinates (fractions of the plot area width). Defaults to the start of the axis domain. Give x and y together; one alone is ignored. Range: -2 – 3
xanchor?"auto" | "left" | "center" | "right""left"Which side of the button row x refers to.
y?numberundefinedVertical position in paper coordinates. Defaults to just above the highest subplot on this x axis. Range: -2 – 3
yanchor?"auto" | "top" | "middle" | "bottom""bottom"Which side of the button row y refers to.

Released under the MIT License.