Vue Charts: Themes API Reference
This page documents the AG Charts Themes API. You can find more details about AG Charts themes in the Themes section.
Theme Configuration
This object is used to define the configuration for a custom chart theme.
theme: {
baseTheme?: 'default' | 'dark' | 'material' | 'material-dark' | 'pastel' | 'pastel-dark' | 'solar' | 'solar-dark' | 'vivid' | 'vivid-dark'; // default: 'default'
palette?: Palette;
overrides?: Overrides;
}baseThemestring | The name of the theme to base your theme on. Your custom theme will inherit all of the configuration from the base theme, allowing you to override just the settings you wish to change using the defaults config (see below).Default: 'default'Options: 'default', 'dark', 'material', 'material-dark', 'pastel', 'pastel-dark', 'solar', 'solar-dark', 'vivid', 'vivid-dark' | |
palette | The palette to use. If specified, this replaces the palette from the base theme. See palette for more details. | |
overrides | Configuration from this object is merged over the defaults specified in the base theme. See overrides for more details. |
palette
The palette to use. If specified, this replaces the palette from the base theme.
theme: {
...
palette: {
fills?: string[];
strokes?: string[];
}
}fillsstring[] | The array of fills to be used. | |
strokesstring[] | The array of strokes to be used. |
overrides
Configuration from this object is merged over the defaults specified in the base theme.
theme: {
...
overrides: {
common?: IChart;
cartesian?: IChart;
polar?: IChart;
hierarchy?: IChart;
bar?: IChart;
histogram?: IChart;
line?: IChart;
scatter?: IChart;
area?: IChart;
pie?: IChart;
}
}commonIChart | Specifies defaults for all chart types. Be careful to only use properties that apply to all chart types here. For example, don't specify navigator configuration here as navigators are only available in cartesian charts. See Chart Configuration. | |
cartesianIChart | Specifies defaults for all cartesian charts (used for bar, column, histogram, line, scatter and area series). See Chart Configuration. | |
polarIChart | Specifies defaults for all polar charts (used for pie series). See Chart Configuration. | |
hierarchyIChart | Specifies defaults for all hierarchy charts (used for treemap series). See Chart Configuration. | |
barIChart | Specifies defaults for bar/column charts. See Chart Configuration. | |
histogramIChart | Specifies defaults for histogram charts. See Chart Configuration. | |
lineIChart | Specifies defaults for line charts. See Chart Configuration. | |
scatterIChart | Specifies defaults for scatter/bubble charts. See Chart Configuration. | |
areaIChart | Specifies defaults for line charts. See Chart Configuration. | |
pieIChart | Specifies defaults for pie/doughnut charts. See Chart Configuration. |
Chart Configuration
This is the common configuration shared by all types of chart, as used in the overrides object.
chart: {
autoSize?: boolean; // default: true
width?: number;
height?: number;
tooltip?: Tooltip;
padding?: Padding;
background?: Background;
title?: Title;
subtitle?: Subtitle;
legend?: Legend;
navigator?: Navigator;
axes?: Axes;
series?: Series;
}autoSizeboolean | By default, the chart will resize automatically to fill the container element. Set this to false to disable this behaviour. If either the width or height are set, auto-sizing will be disabled unless this is explicitly set to true.Default: true | |
widthnumber | The width of the chart in pixels. Has no effect if autoSize is set to true. | |
heightnumber | The height of the chart in pixels. Has no effect if autoSize is set to true. | |
tooltip | Global configuration that applies to all tooltips in the chart. See tooltip for more details. | |
padding | Configuration for the padding shown around the chart. See padding for more details. | |
background | Configuration for the background shown behind the chart. See background for more details. | |
title | Configuration for the title shown at the top of the chart. See title for more details. | |
subtitle | Configuration for the subtitle shown beneath the chart title. Note: a subtitle will only be shown if a title is also present. See subtitle for more details. | |
legend | Configuration for the chart legend. See legend for more details. | |
navigator | Configuration for the chart navigator. This config is only supported by cartesian charts. See navigator for more details. | |
axes | See axes for more details. | |
series | This object contains configuration for the different series that might be rendered into the chart. For cartesian charts, the following series are supported: 'bar', 'column', 'histogram', 'line', 'scatter', 'area'For polar charts, the following series are supported: 'pie'If the series property is being set inside configuration for a specific type of chart (e.g. line), instead of supplying the whole series object as specified here, for convenience you can put the relevant series configuration object directly into the series property, since all series for a specific chart will be of the same type (e.g. line).See series for more details. |
tooltip
Global configuration that applies to all tooltips in the chart.
chart: {
...
tooltip: {
enabled?: boolean; // default: true
tracking?: boolean; // default: true
class?: string;
delay?: number; // default: 0
}
}enabledboolean | Set to false to disable tooltips for all series in the chart. Default: true | |
trackingboolean | If true, for series with markers the tooltip will be shown to the closest marker. Default: true | |
classstring | A class name to be added to the tooltip element of the chart. | |
delaynumber | The time interval (in milliseconds) after which the tooltip is shown. Default: 0 |
padding
Configuration for the padding shown around the chart.
chart: {
...
padding: {
top?: number; // default: 20
right?: number; // default: 20
bottom?: number; // default: 20
left?: number; // default: 20
}
}topnumber | The number of pixels of padding at the top of the chart area. Default: 20 | |
rightnumber | The number of pixels of padding at the right of the chart area. Default: 20 | |
bottomnumber | The number of pixels of padding at the bottom of the chart area. Default: 20 | |
leftnumber | The number of pixels of padding at the left of the chart area. Default: 20 |
background
Configuration for the background shown behind the chart.
chart: {
...
background: {
fill?: string; // default: '#FFFFFF'
visible?: boolean; // default: true
}
}fillstring | Colour of the chart background. Default: '#FFFFFF' | |
visibleboolean | Whether or not the background should be visible. Default: true |
title
Configuration for the title shown at the top of the chart.
chart: {
...
title: {
enabled?: boolean; // default: true
text?: string; // default: 'Title'
color?: string; // default: '#000000'
fontStyle?: 'normal' | 'italic' | 'oblique'; // default: 'normal'
fontWeight?: 'normal' | 'bold' | 'bolder' | 'lighter' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'; // default: 'bold'
fontSize?: number; // default: 18
fontFamily?: string; // default: 'Verdana, sans-serif'
}
}enabledboolean | Whether or not the title should be shown. Default: true | |
textstring | The text to show in the title. Default: 'Title' | |
colorstring | The colour to use for the title. Default: '#000000' | |
fontStylestring | The font style to use for the title. Default: 'normal'Options: 'normal', 'italic', 'oblique' | |
fontWeightstring | The font weight to use for the title. Default: 'bold'Options: 'normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '700', '800', '900' | |
fontSizenumber | The font size in pixels to use for the title. Default: 18 | |
fontFamilystring | The font family to use for the title. Default: 'Verdana, sans-serif' |
subtitle
Configuration for the subtitle shown beneath the chart title. Note: a subtitle will only be shown if a title is also present.
chart: {
...
subtitle: {
enabled?: boolean; // default: true
text?: string; // default: 'Subtitle'
color?: string; // default: '#000000'
fontStyle?: 'normal' | 'italic' | 'oblique'; // default: 'normal'
fontWeight?: 'normal' | 'bold' | 'bolder' | 'lighter' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'; // default: 'normal'
fontSize?: number; // default: 14
fontFamily?: string; // default: 'Verdana, sans-serif'
}
}enabledboolean | Whether or not the subtitle should be shown. Default: true | |
textstring | The text to show in the subtitle. Default: 'Subtitle' | |
colorstring | The colour to use for the subtitle. Default: '#000000' | |
fontStylestring | The font style to use for the subtitle. Default: 'normal'Options: 'normal', 'italic', 'oblique' | |
fontWeightstring | The font weight to use for the subtitle. Default: 'normal'Options: 'normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '700', '800', '900' | |
fontSizenumber | The font size in pixels to use for the subtitle. Default: 14 | |
fontFamilystring | The font family to use for the subtitle. Default: 'Verdana, sans-serif' |
legend
Configuration for the chart legend.
chart: {
...
legend: {
enabled?: boolean; // default: true
position?: 'top' | 'right' | 'bottom' | 'left'; // default: 'right'
spacing?: number; // default: 20
item?: Item;
}
}enabledboolean | Whether or not to show the legend. Default: true | |
positionstring | Where the legend should show in relation to the chart. Default: 'right'Options: 'top', 'right', 'bottom', 'left' | |
spacingnumber | The spacing in pixels to use outside the legend. Default: 20 | |
item | Configuration for the legend items that consist of a marker and a label. See item for more details. |
item
Configuration for the legend items that consist of a marker and a label.
chart: {
...
legend: {
...
item: {
paddingX?: number; // default: 16
paddingY?: number; // default: 8
marker?: Marker;
label?: Label;
}
}
}paddingXnumber | The horizontal spacing in pixels to use between legend items. Default: 16 | |
paddingYnumber | The vertical spacing in pixels to use between legend items. Default: 8 | |
marker | Configuration for the legend markers. See marker for more details. | |
label | Configuration for the legend labels. See label for more details. |
marker
Configuration for the legend markers.
chart: {
...
legend: {
...
item: {
...
marker: {
padding?: number; // default: 8
shape?: string;
size?: number; // default: 15
strokeWidth?: number; // default: 1
}
}
}
}paddingnumber | The padding in pixels between a legend marker and the corresponding label. Default: 8 | |
shapestring | If set, overrides the marker shape from the series and the legend will show the specified marker shape instead. If not set, will use a marker shape matching the shape from the series, or fall back to 'square' if there is none.Options: 'circle', 'cross', 'diamond', 'plus', 'square', 'triangle' | |
sizenumber | The size in pixels of the markers in the legend. Default: 15 | |
strokeWidthnumber | The width in pixels of the stroke for markers in the legend. Default: 1 |
label
Configuration for the legend labels.
chart: {
...
legend: {
...
item: {
...
label: {
color?: string; // default: 'black'
fontStyle?: 'normal' | 'italic' | 'oblique'; // default: 'normal'
fontWeight?: 'normal' | 'bold' | 'bolder' | 'lighter' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'; // default: 'normal'
fontSize?: number; // default: 12
fontFamily?: string; // default: 'Verdana, sans-serif'
formatter?: Function;
}
}
}
}colorstring | The colour of the text. Default: 'black' | |
fontStylestring | The font style to use for the legend. Default: 'normal'Options: 'normal', 'italic', 'oblique' | |
fontWeightstring | The font weight to use for the legend. Default: 'normal'Options: 'normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '700', '800', '900' | |
fontSizenumber | The font size in pixels to use for the legend. Default: 12 | |
fontFamilystring | The font family to use for the legend. Default: 'Verdana, sans-serif' | |
formatterFunction | Function used to render legend labels. Where id is a series ID, itemId is component ID within a series, such as a field name or an item index. |
navigator
Configuration for the chart navigator. This config is only supported by cartesian charts.
chart: {
...
navigator: {
enabled?: boolean; // default: false
height?: number; // default: 30
min?: number; // default: 0
max?: number; // default: 1
mask?: Mask;
minHandle?: MinHandle;
maxHandle?: MaxHandle;
}
}enabledboolean | Whether or not to show the navigator. Default: false | |
heightnumber | The height of the navigator. Default: 30 | |
minnumber | The start of the visible range in the [0, 1] interval. Default: 0 | |
maxnumber | The end of the visible range in the [0, 1] interval. Default: 1 | |
mask | Configuration for the navigator's visible range mask. See mask for more details. | |
minHandle | Configuration for the navigator's left handle. See minHandle for more details. | |
maxHandle | Configuration for the navigator's right handle. See maxHandle for more details. |
mask
Configuration for the navigator's visible range mask.
chart: {
...
navigator: {
...
mask: {
fill?: string; // default: '#999999'
stroke?: string; // default: '#999999'
strokeWidth?: number; // default: 1
fillOpacity?: number; // default: 0.2
}
}
}fillstring | The fill colour used by the mask. Default: '#999999' | |
strokestring | The stroke colour used by the mask. Default: '#999999' | |
strokeWidthnumber | The stroke width used by the mask. Default: 1 | |
fillOpacitynumber | The opacity of the mask's fill in the [0, 1] interval, where 0 is effectively no masking. Default: 0.2 |
minHandle
Configuration for the navigator's left handle.
chart: {
...
navigator: {
...
minHandle: {
fill?: string; // default: '#f2f2f2'
stroke?: string; // default: '#999999'
strokeWidth?: number; // default: 1
width?: number; // default: 8
height?: number; // default: 16
gripLineLength?: number; // default: 8
gripLineGap?: number; // default: 2
}
}
}fillstring | The fill colour used by the handle. Default: '#f2f2f2' | |
strokestring | The stroke colour used by the handle. Default: '#999999' | |
strokeWidthnumber | The stroke width used by the handle. Default: 1 | |
widthnumber | The width of the handle. Default: 8 | |
heightnumber | The height of the handle. Default: 16 | |
gripLineLengthnumber | The length of the handle's grip lines. Default: 8 | |
gripLineGapnumber | The distance between the handle's grip lines. Default: 2 |
maxHandle
Configuration for the navigator's right handle.
chart: {
...
navigator: {
...
maxHandle: {
fill?: string; // default: '#f2f2f2'
stroke?: string; // default: '#999999'
strokeWidth?: number; // default: 1
width?: number; // default: 8
height?: number; // default: 16
gripLineLength?: number; // default: 8
gripLineGap?: number; // default: 2
}
}
}fillstring | The fill colour used by the handle. Default: '#f2f2f2' | |
strokestring | The stroke colour used by the handle. Default: '#999999' | |
strokeWidthnumber | The stroke width used by the handle. Default: 1 | |
widthnumber | The width of the handle. Default: 8 | |
heightnumber | The height of the handle. Default: 16 | |
gripLineLengthnumber | The length of the handle's grip lines. Default: 8 | |
gripLineGapnumber | The distance between the handle's grip lines. Default: 2 |
axes
chart: {
...
axes: {
number?: INumberAxis;
log?: ILogAxis;
category?: ICategoryAxis;
groupedCategory?: IGroupedCategoryAxis;
time?: ITimeCategoryAxis;
}
}number | This extends the common axis configuration with options specific to number axes. See number for more details. | |
log | This extends the common axis configuration with options specific to number axes. See log for more details. | |
category | This extends the common axis configuration with options specific to category axes. See category for more details. | |
groupedCategory | This extends the common axis configuration with options specific to grouped category axes. Currently there are no additional options beyond the common configuration. See groupedCategory for more details. | |
time | This extends the common axis configuration with options specific to time axes. See time for more details. |
number
This extends the common axis configuration with options specific to number axes.
chart: {
...
axes: {
...
number: {
nice?: boolean; // default: true
min?: number;
max?: number;
}
}
}niceboolean | If true, the axis will adjust to align the left and right edge of the chart with a tick. Otherwise, the axis will be the minimum required width to show all the data.Default: true | |
minnumber | The minimum value for the axis. | |
maxnumber | The maximum value for the axis. |
log
This extends the common axis configuration with options specific to number axes.
chart: {
...
axes: {
...
log: {
nice?: boolean; // default: true
min?: number;
max?: number;
base?: number; // default: 10
}
}
}niceboolean | If true, the axis will adjust to align the left and right edge of the chart with a tick. Otherwise, the axis will be the minimum required width to show all the data.Default: true | |
minnumber | The minimum value for the axis. | |
maxnumber | The maximum value for the axis. | |
basenumber | The logarithm base. For example, 10 for the common logarithm, Math.E for the natural logarithm, and so on. Default: 10 |
category
This extends the common axis configuration with options specific to category axes.
chart: {
...
axes: {
...
category: {
paddingInner?: number;
paddingOuter?: number;
}
}
}paddingInnernumber | The padding between the category label and the line. | |
paddingOuternumber | The padding between lines for neighbouring categories. |
time
This extends the common axis configuration with options specific to time axes.
chart: {
...
axes: {
...
time: {
nice?: boolean; // default: true
}
}
}niceboolean | If true, the axis will adjust to align the left and right edge of the chart with a tick. Otherwise, the axis will be the minimum required width to show all the data.Default: true |
series
This object contains configuration for the different series that might be rendered into the chart.
For cartesian charts, the following series are supported: 'bar', 'column', 'histogram', 'line', 'scatter', 'area'
For polar charts, the following series are supported: 'pie'
If the series property is being set inside configuration for a specific type of chart (e.g. line), instead of supplying the whole series object as specified here, for convenience you can put the relevant series configuration object directly into the series property, since all series for a specific chart will be of the same type (e.g. line).
chart: {
...
series: {
bar?: IBarColumnSeries;
column?: IBarColumnSeries;
histogram?: IHistogramSeries;
line?: ILineSeries;
area?: IAreaSeries;
scatter?: IScatterSeries;
pie?: IPieSeries;
}
}bar | Configuration for bar series. See bar for more details. | |
columnIBarColumnSeries | Configuration for column series. The configuration is the same shape as for bar series. See Bar/Column Series Configuration. | |
histogram | Configuration for histogram series. See histogram for more details. | |
line | Configuration for line series. See line for more details. | |
area | Configuration for area series. See area for more details. | |
scatter | Configuration for scatter/bubble series. See scatter for more details. | |
pie | Configuration for pie/doughnut series. See pie for more details. |
bar
Configuration for bar series.
chart: {
...
series: {
...
bar: {
tooltip?: Tooltip;
grouped?: boolean; // default: false
normalizedTo?: number;
fills?: string[]; // default: ['#f3622d', '#fba71b', '#57b757', '#41a9c9', '#4258c9', '#9a42c8', '#c84164', '#888888']
fillOpacity?: number; // default: 1
strokes?: string[]; // default: ['#aa4520', '#b07513', '#3d803d', '#2d768d', '#2e3e8d', '#6c2e8c', '#8c2d46', '#5f5f5f']
strokeOpacity?: number; // default: 1
strokeWidth?: number; // default: 1
lineDash?: number[]; // default: []
lineDashOffset?: number; // default: 0
highlightStyle?: HighlightStyle;
shadow?: Shadow;
label?: Label;
}
}
}tooltip | Series-specific tooltip configuration. See tooltip for more details. | |
groupedboolean | Whether to show different y-values as separate bars (grouped) or not (stacked). Default: false | |
normalizedTonumber | The number to normalise the bar stacks to. Has no effect when grouped is true. For example, if normalizedTo is set to 100, the bar stacks will all be scaled proportionally so that each of their totals is 100. | |
fillsstring[] | The colours to cycle through for the fills of the bars. Default: ['#f3622d', '#fba71b', '#57b757', '#41a9c9', '#4258c9', '#9a42c8', '#c84164', '#888888'] | |
fillOpacitynumber | The opacity of the fill for the bars. Default: 1 | |
strokesstring[] | The colours to cycle through for the strokes of the bars. Default: ['#aa4520', '#b07513', '#3d803d', '#2d768d', '#2e3e8d', '#6c2e8c', '#8c2d46', '#5f5f5f'] | |
strokeOpacitynumber | The opacity of the stroke for the bars. Default: 1 | |
strokeWidthnumber | The width in pixels of the stroke for the bars. Default: 1 | |
lineDashnumber[] | Defines how the bar strokes are rendered. Every number in the array specifies the length in pixels of alternating dashes and gaps. For example, [6, 3] means dashes with a length of 6 pixels with gaps between of 3 pixels.Default: [] | |
lineDashOffsetnumber | The initial offset of the dashed lines in pixels. Default: 0 | |
highlightStyle | Configuration for the highlighting used when the bars are hovered over. See highlightStyle for more details. | |
shadow | Configuration for the shadow used behind the chart series. See shadow for more details. | |
label | Configuration for the labels shown on bars. See label for more details. |
tooltip
Series-specific tooltip configuration.
chart: {
...
series: {
...
bar: {
...
tooltip: {
enabled?: boolean; // default: true
renderer?: Function;
}
}
}
}enabledboolean | Whether or not to show tooltips when the series are hovered over. Default: true | |
rendererFunction | Function used to create the content for tooltips. |
highlightStyle
Configuration for the highlighting used when the bars are hovered over.
chart: {
...
series: {
...
bar: {
...
highlightStyle: {
fill?: string; // default: 'yellow'
stroke?: string;
}
}
}
}fillstring | The fill colour of the bars when hovered over. Use undefined for no highlight.Default: 'yellow' | |
strokestring | The colour of the stroke around the bars when hovered over. Use undefined for no highlight. |
shadow
Configuration for the shadow used behind the chart series.
chart: {
...
series: {
...
bar: {
...
shadow: {
enabled?: boolean; // default: true
color?: string; // default: 'rgba(0, 0, 0, 0.5)'
xOffset?: number; // default: 0
yOffset?: number; // default: 0
blur?: number; // default: 5
}
}
}
}enabledboolean | Whether or not the shadow is visible. Default: true | |
colorstring | The colour of the shadow. Default: 'rgba(0, 0, 0, 0.5)' | |
xOffsetnumber | The horizontal offset in pixels for the shadow. Default: 0 | |
yOffsetnumber | The vertical offset in pixels for the shadow. Default: 0 | |
blurnumber | The radius of the shadow's blur, given in pixels. Default: 5 |
label
Configuration for the labels shown on bars.
chart: {
...
series: {
...
bar: {
...
label: {
enabled?: boolean; // default: true
placement?: 'inside' | 'outside'; // default: 'inside'
color?: string; // default: 'rgba(70, 70, 70, 1)'
fontStyle?: 'normal' | 'italic' | 'oblique'; // default: 'normal'
fontWeight?: 'normal' | 'bold' | 'bolder' | 'lighter' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'; // default: 'normal'
fontSize?: number; // default: 12
fontFamily?: string; // default: 'Verdana, sans-serif'
}
}
}
}enabledboolean | Whether or not the labels should be shown. Default: true | |
placementstring | Where to render series labels relative to the segments. Default: 'inside'Options: 'inside', 'outside' | |
colorstring | The colour to use for the labels. Default: 'rgba(70, 70, 70, 1)' | |
fontStylestring | The font style to use for the labels. Default: 'normal'Options: 'normal', 'italic', 'oblique' | |
fontWeightstring | The font weight to use for the labels. Default: 'normal'Options: 'normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '700', '800', '900' | |
fontSizenumber | The font size in pixels to use for the labels. Default: 12 | |
fontFamilystring | The font family to use for the labels. Default: 'Verdana, sans-serif' |
histogram
Configuration for histogram series.
chart: {
...
series: {
...
histogram: {
tooltip?: Tooltip;
binCount?: number;
bins?: number[][];
aggregation?: string; // default: 'sum'
areaPlot?: boolean; // default: 'false'
lineDash?: number[]; // default: []
lineDashOffset?: number; // default: 0
highlightStyle?: HighlightStyle;
fill?: string; // default: '#f3622d'
fillOpacity?: number; // default: 1
stroke?: string; // default: '#aa4520'
strokeOpacity?: number; // default: 1
strokeWidth?: number; // default: 1
}
}
}tooltip | Series-specific tooltip configuration. See tooltip for more details. | |
binCountnumber | The number of bins to try to split the x axis into. Clashes with the bins setting. | |
binsnumber[][] | Set the bins explicitly. The bins need not be of equal width. Clashes with the binCount setting. | |
aggregationstring | Dictates how the bins are aggregated. If set to 'sum', the value shown for the bins will be the total of the yKey values. If set to 'mean', it will display the average yKey value of the bin Default: 'sum'Options: 'sum', 'mean' | |
areaPlotboolean | For variable width bins, if true the histogram will represent the aggregated yKey values using the area of the bar. Otherwise, the height of the var represents the value as per a normal bar chart. This is useful for keeping an undistorted curve displayed when using variable-width binsDefault: 'false' | |
lineDashnumber[] | Defines how the histogram strokes are rendered. Every number in the array specifies the length in pixels of alternating dashes and gaps. For example, [6, 3] means dashes with a length of 6 pixels with gaps between of 3 pixels.Default: [] | |
lineDashOffsetnumber | The initial offset of the dashed lines in pixels. Default: 0 | |
highlightStyle | Configuration for the highlighting used when the bars are hovered over. See highlightStyle for more details. | |
fillstring | The colour of the fill for the histogram bars. Default: '#f3622d' | |
fillOpacitynumber | The opacity of the fill for the histogram bars. Default: 1 | |
strokestring | The colour of the stroke for the histogram bars. Default: '#aa4520' | |
strokeOpacitynumber | The opacity of the stroke for the histogram bars. Default: 1 | |
strokeWidthnumber | The width in pixels of the stroke for the histogram bars. Default: 1 |
tooltip
Series-specific tooltip configuration.
chart: {
...
series: {
...
histogram: {
...
tooltip: {
enabled?: boolean; // default: true
renderer?: Function;
}
}
}
}enabledboolean | Whether or not to show tooltips when the series are hovered over. Default: true | |
rendererFunction | Function used to create the content for tooltips. |
highlightStyle
Configuration for the highlighting used when the bars are hovered over.
chart: {
...
series: {
...
histogram: {
...
highlightStyle: {
fill?: string; // default: 'yellow'
stroke?: string;
}
}
}
}fillstring | The fill colour of the bars when hovered over. Use undefined for no highlight.Default: 'yellow' | |
strokestring | The colour of the stroke around the bars when hovered over. Use undefined for no highlight. |
line
Configuration for line series.
chart: {
...
series: {
...
line: {
tooltip?: Tooltip;
title?: string;
stroke?: string; // default: '#aa4520'
strokeOpacity?: number; // default: 1
strokeWidth?: number; // default: 1
marker?: Marker;
label?: Label;
lineDash?: number[]; // default: []
lineDashOffset?: number; // default: 0
highlightStyle?: HighlightStyle;
}
}
}tooltip | Series-specific tooltip configuration. See tooltip for more details. | |
titlestring | The title to use for the series. Defaults to yName if it exists, or yKey if not. | |
strokestring | The colour of the stroke for the lines. Default: '#aa4520' | |
strokeOpacitynumber | The opacity of the stroke for the lines. Default: 1 | |
strokeWidthnumber | The width in pixels of the stroke for the lines. Default: 1 | |
marker | Configuration for the markers used in the series. See marker for more details. | |
label | Configuration for the labels shown on top of data points. See label for more details. | |
lineDashnumber[] | Defines how the line strokes are rendered. Every number in the array specifies the length in pixels of alternating dashes and gaps. For example, [6, 3] means dashes with a length of 6 pixels with gaps between of 3 pixels.Default: [] | |
lineDashOffsetnumber | The initial offset of the dashed lines in pixels. Default: 0 | |
highlightStyle | Configuration for the highlighting used when the markers are hovered over. See highlightStyle for more details. |
tooltip
Series-specific tooltip configuration.
chart: {
...
series: {
...
line: {
...
tooltip: {
enabled?: boolean; // default: true
renderer?: Function;
}
}
}
}enabledboolean | Whether or not to show tooltips when the series are hovered over. Default: true | |
rendererFunction | Function used to create the content for tooltips. |
marker
Configuration for the markers used in the series.
chart: {
...
series: {
...
line: {
...
marker: {
enabled?: boolean; // default: true
shape?: string | Marker; // default: 'circle'
size?: number; // default: 8
minSize?: number; // default: 12
fill?: string;
stroke?: string;
strokeWidth?: number;
formatter?: Function;
}
}
}
}enabledboolean | Whether or not to show markers. Default: true | |
shapestring | Marker | The shape to use for the markers. You can also supply a custom marker by providing a Marker subclass.Default: 'circle'Options: 'circle', 'cross', 'diamond', 'plus', 'square', 'triangle' | |
sizenumber | The size in pixels of the markers. Default: 8 | |
minSizenumber | For series where the size of the marker is determined by the data, this determines the smallest size a marker can be in pixels. Default: 12 | |
fillstring | The colour to use for marker fills. If this is not specified, the markers will take their fill from the series. | |
strokestring | The colour to use for marker strokes. If this is not specified, the markers will take their stroke from the series. | |
strokeWidthnumber | The width in pixels of the marker stroke. If this is not specified, the markers will take their stroke width from the series. | |
formatterFunction | Function used to return formatting for individual markers, based on the supplied information. If the current marker is highlighted, the highlighted property will be set to true; make sure to check this if you want to differentiate between the highlighted and un-highlighted states. |
label
Configuration for the labels shown on top of data points.
chart: {
...
series: {
...
line: {
...
label: {
enabled?: boolean; // default: true
color?: string; // default: 'rgba(70, 70, 70, 1)'
fontStyle?: 'normal' | 'italic' | 'oblique'; // default: 'normal'
fontWeight?: 'normal' | 'bold' | 'bolder' | 'lighter' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'; // default: 'normal'
fontSize?: number; // default: 12
fontFamily?: string; // default: 'Verdana, sans-serif'
formatter?: Function;
}
}
}
}enabledboolean | Whether or not the labels should be shown. Default: true | |
colorstring | The colour to use for the labels. Default: 'rgba(70, 70, 70, 1)' | |
fontStylestring | The font style to use for the labels. Default: 'normal'Options: 'normal', 'italic', 'oblique' | |
fontWeightstring | The font weight to use for the labels. Default: 'normal'Options: 'normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '700', '800', '900' | |
fontSizenumber | The font size in pixels to use for the labels. Default: 12 | |
fontFamilystring | The font family to use for the labels. Default: 'Verdana, sans-serif' | |
formatterFunction | Function used to turn 'yKey' values into text to be displayed by a label. Be default the values are simply stringified. |
highlightStyle
Configuration for the highlighting used when the markers are hovered over.
chart: {
...
series: {
...
line: {
...
highlightStyle: {
fill?: string; // default: 'yellow'
stroke?: string;
}
}
}
}fillstring | The fill colour of the markers when hovered over. Use undefined for no highlight.Default: 'yellow' | |
strokestring | The colour of the stroke around the markers when hovered over. Use undefined for no highlight. |
area
Configuration for area series.
chart: {
...
series: {
...
area: {
tooltip?: Tooltip;
normalizedTo?: number;
fills?: string[]; // default: ['#f3622d', '#fba71b', '#57b757', '#41a9c9', '#4258c9', '#9a42c8', '#c84164', '#888888']
fillOpacity?: number; // default: 1
strokes?: string[]; // default: ['#aa4520', '#b07513', '#3d803d', '#2d768d', '#2e3e8d', '#6c2e8c', '#8c2d46', '#5f5f5f']
strokeOpacity?: number; // default: 1
strokeWidth?: number; // default: 1
lineDash?: number[]; // default: []
lineDashOffset?: number; // default: 0
marker?: Marker;
label?: Label;
highlightStyle?: HighlightStyle;
shadow?: Shadow;
}
}
}tooltip | Series-specific tooltip configuration. See tooltip for more details. | |
normalizedTonumber | The number to normalise the area stacks to. For example, if normalizedTo is set to 100, the stacks will all be scaled proportionally so that their total height is always 100. | |
fillsstring[] | The colours to cycle through for the fills of the areas. Default: ['#f3622d', '#fba71b', '#57b757', '#41a9c9', '#4258c9', '#9a42c8', '#c84164', '#888888'] | |
fillOpacitynumber | The opacity of the fill for the areas. Default: 1 | |
strokesstring[] | The colours to cycle through for the strokes of the areas. Default: ['#aa4520', '#b07513', '#3d803d', '#2d768d', '#2e3e8d', '#6c2e8c', '#8c2d46', '#5f5f5f'] | |
strokeOpacitynumber | The opacity of the stroke for the areas. Default: 1 | |
strokeWidthnumber | The width in pixels of the stroke for the areas. Default: 1 | |
lineDashnumber[] | Defines how the area strokes are rendered. Every number in the array specifies the length in pixels of alternating dashes and gaps. For example, [6, 3] means dashes with a length of 6 pixels with gaps between of 3 pixels.Default: [] | |
lineDashOffsetnumber | The initial offset of the dashed lines in pixels. Default: 0 | |
marker | Configuration for the markers used in the series. See marker for more details. | |
label | Configuration for the labels shown on top of data points. See label for more details. | |
highlightStyle | Configuration for the highlighting used when the markers are hovered over. See highlightStyle for more details. | |
shadow | Configuration for the shadow used behind the chart series. See shadow for more details. |
tooltip
Series-specific tooltip configuration.
chart: {
...
series: {
...
area: {
...
tooltip: {
enabled?: boolean; // default: true
renderer?: Function;
}
}
}
}enabledboolean | Whether or not to show tooltips when the series are hovered over. Default: true | |
rendererFunction | Function used to create the content for tooltips. |
marker
Configuration for the markers used in the series.
chart: {
...
series: {
...
area: {
...
marker: {
enabled?: boolean; // default: false
shape?: string | Marker; // default: 'circle'
size?: number; // default: 8
minSize?: number; // default: 12
fill?: string;
stroke?: string;
strokeWidth?: number;
formatter?: Function;
}
}
}
}enabledboolean | Whether or not to show markers. Default: false | |
shapestring | Marker | The shape to use for the markers. You can also supply a custom marker by providing a Marker subclass.Default: 'circle'Options: 'circle', 'cross', 'diamond', 'plus', 'square', 'triangle' | |
sizenumber | The size in pixels of the markers. Default: 8 | |
minSizenumber | For series where the size of the marker is determined by the data, this determines the smallest size a marker can be in pixels. Default: 12 | |
fillstring | The colour to use for marker fills. If this is not specified, the markers will take their fill from the series. | |
strokestring | The colour to use for marker strokes. If this is not specified, the markers will take their stroke from the series. | |
strokeWidthnumber | The width in pixels of the marker stroke. If this is not specified, the markers will take their stroke width from the series. | |
formatterFunction | Function used to return formatting for individual markers, based on the supplied information. If the current marker is highlighted, the highlighted property will be set to true; make sure to check this if you want to differentiate between the highlighted and un-highlighted states. |
label
Configuration for the labels shown on top of data points.
chart: {
...
series: {
...
area: {
...
label: {
enabled?: boolean; // default: true
color?: string; // default: 'rgba(70, 70, 70, 1)'
fontStyle?: 'normal' | 'italic' | 'oblique'; // default: 'normal'
fontWeight?: 'normal' | 'bold' | 'bolder' | 'lighter' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'; // default: 'normal'
fontSize?: number; // default: 12
fontFamily?: string; // default: 'Verdana, sans-serif'
formatter?: Function;
}
}
}
}enabledboolean | Whether or not the labels should be shown. Default: true | |
colorstring | The colour to use for the labels. Default: 'rgba(70, 70, 70, 1)' | |
fontStylestring | The font style to use for the labels. Default: 'normal'Options: 'normal', 'italic', 'oblique' | |
fontWeightstring | The font weight to use for the labels. Default: 'normal'Options: 'normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '700', '800', '900' | |
fontSizenumber | The font size in pixels to use for the labels. Default: 12 | |
fontFamilystring | The font family to use for the labels. Default: 'Verdana, sans-serif' | |
formatterFunction | Function used to turn 'yKey' values into text to be displayed by a label. Be default the values are simply stringified. |
highlightStyle
Configuration for the highlighting used when the markers are hovered over.
chart: {
...
series: {
...
area: {
...
highlightStyle: {
fill?: string; // default: 'yellow'
stroke?: string;
}
}
}
}fillstring | The fill colour of the markers when hovered over. Use undefined for no highlight.Default: 'yellow' | |
strokestring | The colour of the stroke around the markers when hovered over. Use undefined for no highlight. |
shadow
Configuration for the shadow used behind the chart series.
chart: {
...
series: {
...
area: {
...
shadow: {
enabled?: boolean; // default: true
color?: string; // default: 'rgba(0, 0, 0, 0.5)'
xOffset?: number; // default: 0
yOffset?: number; // default: 0
blur?: number; // default: 5
}
}
}
}enabledboolean | Whether or not the shadow is visible. Default: true | |
colorstring | The colour of the shadow. Default: 'rgba(0, 0, 0, 0.5)' | |
xOffsetnumber | The horizontal offset in pixels for the shadow. Default: 0 | |
yOffsetnumber | The vertical offset in pixels for the shadow. Default: 0 | |
blurnumber | The radius of the shadow's blur, given in pixels. Default: 5 |
scatter
Configuration for scatter/bubble series.
chart: {
...
series: {
...
scatter: {
tooltip?: Tooltip;
title?: string;
fill?: string; // default: '#f3622d'
fillOpacity?: number; // default: 1
stroke?: string; // default: '#aa4520'
strokeOpacity?: number; // default: 1
strokeWidth?: number; // default: 1
marker?: Marker;
label?: Label;
highlightStyle?: HighlightStyle;
}
}
}tooltip | Series-specific tooltip configuration. See tooltip for more details. | |
titlestring | The title to use for the series. Defaults to yName if it exists, or yKey if not. | |
fillstring | The colour of the fill for the markers. Default: '#f3622d' | |
fillOpacitynumber | The opacity of the fill for the markers. Default: 1 | |
strokestring | The colour of the stroke for the markers. Default: '#aa4520' | |
strokeOpacitynumber | The opacity of the stroke for the markers. Default: 1 | |
strokeWidthnumber | The width in pixels of the stroke for the markers. Default: 1 | |
marker | Configuration for the markers used in the series. See marker for more details. | |
label | Configuration for the labels shown on top of data points. See label for more details. | |
highlightStyle | Configuration for the highlighting used when the markers are hovered over. See highlightStyle for more details. |
tooltip
Series-specific tooltip configuration.
chart: {
...
series: {
...
scatter: {
...
tooltip: {
enabled?: boolean; // default: true
renderer?: Function;
}
}
}
}enabledboolean | Whether or not to show tooltips when the series are hovered over. Default: true | |
rendererFunction | Function used to create the content for tooltips. |
marker
Configuration for the markers used in the series.
chart: {
...
series: {
...
scatter: {
...
marker: {
enabled?: boolean; // default: true
shape?: string | Marker; // default: 'circle'
size?: number; // default: 8
minSize?: number; // default: 12
fill?: string;
stroke?: string;
strokeWidth?: number;
formatter?: Function;
}
}
}
}enabledboolean | Whether or not to show markers. Default: true | |
shapestring | Marker | The shape to use for the markers. You can also supply a custom marker by providing a Marker subclass.Default: 'circle'Options: 'circle', 'cross', 'diamond', 'plus', 'square', 'triangle' | |
sizenumber | The size in pixels of the markers. Default: 8 | |
minSizenumber | For series where the size of the marker is determined by the data, this determines the smallest size a marker can be in pixels. Default: 12 | |
fillstring | The colour to use for marker fills. If this is not specified, the markers will take their fill from the series. | |
strokestring | The colour to use for marker strokes. If this is not specified, the markers will take their stroke from the series. | |
strokeWidthnumber | The width in pixels of the marker stroke. If this is not specified, the markers will take their stroke width from the series. | |
formatterFunction | Function used to return formatting for individual markers, based on the supplied information. If the current marker is highlighted, the highlighted property will be set to true; make sure to check this if you want to differentiate between the highlighted and un-highlighted states. |
label
Configuration for the labels shown on top of data points.
chart: {
...
series: {
...
scatter: {
...
label: {
enabled?: boolean; // default: true
color?: string; // default: 'rgba(70, 70, 70, 1)'
fontStyle?: 'normal' | 'italic' | 'oblique'; // default: 'normal'
fontWeight?: 'normal' | 'bold' | 'bolder' | 'lighter' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'; // default: 'normal'
fontSize?: number; // default: 12
fontFamily?: string; // default: 'Verdana, sans-serif'
}
}
}
}enabledboolean | Whether or not the labels should be shown. Note: unlike other series where a label is shown for every data point, a scatter series label is only shown if it satisfies the following constraints: it doesn't overlap any markers, it doesn't overlap other labels. Default: true | |
colorstring | The colour to use for the labels. Default: 'rgba(70, 70, 70, 1)' | |
fontStylestring | The font style to use for the labels. Default: 'normal'Options: 'normal', 'italic', 'oblique' | |
fontWeightstring | The font weight to use for the labels. Default: 'normal'Options: 'normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '700', '800', '900' | |
fontSizenumber | The font size in pixels to use for the labels. Default: 12 | |
fontFamilystring | The font family to use for the labels. Default: 'Verdana, sans-serif' |
highlightStyle
Configuration for the highlighting used when the markers are hovered over.
chart: {
...
series: {
...
scatter: {
...
highlightStyle: {
fill?: string; // default: 'yellow'
stroke?: string;
}
}
}
}fillstring | The fill colour of the markers when hovered over. Use undefined for no highlight.Default: 'yellow' | |
strokestring | The colour of the stroke around the markers when hovered over. Use undefined for no highlight. |
pie
Configuration for pie/doughnut series.
chart: {
...
series: {
...
pie: {
tooltip?: Tooltip;
rotation?: number; // default: 0
innerRadiusOffset?: number; // default: 0
outerRadiusOffset?: number; // default: 0
title?: Title;
fills?: string[]; // default: ['#f3622d', '#fba71b', '#57b757', '#41a9c9', '#4258c9', '#9a42c8', '#c84164', '#888888']
fillOpacity?: number; // default: 1
strokes?: string[]; // default: ['#aa4520', '#b07513', '#3d803d', '#2d768d', '#2e3e8d', '#6c2e8c', '#8c2d46', '#5f5f5f']
strokeOpacity?: number; // default: 1
strokeWidth?: number; // default: 1
lineDash?: number[]; // default: []
lineDashOffset?: number; // default: 0
highlightStyle?: HighlightStyle;
label?: Label;
callout?: Callout;
shadow?: Shadow;
}
}
}tooltip | Series-specific tooltip configuration. See tooltip for more details. | |
rotationnumber | The rotation of the pie series in degrees. Default: 0 | |
innerRadiusOffsetnumber | The offset in pixels of the inner radius of the series. Used to construct doughnut charts. If this is not given, or a value of zero is given, a pie chart will be rendered. Default: 0 | |
outerRadiusOffsetnumber | The offset in pixels of the outer radius of the series. Used to construct doughnut charts. Default: 0 | |
title | Configuration for the series title. See title for more details. | |
fillsstring[] | The colours to cycle through for the fills of the segments. Default: ['#f3622d', '#fba71b', '#57b757', '#41a9c9', '#4258c9', '#9a42c8', '#c84164', '#888888'] | |
fillOpacitynumber | The opacity of the fill for the segments. Default: 1 | |
strokesstring[] | The colours to cycle through for the strokes of the segments. Default: ['#aa4520', '#b07513', '#3d803d', '#2d768d', '#2e3e8d', '#6c2e8c', '#8c2d46', '#5f5f5f'] | |
strokeOpacitynumber | The opacity of the stroke for the segments. Default: 1 | |
strokeWidthnumber | The width in pixels of the stroke for the segments. Default: 1 | |
lineDashnumber[] | Defines how the pie strokes are rendered. Every number in the array specifies the length in pixels of alternating dashes and gaps. For example, [6, 3] means dashes with a length of 6 pixels with gaps between of 3 pixels.Default: [] | |
lineDashOffsetnumber | The initial offset of the dashed lines in pixels. Default: 0 | |
highlightStyle | Configuration for the highlighting used when the segments are hovered over. See highlightStyle for more details. | |
label | Configuration for the labels used for the segments. See label for more details. | |
callout | Configuration for the callouts used with the labels for the segments. See callout for more details. | |
shadow | Configuration for the shadow used behind the chart series. See shadow for more details. |
tooltip
Series-specific tooltip configuration.
chart: {
...
series: {
...
pie: {
...
tooltip: {
enabled?: boolean; // default: true
renderer?: Function;
}
}
}
}enabledboolean | Whether or not to show tooltips when the series are hovered over. Default: true | |
rendererFunction | Function used to create the content for tooltips. |
title
Configuration for the series title.
chart: {
...
series: {
...
pie: {
...
title: {
enabled?: boolean; // default: true
text?: string;
color?: string; // default: '#000000'
fontStyle?: 'normal' | 'italic' | 'oblique'; // default: 'normal'
fontWeight?: 'normal' | 'bold' | 'bolder' | 'lighter' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'; // default: 'normal'
fontSize?: number; // default: 10
fontFamily?: string; // default: 'Verdana, sans-serif'
}
}
}
}enabledboolean | Whether or not the title should be shown. Default: true | |
textstring | The text to show in the title. | |
colorstring | The colour to use for the title. Default: '#000000' | |
fontStylestring | The font style to use for the title. Default: 'normal'Options: 'normal', 'italic', 'oblique' | |
fontWeightstring | The font weight to use for the title. Default: 'normal'Options: 'normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '700', '800', '900' | |
fontSizenumber | The font size in pixels to use for the title. Default: 10 | |
fontFamilystring | The font family to use for the title. Default: 'Verdana, sans-serif' |
highlightStyle
Configuration for the highlighting used when the segments are hovered over.
chart: {
...
series: {
...
pie: {
...
highlightStyle: {
fill?: string; // default: 'yellow'
stroke?: string;
}
}
}
}fillstring | The fill colour of the segments when hovered over. Use undefined for no highlight.Default: 'yellow' | |
strokestring | The colour of the stroke around the segments when hovered over. Use undefined for no highlight. |
label
Configuration for the labels used for the segments.
chart: {
...
series: {
...
pie: {
...
label: {
enabled?: boolean; // default: true
color?: string; // default: '#000000'
fontStyle?: 'normal' | 'italic' | 'oblique'; // default: 'normal'
fontWeight?: 'normal' | 'bold' | 'bolder' | 'lighter' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'; // default: 'normal'
fontSize?: number; // default: 12
fontFamily?: string; // default: 'Verdana, sans-serif'
offset?: number; // default: 3
minAngle?: number; // default: 20
formatter?: Function;
}
}
}
}enabledboolean | Whether or not the labels should be shown. Default: true | |
colorstring | The colour to use for the labels. Default: '#000000' | |
fontStylestring | The font style to use for the labels. Default: 'normal'Options: 'normal', 'italic', 'oblique' | |
fontWeightstring | The font weight to use for the labels. Default: 'normal'Options: 'normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '700', '800', '900' | |
fontSizenumber | The font size in pixels to use for the labels. Default: 12 | |
fontFamilystring | The font family to use for the labels. Default: 'Verdana, sans-serif' | |
offsetnumber | Distance in pixels between the callout line and the label text. Default: 3 | |
minAnglenumber | Minimum angle in degrees required for a segment to show a label. Default: 20 | |
formatterFunction | Function used to turn 'labelKey' values into text to be displayed next to each pie sector. Be default the values are simply stringified. |
callout
Configuration for the callouts used with the labels for the segments.
chart: {
...
series: {
...
pie: {
...
callout: {
colors?: string[]; // default: ['#aa4520', '#b07513', '#3d803d', '#2d768d', '#2e3e8d', '#6c2e8c', '#8c2d46', '#5f5f5f']
strokeWidth?: number; // default: 1
length?: number; // default: 10
}
}
}
}colorsstring[] | The colours to cycle through for the strokes of the callouts. Default: ['#aa4520', '#b07513', '#3d803d', '#2d768d', '#2e3e8d', '#6c2e8c', '#8c2d46', '#5f5f5f'] | |
strokeWidthnumber | The width in pixels of the stroke for callout lines. Default: 1 | |
lengthnumber | The length in pixels of the callout lines. Default: 10 |
shadow
Configuration for the shadow used behind the chart series.
chart: {
...
series: {
...
pie: {
...
shadow: {
enabled?: boolean; // default: true
color?: string; // default: 'rgba(0, 0, 0, 0.5)'
xOffset?: number; // default: 0
yOffset?: number; // default: 0
blur?: number; // default: 5
}
}
}
}enabledboolean | Whether or not the shadow is visible. Default: true | |
colorstring | The colour of the shadow. Default: 'rgba(0, 0, 0, 0.5)' | |
xOffsetnumber | The horizontal offset in pixels for the shadow. Default: 0 | |
yOffsetnumber | The vertical offset in pixels for the shadow. Default: 0 | |
blurnumber | The radius of the shadow's blur, given in pixels. Default: 5 |
Common Axis Configuration
This is the configuration shared by all types of axis.
axis: {
top?: Top;
right?: Right;
bottom?: Bottom;
left?: Left;
thickness?: number; // default: 0
nice?: boolean; // default: true
min?: number;
max?: number;
title?: Title;
line?: Line;
tick?: Tick;
label?: Label;
gridStyle?: GridStyle;
}top | An object with axis theme overrides for the top positioned axes. Same configs apply here as one level above. For example, to rotate labels by 45 degrees in 'top' positioned axes one can use top: { label: { rotation: 45 } } }.See top for more details. | |
right | An object with axis theme overrides for the right positioned axes. Same configs apply here as one level above.See right for more details. | |
bottom | An object with axis theme overrides for the bottom positioned axes. Same configs apply here as one level above.See bottom for more details. | |
left | An object with axis theme overrides for the left positioned axes. Same configs apply here as one level above.See left for more details. | |
thicknessnumber | If set to a non-zero value, the axis will have the specified thickness regardless of label size. Default: 0 | |
niceboolean | If 'true', the range will be rounded up to ensure nice equal spacing between the ticks. Applies to continuous axes only ('number', 'time'). Default: true | |
minnumber | User override for the automatically determinted min value (based on series data). Only applied to "number" axes. | |
maxnumber | User override for the automatically determinted max value (based on series data). Only applied to "number" axes. | |
title | Configuration for the title shown next to the axis. See title for more details. | |
line | Configuration for the axis line. See line for more details. | |
tick | Configuration for the axis ticks. See tick for more details. | |
label | Configuration for the axis labels, shown next to the ticks. See label for more details. | |
gridStyle | Configuration of the lines used to form the grid in the chart area. See gridStyle for more details. |
title
Configuration for the title shown next to the axis.
axis: {
...
title: {
enabled?: boolean; // default: true
text?: string; // default: 'Axis Title'
color?: string; // default: '#000000'
fontStyle?: 'normal' | 'italic' | 'oblique'; // default: 'normal'
fontWeight?: 'normal' | 'bold' | 'bolder' | 'lighter' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'; // default: 'bold'
fontSize?: number; // default: 14
fontFamily?: string; // default: 'Verdana, sans-serif'
}
}enabledboolean | Whether or not the axis title should be shown. Default: true | |
textstring | The text to show in the axis title. Default: 'Axis Title' | |
colorstring | The colour to use for the axis title. Default: '#000000' | |
fontStylestring | The font style to use for the axis title. Default: 'normal'Options: 'normal', 'italic', 'oblique' | |
fontWeightstring | The font weight to use for the axis title. Default: 'bold'Options: 'normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '700', '800', '900' | |
fontSizenumber | The font size in pixels to use for the axis title. Default: 14 | |
fontFamilystring | The font family to use for the axis title. Default: 'Verdana, sans-serif' |
line
Configuration for the axis line.
axis: {
...
line: {
width?: number; // default: 1
color?: string; // default: 'rgba(195, 195, 195, 1)'
}
}widthnumber | The width in pixels of the axis line. Default: 1 | |
colorstring | The colour of the axis line. Default: 'rgba(195, 195, 195, 1)' |
tick
Configuration for the axis ticks.
axis: {
...
tick: {
width?: number; // default: 1
size?: number; // default: 6
color?: string; // default: 'rgba(195, 195, 195, 1)'
count?: number; // default: 10
}
}widthnumber | The width in pixels of the axis ticks (and corresponding grid line). Default: 1 | |
sizenumber | The length in pixels of the axis ticks. Default: 6 | |
colorstring | The colour of the axis ticks. Default: 'rgba(195, 195, 195, 1)' | |
countnumber | A hint of how many ticks to use across an axis. The axis is not guaranteed to use exactly this number of ticks, but will try to use a number of ticks that is close to the number given. Default: 10 |
label
Configuration for the axis labels, shown next to the ticks.
axis: {
...
label: {
fontStyle?: 'normal' | 'italic' | 'oblique'; // default: 'normal'
fontWeight?: 'normal' | 'bold' | 'bolder' | 'lighter' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'; // default: 'normal'
fontSize?: number; // default: 12
fontFamily?: string; // default: 'Verdana, sans-serif'
color?: string; // default: '#000000'
padding?: number; // default: 5
rotation?: number; // default: 0
format?: string;
formatter?: Function;
}
}fontStylestring | The font style to use for the labels. Default: 'normal'Options: 'normal', 'italic', 'oblique' | |
fontWeightstring | The font weight to use for the labels. Default: 'normal'Options: 'normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '700', '800', '900' | |
fontSizenumber | The font size in pixels to use for the labels. Default: 12 | |
fontFamilystring | The font family to use for the labels. Default: 'Verdana, sans-serif' | |
colorstring | The colour to use for the labels. Default: '#000000' | |
paddingnumber | Padding in pixels between the axis label and the tick. Default: 5 | |
rotationnumber | The rotation of the axis labels in degrees. Default: 0 | |
formatstring | Format string used when rendering labels for time axes. For more information on the structure of the string, click here. | |
formatterFunction | Function used to render axis labels. If value is a number, fractionDigits will also be provided, which indicates the number of fractional digits used in the step between ticks; for example, a tick step of 0.0005 would have fractionDigits set to 4. |
gridStyle
Configuration of the lines used to form the grid in the chart area.
axis: {
...
gridStyle: {
stroke?: string; // default: 'rgba(195, 195, 195, 1)'
lineDash?: number[]; // default: [4, 2]
}
}strokestring | The colour of the grid line. Default: 'rgba(195, 195, 195, 1)' | |
lineDashnumber[] | Defines how the gridlines are rendered. Every number in the array specifies the length in pixels of alternating dashes and gaps. For example, [6, 3] means dashes with a length of 6 pixels with gaps between of 3 pixels.Default: [4, 2] |
Common Series Configuration
This is the common configuration shared by all types of series.
series: {
visible?: boolean; // default: true
showInLegend?: boolean; // default: true
cursor?: string; // default: 'default'
listeners?: Object;
}visibleboolean | Whether or not to display the series. Default: true | |
showInLegendboolean | Whether or not to include the series in the legend. Default: true | |
cursorstring | The cursor to use for hovered series items (such as bar segments or line markers). This config is identical to the CSS cursor property.Default: 'default' | |
listenersObject | A map of event names to event listener functions. The keys can be one of the following: nodeClick |