ESM
import { BarChartModel } from "@arcgis/charts-components/model/bar-chart-model/bar-chart-model.js";
Inheritance
BarChartModelserial-chart-modelchart-modelchart-model-baseEventTarget

Constructors

Constructor

inherited Constructor
Inherited from: ChartModelBase

Parameters

ParameterTypeDescriptionRequired
args
any[]

Properties

PropertyTypeClass
inherited
inherited
inherited
inherited
inherited
inherited
inherited
IDrawingInfo["renderer"] | undefined
readonly inherited
readonly inherited
inherited
inherited
inherited
inherited
inherited
any
inherited
inherited
inherited
inherited
readonly inherited
inherited
inherited
inherited
inherited
inherited
inherited
inherited
inherited
inherited
inherited
string[]
inherited
string[]
inherited
readonly inherited
inherited
readonly inherited
string[]
inherited
inherited
inherited
inherited
inherited
readonly inherited
inherited
inherited
inherited

aggregationType

inherited Property
Type
WebChartStatisticType
Inherited from: SerialChartModel

The aggregation type for the chart.

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.

axisLabelsSymbol

inherited Property
Type
WebChartTextSymbol | undefined
Inherited from: WithAxisLabelsSymbol

Axis labels text symbol (font, color, style).

axisLinesSymbol

inherited Property
Type
ISimpleLineSymbol | undefined
Inherited from: WithAxisLinesSymbol

Axis lines symbol (line width, style, color).

backgroundColor

inherited Property
Type
Color | undefined
Inherited from: WithBackgroundColor

The background color of the chart.

binTemporalData

inherited Property
Type
boolean
Inherited from: SerialChartModel

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.

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.

colorMatch

inherited Property
Type
boolean
Inherited from: WithColorMatch

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

inherited Property
Type
ChartConfig
Inherited from: WithConfig

The current chart configuration object.

cursorCrosshair

inherited Property
Type
WebChartCursorCrosshair | undefined
Inherited from: ModelWithMultiAxes

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

inherited Property
Type
boolean
Inherited from: ModelWithMultiAxes

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

inherited Property
Type
ISimpleLineSymbol | undefined
Inherited from: ModelWithMultiAxes

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

inherited Property
Type
boolean
Inherited from: ModelWithMultiAxes

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.

dataLabelsSymbol

inherited Property
Type
WebChartTextSymbol | undefined
Inherited from: WithDataLabelsSymbol

Data labels text symbol (font, color, style).

dataLabelsVisibility

inherited Property
Type
boolean

Whether data labels are visible.

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.

guideLabelsSymbol

inherited Property
Type
WebChartTextSymbol | undefined
Inherited from: ModelWithGuides

The guide labels text symbol (font, color, style).

layer

readonlyinherited Property
Type
SupportedLayer | undefined
Inherited from: WithLayer

The chart model's layer.

legendMaxHeight

inherited Property
Type
number | undefined
Inherited from: ModelWithLegend

Maximum legend height.

legendPosition

inherited Property
Type
WebChartLegendPositions
Inherited from: ModelWithLegend

Legend position: top, bottom, left, or right.

legendRoundMarker

inherited Property
Type
boolean
Inherited from: ModelWithLegend

Whether legend markers are rounded.

legendTextSymbol

inherited Property
Type
WebChartTextSymbol | undefined
Inherited from: ModelWithLegend

Legend item text symbol (font, color, style).

legendTitleSymbol

inherited Property
Type
WebChartTextSymbol | undefined
Inherited from: ModelWithLegend

Legend title text symbol (font, color, style).

legendTitleText

inherited Property
Type
string
Inherited from: ModelWithLegend

The legend title text.

legendTitleVisibility

inherited Property
Type
boolean
Inherited from: ModelWithLegend

Whether the legend title is visible.

legendVisibility

inherited Property
Type
boolean
Inherited from: ModelWithLegend

Whether the legend title is visible.

nullCategory

inherited Property
Type
WebChartNullCategory | undefined
Inherited from: SerialChartModel

The null category configuration of the chart.

The following to be set on the model for the null category to be applied:

  • fetchNULLValues to be set to true on the model.
  • colorMatch to be set to false on the model

nullPolicy

inherited Property
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.

numericFields

