import { isChartModel, isBarChartModel, isLineChartModel, isComboBarLineChartModel, isSerialChartModel } from "@arcgis/charts-components/model/shared/type-guards.js";Functions
| Name | Return Type | Object |
|---|---|---|
model is ChartModel | | |
model is BarChartModel | | |
model is LineChartModel | | |
model is ComboBarLineChartModel | | |
model is SerialChartModel | | |
model is PieChartModel | | |
model is BoxPlotModel | | |
model is ScatterplotModel | | |
model is HistogramModel | | |
model is HeatChartModel | | |
model is GaugeModel | | |
model is ModelWithMultiAxes | | |
model is ModelWithLineMarkerStyling | | |
model is ModelWithTooltips | | |
model is ModelWithGuides | | |
model is ModelWithXGuides | | |
model is ModelWithYGuides | | |
model is ModelWithLegend | | |
model is PieChartLegendModel | | |
model is ModelWithTemporalBinning | | |
model is ModelOfType | |
isChartModel
Determines if the provided model or config is a ChartModel.
- Signature
-
isChartModel (model: ChartModel | WebChart | undefined): model is ChartModel
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| model | The model to check. | |
- Returns
- model is ChartModel
isBarChartModel
Determines if the provided model is of type BarChartModel.
- Signature
-
isBarChartModel (model: ChartModelBase | undefined): model is BarChartModel
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| model | The model to check. | |
- Returns
- model is BarChartModel
isLineChartModel
Determines if the provided model is of type LineChartModel.
- Signature
-
isLineChartModel (model: ChartModelBase | undefined): model is LineChartModel
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| model | The model to check. | |
- Returns
- model is LineChartModel
isComboBarLineChartModel
Determines if the provided model is of type ComboBarLineChartModel.
- Signature
-
isComboBarLineChartModel (model: ChartModelBase | undefined): model is ComboBarLineChartModel
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| model | The model to check. | |
- Returns
- model is ComboBarLineChartModel
isSerialChartModel
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
| Parameter | Type | Description | Required |
|---|---|---|---|
| model | The model to check. | |
- Returns
- model is SerialChartModel
isPieChartModel
Determines if the provided model is of type PieChartModel.
- Signature
-
isPieChartModel (model: ChartModelBase | undefined): model is PieChartModel
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| model | The model to check. | |
- Returns
- model is PieChartModel
isBoxPlotModel
Determines if the provided model is of type BoxPlotModel.
- Signature
-
isBoxPlotModel (model: ChartModelBase | undefined): model is BoxPlotModel
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| model | The model to check. | |
- Returns
- model is BoxPlotModel
isScatterplotModel
Determines if the provided model is of type ScatterplotModel.
- Signature
-
isScatterplotModel (model: ChartModelBase | undefined): model is ScatterplotModel
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| model | The model to check. | |
- Returns
- model is ScatterplotModel
isHistogramModel
Determines if the provided model is of type HistogramModel.
- Signature
-
isHistogramModel (model: ChartModelBase | undefined): model is HistogramModel
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| model | The model to check. | |
- Returns
- model is HistogramModel
isHeatChartModel
Determines if the provided model is of type HeatChartModel.
- Signature
-
isHeatChartModel (model: ChartModelBase | undefined): model is HeatChartModel
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| model | The model to check. | |
- Returns
- model is HeatChartModel
isGaugeModel
Determines if the provided model is of type GaugeModel.
- Signature
-
isGaugeModel (model: ChartModelBase | undefined): model is GaugeModel
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| model | The model to check. | |
- Returns
- model is GaugeModel
isModelWithMultiAxes
Type guard for ModelWithMultiAxes
- Signature
-
isModelWithMultiAxes (model: ChartModel | undefined): model is ModelWithMultiAxes
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| model | | |
- Returns
- model is ModelWithMultiAxes
isModelWithLineMarkerStyling
Type guard for ModelWithLineMarkerStyling
- Signature
-
isModelWithLineMarkerStyling (model: ChartModel | undefined): model is ModelWithLineMarkerStyling
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| model | | |
- Returns
- model is ModelWithLineMarkerStyling
isModelWithTooltips
Type guard for ModelWithTooltips
- Signature
-
isModelWithTooltips (model: ChartModel | undefined): model is ModelWithTooltips
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| model | | |
- Returns
- model is ModelWithTooltips
isModelWithGuides
Determines if the provided model is of type ModelWithGuides.
- Signature
-
isModelWithGuides (model: ChartModel | undefined): model is ModelWithGuides
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| model | The model to check. | |
- Returns
- model is ModelWithGuides
isModelWithXGuides
Determines if the provided model is of type ModelWithXGuides.
- Signature
-
isModelWithXGuides (model: ChartModel | undefined): model is ModelWithXGuides
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| model | The model to check. | |
- Returns
- model is ModelWithXGuides
isModelWithYGuides
Determines if the provided model is of type ModelWithYGuides.
- Signature
-
isModelWithYGuides (model: ChartModel | undefined): model is ModelWithYGuides
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| model | The model to check. | |
- Returns
- model is ModelWithYGuides
isModelWithLegend
Determines if the provided model is of type ModelWithLegend.
- Signature
-
isModelWithLegend (model: ChartModel | undefined): model is ModelWithLegend
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| model | The model to check. | |
- Returns
- model is ModelWithLegend
isPieChartLegendModel
Determines if the provided model is of type PieChartLegendModel.
- Signature
-
isPieChartLegendModel (model: ChartModel | undefined): model is PieChartLegendModel
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| model | The model to check. | |
- Returns
- model is PieChartLegendModel
isModelWithTemporalBinning
Determines if the provided model is of type ModelWithTemporalBinning.
- Signature
-
isModelWithTemporalBinning (model: ChartModel | undefined): model is ModelWithTemporalBinning
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| model | The model to check. | |
- Returns
- model is ModelWithTemporalBinning
isModelOfType
- 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
| Parameter | Type | Description | Required |
|---|---|---|---|
| model | The model to check. | | |
| type | T | | |
- Returns
- model is ModelOfType