Skip to content
ESM
import { ModelWithMultiAxes } from "@arcgis/charts-components/model/mixins/model-with-multi-axes.js";
Inheritance:
ModelWithMultiAxeschart-modelchart-model-baseEventTarget
Subclasses:
serial-chart-model, box-plot-model, histogram-model, scatterplot-model

Constructors

Constructor

inherited Constructor
Inherited from: ChartModelBase
Parameters
ParameterTypeDescriptionRequired
args
any[]

Properties

PropertyTypeClass
backgroundColor
inherited
chartId
inherited
chartRenderer
inherited
IDrawingInfo["renderer"] | undefined
chartSubType
readonly inherited
chartType
readonly inherited
config
inherited
dataStore
inherited
any
descriptionSymbol
inherited
descriptionText
inherited
fetchNULLValues
inherited
layer
readonly inherited
seriesLength
readonly inherited
splitByValues
readonly inherited
string[]
subtitleSymbol
inherited
subtitleText
inherited
titleSymbol
inherited
titleText
inherited
version
readonly inherited

asyncUpdatesPromise

inherited Property
Type
Promise<void>
Inherited from: ChartModelBase

Promise that resolves when the setup process is complete.

Note: This promise does not need to be awaited if the setup method has already been awaited. It is simply provided as a way to await the setup process from other functions if needed to avoid race conditions.

backgroundColor

inherited Property
Type
Color | undefined
Inherited from: WithBackgroundColor

The background color of the chart.

chartId

inherited Property
Type
string | undefined
Inherited from: WithChartId

The chart ID.

chartRenderer

autocast inherited Property
Type
IDrawingInfo["renderer"] | undefined
Inherited from: WithChartRenderer

The chart renderer.

Example

In this example, we set the chartRenderer for a class-break heat chart.

heatChartModel.chartRenderer = {
"type": "classBreaks",
"field": "arcgis_charts_heat_chart_value",
"classBreakInfos": [
{
"label": "70 - 145",
"classMinValue": 70,
"classMaxValue": 145,
"symbol": {
"type": "esriSFS",
"color": [
212,
227,
255,
255
],
"style": "esriSFSSolid"
}
},
{
"label": "146 - 250",
"classMinValue": 146,
"classMaxValue": 250,
"symbol": {
"type": "esriSFS",
"color": [
43,
108,
240,
255
],
"style": "esriSFSSolid"
}
}
]
};

chartSubtitleVisibility

inherited Property
Type
boolean

Whether or not the chart subtitle is visible.

Note: Even if the subtitle is visible, it may not be displayed if the subtitle text is empty.

chartSubType

readonlyinherited Property
Type
ChartSubType
Inherited from: WithChartSubType

The chart sub type of the series.

chartTitleVisibility

inherited Property
Type
boolean

Whether or not the chart title is visible.

Note: Even if the title is visible, it may not be displayed if the title text is empty.

chartType

readonlyinherited Property
Type
ChartTypes
Inherited from: ChartModelBase

The chart type.

config

inherited Property
Type
ChartConfig
Inherited from: WithConfig

The current chart configuration object.

cursorCrosshair

Property
Type
WebChartCursorCrosshair | undefined

Cursor crosshair from the chart config.

Note: To set the cursor crosshair for the second Y-axis (axisIndex 2), ensure there is a second Y-axis in the chart by using the setAssignToSecondValueAxis(true, 1) method to assign a series to the second Y-axis.

cursorCrosshairHorizontalLineVisibility

Property
Type
boolean

Visibility of the horizontal line of the cursor's crosshair.

  • If the cursor crosshair or its horizontal line visibility is not set, the default value of false will be returned.

Note: To set the cursor crosshair horizontal line visibility for the second Y-axis (axisIndex 2), ensure there is a second Y-axis in the chart by using the setAssignToSecondValueAxis(true, 1) method to assign a series to the second Y-axis.

cursorCrosshairStyle

Property
Type
ISimpleLineSymbol | undefined

Style of the cursor's crosshair from the chart config.