autocast inherited Property
Type
string[]
Inherited from: SerialChartModel

The numeric fields array for the chart.

orderByList

inherited Property
Type
string[]
Inherited from: SerialChartModel

The list of values for custom sort.

rotatedState

inherited Property
Type
boolean
Inherited from: WithRotatedState

Whether the chart is rotated.

seriesLength

readonlyinherited Property
Type
number
Inherited from: WithSeriesLength

The length of the series array.

splitByField

inherited Property
Type
string
Inherited from: SerialChartModel

The split-by field for the chart.

splitByValues

readonlyinherited Property
Type
string[]
Inherited from: WithSplitByValues

The split-by values for the chart.

stackedType

inherited Property
Type
WebChartStackedKinds | undefined
Inherited from: SerialChartModel

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

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.

temporalBinningSize

inherited Property
Type
number | undefined

Time interval size for a temporal bar chart or line chart.

temporalBinningUnit

inherited Property
Type
WebChartTemporalBinningUnits | undefined

Time interval units for a temporal bar chart or line chart.

timeAggregationType

inherited Property
Type
WebChartTimeAggregationTypes | undefined

Time aggregation type for a temporal bar chart or line chart.

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.

trimIncompleteTimeInterval

inherited Property
Type
boolean | undefined

Whether to trim incomplete time intervals for a temporal bar chart or line chart.

version

readonlyinherited Property
Type
string | undefined
Inherited from: WithVersion

The version of the chart configuration.

xAxisField

inherited Property
Type
string
Inherited from: SerialChartModel

The x-axis field for the chart.

xAxisLabelsVisibility

inherited Property
Type
boolean

Whether the x-axis labels are visible.

xAxisTitleSymbol

inherited Property
Type
WebChartTextSymbol | undefined
Inherited from: WithXAxisTitleSymbol

X-axis title text symbol (font, color, style).

xAxisTitleText

inherited Property
Type
string
Inherited from: WithXAxisTitleText

The x-axis title text.

xAxisTitleVisibility

inherited Property
Type
boolean

Whether the x-axis title is visible. true: X-axis title is visible. false: X-axis title is hidden.

Methods

