ESM
import { isChartModel, isBarChartModel, isLineChartModel, isComboBarLineChartModel, isSerialChartModel } from "@arcgis/charts-components/model/shared/type-guards.js";

Functions

isChartModel

Function

Determines if the provided model or config is a ChartModel.

Signature
isChartModel (model: ChartModel | WebChart | undefined): model is ChartModel

Parameters

ParameterTypeDescriptionRequired
model

The model to check.

Returns
model is ChartModel

isBarChartModel

Function

Determines if the provided model is of type BarChartModel.

Signature
isBarChartModel (model: ChartModelBase | undefined): model is BarChartModel

Parameters

ParameterTypeDescriptionRequired
model

The model to check.

Returns
model is BarChartModel

isLineChartModel

Function

Determines if the provided model is of type LineChartModel.

Signature
isLineChartModel (model: ChartModelBase | undefined): model is LineChartModel

Parameters

ParameterTypeDescriptionRequired
model

The model to check.

Returns
model is LineChartModel

isComboBarLineChartModel

Function

Determines if the provided model is of type ComboBarLineChartModel.

Signature
isComboBarLineChartModel (model: ChartModelBase | undefined): model is ComboBarLineChartModel

Parameters

ParameterTypeDescriptionRequired
model

The model to check.

Returns
model is ComboBarLineChartModel

isSerialChartModel

Function

Determines if the provided model is of type SerialChartModel. This includes LineSeries, BarSeries, ComboLineAndBarSeries, and RadarSeries.

Signature
isSerialChartModel (model: ChartModelBase | undefined): model is SerialChartModel

Parameters

ParameterTypeDescriptionRequired
model

The model to check.

Returns
model is SerialChartModel

isPieChartModel

Function

Determines if the provided model is of type PieChartModel.

Signature
isPieChartModel (model: ChartModelBase | undefined): model is PieChartModel

Parameters

ParameterTypeDescriptionRequired
model

The model to check.

Returns
model is PieChartModel

isBoxPlotModel

Function

Determines if the provided model is of type BoxPlotModel.

Signature
isBoxPlotModel (model: ChartModelBase | undefined): model is BoxPlotModel

Parameters

ParameterTypeDescriptionRequired
model

The model to check.

Returns
model is BoxPlotModel

isScatterplotModel

Function

Determines if the provided model is of type ScatterplotModel.

Signature
isScatterplotModel (model: ChartModelBase | undefined): model is ScatterplotModel

Parameters

ParameterTypeDescriptionRequired
model

The model to check.

Returns
model is ScatterplotModel

isHistogramModel

Function

Determines if the provided model is of type HistogramModel.

Signature
isHistogramModel (model: ChartModelBase | undefined): model is HistogramModel

Parameters

ParameterTypeDescriptionRequired
model

The model to check.

Returns
model is HistogramModel

isHeatChartModel

Function

Determines if the provided model is of type HeatChartModel.

Signature
isHeatChartModel (model: ChartModelBase | undefined): model is HeatChartModel

Parameters

ParameterTypeDescriptionRequired
model

The model to check.

Returns
model is HeatChartModel

isGaugeModel

Function

Determines if the provided model is of type GaugeModel.

Signature
isGaugeModel (model: ChartModelBase | undefined): model is GaugeModel

Parameters

ParameterTypeDescriptionRequired
model

The model to check.

Returns
model is GaugeModel

isModelWithMultiAxes

Function

Type guard for ModelWithMultiAxes

Signature
isModelWithMultiAxes (model: ChartModel | undefined): model is ModelWithMultiAxes

Parameters

ParameterTypeDescriptionRequired
model
Returns
model is ModelWithMultiAxes

isModelWithLineMarkerStyling

Function

Type guard for ModelWithLineMarkerStyling

Signature
isModelWithLineMarkerStyling (model: ChartModel | undefined): model is ModelWithLineMarkerStyling

Parameters

ParameterTypeDescriptionRequired
model
Returns
model is ModelWithLineMarkerStyling

isModelWithTooltips

Function

Type guard for ModelWithTooltips

Signature
isModelWithTooltips (model: ChartModel | undefined): model is ModelWithTooltips

Parameters

ParameterTypeDescriptionRequired
model
Returns
model is ModelWithTooltips

isModelWithGuides

Function

Determines if the provided model is of type ModelWithGuides.

Signature
isModelWithGuides (model: ChartModel | undefined): model is ModelWithGuides

Parameters

ParameterTypeDescriptionRequired
model

The model to check.

Returns
model is ModelWithGuides

isModelWithXGuides

Function

Determines if the provided model is of type ModelWithXGuides.

Signature
isModelWithXGuides (model: ChartModel | undefined): model is ModelWithXGuides

Parameters

ParameterTypeDescriptionRequired
model

The model to check.

Returns
model is ModelWithXGuides

isModelWithYGuides

Function

Determines if the provided model is of type ModelWithYGuides.

Signature
isModelWithYGuides (model: ChartModel | undefined): model is ModelWithYGuides

Parameters

ParameterTypeDescriptionRequired
model

The model to check.

Returns
model is ModelWithYGuides

isModelWithLegend

Function

Determines if the provided model is of type ModelWithLegend.

Signature
isModelWithLegend (model: ChartModel | undefined): model is ModelWithLegend

Parameters

ParameterTypeDescriptionRequired
model

The model to check.

Returns
model is ModelWithLegend

isPieChartLegendModel

Function

Determines if the provided model is of type PieChartLegendModel.

Signature
isPieChartLegendModel (model: ChartModel | undefined): model is PieChartLegendModel

Parameters

ParameterTypeDescriptionRequired
model

The model to check.

Returns
model is PieChartLegendModel

isModelWithTemporalBinning

Function

Determines if the provided model is of type ModelWithTemporalBinning.

Signature
isModelWithTemporalBinning (model: ChartModel | undefined): model is ModelWithTemporalBinning

Parameters

ParameterTypeDescriptionRequired
model

The model to check.

Returns
model is ModelWithTemporalBinning

isModelOfType

Function
Type parameters
<T extends ModelTypes | undefined>

Determines if the provided model's type matches the type argument.

Signature
isModelOfType <T extends ModelTypes | undefined>(model: ChartModel | undefined, type: T): model is ModelOfType<T>

Parameters

ParameterTypeDescriptionRequired
model

The model to check.

type
T
Returns
model is ModelOfType