import { SerialChartModel } from "@arcgis/charts-components/model/serial-chart-model/serial-chart-model.js";- Inheritance
- SerialChartModel→
chart-model→ chart-model-base→ EventTarget
- Subclasses
- bar-chart-model, combo-bar-line-chart-model, heat-chart-model, line-chart-model, radar-chart-model
Constructors
Constructor
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| args | any[] | | |
Properties
| Property | Type | Class |
|---|---|---|
| | ||
| inherited | ||
| inherited | ||
| inherited | ||
| inherited | ||
| | ||
| inherited | ||
| inherited | IDrawingInfo["renderer"] | undefined | |
| inherited | ||
| readonly inherited | ||
| inherited | ||
| readonly inherited | ||
| inherited | ||
| inherited | ||
| inherited | ||
| inherited | ||
| inherited | ||
| inherited | ||
| inherited | ||
| inherited | ||
| inherited | ||
| inherited | ||
| inherited | ||
| inherited | ||
| inherited | ||
| inherited | ||
| readonly inherited | ||
| inherited | ||
| inherited | ||
| inherited | ||
| inherited | ||
| inherited | ||
| inherited | ||
| inherited | ||
| inherited | ||
| | ||
| inherited | ||
| string[] | | |
| string[] | | |
| inherited | ||
| readonly inherited | ||
| | ||
| readonly inherited | string[] | |
| | ||
| inherited | ||
| inherited | ||
| inherited | ||
| inherited | ||
| inherited | ||
| inherited | ||
| inherited | ||
| inherited | ||
| readonly inherited | ||
| | ||
| inherited | ||
| inherited | ||
| inherited | ||
| inherited |
asyncUpdatesPromise
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.
axisLabelsSymbol
- Type
- WebChartTextSymbol | undefined
Axis labels text symbol (font, color, style).
axisLinesSymbol
- Type
- ISimpleLineSymbol | undefined
Axis lines symbol (line width, style, color).
backgroundColor
The background color of the chart.
binTemporalData
- Type
- boolean
Whether temporal binning is enabled for all series in the config.
Note: Setting this prop removes any existing temporal binning settings if value is set to false.
chartRenderer
- Type
- IDrawingInfo["renderer"] | undefined
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
- 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
- Type
- ChartSubType
The chart sub type of the series.
chartTitleVisibility
- 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.
colorMatch
- Type
- boolean
Whether the chart should attempt to match the data source's colors.
true: Attempt to match the data source's colors.
false: Use the colors defined in the config.
config
- Type
- ChartConfig
The current chart configuration object.
cursorCrosshair
- 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
- 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
falsewill 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
- 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
- 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
falsewill 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.
dataLabelsSymbol
- Type
- WebChartTextSymbol | undefined
Data labels text symbol (font, color, style).
dataLabelsVisibility
- Type
- boolean
Whether data labels are visible.
dataStore
- Type
- any
Data store object that can be used to store any data needed for the chart.
descriptionSymbol
- Type
- WebChartTextSymbol | undefined
The description text symbol. Contains styling information such as font, color, and symbol style.
descriptionVisibility
- 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
- Type
- boolean
Whether to fetch null values for them to be counted or displayed as categories on the chart.
guideLabelsSymbol
- Type
- WebChartTextSymbol | undefined
The guide labels text symbol (font, color, style).
layer
- Type
- SupportedLayer | undefined
The chart model's layer.
legendPosition
Legend position: top, bottom, left, or right.
legendRoundMarker
- Type
- boolean
Whether legend markers are rounded.
legendTextSymbol
- Type
- WebChartTextSymbol | undefined
Legend item text symbol (font, color, style).
legendTitleSymbol
- Type
- WebChartTextSymbol | undefined
Legend title text symbol (font, color, style).
legendTitleText
- Type
- string
The legend title text.
legendTitleVisibility
- Type
- boolean
Whether the legend title is visible.
legendVisibility
- Type
- boolean
Whether the legend title is visible.
nullCategory
- Type
- WebChartNullCategory | undefined
The null category configuration of the chart.
The following to be set on the model for the null category to be applied:
fetchNULLValuesto be set totrueon the model.colorMatchto be set tofalseon the model
nullPolicy
- Type
- WebChartNullPolicyTypes | undefined
Policy which tells the chart how to handle null values.
null: Break the bar where null values are present.
zero: Treats null values as zero.
interpolate:
- Bar series: same effect as
null - Line series: connects the lines across null values.
rotatedState
- Type
- boolean
Whether the chart is rotated.
seriesLength
- Type
- number
The length of the series array.
splitByValues
- Type
- string[]
The split-by values for the chart.
stackedType
- Type
- WebChartStackedKinds | undefined
How the bars (lines) should be placed when multiple series are rendered in the same chart, say when "split by" operation is executed on any field or when multiple attributes/fields corresponding to the same set of classes are to be visualized.
Note: Currently this property is only used for bar charts and line charts.
subtitleSymbol
- Type
- WebChartTextSymbol | undefined
The subtitle text symbol. Contains styling information such as font, color, and symbol style.
subtitleText
- Type
- string
The chart subtitle text.
temporalBinningSize
Time interval size for a temporal bar chart or line chart.
temporalBinningUnit
Time interval units for a temporal bar chart or line chart.
timeAggregationType
Time aggregation type for a temporal bar chart or line chart.
titleSymbol
- Type
- WebChartTextSymbol | undefined
The title text symbol. Contains styling information such as font, color, and symbol style.
trimIncompleteTimeInterval
Whether to trim incomplete time intervals for a temporal bar chart or line chart.
version
The version of the chart configuration.
xAxisLabelsVisibility
- Type
- boolean
Whether the x-axis labels are visible.
xAxisTitleSymbol
- Type
- WebChartTextSymbol | undefined
X-axis title text symbol (font, color, style).
xAxisTitleText
- Type
- string
The x-axis title text.
xAxisTitleVisibility
- Type
- boolean
Whether the x-axis title is visible.
true: X-axis title is visible.
false: X-axis title is hidden.
Methods
| Method | Signature | Class |
|---|---|---|
| inherited | addXAxisGuide(name: string, index?: number): void | |
| inherited | addYAxisGuide(name: string, index?: number): void | |
| inherited | deleteXAxisGuide(index?: number): void | |
| inherited | deleteYAxisGuide(index?: number): void | |
| generateChartTitle(): string | | |
| inherited | generateXAxisTitle(): string | |
| generateYAxisTitle(): string | | |
| getAssignToSecondValueAxis(seriesIndex: number): boolean | | |
| inherited | getAxisLabelsVisibility(axisIndex: number): boolean | |
| inherited | getAxisScrollbar(axisIndex: number): WebChartAxisScrollBar | undefined | |
| inherited | getAxisTitleSymbol(axisIndex: number): WebChartTextSymbol | undefined | |
| inherited | getAxisTitleText(axisIndex: number): string | |
| inherited | getAxisTitleVisibility(axisIndex: number): boolean | |
| inherited | getAxisValueFormat(axisIndex: number): CategoryFormatOptions | DateTimeFormatOptions | NumberFormatOptions | undefined | |
| inherited | getAxisVisibility(axisIndex: number): boolean | |
| inherited | getBuffer(axisIndex: number): boolean | |
| getCustomSortValues(): Promise<string[]> | | |
| inherited | getDataFilters(): WebChartDataFilters | undefined | |
| inherited | getDataTooltipReverseColor(seriesIndex?: number): boolean | |
| inherited | getDataTooltipValueFormat(seriesIndex: number): NumberFormatOptions | undefined | |
| inherited | getDataTooltipVisibility(seriesIndex?: number): boolean | |
| inherited | getDefaultXAxisTitleText(): string | |
| inherited | getDisplayCursorTooltip(axisIndex: number): boolean | |
| inherited | getDisplayZeroLine(axisIndex: number): boolean | |
| inherited | getGridLinesSymbol(): ISimpleLineSymbol | undefined | |
| inherited | getGuideAbove(index?: number, orientation?: GuideOrientation): boolean | |
| inherited | getGuideEnd(index?: number, orientation?: GuideOrientation): Date | number | string | null | undefined | |
| inherited | getGuideLabelText(index?: number, orientation?: GuideOrientation): string | undefined | |
| inherited | getGuideName(index?: number, orientation?: GuideOrientation): string | undefined | |
| inherited | getGuideStart(index?: number, orientation?: GuideOrientation): Date | number | string | null | |
| inherited | getGuideStyle(index?: number, orientation?: GuideOrientation): ISimpleFillSymbol | ISimpleLineSymbol | undefined | |
| inherited | getGuideVisibility(index?: number, orientation?: GuideOrientation): boolean | |
| inherited | getHorizontalAxisLabelsBehavior(): WebChartLabelBehavior | |
| inherited | getIntegerOnlyValues(axisIndex: number): boolean | |
| inherited | getLogarithmic(axisIndex: number): boolean | |
| inherited | getMaxBound(axisIndex: number): number | |
| inherited | getMinBound(axisIndex: number): number | |
| getOrderOfSeries(): string[] | | |
| getSeriesColor(seriesIndex: number): Color | undefined | | |
| inherited | getSeriesId(seriesIndex: number): string | undefined | |
| inherited | getSeriesIndex(seriesId: string): number | undefined | |
| getSeriesName(seriesIndex: number): string | undefined | | |
| inherited | getSeriesVisibility(seriesIndex: number): boolean | |
| getSortOrder(): HeatChartDataSortingKinds | SerialChartDataSortingKinds | | |
| inherited | getTickSpacing(axisIndex: number): number | undefined | |
| inherited | getTooltipReverseColor(index: number, orientation?: GuideOrientation): boolean | |
| inherited | getVerticalAxisLabelsBehavior(): WebChartLabelBehavior | |
| inherited | getXGuidesLength(): number | undefined | |
| inherited | getYGuidesLength(): number | undefined | |
| inherited | isSameChartAs(otherModel: ChartModel | undefined): boolean | |
| moveCustomSortValuesInOrderByList(fromIndex: number, toIndex: number): void | | |
| moveSeries(fromIndex: number, toIndex: number): void | | |
| inherited | resetTimeInterval(): void | |
| setAssignToSecondValueAxis(assign: boolean, seriesIndex: number): void | | |
| inherited | setAxisLabelsVisibility(isVisible: boolean, axisIndex: number): void | |
| inherited | setAxisScrollbar(scrollbar: WebChartAxisScrollBar, axisIndex: number): void | |
| inherited | setAxisTitleSymbol(titleSymbol: WebChartTextSymbol | undefined, axisIndex: number): void | |
| inherited | setAxisTitleText(titleText: string, axisIndex: number): void | |
| inherited | setAxisTitleVisibility(isVisible: boolean, axisIndex: number): void | |
| inherited | setAxisValueFormat(axisIndex: number, valueFormat?: CategoryFormatOptions | DateTimeFormatOptions | NumberFormatOptions): void | |
| inherited | setAxisVisibility(isVisible: boolean, axisIndex: number): void | |
| inherited | setBuffer(buffer: boolean, axisIndex: number): void | |
| setDataFilters(newDataFilter: WebChartDataFilters | undefined): Promise<void> | | |
| inherited | setDataTooltipReverseColor(reverseColor: boolean, seriesIndex?: number): void | |
| inherited | setDataTooltipValueFormat(seriesIndex: number, valueFormat: NumberFormatOptions | undefined): void | |
| inherited | setDataTooltipVisibility(visibility: boolean, seriesIndex?: number): void | |
| inherited | setDisplayCursorTooltip(displayCursorTooltip: boolean, axisIndex: number): void | |
| inherited | setDisplayZeroLine(displayZeroLine: boolean, axisIndex: number): void | |
| inherited | setGridLinesSymbol(linesSymbol: ISimpleLineSymbol | undefined, axisIndices?: number[]): void | |
| inherited | setGuideAbove(above: boolean, index?: number, orientation?: GuideOrientation): void | |
| inherited | setGuideEnd(end: Date | number | string | null | undefined, index?: number, orientation?: GuideOrientation): void | |
| inherited | setGuideLabelText(labelText: string, index?: number, orientation?: GuideOrientation): void | |
| inherited | setGuideName(name: string, index?: number, orientation?: GuideOrientation): void | |
| inherited | setGuideStart(start: Date | number | string | null, index?: number, orientation?: GuideOrientation): void | |
| inherited | setGuideStyle(style: ISimpleFillSymbol | ISimpleLineSymbol, index?: number, orientation?: GuideOrientation): void | |
| inherited | setGuideVisibility(visible: boolean, index?: number, orientation?: GuideOrientation): void | |
| inherited | setHorizontalAxisLabelsBehavior(horizontalBehavior: WebChartLabelBehavior): void | |
| inherited | setIntegerOnlyValues(integerOnlyValues: boolean, axisIndex: number): void | |
| inherited | setLogarithmic(isLogarithmic: boolean, axisIndex: number): void | |
| inherited | setMaxBound(newMaxBound: number | null, axisIndex: number): void | |
| inherited | setMinBound(newMinBound: number | null, axisIndex: number): void | |
| setOrderOfSeries(newOrder: string[]): void | | |
| setSeriesColor(newColor: Color | undefined, seriesIndex: number): void | | |
| setSeriesName(name: string, seriesIndex: number): void | | |
| inherited | setSeriesVisibility(props: LegendItemVisibility): void | |
| setSortOrder(newSortOrder: HeatChartDataSortingKinds | SerialChartDataSortingKinds, orderByList?: string[]): void | | |
| inherited | setTickSpacing(tickSpacing: number, axisIndex: number): void | |
| inherited | setTooltipReverseColor(reverseColor: boolean, index: number, orientation?: GuideOrientation): void | |
| inherited | setup(params: ModelParams<ChartConfig>): Promise<void> | |
| inherited | setVerticalAxisLabelsBehavior(verticalBehavior: WebChartLabelBehavior): void | |
| inherited | update(): Promise<void> | |
| updateSeriesFromLayerFilter(): Promise<void> | |
addXAxisGuide
- Signature
-
addXAxisGuide (name: string, index?: number): void
Adds an X-axis guide.
addYAxisGuide
- Signature
-
addYAxisGuide (name: string, index?: number): void
Adds a Y-axis guide.
deleteXAxisGuide
- Signature
-
deleteXAxisGuide (index?: number): void
Deletes an X-axis guide.
deleteYAxisGuide
- Signature
-
deleteYAxisGuide (index?: number): void
Deletes a Y-axis guide.
generateChartTitle
- Signature
-
generateChartTitle (): string
Generate the proper chart title given the current config.
- Returns
- string
generateXAxisTitle
- Signature
-
generateXAxisTitle (): string
Generate the proper x-axis title from the current config.
- Returns
- string
generateYAxisTitle
- Signature
-
generateYAxisTitle (): string
Generate the proper y-axis title given the current config.
- Returns
- string
getAxisLabelsVisibility
- Signature
-
getAxisLabelsVisibility (axisIndex: number): boolean
Gets the visibility of the specified axis labels.
getAxisScrollbar
- Signature
-
getAxisScrollbar (axisIndex: number): WebChartAxisScrollBar | undefined
Gets the scrollbar configuration for the specified axis.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| axisIndex | The index of the axis (0 for X-axis, 1 for Y-axis, 2 for second Y-axis). | |
- Returns
- WebChartAxisScrollBar | undefined
getAxisTitleSymbol
- Signature
-
getAxisTitleSymbol (axisIndex: number): WebChartTextSymbol | undefined
Gets the specified title text symbol. Contains styling information such as font, color, and symbol style.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| axisIndex | The index of the axis to get the title symbol for | |
- Returns
- WebChartTextSymbol | undefined
getAxisTitleText
- Signature
-
getAxisTitleText (axisIndex: number): string
Gets the title text of the specified axis.
getAxisTitleVisibility
- Signature
-
getAxisTitleVisibility (axisIndex: number): boolean
Gets the visibility of the specified axis title.
getAxisValueFormat
- Signature
-
getAxisValueFormat (axisIndex: number): CategoryFormatOptions | DateTimeFormatOptions | NumberFormatOptions | undefined
Gets the value format for the specified axis.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| axisIndex | The index of the axis (0 for X-axis, 1 for Y-axis, 2 for second Y-axis). | |
getAxisVisibility
- Signature
-
getAxisVisibility (axisIndex: number): boolean
Gets the visibility of the specified axis.
getBuffer
- 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 be1. - If the
bufferis not set on the axis, the default value offalsewill be returned.
getDataFilters
- Signature
-
getDataFilters (): WebChartDataFilters | undefined
Gets the data filter for the bar chart.
- Returns
- WebChartDataFilters | undefined
getDataTooltipReverseColor
- Signature
-
getDataTooltipReverseColor (seriesIndex?: number): boolean
Gets the setting of the dataTooltipReverseColor property.
- If the
seriesIndexis provided, thedataTooltipReverseColorfor that series will be returned. Otherwise, the same property of the first series will be returned. - If the
dataTooltipReverseColoris not set on the series, the default value offalsewill be returned.
getDataTooltipValueFormat
- 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
| Parameter | Type | Description | Required |
|---|---|---|---|
| seriesIndex | The index of the series to retrieve the value format for. | |
- Returns
- NumberFormatOptions | undefined
getDataTooltipVisibility
- Signature
-
getDataTooltipVisibility (seriesIndex?: number): boolean
Gets the visibility of the data tooltips.
- If the
seriesIndexis provided, the visibility for that series will be returned. Otherwise, the visibility of the first series will be returned. - If the visibility is not set on the series, the default value of
truewill be returned.
getDefaultXAxisTitleText
- Signature
-
getDefaultXAxisTitleText (): string
Get the default x-axis title text.
- Returns
- string
getDisplayCursorTooltip
- 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 be1. - If the displayCursorTooltip is not set on the axis, the default value of
falsewill be returned.
getDisplayZeroLine
- 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 be1. - If the displayZeroLine is not set on the axis, the default value of
falsewill be returned.
getGridLinesSymbol
- Signature
-
getGridLinesSymbol (): ISimpleLineSymbol | undefined
Gets the grid lines symbol. Contains styling information such as line width, line style, and line color.
- Returns
- ISimpleLineSymbol | undefined
getGuideAbove
- Signature
-
getGuideAbove (index?: number, orientation?: GuideOrientation): boolean
Gets whether the guide should be rendered above the other chart elements.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| index | Default | | |
| orientation | Default | |
- Returns
- boolean
getGuideEnd
- Signature
-
getGuideEnd (index?: number, orientation?: GuideOrientation): Date | number | string | null | undefined
Gets the end value of a guide.
getGuideLabelText
- Signature
-
getGuideLabelText (index?: number, orientation?: GuideOrientation): string | undefined
Gets the guide label text.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| index | Default | | |
| orientation | Default | |
getGuideName
- Signature
-
getGuideName (index?: number, orientation?: GuideOrientation): string | undefined
Gets the name of a guide.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| index | Default | | |
| orientation | Default | |
getGuideStart
- Signature
-
getGuideStart (index?: number, orientation?: GuideOrientation): Date | number | string | null
Gets the start value of a guide.
getGuideStyle
- Signature
-
getGuideStyle (index?: number, orientation?: GuideOrientation): ISimpleFillSymbol | ISimpleLineSymbol | undefined
Gets the guide style.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| index | Default | | |
| orientation | Default | |
- Returns
- ISimpleFillSymbol | ISimpleLineSymbol | undefined
getGuideVisibility
- Signature
-
getGuideVisibility (index?: number, orientation?: GuideOrientation): boolean
Gets whether a guide is visible.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| index | Default | | |
| orientation | Default | |
- Returns
- boolean
getHorizontalAxisLabelsBehavior
- Signature
-
getHorizontalAxisLabelsBehavior (): WebChartLabelBehavior
Gets the horizontal axis labels behavior for the chart.
- Returns
- WebChartLabelBehavior
getIntegerOnlyValues
- 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 be1. - If the
integerOnlyValuesis not set on the axis, the default value offalsewill be returned.
getLogarithmic
- 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.
getMaxBound
- Signature
-
getMaxBound (axisIndex: number): number
Gets the maximum bound for the specified axis.
getMinBound
- Signature
-
getMinBound (axisIndex: number): number
Gets the minimum bound for the specified axis.
getOrderOfSeries
- Signature
-
getOrderOfSeries (): string[]
Gets the order of the series array by returning an array of series ids.
- Returns
- string[]
getSeriesId
- Signature
-
getSeriesId (seriesIndex: number): string | undefined
Gets the series ID for a given series index.
If the series index is out of bounds, this function will return undefined.
getSeriesIndex
- Signature
-
getSeriesIndex (seriesId: string): number | undefined
Gets the series index for a given series ID.
If the series ID is not found, this function will return undefined.
getSeriesVisibility
- Signature
-
getSeriesVisibility (seriesIndex: number): boolean
Gets the visibility of a series.
getTickSpacing
- 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 be1.
getTooltipReverseColor
- Signature
-
getTooltipReverseColor (index: number, orientation?: GuideOrientation): boolean
Gets whether the tooltip text color should be reversed for a guide.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| index | The index of the guide in the list of guides for the given axis orientation. | | |
| orientation | The axis orientation of the guide. | |
- Returns
- boolean
getVerticalAxisLabelsBehavior
- Signature
-
getVerticalAxisLabelsBehavior (): WebChartLabelBehavior
Gets the vertical axis labels behavior for the chart.
- Returns
- WebChartLabelBehavior
getXGuidesLength
- Signature
-
getXGuidesLength (): number | undefined
Gets the number guides in the X-axis guides list.
getYGuidesLength
- Signature
-
getYGuidesLength (): number | undefined
Gets the number guides in the Y-axis guides list.
isSameChartAs
- Signature
-
isSameChartAs (otherModel: ChartModel | undefined): boolean
Checks if the current chart model is for the same chart as another chart model.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| otherModel | The other chart model to compare to. | |
- Returns
- boolean
moveCustomSortValuesInOrderByList
- Signature
-
moveCustomSortValuesInOrderByList (fromIndex: number, toIndex: number): void
Moves the custom sort values in-place for the order by list in the config.
Note: This method should be only used when the sort order is set to SerialChartDataSortingKinds.customSort.
resetTimeInterval
- Signature
-
resetTimeInterval (): void
Resets the time interval to default for a temporal line chart.
- Returns
- void
setAxisLabelsVisibility
- 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.
setAxisScrollbar
- 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
| Parameter | Type | Description | Required |
|---|---|---|---|
| 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
- 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
| Parameter | Type | Description | Required |
|---|---|---|---|
| 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
- 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.
setAxisTitleVisibility
- 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.
setAxisValueFormat
- 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
| Parameter | Type | Description | Required |
|---|---|---|---|
| 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
- 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.
setBuffer
- 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 be1.
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.
setDataTooltipReverseColor
- Signature
-
setDataTooltipReverseColor (reverseColor: boolean, seriesIndex?: number): void
Sets the setting of the dataTooltipReverseColor property.
- If the
seriesIndexis provided, the reverse color will be set for that series only. Otherwise, the reverse color will be set for all series.
setDataTooltipValueFormat
- Signature
-
setDataTooltipValueFormat (seriesIndex: number, valueFormat: NumberFormatOptions | undefined): void
Sets the data tooltip value format for a series.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| seriesIndex | The index of the series to set the value format for. | | |
| valueFormat | The value format to set. | |
- Returns
- void
setDataTooltipVisibility
- Signature
-
setDataTooltipVisibility (visibility: boolean, seriesIndex?: number): void
Sets the visibility of the data tooltips.
- If the
seriesIndexis provided, the visibility will be set for that series only. Otherwise, the visibility will be set for all series.
setDisplayCursorTooltip
- 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 be1.
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.
setDisplayZeroLine
- 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 be1.
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.
setGridLinesSymbol
- 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.
setGuideAbove
- Signature
-
setGuideAbove (above: boolean, index?: number, orientation?: GuideOrientation): void
Sets whether the guide should be rendered above the other chart elements.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| above | New above boolean to set. | | |
| index | Default | | |
| orientation | Default | |
- Returns
- void
setGuideEnd
- Signature
-
setGuideEnd (end: Date | number | string | null | undefined, index?: number, orientation?: GuideOrientation): void
Sets the end value of a guide.
Parameters
- Returns
- void
setGuideLabelText
- Signature
-
setGuideLabelText (labelText: string, index?: number, orientation?: GuideOrientation): void
Sets the guide label text.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| labelText | New label text to set. | | |
| index | Default | | |
| orientation | Default | |
- Returns
- void
setGuideName
- Signature
-
setGuideName (name: string, index?: number, orientation?: GuideOrientation): void
Sets the name of a guide.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| name | New name to set. | | |
| index | Default | | |
| orientation | Default | |
- Returns
- void
setGuideStart
- Signature
-
setGuideStart (start: Date | number | string | null, index?: number, orientation?: GuideOrientation): void
Sets the start value of a guide.
setGuideStyle
- Signature
-
setGuideStyle (style: ISimpleFillSymbol | ISimpleLineSymbol, index?: number, orientation?: GuideOrientation): void
Sets the guide style.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| style | New style to set. | | |
| index | Default | | |
| orientation | Default | |
- Returns
- void
- Example
- chartModel.setGuideStyle({type: "esriSLS",color: [0, 200, 0, 255],width: 2,},1,);
setGuideVisibility
- Signature
-
setGuideVisibility (visible: boolean, index?: number, orientation?: GuideOrientation): void
Sets whether a guide is visible.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| visible | New visibility to set. | | |
| index | Default | | |
| orientation | Default | |
- Returns
- void
setHorizontalAxisLabelsBehavior
- 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
| Parameter | Type | Description | Required |
|---|---|---|---|
| horizontalBehavior | The behavior for the horizontal axis labels. | |
- Returns
- void
setIntegerOnlyValues
- 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 be1.
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.
setLogarithmic
- 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.
setMaxBound
- 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.
setMinBound
- 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.
setSeriesVisibility
- Signature
-
setSeriesVisibility (props: LegendItemVisibility): void
Sets the visibility of a series.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| props | Visibility options for the series. | |
- Returns
- void
setSortOrder
- Signature
-
setSortOrder (newSortOrder: HeatChartDataSortingKinds | SerialChartDataSortingKinds, orderByList?: string[]): void
Sets the sort order for the bar chart.
setTickSpacing
- 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 be1. 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 thesetAssignToSecondValueAxis(true, 1)method to assign a series to the second Y-axis.
setTooltipReverseColor
- Signature
-
setTooltipReverseColor (reverseColor: boolean, index: number, orientation?: GuideOrientation): void
Sets whether the tooltip text color should be reversed for a guide.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| reverseColor | New reverseColor boolean to set. | | |
| index | The index of the guide in the list of guides for the given axis orientation. | | |
| orientation | The axis orientation of the guide. | |
- Returns
- void
setup
- Signature
-
setup (params: ModelParams<ChartConfig>): Promise<void>
Completes the async setup process for the chart model. Must be called before using the model.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| params | The parameters to be used to set up the chart model. | |
setVerticalAxisLabelsBehavior
- 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
| Parameter | Type | Description | Required |
|---|---|---|---|
| verticalBehavior | The behavior for the vertical axis labels. | |
- Returns
- void
update
- Signature
-
update (): Promise<void>
Can be awaited to allow any pending async updates to complete.