Skip to main content
SeriesBasedChartOptions
Base options for a series based chart
NameTypeDescription
colorGenerator?ColorGeneratorOptional function to call in order to establish the color to be used for each series
data?Array<ObjectData>Optional data to load into the chart.
dataSource?DataSourceOptional data source (of type DataSource, meaning both VisuallyJsModel and Selection are supported) from which to retrieve data to load into the chart.
dataSourceFilter?ChartModelFilterWhen you provide dataSource, you can also provide a filter which accepts or rejects specific nodes/groups in the data source.
defaultColor?stringOptional color to use for every series. Overrides any colorGenerator.
emptyMessage?stringMessage to display when the chart has no data. Defaults to "No data".
grouped?booleanIf true, the data will be grouped, if the chart type supports it (eg Bar/Column).
groupField?stringThe name of the field that identifies which group a data point belongs to. Defaults to group.
height?numberHeight for the chart. If omitted, height is computed from the width of the chart's container
legend?boolean | LegendSpecEither a boolean true/false, indicating the legend should be shown/hidden, or a spec for a legend.
resizeObserver?booleanDefaults to true, meaning the chart will redraw when its container element resizes.
seriesArray<T>Definition of the chart series' to display. You can display multiple series on a chart.
style?ChartStyleOptionsStyles for legend and grid.
subtitle?SubtitleSpecSubtitle for the chart.
title?ChartTitleSpecTitle for the chart.
titlePadding?numberPadding to leave underneath the title
tooltip?TooltipOptionsOptions for a tooltip for the chart.
url?stringOptional URL from which to retrieve data to load into the chart
width?numberWidth for the chart. If omitted, width is computed from the width of the chart's container
zoom?{
  enabled:boolean,
  initialValue:number,
  range:[number, number]
}
Optional zoom configuration.