Note: To set the cursor crosshair style for the second Y-axis (axisIndex 2), ensure there is a second Y-axis in the chart by using the setAssignToSecondValueAxis(true, 1) method to assign a series to the second Y-axis.

cursorCrosshairVerticalLineVisibility

Property
Type
boolean

Visibility of the vertical line of the cursor's crosshair.

  • If the cursor crosshair or its vertical line visibility is not set, the default value of false will be returned.

Note: To set the cursor crosshair vertical line visibility for the second Y-axis (axisIndex 2), ensure there is a second Y-axis in the chart by using the setAssignToSecondValueAxis(true, 1) method to assign a series to the second Y-axis.

dataStore

inherited Property
Type
any
Inherited from: ChartModelBase

Data store object that can be used to store any data needed for the chart.

descriptionSymbol

inherited Property
Type
WebChartTextSymbol | undefined
Inherited from: WithDescriptionSymbol

The description text symbol. Contains styling information such as font, color, and symbol style.

descriptionText

inherited Property
Type
string
Inherited from: WithDescriptionText

descriptionVisibility

inherited Property
Type
boolean

Whether or not the chart description is visible.

Note: Even if the description is visible, it may not be displayed if the description text is empty.

fetchNULLValues

inherited Property
Type
boolean
Inherited from: WithFetchNULLValues

Whether to fetch null values for them to be counted or displayed as categories on the chart.

layer

readonlyinherited Property
Type
SupportedLayer | undefined
Inherited from: WithLayer

The chart model's layer.

seriesLength

readonlyinherited Property
Type
number
Inherited from: WithSeriesLength

The length of the series array.

splitByValues

readonlyinherited Property
Type
string[]
Inherited from: WithSplitByValues

The split-by values for the chart.

subtitleSymbol

inherited Property
Type
WebChartTextSymbol | undefined
Inherited from: WithSubtitleSymbol

The subtitle text symbol. Contains styling information such as font, color, and symbol style.

subtitleText

inherited Property
Type
string
Inherited from: WithSubtitleText

The chart subtitle text.

titleSymbol

inherited Property
Type
WebChartTextSymbol | undefined
Inherited from: WithTitleSymbol

The title text symbol. Contains styling information such as font, color, and symbol style.

titleText

inherited Property
Type
string
Inherited from: WithTitleText

The chart title text.

version

readonlyinherited Property
Type
string | undefined
Inherited from: WithVersion

The version of the chart configuration.

Methods

