Skip to content
ESM
import { ModelWithLineMarkerStyling } from "@arcgis/charts-components/model/mixins/model-with-line-marker-styling.js";
Inheritance:
ModelWithLineMarkerStylingchart-modelchart-model-baseEventTarget
Subclasses:
line-chart-model, radar-chart-model

Constructors

Constructor

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

Properties

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.

backgroundColor

inherited Property
Type
Color | undefined
Inherited from: WithBackgroundColor

The background color of the chart.

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.

config

inherited Property
Type
ChartConfig
Inherited from: WithConfig

The current chart configuration object.

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.

layer

readonlyinherited Property
Type
SupportedLayer | undefined
Inherited from: WithLayer

The chart model's layer.

seriesLength

readonlyinherited Property
Type
number
Inherited from: WithSeriesLength

The length of the series array.

splitByValues

readonlyinherited Property
Type
string[]
Inherited from: WithSplitByValues

The split-by values for the chart.

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.

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.

version

readonlyinherited Property
Type
string | undefined
Inherited from: WithVersion

The version of the chart configuration.

Methods

MethodSignatureClass
generateChartTitle
inherited
generateChartTitle(): string
getAreaColor(seriesIndex: number): Color | undefined
getConnectLines(seriesIndex: number): boolean | undefined
getDataFilters
inherited
getDataFilters(): WebChartDataFilters | undefined
getDataTooltipValueFormat(seriesIndex: number): NumberFormatOptions | undefined
getSeriesId
inherited
getSeriesId(seriesIndex: number): string | undefined
getSeriesIndex
inherited
getSeriesIndex(seriesId: string): number | undefined
getSeriesLineStyle(seriesIndex: number): RESTSimpleLineSymbolStyle | undefined
getSeriesLineWidth(seriesIndex: number): number | undefined
getSeriesMarkerColor(seriesIndex: number): Color | undefined
getSeriesMarkerSize(seriesIndex: number): number | undefined
getSeriesMarkerStyle(seriesIndex: number): RESTSimpleMarkerSymbolStyle | undefined
getSeriesVisibility(seriesIndex: number): boolean
isAreaVisible(seriesIndex: number): boolean
isLineSmoothed(seriesIndex: number): boolean
isMarkerVisible(seriesIndex: number): boolean
isSameChartAs
inherited
isSameChartAs(otherModel: ChartModel | undefined): boolean
setAreaColor(color: Color | undefined, seriesIndex: number): void
setAreaVisible(visible: boolean, seriesIndex: number): void
setConnectLines(connect: boolean | undefined, seriesIndex: number): void
setDataFilters
inherited
setDataFilters(newDataFilters: WebChartDataFilters | undefined): Promise<void>
setDataTooltipValueFormat(seriesIndex: number, valueFormat: NumberFormatOptions | undefined): void
setLineSmoothed(smoothed: boolean, seriesIndex: number): void
setMarkerVisible(visible: boolean, seriesIndex: number): void
setSeriesLineStyle(style: RESTSimpleLineSymbolStyle | undefined, seriesIndex: number): void
setSeriesLineWidth(width: number | undefined, seriesIndex: number): void
setSeriesMarkerColor(color: Color | undefined, seriesIndex: number): void
setSeriesMarkerSize(size: number | undefined, seriesIndex: number): void
setSeriesMarkerStyle(style: RESTSimpleMarkerSymbolStyle | undefined, seriesIndex: number): void
setSeriesVisibility(props: LegendItemVisibility): 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

getAreaColor

Method
Signature
getAreaColor (seriesIndex: number): Color | undefined

Specify the color of the filled area for line chart. Note: areaColor will be applied only if showArea is true, and is defaulted to the line color if not provided.

Parameters
ParameterTypeDescriptionRequired
seriesIndex

The index of the series.

Returns
Color | undefined

getConnectLines

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

Specify the color of the filled area for line chart.

Parameters
ParameterTypeDescriptionRequired
seriesIndex

The index of the series.

Returns
boolean | undefined

getDataFilters

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

Gets the data filter for the bar chart.

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

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

getSeriesLineStyle

Method
Signature
getSeriesLineStyle (seriesIndex: number): RESTSimpleLineSymbolStyle | undefined

Gets the line style 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
RESTSimpleLineSymbolStyle | undefined

getSeriesLineWidth

Method
Signature
getSeriesLineWidth (seriesIndex: number): number | undefined

Gets the line width 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
number | undefined

getSeriesMarkerColor

Method
Signature
getSeriesMarkerColor (seriesIndex: number): Color | undefined

