Skip to content
ESM
import { convertChartSpec } from "@arcgis/charts-components/utils/chart-config/converter/index.js";

Functions

NameReturn TypeObject

convertChartSpec

Function
Type parameters
<T extends WebChart | WebGaugeChart>

Function that converts the chart config with older chart JSON Schema to the current version.

Note:

  • This function will convert and update the chart config to the current version if the version is older or unrecognized.
  • This function will also call mandatory conversion functions that are not related to the spec version to ensure certain features are working properly.
Signature
convertChartSpec <T extends WebChart | WebGaugeChart>(config?: T, layerOrLayerView?: FeatureLayerView | SupportedLayer, chartContainer?: HTMLElement): Promise<T>
Parameters
ParameterTypeDescriptionRequired
config
T

The chart config.

layerOrLayerView

The layer instance.

chartContainer
Returns
Promise

The updated web chart config.