MethodSignatureClass
generateChartTitle
inherited
generateChartTitle(): string
generateYAxisTitle(): string
getAxisLabelsVisibility(axisIndex: number): boolean
getAxisScrollbar(axisIndex: number): WebChartAxisScrollBar | undefined
getAxisTitleSymbol(axisIndex: number): WebChartTextSymbol | undefined
getAxisTitleText(axisIndex: number): string
getAxisTitleVisibility(axisIndex: number): boolean
getAxisValueFormat(axisIndex: number): CategoryFormatOptions | DateTimeFormatOptions | NumberFormatOptions | undefined
getAxisVisibility(axisIndex: number): boolean
getBuffer(axisIndex: number): boolean
getDataFilters
inherited
getDataFilters(): WebChartDataFilters | undefined
getDataTooltipValueFormat(seriesIndex: number): NumberFormatOptions | undefined
getDefaultXAxisTitleText(): string
getDisplayCursorTooltip(axisIndex: number): boolean
getDisplayZeroLine(axisIndex: number): boolean
getGridLinesSymbol(): ISimpleLineSymbol | undefined
getHorizontalAxisLabelsBehavior(): WebChartLabelBehavior
getIntegerOnlyValues(axisIndex: number): boolean
getLogarithmic(axisIndex: number): boolean
getMaxBound(axisIndex: number): number
getMinBound(axisIndex: number): number
getSeriesId
inherited
getSeriesId(seriesIndex: number): string | undefined
getSeriesIndex
inherited
getSeriesIndex(seriesId: string): number | undefined
getSeriesVisibility(seriesIndex: number): boolean
getTickSpacing(axisIndex: number): number | undefined
getVerticalAxisLabelsBehavior(): WebChartLabelBehavior
isSameChartAs
inherited
isSameChartAs(otherModel: ChartModel | undefined): boolean
setAxisLabelsVisibility(isVisible: boolean, axisIndex: number): void
setAxisScrollbar(scrollbar: WebChartAxisScrollBar, axisIndex: number): void
setAxisTitleSymbol(titleSymbol: WebChartTextSymbol | undefined, axisIndex: number): void
setAxisTitleText(titleText: string, axisIndex: number): void
setAxisTitleVisibility(isVisible: boolean, axisIndex: number): void
setAxisValueFormat(axisIndex: number, valueFormat?: CategoryFormatOptions | DateTimeFormatOptions | NumberFormatOptions): void
setAxisVisibility(isVisible: boolean, axisIndex: number): void
setBuffer(buffer: boolean, axisIndex: number): void
setDataFilters
inherited
setDataFilters(newDataFilters: WebChartDataFilters | undefined): Promise<void>
setDataTooltipValueFormat(seriesIndex: number, valueFormat: NumberFormatOptions | undefined): void
setDisplayCursorTooltip(displayCursorTooltip: boolean, axisIndex: number): void
setDisplayZeroLine(displayZeroLine: boolean, axisIndex: number): void
setGridLinesSymbol(linesSymbol: ISimpleLineSymbol | undefined, axisIndices?: number[]): void
setHorizontalAxisLabelsBehavior(horizontalBehavior: WebChartLabelBehavior): void
setIntegerOnlyValues(integerOnlyValues: boolean, axisIndex: number): void
setLogarithmic(isLogarithmic: boolean, axisIndex: number): void
setMaxBound(newMaxBound: number | null, axisIndex: number): void
setMinBound(newMinBound: number | null, axisIndex: number): void
setSeriesVisibility(props: LegendItemVisibility): void
setTickSpacing(tickSpacing: number, axisIndex: number): void
setup
inherited
setup(params: ModelParams<ChartConfig>): Promise<void>
setVerticalAxisLabelsBehavior(verticalBehavior: WebChartLabelBehavior): void
update
inherited
update(): Promise<void>

generateChartTitle

inherited Method
Signature
generateChartTitle (): string
Inherited from: ChartModelBase

Generate the proper chart title from the current config.

Returns
string

generateYAxisTitle

Method
Signature
generateYAxisTitle (): string

Generate the proper y-axis title from the current config.

Returns
string

getAxisLabelsVisibility

Method
Signature
getAxisLabelsVisibility (axisIndex: number): boolean

Gets the visibility of the specified axis labels.

Parameters
ParameterTypeDescriptionRequired
axisIndex

axisIndex The index of the axis (0 for X-axis, 1 for Y-axis, 2 for second Y-axis).

Returns
boolean

{boolean}

getAxisScrollbar

Method
Signature
getAxisScrollbar (axisIndex: number): WebChartAxisScrollBar | undefined

Gets the scrollbar configuration for the specified axis.

Parameters
ParameterTypeDescriptionRequired
axisIndex

The index of the axis (0 for X-axis, 1 for Y-axis, 2 for second Y-axis).

Returns
WebChartAxisScrollBar | undefined

getAxisTitleSymbol

Method
Signature
getAxisTitleSymbol (axisIndex: number): WebChartTextSymbol | undefined

Gets the specified title text symbol. Contains styling information such as font, color, and symbol style.

Parameters
ParameterTypeDescriptionRequired
axisIndex

The index of the axis to get the title symbol for

Returns
WebChartTextSymbol | undefined

getAxisTitleText

Method
Signature
getAxisTitleText (axisIndex: number): string

Gets the title text of the specified axis.

Parameters
ParameterTypeDescriptionRequired
axisIndex

The index of the axis (0 for X-axis, 1 for Y-axis, 2 for second Y-axis).

Returns
string

getAxisTitleVisibility

Method
Signature
getAxisTitleVisibility (axisIndex: number): boolean