MethodSignatureClass
inherited
addXAxisGuide(name: string, index?: number): void
inherited
addYAxisGuide(name: string, index?: number): void
inherited
deleteXAxisGuide(index?: number): void
inherited
deleteYAxisGuide(index?: number): void
inherited
generateChartTitle(): string
inherited
generateXAxisTitle(): string
inherited
generateYAxisTitle(): string
getAssignToSecondValueAxis(seriesIndex: number): boolean
getAxisLabelsVisibility(axisIndex: number): boolean
inherited
getAxisScrollbar(axisIndex: number): WebChartAxisScrollBar | undefined
inherited
getAxisTitleSymbol(axisIndex: number): WebChartTextSymbol | undefined
inherited
getAxisTitleText(axisIndex: number): string
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
getDataTooltipReverseColor(seriesIndex?: number): boolean
getDataTooltipValueFormat(seriesIndex: number): NumberFormatOptions | undefined
getDataTooltipVisibility(seriesIndex?: number): boolean
getDefaultXAxisTitleText(): string
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
getHorizontalAxisLabelsBehavior(): WebChartLabelBehavior
getIntegerOnlyValues(axisIndex: number): boolean
inherited
getLogarithmic(axisIndex: number): boolean
inherited
getMaxBound(axisIndex: number): number
inherited
getMinBound(axisIndex: number): number
inherited
getOrderOfSeries(): string[]
inherited
getSeriesColor(seriesIndex: number): Color | undefined
getSeriesHideOversizedSideBySideLabels(seriesIndex: number): boolean | undefined
getSeriesHideOversizedStackedLabels(seriesIndex: number): boolean | undefined
inherited
getSeriesId(seriesIndex: number): string | undefined
inherited
getSeriesIndex(seriesId: string): number | undefined
inherited
getSeriesName(seriesIndex: number): string | undefined
getSeriesVisibility(seriesIndex: number): boolean
getSortOrder(): SerialChartDataSortingKinds
inherited
getTickSpacing(axisIndex: number): number | undefined
getTooltipReverseColor(index: number, orientation?: GuideOrientation): boolean
getVerticalAxisLabelsBehavior(): WebChartLabelBehavior
inherited
getXGuidesLength(): number | undefined
inherited
getYGuidesLength(): number | undefined
inherited
isSameChartAs(otherModel: ChartModel | undefined): boolean
moveCustomSortValuesInOrderByList(fromIndex: number, toIndex: number): void
inherited
moveSeries(fromIndex: number, toIndex: number): void
resetAvailable(): boolean
resetSeriesStyling(): void
inherited
resetTimeInterval(): void
setAssignToSecondValueAxis(assign: boolean, seriesIndex: number): void
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
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
inherited
setDataFilters(newDataFilter: WebChartDataFilters | undefined): Promise<void>
setDataTooltipReverseColor(reverseColor: boolean, seriesIndex?: number): void
setDataTooltipValueFormat(seriesIndex: number, valueFormat: NumberFormatOptions | undefined): void
setDataTooltipVisibility(visibility: boolean, seriesIndex?: number): void
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
setHorizontalAxisLabelsBehavior(horizontalBehavior: WebChartLabelBehavior): void
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
inherited
setOrderOfSeries(newOrder: string[]): void
inherited
setSeriesColor(newColor: Color | undefined, seriesIndex: number): void
setSeriesHideOversizedSideBySideLabels(hide: boolean | undefined, seriesIndex: number): void
setSeriesHideOversizedStackedLabels(hide: boolean | undefined, seriesIndex?: number): void
inherited
setSeriesName(name: string, seriesIndex: number): void
setSeriesVisibility(props: LegendItemVisibility): void
inherited
setSortOrder(newSortOrder: HeatChartDataSortingKinds | SerialChartDataSortingKinds, orderByList?: string[]): void
inherited
setTickSpacing(tickSpacing: number, axisIndex: number): void
setTooltipReverseColor(reverseColor: boolean, index: number, orientation?: GuideOrientation): void
setup(params: ModelParams<ChartConfig<typeof ModelTypes.BarChart>>): Promise<void>
setVerticalAxisLabelsBehavior(verticalBehavior: WebChartLabelBehavior): void
inherited
update(): Promise<void>
updateSeriesFromLayerFilter(): Promise<void>

addXAxisGuide

inherited Method
Signature
addXAxisGuide (name: string, index?: number): void
Inherited from: ModelWithXGuides

Adds an X-axis guide.

Parameters

ParameterTypeDescriptionRequired
name

The name of the guide.

index

The index to insert the new guide in the list of X-axis guides. If left undefined, the guide is appended to the end of the list.

Returns
void

addYAxisGuide

inherited Method
Signature
addYAxisGuide (name: string, index?: number): void
Inherited from: ModelWithYGuides

Adds a Y-axis guide.

Parameters

ParameterTypeDescriptionRequired
name

The name of the guide.

index

The index to insert the new guide in the list of Y-axis guides. If left undefined, the guide is appended to the end of the list.

Returns
void

deleteXAxisGuide

inherited Method
Signature
deleteXAxisGuide (index?: number): void
Inherited from: ModelWithXGuides

Deletes an X-axis guide.

Parameters

ParameterTypeDescriptionRequired
index

The index of the guide to delete in the list of X-axis guides. If left undefined, the last guide in the list is deleted.

Returns
void

deleteYAxisGuide

inherited Method
Signature
deleteYAxisGuide (index?: number): void
Inherited from: ModelWithYGuides

Deletes a Y-axis guide.

Parameters

ParameterTypeDescriptionRequired
index

The index of the guide to delete in the list of Y-axis guides. If left undefined, the last guide in the list is deleted.

Returns
void

generateChartTitle

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

Generate the proper chart title given the current config.

Returns
string

generateXAxisTitle

inherited Method
Signature
generateXAxisTitle (): string
Inherited from: WithGenerateXAxisTitle

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

Returns
string

generateYAxisTitle

inherited Method
Signature
generateYAxisTitle (): string
Inherited from: SerialChartModel

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

Returns
string

getAssignToSecondValueAxis

inherited Method
Signature
getAssignToSecondValueAxis (seriesIndex: number): boolean
Inherited from: SerialChartModel

Gets whether the series should be assigned to the second value axis.

Parameters

ParameterTypeDescriptionRequired
seriesIndex

The index of the series.