Gets the marker 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

Color | undefined

getSeriesMarkerSize

Method
Signature
getSeriesMarkerSize (seriesIndex: number): number | undefined

Gets the marker size 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
number | undefined

getSeriesMarkerStyle

Method
Signature
getSeriesMarkerStyle (seriesIndex: number): RESTSimpleMarkerSymbolStyle | undefined

Gets the marker style 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
RESTSimpleMarkerSymbolStyle | 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

isAreaVisible

Method
Signature
isAreaVisible (seriesIndex: number): boolean

Specify whether the line series should show area.

Parameters
ParameterTypeDescriptionRequired
seriesIndex

The index of the series.

Returns
boolean

isLineSmoothed

Method
Signature
isLineSmoothed (seriesIndex: number): boolean

Specify whether line segments of the series should be smoothed.

Parameters
ParameterTypeDescriptionRequired
seriesIndex

The index of the series.

Returns
boolean

isMarkerVisible

Method
Signature
isMarkerVisible (seriesIndex: number): boolean

Indicate whether to show or hide the markers/bullets of the line series.

Parameters
ParameterTypeDescriptionRequired
seriesIndex

The index of the series.

Returns
boolean

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

setAreaColor

Method
Signature
setAreaColor (color: Color | undefined, seriesIndex: number): void

Specify the color of the filled area for line chart.

Parameters
ParameterTypeDescriptionRequired
color

The color of the filled area for line chart.

seriesIndex

The index of the series.

Returns
void

setAreaVisible

Method
Signature
setAreaVisible (visible: boolean, seriesIndex: number): void

Specify whether the line series should show area.

Parameters
ParameterTypeDescriptionRequired
visible

true if the line series should show area, false otherwise.

seriesIndex

The index of the series.

Returns
void

setConnectLines

Method
Signature
setConnectLines (connect: boolean | undefined, seriesIndex: number): void

Specify whether to connect the lines when there's a gap in the data. Note: Can be overridden by the temporal data setting nullPolicy.

Parameters
ParameterTypeDescriptionRequired
connect

Whether to connect the gap in the data

seriesIndex

The index of the series.

Returns
void

setDataFilters

inherited Method
Signature
setDataFilters (newDataFilters: WebChartDataFilters | undefined): Promise<void>
Inherited from: WithDataFilters

Sets the data filter for the chart.

Parameters
ParameterTypeDescriptionRequired
newDataFilters

The new data filter.

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

setLineSmoothed

Method
Signature
setLineSmoothed (smoothed: boolean, seriesIndex: number): void

Specify whether line segments of the series should be smoothed.

Parameters
ParameterTypeDescriptionRequired
smoothed

true if line segment of the series should be smoothed, false otherwise.

seriesIndex

The index of the series.

Returns
void

setMarkerVisible

Method
Signature
setMarkerVisible (visible: boolean, seriesIndex: number): void

Indicate whether to show or hide the markers/bullets of the line series.

Parameters
ParameterTypeDescriptionRequired
visible

true if the markers/bullets of the line series should be shown, false otherwise.

seriesIndex

The index of the series.

Returns
void

setSeriesLineStyle

Method
Signature
setSeriesLineStyle (style: RESTSimpleLineSymbolStyle | undefined, seriesIndex: number): void

Sets the line style of the series based on the series index.

Parameters
ParameterTypeDescriptionRequired
style

The new style for the series.

seriesIndex

The index of the series.

Returns
void

setSeriesLineWidth

Method
Signature
setSeriesLineWidth (width: number | undefined, seriesIndex: number): void

Sets the line width of the series based on the series index.

Parameters
ParameterTypeDescriptionRequired
width

The new width for the series.

seriesIndex

The index of the series.

Returns
void

setSeriesMarkerColor

Method
Signature
setSeriesMarkerColor (color: Color | undefined, seriesIndex: number): void

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

Parameters
ParameterTypeDescriptionRequired
color

The new color for the series.

seriesIndex

The index of the series.

Returns
void

setSeriesMarkerSize

Method
Signature
setSeriesMarkerSize (size: number | undefined, seriesIndex: number): void

Sets the marker size of the series based on the series index.

Parameters
ParameterTypeDescriptionRequired
size

The new size for the series.

seriesIndex

The index of the series.

Returns
void

setSeriesMarkerStyle

Method
Signature
setSeriesMarkerStyle (style: RESTSimpleMarkerSymbolStyle | undefined, seriesIndex: number): void

Sets the marker style of the series based on the series index.

Parameters
ParameterTypeDescriptionRequired
style

The new style 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

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>