Gets the visibility of the specified axis title.

Parameters
ParameterTypeDescriptionRequired
axisIndex

The index of the axis (0 for X-axis, 1 for Y-axis, 2 for second Y-axis).

Returns
boolean

getAxisValueFormat

Method
Signature
getAxisValueFormat (axisIndex: number): CategoryFormatOptions | DateTimeFormatOptions | NumberFormatOptions | undefined

Gets the value format for the specified axis.

Parameters
ParameterTypeDescriptionRequired
axisIndex

The index of the axis (0 for X-axis, 1 for Y-axis, 2 for second Y-axis).

Returns
CategoryFormatOptions | DateTimeFormatOptions | NumberFormatOptions | undefined

getAxisVisibility

Method
Signature
getAxisVisibility (axisIndex: number): boolean

Gets the visibility of the specified axis.

Parameters
ParameterTypeDescriptionRequired
axisIndex

axisIndex The index of the axis (0 for X-axis, 1 for Y-axis, 2 for second Y-axis).

Returns
boolean

{boolean}

getBuffer

Method
Signature
getBuffer (axisIndex: number): boolean

Gets the buffer setting for the specified axis.

  • This setting is only applicable to the axis of type ValueAxis.
  • To get the setting for the x-axis, the axisIndex should be 0. For the y-axis, the axisIndex should be 1.
  • If the buffer is not set on the axis, the default value of false will be returned.
Parameters
ParameterTypeDescriptionRequired
axisIndex

The index of the axis

Returns
boolean

getDataFilters

inherited Method
Signature
getDataFilters (): WebChartDataFilters | undefined
Inherited from: WithDataFilters

Gets the data filter for the bar chart.

getDataTooltipValueFormat

inherited Method
Signature
getDataTooltipValueFormat (seriesIndex: number): NumberFormatOptions | undefined

Gets the data tooltip value format for a series.

If the series index is out of bounds or the series list is empty, this function will return undefined.

Parameters
ParameterTypeDescriptionRequired
seriesIndex

The index of the series to retrieve the value format for.

Returns
NumberFormatOptions | undefined

getDefaultXAxisTitleText

Method
Signature
getDefaultXAxisTitleText (): string

Get the default x-axis title text.

Returns
string

getDisplayCursorTooltip

Method
Signature
getDisplayCursorTooltip (axisIndex: number): boolean

Gets the display cursor tooltip setting for the specified axis.

  • To get the setting for the x-axis, the axisIndex should be 0. For the y-axis, the axisIndex should be 1.
  • If the displayCursorTooltip is not set on the axis, the default value of false will be returned.
Parameters
ParameterTypeDescriptionRequired
axisIndex

The index of the axis to get the display cursor tooltip for.

Returns
boolean

getDisplayZeroLine

Method
Signature
getDisplayZeroLine (axisIndex: number): boolean

Gets the display zero line setting for the specified axis.

  • This setting is only applicable to the axis of type ValueAxis.
  • To get the setting for the x-axis, the axisIndex should be 0. For the y-axis, the axisIndex should be 1.
  • If the displayZeroLine is not set on the axis, the default value of false will be returned.
Parameters
ParameterTypeDescriptionRequired
axisIndex

The index of the axis to get the display zero line for.

Returns
boolean

getGridLinesSymbol

Method
Signature
getGridLinesSymbol (): ISimpleLineSymbol | undefined

Gets the grid lines symbol. Contains styling information such as line width, line style, and line color.

getHorizontalAxisLabelsBehavior

Method
Signature
getHorizontalAxisLabelsBehavior (): WebChartLabelBehavior

Gets the horizontal axis labels behavior for the chart.

getIntegerOnlyValues

Method
Signature
getIntegerOnlyValues (axisIndex: number): boolean

Gets the integer only values setting for the specified axis.

  • This setting is only applicable to the axis of type ValueAxis.
  • To get the setting for the x-axis, the axisIndex should be 0. For the y-axis, the axisIndex should be 1.
  • If the integerOnlyValues is not set on the axis, the default value of false will be returned.