Returns
boolean

getAxisLabelsVisibility

inherited Method
Signature
getAxisLabelsVisibility (axisIndex: number): boolean
Inherited from: ModelWithMultiAxes

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

inherited Method
Signature
getAxisScrollbar (axisIndex: number): WebChartAxisScrollBar | undefined
Inherited from: ModelWithMultiAxes

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

inherited Method
Signature
getAxisTitleSymbol (axisIndex: number): WebChartTextSymbol | undefined
Inherited from: ModelWithMultiAxes

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

inherited Method
Signature
getAxisTitleText (axisIndex: number): string
Inherited from: ModelWithMultiAxes

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

inherited Method
Signature
getAxisTitleVisibility (axisIndex: number): boolean
Inherited from: ModelWithMultiAxes

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

inherited Method
Signature
getAxisValueFormat (axisIndex: number): CategoryFormatOptions | DateTimeFormatOptions | NumberFormatOptions | undefined
Inherited from: ModelWithMultiAxes

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

inherited Method
Signature
getAxisVisibility (axisIndex: number): boolean
Inherited from: ModelWithMultiAxes

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

inherited Method
Signature
getBuffer (axisIndex: number): boolean
Inherited from: ModelWithMultiAxes

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

getCustomSortValues

inherited Method
Signature
getCustomSortValues (): Promise<string[]>
Inherited from: SerialChartModel

Gets the list of the category values for the chart.

Returns
Promise<string[]>

getDataFilters

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

Gets the data filter for the bar chart.

getDataTooltipReverseColor

inherited Method
Signature
getDataTooltipReverseColor (seriesIndex?: number): boolean
Inherited from: ModelWithTooltips

Gets the setting of the dataTooltipReverseColor property.

  • If the seriesIndex is provided, the dataTooltipReverseColor for that series will be returned. Otherwise, the same property of the first series will be returned.
  • If the dataTooltipReverseColor is not set on the series, the default value of false will be returned.

Parameters

ParameterTypeDescriptionRequired
seriesIndex

The index of the series.

Returns
boolean

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

getDataTooltipVisibility

inherited Method
Signature
getDataTooltipVisibility (seriesIndex?: number): boolean
Inherited from: ModelWithTooltips

Gets the visibility of the data tooltips.

  • If the seriesIndex is 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 true will be returned.

Parameters

ParameterTypeDescriptionRequired
seriesIndex

The index of the series.

Returns
boolean

getDefaultXAxisTitleText

inherited Method
Signature
getDefaultXAxisTitleText (): string
Inherited from: ModelWithMultiAxes

Get the default x-axis title text.

Returns
string

getDisplayCursorTooltip

inherited Method
Signature
getDisplayCursorTooltip (axisIndex: number): boolean
Inherited from: ModelWithMultiAxes

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

inherited Method
Signature
getDisplayZeroLine (axisIndex: number): boolean
Inherited from: ModelWithMultiAxes

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

inherited Method
Signature
getGridLinesSymbol (): ISimpleLineSymbol | undefined
Inherited from: ModelWithMultiAxes

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

getGuideAbove

inherited Method
Signature
getGuideAbove (index?: number, orientation?: GuideOrientation): boolean
Inherited from: ModelWithGuides

Gets whether the guide should be rendered above the other chart elements.

Parameters

ParameterTypeDescriptionRequired
index

Default 0. The index of the guide in the list of guides for the given axis orientation.

orientation

Default y. The axis orientation of the guide.

Returns
boolean

getGuideEnd

inherited Method
Signature
getGuideEnd (index?: number, orientation?: GuideOrientation): Date | number | string | null | undefined
Inherited from: ModelWithGuides

Gets the end value of a guide.

Parameters

ParameterTypeDescriptionRequired
index

Default 0. The index of the guide in the list of guides for the given axis orientation.

orientation

Default y. The axis orientation of the guide.

Returns
Date | number | string | null | undefined

getGuideLabelText

inherited Method
Signature
getGuideLabelText (index?: number, orientation?: GuideOrientation): string | undefined
Inherited from: ModelWithGuides

Gets the guide label text.

Parameters

ParameterTypeDescriptionRequired
index

Default 0. The index of the guide in the list of guides for the given axis orientation.

orientation

