Skip to content
ESM
import { ChartModelBase } from "@arcgis/charts-components/model/chart-model/chart-model-base.js";
Inheritance:
ChartModelBaseEventTarget
Subclasses:
config, layer, chart-id, title-text, title-symbol, version, subtitle-text, subtitle-symbol, description-text, description-symbol, title-visibility, subtitle-visibility, description-visibility, chart-renderer, background-color, series-visibility, series-id, series-index, series-length, chart-sub-type, data-tooltip-value-format, fetch-null-values, split-by-values, data-filters, chart-model, color-match, rotated-state, data-labels-visibility, data-labels-symbol, x-axis-title-text, x-axis-labels-visibility, x-axis-title-visibility, x-bounds, x-axis-title-symbol, axis-labels-symbol, axis-lines-symbol, generate-x-axis-title, negative-values-stacked-to-baseline, max-x-bound, min-x-bound

Constructors

Constructor

Constructor
Parameters
ParameterTypeDescriptionRequired
args
any[]

Properties

asyncUpdatesPromise

Property
Type
Promise<void>

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.

chartType

readonly Property
Type
ChartTypes

The chart type.

dataStore

Property
Type
any

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

Methods

MethodSignatureClass
generateChartTitle(): string
isSameChartAs(otherModel: ChartModel | undefined): boolean
setup(params: ModelParams<ChartConfig>): Promise<void>
update(): Promise<void>

generateChartTitle

Method
Signature
generateChartTitle (): string

Generate the proper chart title from the current config.

Returns
string

isSameChartAs

Method
Signature
isSameChartAs (otherModel: ChartModel | undefined): boolean

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

setup

Method
Signature
setup (params: ModelParams<ChartConfig>): Promise<void>

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

Parameters
ParameterTypeDescriptionRequired
params

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

Returns
Promise<void>

update

Method
Signature
update (): Promise<void>

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

Returns
Promise<void>