Parameters
ParameterTypeDescriptionRequired
axisIndex

The index of the axis

Returns
boolean

getLogarithmic

Method
Signature
getLogarithmic (axisIndex: number): boolean

Gets whether logarithmic scale is enabled for the specified axis.

  • true: Logarithmic scale is enabled for the specified axis.
  • false: Logarithmic scale is disabled for the specified axis.
Parameters
ParameterTypeDescriptionRequired
axisIndex

The index of the axis (0 for X-axis, 1 for Y-axis, 2 for second Y-axis).

Returns
boolean

getMaxBound

Method
Signature
getMaxBound (axisIndex: number): number

Gets the maximum bound for the specified axis.

Parameters
ParameterTypeDescriptionRequired
axisIndex

The index of the axis (0 for X-axis, 1 for Y-axis, 2 for second Y-axis).

Returns
number

getMinBound

Method
Signature
getMinBound (axisIndex: number): number

Gets the minimum bound for the specified axis.

Parameters
ParameterTypeDescriptionRequired
axisIndex

The index of the axis (0 for X-axis, 1 for Y-axis, 2 for second Y-axis).

Returns
number

getSeriesId

inherited Method
Signature
getSeriesId (seriesIndex: number): string | undefined
Inherited from: WithSeriesId

Gets the series ID for a given series index. If the series index is out of bounds, this function will return undefined.

Parameters
ParameterTypeDescriptionRequired
seriesIndex

The index of the series.

Returns
string | undefined

getSeriesIndex

inherited Method
Signature
getSeriesIndex (seriesId: string): number | undefined
Inherited from: WithSeriesIndex

Gets the series index for a given series ID. If the series ID is not found, this function will return undefined.

Parameters
ParameterTypeDescriptionRequired
seriesId

The ID of the series.

Returns
number | undefined

getSeriesVisibility

inherited Method
Signature
getSeriesVisibility (seriesIndex: number): boolean
Inherited from: WithSeriesVisibility

Gets the visibility of a series.

Parameters
ParameterTypeDescriptionRequired
seriesIndex

The series index

Returns
boolean

getTickSpacing

Method
Signature
getTickSpacing (axisIndex: number): number | undefined

Gets the tick spacing setting for the specified axis.

  • To get the setting for the x-axis, the axisIndex should be 0. For the y-axis, the axisIndex should be 1.
Parameters
ParameterTypeDescriptionRequired
axisIndex

The index of the axis

Returns
number | undefined

getVerticalAxisLabelsBehavior

Method
Signature
getVerticalAxisLabelsBehavior (): WebChartLabelBehavior

Gets the vertical axis labels behavior for the chart.

isSameChartAs

inherited Method
Signature
isSameChartAs (otherModel: ChartModel | undefined): boolean
Inherited from: ChartModelBase

Checks if the current chart model is for the same chart as another chart model.

Parameters
ParameterTypeDescriptionRequired
otherModel

The other chart model to compare to.

Returns
boolean

setAxisLabelsVisibility

Method
Signature
setAxisLabelsVisibility (isVisible: boolean, axisIndex: number): void

Sets the visibility of the specified axis labels. Note: The labels visibility for the second Y-axis (axisIndex 2) will only be applied if there is a second Y-axis in the chart. To enable the second Y-axis, use the setAssignToSecondValueAxis(true, 1) method to assign a series to the second Y-axis.

Parameters
ParameterTypeDescriptionRequired
isVisible

isVisible The visibility state for the axis labels.

axisIndex

axisIndex The index of the axis (0 for X-axis, 1 for Y-axis, 2 for second Y-axis).

Returns
void

setAxisScrollbar

Method
Signature
setAxisScrollbar (scrollbar: WebChartAxisScrollBar, axisIndex: number): void

Sets the scrollbar configuration for the specified axis. Note: The scrollbar configuration for the second Y-axis (axisIndex 2) will only be applied if there is a second Y-axis in the chart. To enable the second Y-axis, use the setAssignToSecondValueAxis(true, 1) method to assign a series to the second Y-axis.