Default y. The axis orientation of the guide.

Returns
string | undefined

getGuideName

inherited Method
Signature
getGuideName (index?: number, orientation?: GuideOrientation): string | undefined
Inherited from: ModelWithGuides

Gets the name of a guide.

Parameters

ParameterTypeDescriptionRequired
index

Default 0. The index of the guide in the list of guides for the given axis orientation.

orientation

Default y. The axis orientation of the guide.

Returns
string | undefined

getGuideStart

inherited Method
Signature
getGuideStart (index?: number, orientation?: GuideOrientation): Date | number | string | null
Inherited from: ModelWithGuides

Gets the start value of a guide.

Parameters

ParameterTypeDescriptionRequired
index

Default 0. The index of the guide in the list of guides for the given axis orientation.

orientation

Default y. The axis orientation of the guide.

Returns
Date | number | string | null

getGuideStyle

inherited Method
Signature
getGuideStyle (index?: number, orientation?: GuideOrientation): ISimpleFillSymbol | ISimpleLineSymbol | undefined
Inherited from: ModelWithGuides

Gets the guide style.

Parameters

ParameterTypeDescriptionRequired
index

Default 0. The index of the guide in the list of guides for the given axis orientation.

orientation

Default y. The axis orientation of the guide.

Returns
ISimpleFillSymbol | ISimpleLineSymbol | undefined

getGuideVisibility

inherited Method
Signature
getGuideVisibility (index?: number, orientation?: GuideOrientation): boolean
Inherited from: ModelWithGuides

Gets whether a guide is visible.

Parameters

ParameterTypeDescriptionRequired
index

Default 0. The index of the guide in the list of guides for the given axis orientation.

orientation

Default y. The axis orientation of the guide.

Returns
boolean

getHorizontalAxisLabelsBehavior

inherited Method
Signature
getHorizontalAxisLabelsBehavior (): WebChartLabelBehavior
Inherited from: ModelWithMultiAxes

Gets the horizontal axis labels behavior for the chart.

getIntegerOnlyValues

inherited Method
Signature
getIntegerOnlyValues (axisIndex: number): boolean
Inherited from: ModelWithMultiAxes

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

inherited Method
Signature
getLogarithmic (axisIndex: number): boolean
Inherited from: ModelWithMultiAxes

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

inherited Method
Signature
getMaxBound (axisIndex: number): number
Inherited from: ModelWithMultiAxes

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

inherited Method
Signature
getMinBound (axisIndex: number): number
Inherited from: ModelWithMultiAxes

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

getOrderOfSeries

inherited Method
Signature
getOrderOfSeries (): string[]
Inherited from: SerialChartModel

Gets the order of the series array by returning an array of series ids.

Returns
string[]

getSeriesColor

inherited Method
Signature
getSeriesColor (seriesIndex: number): Color | undefined
Inherited from: SerialChartModel

Gets the color of the series based on the series index. If the index is out of bounds, it will return undefined.

Parameters

ParameterTypeDescriptionRequired
seriesIndex

The index of the series.

Returns
Color | undefined

getSeriesHideOversizedSideBySideLabels

Method
Signature
getSeriesHideOversizedSideBySideLabels (seriesIndex: number): boolean | undefined

Gets whether to hide oversized data labels of the side-by-side series based on the series index. If the index is out of bounds, it will return undefined.

Parameters

ParameterTypeDescriptionRequired
seriesIndex

The index of the series.

Returns
boolean | undefined

getSeriesHideOversizedStackedLabels

Method
Signature
getSeriesHideOversizedStackedLabels (seriesIndex: number): boolean | undefined

Gets whether to hide oversized stacked labels of the series based on the series index. If the index is out of bounds, it will return undefined.

Parameters

ParameterTypeDescriptionRequired
seriesIndex

The index of the series.

Returns
boolean | undefined

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

getSeriesName

inherited Method
Signature
getSeriesName (seriesIndex: number): string | undefined
Inherited from: SerialChartModel

Gets the name of the series based on the series index. If the index is out of bounds, it will return undefined.

Parameters

ParameterTypeDescriptionRequired
seriesIndex

The index of the series.

Returns
string | 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

getSortOrder

Method
Signature
getSortOrder (): SerialChartDataSortingKinds

Gets the sort order for the bar chart.

