Skip to content
ESM
import { WithDataFilters } from "@arcgis/charts-components/model/properties/data-filters.js";
Inheritance:
WithDataFilterschart-model-baseEventTarget
Subclasses:
chart-model

Adds support for working with chart data filters.

Constructors

Constructor

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

Properties

PropertyTypeClass
chartType
readonly inherited
dataStore
inherited
any

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.

chartType

readonlyinherited Property
Type
ChartTypes
Inherited from: ChartModelBase

The chart type.

dataStore

inherited Property
Type
any
Inherited from: ChartModelBase

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

Methods

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

generateChartTitle

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

Generate the proper chart title from the current config.

Returns
string

getDataFilters

Method
Signature
getDataFilters (): WebChartDataFilters | undefined

Gets the data filter for the bar chart.

isSameChartAs

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

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

Parameters
ParameterTypeDescriptionRequired
otherModel

The other chart model to compare to.

Returns
boolean

setDataFilters

Method
Signature
setDataFilters (newDataFilters: WebChartDataFilters | undefined): Promise<void>

Sets the data filter for the chart.

Parameters
ParameterTypeDescriptionRequired
newDataFilters

The new data filter.

Returns
Promise<void>

setup

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

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

Parameters
ParameterTypeDescriptionRequired
params

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

Returns
Promise<void>

update

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

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

Returns
Promise<void>