Parameters
ParameterTypeDescriptionRequired
scrollbar

The scrollbar configuration to set.

axisIndex

The index of the axis (0 for X-axis, 1 for Y-axis, 2 for second Y-axis).

Returns
void

setAxisTitleSymbol

Method
Signature
setAxisTitleSymbol (titleSymbol: WebChartTextSymbol | undefined, axisIndex: number): void

Sets the title text symbol for the specified axis. Contains styling information such as font, color, and symbol style. Note: The title text symbol for the second Y-axis (axisIndex 2) will only be applied if there is a second Y-axis in the chart. To enable the second Y-axis, use the setAssignToSecondValueAxis(true, 1) method to assign a series to the second Y-axis.

Parameters
ParameterTypeDescriptionRequired
titleSymbol

The title text symbol to set.

axisIndex

The index of the axis (0 for X-axis, 1 for Y-axis, 2 for second Y-axis).

Returns
void

setAxisTitleText

Method
Signature
setAxisTitleText (titleText: string, axisIndex: number): void

Sets the title text for the specified axis. Note: The title text for the second Y-axis (axisIndex 2) will only be applied if there is a second Y-axis in the chart. To enable the second Y-axis, use the setAssignToSecondValueAxis(true, 1) method to assign a series to the second Y-axis.

Parameters
ParameterTypeDescriptionRequired
titleText

The title text for the axis.

axisIndex

The index of the axis (0 for X-axis, 1 for Y-axis, 2 for second Y-axis).

Returns
void

setAxisTitleVisibility

Method
Signature
setAxisTitleVisibility (isVisible: boolean, axisIndex: number): void

Sets the visibility of the specified axis title. Note: The title visibility for the second Y-axis (axisIndex 2) will only be applied if there is a second Y-axis in the chart. To enable the second Y-axis, use the setAssignToSecondValueAxis(true, 1) method to assign a series to the second Y-axis.

Parameters
ParameterTypeDescriptionRequired
isVisible

The visibility state for the axis title.

axisIndex

The index of the axis (0 for X-axis, 1 for Y-axis, 2 for second Y-axis).

Returns
void

setAxisValueFormat

Method
Signature
setAxisValueFormat (axisIndex: number, valueFormat?: CategoryFormatOptions | DateTimeFormatOptions | NumberFormatOptions): void

Sets the value format for the specified axis. Note: The value format for the second Y-axis (axisIndex 2) will only be applied if there is a second Y-axis in the chart. To enable the second Y-axis, use the setAssignToSecondValueAxis(true, 1) method to assign a series to the second Y-axis.

Parameters
ParameterTypeDescriptionRequired
axisIndex

The index of the axis (0 for X-axis, 1 for Y-axis, 2 for second Y-axis).

valueFormat

The value format to set.

Returns
void

setAxisVisibility

Method
Signature
setAxisVisibility (isVisible: boolean, axisIndex: number): void

Sets the visibility of the specified axis. Note: The visibility for the second Y-axis (axisIndex 2) will only be applied if there is a second Y-axis in the chart. To enable the second Y-axis, use the setAssignToSecondValueAxis(true, 1) method to assign a series to the second Y-axis.

Parameters
ParameterTypeDescriptionRequired
isVisible

isVisible The visibility state for the axis.

axisIndex

axisIndex The index of the axis (0 for X-axis, 1 for Y-axis, 2 for second Y-axis).

Returns
void

setBuffer

Method
Signature
setBuffer (buffer: boolean, axisIndex: number): void

Sets the buffer for the specified axis.

  • This setting is only applicable to the axis of type ValueAxis.
  • To set the setting for the x-axis, the axisIndex should be 0. For the y-axis, the axisIndex should be 1.

Note: To set the buffer for the second Y-axis (axisIndex 2), ensure there is a second Y-axis in the chart by using the setAssignToSecondValueAxis(true, 1) method to assign a series to the second Y-axis.

Parameters
ParameterTypeDescriptionRequired
buffer

The setting for the buffer

axisIndex