Returns
SerialChartDataSortingKinds

{"xAxisAsc" | "xAxisDesc" | "yAxisAsc" | "yAxisDesc" | "customSort"}

getTickSpacing

inherited Method
Signature
getTickSpacing (axisIndex: number): number | undefined
Inherited from: ModelWithMultiAxes

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

getTooltipReverseColor

inherited Method
Signature
getTooltipReverseColor (index: number, orientation?: GuideOrientation): boolean
Inherited from: ModelWithGuides

Gets whether the tooltip text color should be reversed for a guide.

Parameters

ParameterTypeDescriptionRequired
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

inherited Method
Signature
getVerticalAxisLabelsBehavior (): WebChartLabelBehavior
Inherited from: ModelWithMultiAxes

Gets the vertical axis labels behavior for the chart.

getXGuidesLength

inherited Method
Signature
getXGuidesLength (): number | undefined
Inherited from: ModelWithXGuides

Gets the number guides in the X-axis guides list.

Returns
number | undefined

The number of X-axis guides.

getYGuidesLength

inherited Method
Signature
getYGuidesLength (): number | undefined
Inherited from: ModelWithYGuides

Gets the number guides in the Y-axis guides list.

Returns
number | undefined

The number of Y-axis guides.

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

moveCustomSortValuesInOrderByList

inherited Method
Signature
moveCustomSortValuesInOrderByList (fromIndex: number, toIndex: number): void
Inherited from: SerialChartModel

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.

Parameters

ParameterTypeDescriptionRequired
fromIndex

The index to move the custom sort value from.

toIndex

The index to move the custom sort value to.

Returns
void

moveSeries

inherited Method
Signature
moveSeries (fromIndex: number, toIndex: number): void
Inherited from: SerialChartModel

Moves a series from one index in the series array to another.

Parameters

ParameterTypeDescriptionRequired
fromIndex

Index to move the series from.

toIndex

Index to move the series to.

Returns
void

resetAvailable

Method
Signature
resetAvailable (): boolean

Returns whether the series styling is able to be reset.

Returns
boolean

resetSeriesStyling

Method
Signature
resetSeriesStyling (): void

Resets the series styling to the default styling.

Returns
void

resetTimeInterval

inherited Method
Signature
resetTimeInterval (): void

Resets the time interval to default for a temporal line chart.

Returns
void

setAssignToSecondValueAxis

inherited Method
Signature
setAssignToSecondValueAxis (assign: boolean, seriesIndex: number): void
Inherited from: SerialChartModel

Sets whether the series should be assigned to the second value axis.

Parameters

ParameterTypeDescriptionRequired
assign

The value for the setting.

seriesIndex

The index of the series.

Returns
void

setAxisLabelsVisibility

inherited Method
Signature
setAxisLabelsVisibility (isVisible: boolean, axisIndex: number): void
Inherited from: ModelWithMultiAxes

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

inherited Method
Signature
setAxisScrollbar (scrollbar: WebChartAxisScrollBar, axisIndex: number): void
Inherited from: ModelWithMultiAxes

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

inherited Method
Signature
setAxisTitleSymbol (titleSymbol: WebChartTextSymbol | undefined, axisIndex: number): void
Inherited from: ModelWithMultiAxes

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

inherited Method
Signature
setAxisTitleText (titleText: string, axisIndex: number): void
Inherited from: ModelWithMultiAxes

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

inherited Method
Signature
setAxisTitleVisibility (isVisible: boolean, axisIndex: number): void
Inherited from: ModelWithMultiAxes

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

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

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

inherited Method
Signature
setAxisVisibility (isVisible: boolean, axisIndex: number): void
Inherited from: ModelWithMultiAxes

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

inherited Method
Signature
setBuffer (buffer: boolean, axisIndex: number): void
Inherited from: ModelWithMultiAxes

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 (newDataFilter: WebChartDataFilters | undefined): Promise<void>
Inherited from: SerialChartModel

Sets the data filter for the bar chart.

Parameters

ParameterTypeDescriptionRequired
newDataFilter

The new data filter.

Returns
Promise<void>

setDataTooltipReverseColor

inherited Method
Signature
setDataTooltipReverseColor (reverseColor: boolean, seriesIndex?: number): void
Inherited from: ModelWithTooltips

