Skip to main content
BaseChartOptions
Base options for charts.
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".
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.
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.