The index of the axis

Returns
void

setDataFilters

inherited Method
Signature
setDataFilters (newDataFilters: WebChartDataFilters | undefined): Promise<void>
Inherited from: WithDataFilters

Sets the data filter for the chart.

Parameters
ParameterTypeDescriptionRequired
newDataFilters

The new data filter.

Returns
Promise<void>

setDataTooltipValueFormat

inherited Method
Signature
setDataTooltipValueFormat (seriesIndex: number, valueFormat: NumberFormatOptions | undefined): void

Sets the data tooltip value format for a series.

Parameters
ParameterTypeDescriptionRequired
seriesIndex

The index of the series to set the value format for.

valueFormat

The value format to set.

Returns
void

setDisplayCursorTooltip

Method
Signature
setDisplayCursorTooltip (displayCursorTooltip: boolean, axisIndex: number): void

Sets the display cursor tooltip setting for the specified axis.

  • To set the setting for the x-axis, the axisIndex should be 0. For the y-axis, the axisIndex should be 1.

Note: To set the display cursor tooltip for the second Y-axis (axisIndex 2), ensure there is a second Y-axis in the chart by using the setAssignToSecondValueAxis(true, 1) method to assign a series to the second Y-axis.

Parameters
ParameterTypeDescriptionRequired
displayCursorTooltip

The display cursor tooltip setting for the axis.

axisIndex

The index of the axis to set the display cursor tooltip for.

Returns
void

setDisplayZeroLine

Method
Signature
setDisplayZeroLine (displayZeroLine: boolean, axisIndex: number): void

Sets the display zero line setting for the specified axis.

  • This setting is only applicable to the axis of type ValueAxis.
  • To set the setting for the x-axis, the axisIndex should be 0. For the y-axis, the axisIndex should be 1.

Note: To set the display zero line for the second Y-axis (axisIndex 2), ensure there is a second Y-axis in the chart by using the setAssignToSecondValueAxis(true, 1) method to assign a series to the second Y-axis.

Parameters
ParameterTypeDescriptionRequired
displayZeroLine

The display zero line setting for the axis.

axisIndex

The index of the axis to set the display zero line for.

Returns
void

setGridLinesSymbol

Method
Signature
setGridLinesSymbol (linesSymbol: ISimpleLineSymbol | undefined, axisIndices?: number[]): void

Sets the grid lines symbol. Contains styling information such as line width, line style, and line color. Note: To set the grid lines symbol for the second Y-axis (axisIndex 2), ensure there is a second Y-axis in the chart by using the setAssignToSecondValueAxis(true, 1) method to assign a series to the second Y-axis.

Parameters
ParameterTypeDescriptionRequired
linesSymbol

The grid lines symbol.

axisIndices
number[]

The indices of the axes to set the grid lines symbol for.

Returns
void

setHorizontalAxisLabelsBehavior

Method
Signature
setHorizontalAxisLabelsBehavior (horizontalBehavior: WebChartLabelBehavior): void

Sets the horizontal axis labels behavior for the chart. Note: The horizontal axis labels behavior for the second Y-axis (axisIndex 2) will only be applied if there is a second Y-axis in the chart. To enable the second Y-axis, use the setAssignToSecondValueAxis(true, 1) method to assign a series to the second Y-axis.

Parameters
ParameterTypeDescriptionRequired
horizontalBehavior

The behavior for the horizontal axis labels.

Returns
void

setIntegerOnlyValues

Method
Signature
setIntegerOnlyValues (integerOnlyValues: boolean, axisIndex: number): void

Sets the integer only values setting for the specified axis.

  • This setting is only applicable to the axis of type ValueAxis.
  • To set the setting for the x-axis, the axisIndex should be 0. For the y-axis, the axisIndex should be 1.

Note: To set the integer only values for the second Y-axis (axisIndex 2), ensure there is a second Y-axis in the chart by using the setAssignToSecondValueAxis(true, 1) method to assign a series to the second Y-axis.

Parameters
ParameterTypeDescriptionRequired
integerOnlyValues