Sets the setting of the dataTooltipReverseColor property.

  • If the seriesIndex is provided, the reverse color will be set for that series only. Otherwise, the reverse color will be set for all series.

Parameters

ParameterTypeDescriptionRequired
reverseColor

Indicator of whether to reverse the color.

seriesIndex

The index of the series to set the reverse color.

Returns
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

setDataTooltipVisibility

inherited Method
Signature
setDataTooltipVisibility (visibility: boolean, seriesIndex?: number): void
Inherited from: ModelWithTooltips

Sets the visibility of the data tooltips.

  • If the seriesIndex is provided, the visibility will be set for that series only. Otherwise, the visibility will be set for all series.

Parameters

ParameterTypeDescriptionRequired
visibility

The visibility of the data tooltips.

seriesIndex

The index of the series to set the visibility.

Returns
void

setDisplayCursorTooltip

inherited Method
Signature
setDisplayCursorTooltip (displayCursorTooltip: boolean, axisIndex: number): void
Inherited from: ModelWithMultiAxes

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

inherited Method
Signature
setDisplayZeroLine (displayZeroLine: boolean, axisIndex: number): void
Inherited from: ModelWithMultiAxes

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

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

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

setGuideAbove

inherited Method
Signature
setGuideAbove (above: boolean, index?: number, orientation?: GuideOrientation): void
Inherited from: ModelWithGuides

Sets whether the guide should be rendered above the other chart elements.

Parameters

ParameterTypeDescriptionRequired
above

New above boolean to set.

index

Default 0. The index of the guide in the list of guides for the given axis orientation.

orientation

Default y. The axis orientation of the guide.

Returns
void

setGuideEnd

inherited Method
Signature
setGuideEnd (end: Date | number | string | null | undefined, index?: number, orientation?: GuideOrientation): void
Inherited from: ModelWithGuides

Sets the end value of a guide.

Parameters

ParameterTypeDescriptionRequired
end

New end value to set.

index

Default 0. The index of the guide in the list of guides for the given axis orientation.

orientation

Default y. The axis orientation of the guide.

Returns
void

setGuideLabelText

inherited Method
Signature
setGuideLabelText (labelText: string, index?: number, orientation?: GuideOrientation): void
Inherited from: ModelWithGuides

Sets the guide label text.

Parameters

ParameterTypeDescriptionRequired
labelText

New label text to set.

index

Default 0. The index of the guide in the list of guides for the given axis orientation.

orientation

Default y. The axis orientation of the guide.

Returns
void

setGuideName

inherited Method
Signature
setGuideName (name: string, index?: number, orientation?: GuideOrientation): void
Inherited from: ModelWithGuides

Sets the name of a guide.

Parameters

ParameterTypeDescriptionRequired
name

New name to set.

index

Default 0. The index of the guide in the list of guides for the given axis orientation.

orientation

Default y. The axis orientation of the guide.

Returns
void

setGuideStart

inherited Method
Signature
setGuideStart (start: Date | number | string | null, index?: number, orientation?: GuideOrientation): void
Inherited from: ModelWithGuides

Sets the start value of a guide.

Parameters

ParameterTypeDescriptionRequired
start

New start value to set.

index

Default 0. The index of the guide in the list of guides for the given axis orientation.

orientation

Default y. The axis orientation of the guide.

Returns
void

setGuideStyle

inherited Method
Signature
setGuideStyle (style: ISimpleFillSymbol | ISimpleLineSymbol, index?: number, orientation?: GuideOrientation): void
Inherited from: ModelWithGuides

Sets the guide style.

Parameters

ParameterTypeDescriptionRequired
style

New style to set.

index

Default 0. The index of the guide in the list of guides for the given axis orientation.

orientation

Default y. The axis orientation of the guide.

Returns
void
Example
chartModel.setGuideStyle(
{
type: "esriSLS",
color: [0, 200, 0, 255],
width: 2,
},
1,
);

setGuideVisibility

inherited Method
Signature
setGuideVisibility (visible: boolean, index?: number, orientation?: GuideOrientation): void
Inherited from: ModelWithGuides

Sets whether a guide is visible.

Parameters

ParameterTypeDescriptionRequired
visible

New visibility to set.

index

