Skip to content

Interface: ViolinOptions ​

Options of violin: px.violin's arguments in camelCase.

Extends ​

  • CategoricalOptions

Properties ​

PropertyModifierTypeDescriptionInherited from
animationFrame?readonlyColumnRefColumn of frame values: one frame per value (in categoryOrders / first-appearance order), with a Play / Pause update menu and a slider. Axis ranges are fixed across frames.CategoricalOptions.animationFrame
animationGroup?readonlyColumnRefColumn matching rows across frames (ids), so each object moves rather than being replaced.CategoricalOptions.animationGroup
box?readonlybooleanDraw a box inside each violin.-
categoryOrders?readonlyReadonly<Record<string, readonly unknown[]>>Value orders per column: { day: ['Thu', 'Fri', 'Sat', 'Sun'] }. They order the traces and legend (for grouping columns), facets, frames and category axes. Values not listed follow in order of first appearance; listed values without rows still take a color and a facet (as px).CategoricalOptions.categoryOrders
color?readonlyColumnRefColumn to color by.CategoricalOptions.color
colorDiscreteMap?readonlyReadonly<Record<string, string>> | "identity"Fixed colors per value of color ({ Asia: 'red' }); other values continue with the sequence. 'identity': the values are colors themselves (no legend entries for them).CategoricalOptions.colorDiscreteMap
colorDiscreteSequence?readonlyreadonly string[]Colors for the values of color, in order. Default: the template's colorway.CategoricalOptions.colorDiscreteSequence
customData?readonlyreadonly ColumnRef[]Columns put in customdata (first, before hoverData's), e.g. for click handlers.CategoricalOptions.customData
facetCol?readonlyColumnRefColumn whose values make the columns of subplots.CategoricalOptions.facetCol
facetColSpacing?readonlynumberSpace between facet columns, as a fraction of the plot width. Default 0.02.CategoricalOptions.facetColSpacing
facetColWrap?readonlynumberWrap facetCol after this many columns (row by row from the top). Ignored with facetRow or a marginal. Default 0 (no wrapping).CategoricalOptions.facetColWrap
facetRow?readonlyColumnRefColumn whose values make the rows of subplots (first value at the top).CategoricalOptions.facetRow
facetRowSpacing?readonlynumberSpace between facet rows, as a fraction of the plot height. Default 0.03 (0.07 wrapped).CategoricalOptions.facetRowSpacing
height?readonlynumberFigure height in px (layout.height).CategoricalOptions.height
hoverData?readonly| readonly ColumnRef[] | Readonly<Record<string, string | boolean>>More columns for the hover label, through customdata: a list of columns, or an object that adds columns (true), removes lines (false, e.g. { x: false }) or formats them (':.2f', `'%Y'`).
hoverName?readonlyColumnRefColumn shown in bold at the top of the hover label (hovertext).CategoricalOptions.hoverName
labels?readonlyReadonly<Record<string, string>>Display names of columns: { gdpPercap: 'GDP per capita' }. Used for axis titles, hover lines, the legend title, facet labels, the colorbar title and the animation slider.CategoricalOptions.labels
logX?readonlybooleanLog x axis (type: 'log', on every facet).CategoricalOptions.logX
logY?readonlybooleanLog y axis.CategoricalOptions.logY
orientation?readonly"v" | "h"'v' or 'h'. Default as px: 'h' when only the value column of a horizontal chart is given or when x is numeric and y is not, else 'v'.CategoricalOptions.orientation
points?readonlyfalse | "outliers" | "suspectedoutliers" | "all"Which points to draw: 'outliers', 'suspectedoutliers', 'all', false.-
rangeX?readonlyreadonly [unknown, unknown]Fixed x range, in data units (log axes take data units too, as px).CategoricalOptions.rangeX
rangeY?readonlyreadonly [unknown, unknown]Fixed y range, in data units.CategoricalOptions.rangeY
template?readonlystring | Templatelayout.template: a registered name ('plotly-classic') or a template object. Default: unset, so the chart's default template applies (Holochart's holochart look); its colorway, symbol and dash cycles and sequential colorscale are what the figure's colors are taken from.CategoricalOptions.template
title?readonlystringFigure title (layout.title.text).CategoricalOptions.title
violinmode?readonly"group" | "overlay"layout.violinmode: 'group' or 'overlay'.-
width?readonlynumberFigure width in px (layout.width).CategoricalOptions.width
x?readonlyColumnRefColumn of x values.CategoricalOptions.x
y?readonlyColumnRefColumn of y values.CategoricalOptions.y

Released under the MIT License.