The boolean value to set for the integer only values setting

axisIndex

The index of the axis

Returns
void

setLogarithmic

Method
Signature
setLogarithmic (isLogarithmic: boolean, axisIndex: number): void

Sets whether logarithmic scale is enabled for the specified axis.

  • true: Enable logarithmic scale for the specified axis.
  • false: Disable logarithmic scale for the specified axis.

Note: The logarithmic scale for the second Y-axis (axisIndex 2) will only be applied if there is a second Y-axis in the chart. To enable the second Y-axis, use the setAssignToSecondValueAxis(true, 1) method to assign a series to the second Y-axis.

Parameters
ParameterTypeDescriptionRequired
isLogarithmic

Whether to enable logarithmic scale for the specified axis.

axisIndex

The index of the axis (0 for X-axis, 1 for Y-axis, 2 for second Y-axis).

Returns
void

setMaxBound

Method
Signature
setMaxBound (newMaxBound: number | null, axisIndex: number): void

Sets the maximum bound for the specified axis. Note: The maximum bound for the second Y-axis (axisIndex 2) will only be applied if there is a second Y-axis in the chart. To enable the second Y-axis, use the setAssignToSecondValueAxis(true, 1) method to assign a series to the second Y-axis.

Parameters
ParameterTypeDescriptionRequired
newMaxBound

The value to set as the maximum bound.

axisIndex

The index of the axis (0 for X-axis, 1 for Y-axis, 2 for second Y-axis).

Returns
void

setMinBound

Method
Signature
setMinBound (newMinBound: number | null, axisIndex: number): void

Sets the minimum bound for the specified axis. Note: The minimum bound for the second Y-axis (axisIndex 2) will only be applied if there is a second Y-axis in the chart. To enable the second Y-axis, use the setAssignToSecondValueAxis(true, 1) method to assign a series to the second Y-axis.

Parameters
ParameterTypeDescriptionRequired
newMinBound

The value to set as the minimum bound.

axisIndex

The index of the axis (0 for X-axis, 1 for Y-axis, 2 for second Y-axis).

Returns
void

setSeriesVisibility

inherited Method
Signature
setSeriesVisibility (props: LegendItemVisibility): void
Inherited from: WithSeriesVisibility

Sets the visibility of a series.

Parameters
ParameterTypeDescriptionRequired
props

Visibility options for the series.

Returns
void

setTickSpacing

Method
Signature
setTickSpacing (tickSpacing: number, axisIndex: number): void

Sets the tick spacing for the specified axis.

  • To set the setting for the x-axis, the axisIndex should be 0. For the y-axis, the axisIndex should be 1. Note: To set the tick spacing for the second Y-axis (axisIndex 2), ensure there is a second Y-axis in the chart by using the setAssignToSecondValueAxis(true, 1) method to assign a series to the second Y-axis.
Parameters
ParameterTypeDescriptionRequired
tickSpacing

The value to set for the tick spacing

axisIndex

The index of the axis

Returns
void

setup

inherited Method
Signature
setup (params: ModelParams<ChartConfig>): Promise<void>
Inherited from: ChartModelBase

Completes the async setup process for the chart model. Must be called before using the model.

Parameters
ParameterTypeDescriptionRequired
params

The parameters to be used to set up the chart model.

Returns
Promise<void>

setVerticalAxisLabelsBehavior

Method
Signature
setVerticalAxisLabelsBehavior (verticalBehavior: WebChartLabelBehavior): void

Sets the vertical axis labels behavior for the chart. Note: The vertical axis labels behavior for the second Y-axis (axisIndex 2) will only be applied if there is a second Y-axis in the chart. To enable the second Y-axis, use the setAssignToSecondValueAxis(true, 1) method to assign a series to the second Y-axis.

Parameters
ParameterTypeDescriptionRequired
verticalBehavior

The behavior for the vertical axis labels.

Returns
void

update

inherited Method
Signature
update (): Promise<void>
Inherited from: ChartModelBase

Can be awaited to allow any pending async updates to complete.

Returns
Promise<void>