Default 0. The index of the guide in the list of guides for the given axis orientation.

orientation

Default y. The axis orientation of the guide.

Returns
void

setHorizontalAxisLabelsBehavior

inherited Method
Signature
setHorizontalAxisLabelsBehavior (horizontalBehavior: WebChartLabelBehavior): void
Inherited from: ModelWithMultiAxes

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

inherited Method
Signature
setIntegerOnlyValues (integerOnlyValues: boolean, axisIndex: number): void
Inherited from: ModelWithMultiAxes

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

inherited Method
Signature
setLogarithmic (isLogarithmic: boolean, axisIndex: number): void
Inherited from: ModelWithMultiAxes

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

inherited Method
Signature
setMaxBound (newMaxBound: number | null, axisIndex: number): void
Inherited from: ModelWithMultiAxes

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

inherited Method
Signature
setMinBound (newMinBound: number | null, axisIndex: number): void
Inherited from: ModelWithMultiAxes

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

setOrderOfSeries

inherited Method
Signature
setOrderOfSeries (newOrder: string[]): void
Inherited from: SerialChartModel

Sets the order of the series array by providing an array of series ids.

Parameters

ParameterTypeDescriptionRequired
newOrder
string[]

The new order of the series array.

Returns
void

setSeriesColor

inherited Method
Signature
setSeriesColor (newColor: Color | undefined, seriesIndex: number): void
Inherited from: SerialChartModel

Sets the color of the series based on the series index.

Parameters

ParameterTypeDescriptionRequired
newColor

The new color for the series.

seriesIndex

The index of the series.

Returns
void

setSeriesHideOversizedSideBySideLabels

Method
Signature
setSeriesHideOversizedSideBySideLabels (hide: boolean | undefined, seriesIndex: number): void

Sets whether to hide oversized data labels of the side-by-side series based on the series index.

Parameters

ParameterTypeDescriptionRequired
hide

The value for hiding oversized data labels.

seriesIndex

The index of the series.

Returns
void

setSeriesHideOversizedStackedLabels

Method
Signature
setSeriesHideOversizedStackedLabels (hide: boolean | undefined, seriesIndex?: number): void

Sets whether to hide oversized stacked labels of the series based on the series index.

Parameters

ParameterTypeDescriptionRequired
hide

The value for hiding oversized stacked labels.

seriesIndex

The index of the series. When not provided all the series will be updated.

Returns
void

setSeriesName

inherited Method
Signature
setSeriesName (name: string, seriesIndex: number): void
Inherited from: SerialChartModel

Sets name of the series based on the series index.

Parameters

ParameterTypeDescriptionRequired
name

The name for the series.

seriesIndex

The index of the series.

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

setSortOrder

inherited Method
Signature
setSortOrder (newSortOrder: HeatChartDataSortingKinds | SerialChartDataSortingKinds, orderByList?: string[]): void
Inherited from: SerialChartModel

Sets the sort order for the bar chart.

Parameters

ParameterTypeDescriptionRequired
newSortOrder

The new sort order.

orderByList
string[]

The list of category's values to order by.

Returns
void

setTickSpacing

inherited Method
Signature
setTickSpacing (tickSpacing: number, axisIndex: number): void
Inherited from: ModelWithMultiAxes

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

setTooltipReverseColor

inherited Method
Signature
setTooltipReverseColor (reverseColor: boolean, index: number, orientation?: GuideOrientation): void
Inherited from: ModelWithGuides

Sets whether the tooltip text color should be reversed for a guide.

Parameters

ParameterTypeDescriptionRequired
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

Method
Signature
setup (params: ModelParams<ChartConfig<typeof ModelTypes.BarChart>>): Promise<void>

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

Parameters

ParameterTypeDescriptionRequired
params
ModelParams<ChartConfig<typeof ModelTypes.BarChart>>
Returns
Promise<void>

setVerticalAxisLabelsBehavior

inherited Method
Signature
setVerticalAxisLabelsBehavior (verticalBehavior: WebChartLabelBehavior): void
Inherited from: ModelWithMultiAxes

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>

updateSeriesFromLayerFilter

inherited Method
Signature
updateSeriesFromLayerFilter (): Promise<void>
Inherited from: SerialChartModel

Updates the series based on the layer filter.

Returns
Promise<void>