▾
import { WithGenerateXAxisTitle } from "@arcgis/charts-components/model/properties/axes/x-axis/generate-x-axis-title.js";- Inheritance
- WithGenerateXAxisTitle→
chart-model-base→ EventTarget
Adds support for computing an x-axis title based on chart type.
Constructors
Constructor
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| args | any[] | | |
Properties
| Property | Type | Class |
|---|---|---|
| inherited | ||
| readonly inherited | ||
| inherited | ||
| readonly 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.
dataStore
- Type
- any
Data store object that can be used to store any data needed for the chart.
revision
- Type
- number
The current revision number of the chart configuration. Increments with each update.
Methods
| Method | Signature | Class |
|---|---|---|
| inherited | generateChartTitle(): string | |
| generateXAxisTitle(): string | | |
| inherited | isSameChartAs(otherModel: ChartModel | undefined): boolean | |
| inherited | recall(configRevision?: number): ChartConfig | undefined | |
| inherited | setup(params: ModelParams<ChartConfig>): Promise<void> | |
| inherited | update(): Promise<void> |
generateChartTitle
- Signature
-
generateChartTitle (): string
Generate the proper chart title from the current config.
- Returns
- string
generateXAxisTitle
- Signature
-
generateXAxisTitle (): string
Generate the proper x-axis title from the current config.
- Returns
- string
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
recall
- Signature
-
recall (configRevision?: number): ChartConfig | undefined
Recalls a previous chart configuration based on its revision number. Returns undefined if the requested revision is not available (beyond the stored history limit).
If no configRevision number is provided, it recalls the last configuration just before the current one.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| configRevision | | |
- Returns
- ChartConfig | undefined
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. | |
update
- Signature
-
update (): Promise<void>
Can be awaited to allow any pending async updates to complete.