JavaScript Charts: API Explorer
The API explorer can be used to gain familiarity with the AG Charts API and see in real-time how different options
affect charts. A code snippet showing the use of the API is produced based on the point and click configurations specified in the explorer.
API Explorer
Bar
Line
Scatter
Area
Pie
Histogram
Options
Search:
type'cartesian' | 'groupedCategory' | 'line' | 'bar' | 'column' | 'area' | 'scatter' | 'histogram'
Type of chart to render. Inherited from the first declared series if unspecified.
Default: N/A
Type of chart to render. Inherited from the first declared series if unspecified.
dataany[]
The data to render the chart from. If this is not specified, it must be set on individual series instead.
Required
The data to render the chart from. If this is not specified, it must be set on individual series instead.
containerHTMLElement | null
The element to place the rendered chart into.
Important: make sure to read the
Default: N/A
The element to place the rendered chart into.
Important: make sure to read the
autoSize
config description for information on how the container element affects the chart size (by default). axesObject❯
Axis configurations.
Axis configurations.
type'number'
Required
niceboolean
If 'true', the range will be rounded up to ensure nice equal spacing between the ticks.
Default:
true
If 'true', the range will be rounded up to ensure nice equal spacing between the ticks.
false
true
minnumber
User override for the automatically determined min value (based on series data).
Default: N/A
User override for the automatically determined min value (based on series data).
maxnumber
User override for the automatically determined max value (based on series data).
Default: N/A
User override for the automatically determined max value (based on series data).
tickObject❯
Configuration for the axis ticks.
Configuration for the axis ticks.
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: N/A
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.
widthnumber
The width in pixels of the axis ticks (and corresponding grid line).
px
Default:
1
The width in pixels of the axis ticks (and corresponding grid line).
px
sizenumber
The length in pixels of the axis ticks.
px
Default:
6
The length in pixels of the axis ticks.
px
colorstring
The colour of the axis ticks.
Default:
'rgba(195, 195, 195, 1)'
The colour of the axis ticks.
position'top' | 'right' | 'bottom' | 'left'
The position on the chart where the axis should be rendered.
Default: N/A
The position on the chart where the axis should be rendered.
top
right
bottom
left
titleObject❯
Configuration for the title shown next to the axis.
Configuration for the title shown next to the axis.
enabledboolean
Whether or not the title should be shown.
Default:
true
Whether or not the title should be shown.
false
true
paddingObject❯
topnumber
The number of pixels of padding at the top of the chart area.
px
Default:
20
The number of pixels of padding at the top of the chart area.
px
rightnumber
The number of pixels of padding at the right of the chart area.
px
Default:
20
The number of pixels of padding at the right of the chart area.
px
bottomnumber
The number of pixels of padding at the bottom of the chart area.
px
Default:
20
The number of pixels of padding at the bottom of the chart area.
px
leftnumber
The number of pixels of padding at the left of the chart area.
px
Default:
20
The number of pixels of padding at the left of the chart area.
px
textstring
The text to show in the title.
Default:
'Title'
The text to show in the title.
fontStyle'normal' | 'italic' | 'oblique'
The font style to use for the title.
Default:
'normal'
The font style to use for the title.
normal
italic
oblique
fontWeight'normal' | 'bold' | 'bolder' | 'lighter' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'
The font weight to use for the title.
Default:
'bold'
The font weight to use for the title.
normal
bold
bolder
lighter
100
200
300
400
500
600
700
800
900
fontSizenumber
The font size in pixels to use for the title.
px
Default:
18
The font size in pixels to use for the title.
px
fontFamilystring
The font family to use for the title.
Default:
'Verdana, sans-serif'
The font family to use for the title.
Verdana, sans-serif
Arial, sans-serif
Times New Roman, serif
colorstring
The colour to use for the title.
Default:
'#000000'
The colour to use for the title.
lineObject❯
Configuration for the axis line.
Configuration for the axis line.
widthnumber
The width in pixels of the axis line.
px
Default:
1
The width in pixels of the axis line.
px
colorstring
The colour of the axis line.
Default:
'rgba(195, 195, 195, 1)'
The colour of the axis line.
labelObject❯
Configuration for the axis labels, shown next to the ticks.
Configuration for the axis labels, shown next to the ticks.
fontStyle'normal' | 'italic' | 'oblique'
The font style to use for the labels.
Default:
'normal'
The font style to use for the labels.
normal
italic
oblique
fontWeight'normal' | 'bold' | 'bolder' | 'lighter' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'
The font weight to use for the labels.
Default:
'normal'
The font weight to use for the labels.
normal
bold
bolder
lighter
100
200
300
400
500
600
700
800
900
fontSizenumber
The font size in pixels to use for the labels.
px
Default:
12
The font size in pixels to use for the labels.
px
fontFamilystring
The font family to use for the labels
Default:
'Verdana, sans-serif'
The font family to use for the labels
Verdana, sans-serif
Arial, sans-serif
Times New Roman, serif
paddingnumber
Padding in pixels between the axis label and the tick.
px
Default:
5
Padding in pixels between the axis label and the tick.
px
colorstring
The colour to use for the labels
Default:
'#000000'
The colour to use for the labels
rotationnumber
The rotation of the axis labels in degrees. Note: for integrated charts the default is 335 degrees, unless the axis shows grouped or default categories (indexes). The first row of labels in a grouped category axis is rotated perpendicular to the axis line.
°
Default:
0
The rotation of the axis labels in degrees. Note: for integrated charts the default is 335 degrees, unless the axis shows grouped or default categories (indexes). The first row of labels in a grouped category axis is rotated perpendicular to the axis line.
°
autoRotateboolean
If specified and axis labels may collide, they are rotated so that they are positioned at the supplied angle. This is enabled by default for category. If the
Default:
false
If specified and axis labels may collide, they are rotated so that they are positioned at the supplied angle. This is enabled by default for category. If the
rotation
property is specified, it takes precedence. false
true
autoRotateAnglenumber
If autoRotate is enabled, specifies the rotation angle to use when autoRotate is activated. Defaults to an angle of 335 degrees if unspecified.
°
Default:
335
If autoRotate is enabled, specifies the rotation angle to use when autoRotate is activated. Defaults to an angle of 335 degrees if unspecified.
°
formatstring
Format string used when rendering labels for time axes.
Default: N/A
Format string used when rendering labels for time axes.
formatterFunction
Default: N/A
function (params: AgAxisLabelFormatterParams) => string;
interface AgAxisLabelFormatterParams {
value: any;
index: number;
fractionDigits: number;
formatter: (x: any) => string;
}
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
gridStyleAgAxisGridStyle[]
Configuration of the lines used to form the grid in the chart area.
Default: N/A
Configuration of the lines used to form the grid in the chart area.
keysstring[]
Default: N/A
thicknessnumber
If set to a non-zero value, the axis will have the specified thickness regardless of label size.
px
Default: N/A
If set to a non-zero value, the axis will have the specified thickness regardless of label size.
px
seriesObject❯
Series configurations.
Series configurations.
type'bar' | 'column'
Default: N/A
bar
column
groupedboolean
Whether to show different y-values as separate bars (grouped) or not (stacked).
Default:
false
Whether to show different y-values as separate bars (grouped) or not (stacked).
false
true
stackedboolean
Default: N/A
false
true
normalizedTonumber
The number to normalise the bar stacks to. Has no effect when
Default: N/A
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. xKeystring
The key to use to retrieve x-values from the data.
Required
The key to use to retrieve x-values from the data.
yKeystring
The keys to use to retrieve y-values from the data.
Default: N/A
The keys to use to retrieve y-values from the data.
xNamestring
A human-readable description of the x-values. If supplied, this will be shown in the default tooltip and passed to the tooltip renderer as one of the parameters.
Default: N/A
A human-readable description of the x-values. If supplied, this will be shown in the default tooltip and passed to the tooltip renderer as one of the parameters.
yNamestring
Human-readable description of the y-values. If supplied, a corresponding
Default: N/A
Human-readable description of the y-values. If supplied, a corresponding
yName
will be shown in the default tooltip and passed to the tooltip renderer as one of the parameters. flipXYboolean
Default: N/A
false
true
fillstring
The colour to use for the fill of the area.
Default: N/A
The colour to use for the fill of the area.
strokestring
The colours to use for the stroke of the bars.
Default: N/A
The colours to use for the stroke of the bars.
strokeWidthnumber
The width in pixels of the stroke for the bars.
px
Default:
1
The width in pixels of the stroke for the bars.
px
fillOpacitynumber
The opacity of the fill for the bars.
Default:
1
The opacity of the fill for the bars.
strokeOpacitynumber
The opacity of the stroke for the bars.
Default:
1
The opacity of the stroke for the bars.
lineDashPixelSize[]
Defines how the bar/column strokes are rendered. Every number in the array specifies the length in pixels of alternating dashes and gaps. For example,
Default: N/A
Defines how the bar/column 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. lineDashOffsetnumber
The initial offset of the dashed line in pixels.
px
Default:
0
The initial offset of the dashed line in pixels.
px
shadowObject❯
Configuration for the shadow used behind the chart series.
Configuration for the shadow used behind the chart series.
enabledboolean
Whether or not the shadow is visible.
Default: N/A
Whether or not the shadow is visible.
false
true
colorstring
The colour of the shadow.
Default: N/A
The colour of the shadow.
xOffsetnumber
The horizontal offset in pixels for the shadow.
px
Default: N/A
The horizontal offset in pixels for the shadow.
px
yOffsetnumber
The vertical offset in pixels for the shadow.
px
Default: N/A
The vertical offset in pixels for the shadow.
px
blurnumber
The radius of the shadow's blur, given in pixels.
px
Default: N/A
The radius of the shadow's blur, given in pixels.
px
labelObject❯
Configuration for the labels shown on bars.
Configuration for the labels shown on bars.
formatterFunction
Default: N/A
function (params: { value: number; }) => string;
Function used to turn 'yKey' values into text to be displayed by a label. By default the values are simply stringified. placement'inside' | 'outside'
Where to render series labels relative to the segments.
Default: N/A
Where to render series labels relative to the segments.
inside
outside
enabledboolean
Whether or not the labels should be shown.
Default: N/A
Whether or not the labels should be shown.
false
true
fontStyle'normal' | 'italic' | 'oblique'
The font style to use for the labels.
Default: N/A
The font style to use for the labels.
normal
italic
oblique
fontWeight'normal' | 'bold' | 'bolder' | 'lighter' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'
The font weight to use for the labels.
Default: N/A
The font weight to use for the labels.
normal
bold
bolder
lighter
100
200
300
400
500
600
700
800
900
fontSizenumber
The font size in pixels to use for the labels.
px
Default: N/A
The font size in pixels to use for the labels.
px
fontFamilystring
The font family to use for the labels.
Default: N/A
The font family to use for the labels.
Verdana, sans-serif
Arial, sans-serif
Times New Roman, serif
colorstring
The colour to use for the labels.
Default: N/A
The colour to use for the labels.
tooltipObject❯
Series-specific tooltip configuration.
Series-specific tooltip configuration.
rendererFunction
Default: N/A
function (params: AgCartesianSeriesTooltipRendererParams) => string | AgTooltipRendererResult;
interface AgCartesianSeriesTooltipRendererParams {
xKey: string;
xValue: any;
xName: string;
yKey: string;
yValue: any;
yName: string;
datum: any;
title: string;
color: string;
}
Function used to create the content for tooltips. enabledboolean
Whether or not to show tooltips when the series are hovered over.
Default: N/A
Whether or not to show tooltips when the series are hovered over.
false
true
formatterFunction
Default: N/A
function (params: AgBarSeriesFormatterParams) => AgBarSeriesFormat;
interface AgBarSeriesFormat {
fill: string;
stroke: string;
strokeWidth: number;
}
interface AgBarSeriesFormatterParams {
datum: any;
fill: string;
stroke: string;
strokeWidth: number;
highlighted: boolean;
xKey: string;
yKey: string;
}
Function used to return formatting for individual bars/columns, based on the given parameters. If the current bar/column 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. dataany[]
The data to use when rendering the series. If this is not supplied, data must be set on the chart instead.
Default: N/A
The data to use when rendering the series. If this is not supplied, data must be set on the chart instead.
visibleboolean
Whether or not to display the series.
Default: N/A
Whether or not to display the series.
false
true
showInLegendboolean
Whether or not to include the series in the legend.
Default: N/A
Whether or not to include the series in the legend.
false
true
cursorstring
The cursor to use for hovered area markers. This config is identical to the CSS
Default: N/A
The cursor to use for hovered area markers. This config is identical to the CSS
cursor
property. listenersAgBaseSeriesListeners | {[key: string]: Function}
A map of event names to event listeners.
Default: N/A
A map of event names to event listeners.
highlightStyleObject❯
Configuration for series markers and series line highlighting when a marker / data point or a legend item is hovered over.
Configuration for series markers and series line highlighting when a marker / data point or a legend item is hovered over.
itemObject❯
Highlight style used for an individual marker when tapped or hovered over.
Highlight style used for an individual marker when tapped or hovered over.
fillstring
The fill colour of a marker when tapped or hovered over. Use
Default: N/A
The fill colour of a marker when tapped or hovered over. Use
undefined
for no highlight. strokestring
The stroke colour of a marker when tapped or hovered over. Use
Default: N/A
The stroke colour of a marker when tapped or hovered over. Use
undefined
for no highlight. strokeWidthnumber
The stroke width of a marker when tapped or hovered over. Use
px
Default: N/A
The stroke width of a marker when tapped or hovered over. Use
undefined
for no highlight. px
seriesObject❯
Highlight style used for whole series when one of its markers is tapped or hovered over.
Highlight style used for whole series when one of its markers is tapped or hovered over.
enabledboolean
Default: N/A
false
true
dimOpacitynumber
The opacity of the whole series (area line, area fill, labels and markers, if any) when another chart series or another stack level in the same area series is highlighted by hovering a data point or a legend item. Use
Default: N/A
The opacity of the whole series (area line, area fill, labels and markers, if any) when another chart series or another stack level in the same area series is highlighted by hovering a data point or a legend item. Use
undefined
or 1
for no dimming. strokeWidthnumber
The stroke width of the area line when one of the markers is tapped or hovered over, or when a tooltip is shown for a data point, even when series markers are disabled. Use
px
Default: N/A
The stroke width of the area line when one of the markers is tapped or hovered over, or when a tooltip is shown for a data point, even when series markers are disabled. Use
undefined
for no highlight. px
widthnumber
The width of the chart in pixels. Has no effect if
px
Default: N/A
The width of the chart in pixels. Has no effect if
autoSize
is set to true
. px
heightnumber
The height of the chart in pixels. Has no effect if
px
Default: N/A
The height of the chart in pixels. Has no effect if
autoSize
is set to true
. px
autoSizeboolean
By default, the chart will resize automatically to fill the container element. Set this to
Important: if this config is set to
Default:
true
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
.Important: if this config is set to
true
, make sure to give the chart's container
element an explicit size, otherwise you will run into a chicken and egg situation where the container expects to size itself according to the content and the chart expects to size itself according to the container. false
true
paddingObject❯
Configuration for the padding shown around the chart.
Configuration for the padding shown around the chart.
topnumber
The number of pixels of padding at the top of the chart area.
px
Default:
20
The number of pixels of padding at the top of the chart area.
px
rightnumber
The number of pixels of padding at the right of the chart area.
px
Default:
20
The number of pixels of padding at the right of the chart area.
px
bottomnumber
The number of pixels of padding at the bottom of the chart area.
px
Default:
20
The number of pixels of padding at the bottom of the chart area.
px
leftnumber
The number of pixels of padding at the left of the chart area.
px
Default:
20
The number of pixels of padding at the left of the chart area.
px
backgroundObject❯
Configuration for the background shown behind the chart.
Configuration for the background shown behind the chart.
visibleboolean
Whether or not the background should be visible.
Default:
true
Whether or not the background should be visible.
false
true
fillstring
Colour of the chart background.
Default:
'#FFFFFF'
Colour of the chart background.
titleObject❯
Configuration for the title shown at the top of the chart.
Configuration for the title shown at the top of the chart.
enabledboolean
Whether or not the title should be shown.
Default:
true
Whether or not the title should be shown.
false
true
paddingObject❯
topnumber
The number of pixels of padding at the top of the chart area.
px
Default:
20
The number of pixels of padding at the top of the chart area.
px
rightnumber
The number of pixels of padding at the right of the chart area.
px
Default:
20
The number of pixels of padding at the right of the chart area.
px
bottomnumber
The number of pixels of padding at the bottom of the chart area.
px
Default:
20
The number of pixels of padding at the bottom of the chart area.
px
leftnumber
The number of pixels of padding at the left of the chart area.
px
Default:
20
The number of pixels of padding at the left of the chart area.
px
textstring
The text to show in the title.
Default:
'Title'
The text to show in the title.
fontStyle'normal' | 'italic' | 'oblique'
The font style to use for the title.
Default:
'normal'
The font style to use for the title.
normal
italic
oblique
fontWeight'normal' | 'bold' | 'bolder' | 'lighter' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'
The font weight to use for the title.
Default:
'bold'
The font weight to use for the title.
normal
bold
bolder
lighter
100
200
300
400
500
600
700
800
900
fontSizenumber
The font size in pixels to use for the title.
px
Default:
18
The font size in pixels to use for the title.
px
fontFamilystring
The font family to use for the title.
Default:
'Verdana, sans-serif'
The font family to use for the title.
Verdana, sans-serif
Arial, sans-serif
Times New Roman, serif
colorstring
The colour to use for the title.
Default:
'#000000'
The colour to use for the title.
subtitleObject❯
Configuration for the subtitle shown beneath the chart title. Note: a subtitle will only be shown if a title is also present.
Configuration for the subtitle shown beneath the chart title. Note: a subtitle will only be shown if a title is also present.
enabledboolean
Whether or not the title should be shown.
Default:
true
Whether or not the title should be shown.
false
true
paddingObject❯
topnumber
The number of pixels of padding at the top of the chart area.
px
Default:
20
The number of pixels of padding at the top of the chart area.
px
rightnumber
The number of pixels of padding at the right of the chart area.
px
Default:
20
The number of pixels of padding at the right of the chart area.
px
bottomnumber
The number of pixels of padding at the bottom of the chart area.
px
Default:
20
The number of pixels of padding at the bottom of the chart area.
px
leftnumber
The number of pixels of padding at the left of the chart area.
px
Default:
20
The number of pixels of padding at the left of the chart area.
px
textstring
The text to show in the title.
Default:
'Title'
The text to show in the title.
fontStyle'normal' | 'italic' | 'oblique'
The font style to use for the title.
Default:
'normal'
The font style to use for the title.
normal
italic
oblique
fontWeight'normal' | 'bold' | 'bolder' | 'lighter' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'
The font weight to use for the title.
Default:
'bold'
The font weight to use for the title.
normal
bold
bolder
lighter
100
200
300
400
500
600
700
800
900
fontSizenumber
The font size in pixels to use for the title.
px
Default:
18
The font size in pixels to use for the title.
px
fontFamilystring
The font family to use for the title.
Default:
'Verdana, sans-serif'
The font family to use for the title.
Verdana, sans-serif
Arial, sans-serif
Times New Roman, serif
colorstring
The colour to use for the title.
Default:
'#000000'
The colour to use for the title.
tooltipObject❯
Global configuration that applies to all tooltips in the chart.
Global configuration that applies to all tooltips in the chart.
enabledboolean
Set to false to disable tooltips for all series in the chart.
Default:
true
Set to false to disable tooltips for all series in the chart.
false
true
classstring
A class name to be added to the tooltip element of the chart.
Default: N/A
A class name to be added to the tooltip element of the chart.
trackingboolean
If true, for series with markers the tooltip will be shown to the closest marker.
Default:
true
If true, for series with markers the tooltip will be shown to the closest marker.
false
true
delaynumber
The time interval (in milliseconds) after which the tooltip is shown.
ms
Default:
0
The time interval (in milliseconds) after which the tooltip is shown.
ms
legendObject❯
Configuration for the chart legend.
Configuration for the chart legend.
enabledboolean
Whether or not to show the legend.
Default:
true
Whether or not to show the legend.
false
true
position'top' | 'right' | 'bottom' | 'left'
Where the legend should show in relation to the chart.
Default:
'right'
Where the legend should show in relation to the chart.
top
right
bottom
left
spacingnumber
The spacing in pixels to use outside the legend.
px
Default:
20
The spacing in pixels to use outside the legend.
px
itemObject❯
Configuration for the legend items that consist of a marker and a label.
Configuration for the legend items that consist of a marker and a label.
markerObject❯
Configuration for the legend markers.
Configuration for the legend markers.
sizenumber
The size in pixels of the markers in the legend.
px
Default:
15
The size in pixels of the markers in the legend.
px
shape'circle' | 'cross' | 'diamond' | 'heart' | 'plus' | 'triangle' | any
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
Default:
'square'
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. circle
cross
diamond
heart
plus
triangle
paddingnumber
The padding in pixels between a legend marker and the corresponding label.
px
Default:
8
The padding in pixels between a legend marker and the corresponding label.
px
strokeWidthnumber
The width in pixels of the stroke for markers in the legend.
px
Default:
1
The width in pixels of the stroke for markers in the legend.
px
labelObject❯
Configuration for the legend labels.
Configuration for the legend labels.
colorstring
The colour of the text.
Default:
'black'
The colour of the text.
fontStyle'normal' | 'italic' | 'oblique'
The font style to use for the legend.
Default:
'normal'
The font style to use for the legend.
normal
italic
oblique
fontWeight'normal' | 'bold' | 'bolder' | 'lighter' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'
The font weight to use for the legend.
Default:
'normal'
The font weight to use for the legend.
normal
bold
bolder
lighter
100
200
300
400
500
600
700
800
900
fontSizenumber
The font size in pixels to use for the legend.
px
Default:
12
The font size in pixels to use for the legend.
px
fontFamilystring
The font family to use for the legend.
Default:
'Verdana, sans-serif'
The font family to use for the legend.
Verdana, sans-serif
Arial, sans-serif
Times New Roman, serif
formatterFunction
Default: N/A
function (id: string, itemId: any, value: string) => string;
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. paddingXnumber
The horizontal spacing in pixels to use between legend items.
px
Default:
16
The horizontal spacing in pixels to use between legend items.
px
paddingYnumber
The vertical spacing in pixels to use between legend items.
px
Default:
8
The vertical spacing in pixels to use between legend items.
px
listenersObject❯
A map of event names to event listeners.
A map of event names to event listeners.
seriesNodeClickFunction
Required
function (type: 'seriesNodeClick', series: any, datum: any, xKey: string, yKey: string) => any;
The listener to call when a node (marker, column, bar, tile or a pie slice) in any series is clicked. In case a chart has multiple series, the chart's seriesNodeClick
event can be used to listen to nodeClick
events of all the series at once. navigatorObject❯
Configuration for the chart navigator.
Configuration for the chart navigator.
enabledboolean
Whether or not to show the navigator.
Default:
false
Whether or not to show the navigator.
false
true
heightnumber
The height of the navigator.
px
Default:
30
The height of the navigator.
px
marginnumber
The distance between the navigator and the bottom axis.
px
Default:
10
The distance between the navigator and the bottom axis.
px
minnumber
The start of the visible range in the
Default:
0
The start of the visible range in the
[0, 1]
interval. maxnumber
The end of the visible range in the
Default:
1
The end of the visible range in the
[0, 1]
interval. maskObject❯
Configuration for the navigator's visible range mask.
Configuration for the navigator's visible range mask.
fillstring
The fill colour used by the mask.
Default:
'#999999'
The fill colour used by the mask.
strokestring
The stroke colour used by the mask.
Default:
'#999999'
The stroke colour used by the mask.
strokeWidthnumber
The stroke width used by the mask.
px
Default:
1
The stroke width used by the mask.
px
fillOpacitynumber
The opacity of the mask's fill in the
Default:
0.2
The opacity of the mask's fill in the
[0, 1]
interval, where 0
is effectively no masking. minHandleObject❯
Configuration for the navigator's left handle.
Configuration for the navigator's left handle.
fillstring
The fill colour used by the handle.
Default:
'#f2f2f2'
The fill colour used by the handle.
strokestring
The stroke colour used by the handle.
Default:
'#999999'
The stroke colour used by the handle.
strokeWidthnumber
The stroke width used by the handle.
px
Default:
1
The stroke width used by the handle.
px
widthnumber
The width of the handle.
px
Default:
8
The width of the handle.
px
heightnumber
The height of the handle.
px
Default:
16
The height of the handle.
px
gripLineGapnumber
The distance between the handle's grip lines.
px
Default:
2
The distance between the handle's grip lines.
px
gripLineLengthnumber
The length of the handle's grip lines.
px
Default:
8
The length of the handle's grip lines.
px
maxHandleObject❯
Configuration for the navigator's right handle.
Configuration for the navigator's right handle.
fillstring
The fill colour used by the handle.
Default:
'#f2f2f2'
The fill colour used by the handle.
strokestring
The stroke colour used by the handle.
Default:
'#999999'
The stroke colour used by the handle.
strokeWidthnumber
The stroke width used by the handle.
px
Default:
1
The stroke width used by the handle.
px
widthnumber
The width of the handle.
px
Default:
8
The width of the handle.
px
heightnumber
The height of the handle.
px
Default:
16
The height of the handle.
px
gripLineGapnumber
The distance between the handle's grip lines.
px
Default:
2
The distance between the handle's grip lines.
px
gripLineLengthnumber
The length of the handle's grip lines.
px
Default:
8
The length of the handle's grip lines.
px
themestring | AgChartTheme
Theme to use for rendering of the chart. Specify an inbuilt theme name, or provide an
Default:
'ag-default'
Theme to use for rendering of the chart. Specify an inbuilt theme name, or provide an
AgChartTheme
instance to customise. ag-default
ag-material
ag-pastel
ag-solar
ag-vivid
ag-default-dark
ag-material-dark
ag-pastel-dark
ag-solar-dark
ag-vivid-dark
// Create new chart
chart = AgChart.create({
series: [
{
type: 'column',
xKey: 'month',
yKey: 'revenue',
stacked: true
},
{
type: 'column',
xKey: 'month',
yKey: 'profit',
stacked: true
}
]
});
// Update existing chart
AgChart.update(chart, {
series: [
{
type: 'column',
xKey: 'month',
yKey: 'revenue',
stacked: true
},
{
type: 'column',
xKey: 'month',
yKey: 'profit',
stacked: true
}
]
});