▾
import "@arcgis/charts-components/components/arcgis-chart";- Inheritance
- ArcgisChart→
HTMLElement
- Since
- ArcGIS Maps SDK for JavaScript 4.32
The ArcGIS Chart component renders a chart from a model object that defines the chart's configuration and data.
Depending on your use case, you can:
- Load a saved chart from a layer item by setting layerItemId and chartIndex.
- Create a new model with
createModel(), then set it to the model property. - Load a saved chart from a layer item and customize it by calling loadModel() before making changes to the model.
See also:
- Charts introduction page: For an overview of charts and their capabilities.
- Chart types guide page: For a complete list of supported chart types and detailed guides.
- Tutorial: Display a chart
- Tutorial: Chart and map interactions
When the chart is rendering while its container is not yet fully sized, a console error about the chart's attribute height may appear. This is a known issue and should not affect the functionality of the chart.
Demos
Properties
| Property | Attribute | Type |
|---|---|---|
| action-mode | ||
| allow-using-object-id-stat | ||
| deprecated | animation-enabled | |
| animations-enabled | ||
| | ||
| auto-destroy-disabled | ||
| deprecated | auto-dispose-chart | |
| auto-inverse-data-label-text-color | ||
| | ||
| chart-index | ||
| | ||
| | ||
| configuration-enabled | ||
| cursor-range | ||
| | ||
| deprecated | disable-interactions | |
| deprecated | disable-toggling-legend-items | |
| deprecated | enable-configuration | |
| deprecated | enable-responsive-features | |
| error-policy | ||
| deprecated | feature-index | |
| deprecated | filter-by-extent | |
| filter-by-selection | ||
| filter-by-view-extent | ||
| | ||
| | ||
| deprecated | hide-empty-series | |
| deprecated | hide-license-watermark | |
| hide-loader-animation | ||
| hide-ui-messages | ||
| hide-zero-count-categories | ||
| deprecated | ignore-smooth-rendering-limit | |
| ignore-view-extent | ||
| interactions-disabled | ||
| | ||
| deprecated | layer-fields-change-policy | |
| deprecated | layer-filter-change-policy | |
| layer-item-id | ||
| deprecated | layer-renderer-change-policy | |
| legend-interactions-disabled | ||
| deprecated | legend-position | |
| | ||
| deprecated | legend-visibility | |
| deprecated | | |
| map-layer-id | ||
| | ||
| | ||
| null-as-valid | ||
| placeholder | ||
| popup-template-field-infos-enabled | ||
| deprecated | queue-chart-creation | |
| reference-element | ||
| deprecated | replace-no-value-category-with-zero | |
| return-features-extent | ||
| return-selection-indexes | ||
| return-selection-oi-ds | ||
| rotated | ||
| deprecated | rotation | |
| | ||
| | ||
| | ||
| | ||
| | ||
| set-time-binning-info-when-not-provided | ||
| show-empty-series | ||
| deprecated | show-license-watermark | |
| deprecated | show-ui-messages | |
| skip-chart-creation-queue | ||
| sync-charts-selection | ||
| deprecated | sync-selection | |
| deprecated | sync-selections-between-chart-and-layer-view-policy | |
| sync-view-selection | ||
| sync-view-time-extent | ||
| sync-view-time-zone | ||
| deprecated | | (typeof WebChartTypes.BarSeries | typeof WebChartTypes.ComboLineAndBarSeries | typeof WebChartTypes.HeatSeries | typeof WebChartTypes.LineSeries | typeof WebChartTypes.RadarSeries)[] |
| time-zone | ||
| deprecated | toggling-legend-items-disabled | |
| | ||
| truncate-long-titles | ||
| | ||
| deprecated | use-animated-charts | |
| deprecated | use-popup-template-fields-info | |
| | ||
| deprecated | view-time-extent-change-policy | |
| | ||
| | ||
| zero-count-as-valid |
actionMode
- Type
- ActionModes | undefined
Specifies how user interactions on the chart are handled.
- For all chart types except gauges,
multiSelectionWithCtrlKeyis the default behavior when actionMode is not explicitly set. - For gauges, the default behavior is
none. - Specific axis can be targeted for selection or zoom actions via the cursorRange property.
monoSelection
Allow users to select one data item at a time by clicking on it. Each new selection replaces the previous selection.
multiSelection
Allows users to click or drag a selection rectangle to select multiple data items. Each new selection is added to the existing selection.
multiSelectionWithCtrlKey
Allow users to click or drag a selection rectangle to select multiple data items. Each new selection replaces the previous selection unless the Ctrl (or Cmd on macOS) key is held.
In the below video, the first two selections are made without holding the Ctrl key, so each new selection replaces the previous one. The next two selections are made while holding the Ctrl key, so they are added to the existing selection.
zoom
Allows users to zoom into an area of the chart.
Zoom can also be configured using the
setAxisScrollbarmethod on the charts model. Refer to the method documentation for details.
none
Disable interaction-driven selection or zoom actions.
- Attribute
- action-mode
allowUsingObjectIdStat
- Type
- boolean
When true, object ID can be used as a numeric field for aggregated charts (for example, sum of objectId).
- Attribute
- allow-using-object-id-stat
- Default value
- false
animationsEnabled
- Type
- boolean
- Since
- ArcGIS Maps SDK for JavaScript 5.2
When true, elements such as data items, axes, and legends will animate when the chart is first rendered or when the chart's configuration is updated.
- Attribute
- animations-enabled
- Default value
- false
aria
- Type
- DOMContainerAria | undefined
- Since
- ArcGIS Maps SDK for JavaScript 5.0
The ARIA attributes for the chart component. Provides accessibility information to assistive technologies such as screen readers. Supports the following properties: `label`, `description`, `describedByElements`, and `labelledByElements`.
- See also
- Example
- chartElement.aria = {label: "Custom chart label",description: "Custom chart description",};
autoDestroyDisabled
- Type
- boolean
- Since
- ArcGIS Maps SDK for JavaScript 5.0
When true, the component is not destroyed automatically when it is disconnected from the document, which is useful when moving or temporarily hiding it.
Call the destroy() method when you are done to prevent memory leaks.
- Attribute
- auto-destroy-disabled
- Default value
- false
autoDisposeChart
- Type
- boolean
Auto disposes the chart when a new one is created in the same container.
- Attribute
- auto-dispose-chart
- Default value
- false
autoInverseDataLabelTextColor
- Type
- boolean
- Since
- ArcGIS Maps SDK for JavaScript 4.34
When true, the data label text color is automatically adjusted for readability based on its background, switching to either the chart background color or white when the contrast is too low.
With autoInverseDataLabelTextColor | Without autoInverseDataLabelTextColor |
|---|---|
![]() | ![]() |
Note: Applicable to heat charts only.
- Attribute
- auto-inverse-data-label-text-color
- Default value
- false
calciteThemingCSSVariables
- Since
- ArcGIS Maps SDK for JavaScript 5.1
Specifies the Calcite CSS variables to use when applying a Calcite theme.
By default the following variables are used:
- background:
--calcite-color-foreground-1 - text:
--calcite-color-text-1 - line:
--calcite-color-border-1 - secondary line:
--calcite-color-text-3 - spinner:
--calcite-color-brand-hover
The chart colors are overridden by those associated to those CSS variables, but only if they have not been customized beforehand.
chartIndex
The index of the chart to be rendered from the layer. Must be used in conjunction with the layer, layerItemId, or mapLayerId property.
If layer, layerItemId, or mapLayerId is set without chartIndex, the first chart in the layer will be rendered.
If chartIndex is out of bounds, the first chart in the layer will be rendered and a warning event will be emitted.
- Attribute
- chart-index
- Example
- <arcgis-chart layer-item-id="8871626e970a4f3e9d6113ec63a92f2f" chart-index="2"></arcgis-chart>
chartLimits
- Type
- ChartElementLimit | undefined
Customize the maximum number of data items allowed on the chart.
- The chart's behavior once that limit is reached can be adjusted through the
behaviorAfterLimitnested property.reject: Reject the creation or update of the chart when the limit is reached.renderUpToTheLimit: Render the elements up to the given limits.
- Specific limits for each chart type can be defined with the following nested properties.
serialChart: Bar chart, line chart, combo bar line chart and radar chart.series,elementsandcategorieslimits can be specified.
boxPlot:series,elements,categoriesandoutlierslimits can be specified.heatChart:cellslimits can be specified.scatterplot:aggregationThresholdandmarkersAfterAggregationlimits can be specified.pieChart:sliceslimits can be specified.gauge:featureslimits can be specified.
Default limits when chartLimits is not set:
- Except for scatterplots, limits are enforced by rejecting chart creation or updates. No maximum category count is set by default.
- The @arcgisBadDataWarningRaise event is emitted and, by default, a "Too many features" or "No data available to display" warning message is displayed in the chart container. Set hideUIMessages to
trueto hide the warning.
- The @arcgisBadDataWarningRaise event is emitted and, by default, a "Too many features" or "No data available to display" warning message is displayed in the chart container. Set hideUIMessages to
- Specific limits for each chart type are as follows:
- Bar chart, box plot: Up to 100 series. With one series, up to 10,000 elements total; with two series, up to 1,000 per series and 2,000 total; with three or more series, up to 100 per series and 2,000 total. Box plots also allow up to 10,000 outliers.
- Line chart, radar chart: Up to 100 series. With one series, up to 10,000 markers total; with two series, up to 5,000 per series and 10,000 total; with three or more series, up to 1,000 per series and 10,000 total.
- Histogram: Up to 64 bins, the default is 32 bins.
- Pie chart: Up to 300 slices.
- Heat chart: Up to 10,000 cells.
- Scatterplot: Aggregation starts after 10,000 markers; displays up to 10,000 aggregated markers.
- Gauge by feature: Up to 50 features.
- Example
- // Set the maximum number of categories to 15 for the bar chart (part of the serial chart).chartElement.chartLimits = {behaviorAfterLimit: "renderUpToTheLimit",serialChart: { categories: 15 }};// Reject the creation or update of the pie chart when the slices count exceeds 10.chartElement.chartLimits = {behaviorAfterLimit: "reject",pieChart: { slices: 10 }};
chartWillRender
- Type
- PreRenderCallback | undefined
Lifecycle function executed after the data has been processed and before the chart renders. Can be used to alter the model from information extracted from the data.
Note: Applicable to gauges and pie charts only.
configurationEnabled
- Type
- boolean
- Since
- ArcGIS Maps SDK for JavaScript 5.1
Whether to use features uniquely designed for a chart currently being configured by a user via the UI.
When true and if the arcgis-charts-action-bar is slotted in the chart component,
the action bar will expose an "Edit chart" action, surface relevant error states, and show a helpful in-container placeholder about the chart’s purpose.
- Attribute
- configuration-enabled
- Default value
- false
cursorRange
- Type
- CursorRange | undefined
Defines how the cursor selection rectangle is constrained when actionMode is multiSelection, multiSelectionWithCtrlKey, or zoom.
multi-axes: Allows drawing a free rectangle across both axes.x-axis: Constrains the rectangle to the x-axis direction.y-axis: Constrains the rectangle to the y-axis direction.undefined: Uses the default behavior for the current chart type and action mode.
multi-axes with selection | x-axis with selection | y-axis with selection |
|---|---|---|
Default behavior when cursorRange is undefined:
- Bar chart: For selection,
multi-axes. For zoom,x-axis(ory-axiswhen rotated). - Box plot: For selection and zoom,
multi-axes. - Heat chart, Histogram: For selection,
multi-axes. For zoom,x-axis. - Line chart: For category axes, selection and zoom use
x-axis(ory-axiswhen rotated). For number or date axes, both usemulti-axes. - Radar chart: For selection and zoom,
x-axis(circular axis). - Scatterplot: For selection and zoom,
multi-axes.
Note: Not applicable to gauges and pie charts.
- Attribute
- cursor-range
dataLabelFormatter
- Type
- BarAndLineDataLabelFormatCallback | HistogramLabelFormatCallback | PieChartLabelFormatCallback | ScatterplotLabelFormatCallback | undefined
Callback function used to format the data labels. If the returned string contains HTML tags they will be interpreted as such.
- Example
- // Render custom data labels with the stat value and percentage formatted to 2 decimal places.chartElement.dataLabelFormatter = (statValue, percent) => {return `<div>Total listings: <strong>${statValue}</strong><br>Percentage: <strong>${Number(percent).toFixed(2)}%</strong></div>`;};

Note: Not applicable to gauges and radar charts.
disableInteractions
- Type
- boolean
Disables all interactions on the chart.
- Attribute
- disable-interactions
- Default value
- false
disableTogglingLegendItems
- Type
- boolean
Disables the toggling of series from the legend items.
Note: Only applicable to multi-series charts.
- Attribute
- disable-toggling-legend-items
- Default value
- false
enableConfiguration
- Type
- boolean
Whether to use features uniquely designed for a chart currently being configured by a user via the UI. When true, the slotted charts action bar will expose an Edit chart action, surfaces relevant error states, and can show a helpful in-container placeholder about the chart’s purpose.
- Attribute
- enable-configuration
- Default value
- false
enableResponsiveFeatures
- Type
- boolean
Enables the responsive features.
- Attribute
- enable-responsive-features
- Default value
- false
errorPolicy
- Type
- ErrorPolicy
When set to ignore, the chart fails silently without displaying an error or hiding the chart.
By default, it is set to throw, which displays an error alert and hides the chart when it can't be created or updated.
- Attribute
- error-policy
- Default value
- "throw"
filterByExtent
- Type
- boolean
When true, all chart elements are filtered based on the view extent.
- Attribute
- filter-by-extent
- Default value
- false
filterBySelection
- Type
- boolean
When true, the chart uses the current selection as a data filter and renders only selected elements instead of rendering the full dataset with selection styling.
Axis bounds, time binning intervals will be computed based on the selected elements only.
Note: Not applicable to gauges or charts configured with imagery layers.
- Attribute
- filter-by-selection
- Default value
- false
filterByViewExtent
- Type
- boolean
When true, chart queries are constrained to the current map view extent. The chart refreshes as the view extent changes, and the axis bounds or other derived values are recalculated from the view extent data.
- Attribute
- filter-by-view-extent
- Default value
- false
gaugeInnerLabelFormatter
Callback function used to format the gauge inner label. If the returned string contains HTML tags they will be interpreted as such.
- Example
- // Render a centered custom gauge label with the value formatted to 2 decimal places.chartElement.gaugeInnerLabelFormatter = (value) => {return `<div style="text-align: center;"><u>Custom gauge inner label: </u><br /><b>${Number(value).toFixed(2)}</b></div>`;};

Note: Applicable to gauges only.
guideTooltipFormatter
Callback function used to format the axes guides tooltip. If the returned string contains HTML tags they will be interpreted as such.
- Example
- // Render a custom tooltip with the guide's start and end values.chartElement.guideTooltipFormatter = (props) => {return `<u>Custom guide tooltip</u><br />Range: <b>${props.start} - ${props.end}</b>`;};

Note: Not applicable to pie charts.
hideEmptySeries
When true, the empty series are completely hidden from the chart and the legend.
For example, a series may become empty after applying a data filter, filter by attribute or geometry (as when using the filter by view extent).
Note: Not applicable to gauges.
- Attribute
- hide-empty-series
- Default value
- false
hideLoaderAnimation
- Type
- boolean
When true, the loader animation is hidden when the chart is being created or updated. By default, it is shown at chart creation and each update (if it takes more than 300ms).
When hideLoaderAnimation is true | When hideLoaderAnimation is false |
|---|---|
- Attribute
- hide-loader-animation
- Default value
- false
hideUIMessages
- Type
- boolean
- Since
- ArcGIS Maps SDK for JavaScript 5.1
When true, UI messages are hidden. These messages can be no data warnings, any placeholder messages set or invalid chart configuration.
By default, its value is false, which displays the messages on the chart.
- Attribute
- hide-ui-messages
- Default value
- false
hideZeroCountCategories
- Type
- boolean
- Since
- ArcGIS Maps SDK for JavaScript 5.1
When true, missing categories from a Count aggregation are kept as gaps in the chart's data.
When data is retrieved from the server, features with a count of 0 are excluded from the response, resulting in missing chart entries.
By default, the chart's WebChartGenericDataItem associated with empty categories (from only a Count aggregation) are populated with 0s.
- Attribute
- hide-zero-count-categories
- Default value
- false
ignoreSmoothRenderingLimit
- Type
- boolean
When true, disables the default setting that uses debounce functions to handle the visibility of markers
that are outside of the plotting area when the min/max bound changes and/or when a zoom action is performed
(via chart cursor or scrollbar), to increase performance.
This property will be set when the chart is created and cannot be updated after that.
It's recommended that this property should only be set to true for small datasets.
When left undefined, will be treated as false.
Note: Applicable to line charts only.
- Attribute
- ignore-smooth-rendering-limit
- Default value
- false
ignoreViewExtent
- Type
- boolean
When true, it signals the queries to ignore the view's extent, whether an additional geometry filter is provided or not.
This property will be effective when the component's view property is provided or when the layer property is set to ChartLayerView.
By default the queries made by the chart will consider the view's extent as the unique geometry filter applicable. This implies ignoring any
geometry filters passed through the model or the runtimeDataFilters properties.
- Attribute
- ignore-view-extent
- Default value
- false
interactionsDisabled
- Type
- boolean
When true, all interactions such as zooming and selection are disabled on the chart. The chart will be rendered in a read-only state.
- Attribute
- interactions-disabled
- Default value
- false
layer
- Type
- ChartLayerInput | undefined
Used to perform queries.
Charts supports feature-like and imagery layers. Feature-like layers must implement the properties and methods defined by ChartLayer.
- Feature-like layers:
CatalogLayer,CSVLayer,FeatureLayer,GeoJSONLayer,ParquetLayer,WFSLayer - Imagery layers:
ImageryLayer,ImageryTileLayer,OrientedImageryLayer,WCSLayer
Note: Queries run client-side when layer is a ChartLayerView, or when both layer and view are provided.
layerItemId
Layer item ID associated with the chart to be rendered. Can be used in conjunction with the chartIndex property.
If layerItemId is set without chartIndex, the first chart in the layer will be rendered.
Supported layer types include: FeatureLayer, ParquetLayer,ImageryLayer, ImageryTileLayer, WCSLayer and OrientedImageryLayer.
The layer item ID can be found in the URL of the layer's item page on ArcGIS Online or Enterprise. For example, in the URL
https://www.arcgis.com/home/item.html?id=8871626e970a4f3e9d6113ec63a92f2f, the layer item ID is8871626e970a4f3e9d6113ec63a92f2f.
- Attribute
- layer-item-id
- Example
- <arcgis-chart layer-item-id="8871626e970a4f3e9d6113ec63a92f2f" chart-index="2"></arcgis-chart>
layerRendererChangePolicy
Allows the chart to update automatically when the layer's renderer changes. Applies when the color match is enabled.
Note: If the property is set to ignore the chart will still use the layer's renderer information when the data is updated.
- Attribute
- layer-renderer-change-policy
- Default value
- "refresh"
legendInteractionsDisabled
- Since
- ArcGIS Maps SDK for JavaScript 5.2
When true, disables the toggling of series or slices from the legend items. Clicking on the legend items will not hide or show the corresponding elements on the chart.
Note: Only applicable to charts with multiple series and while the legend is displayed.
- Attribute
- legend-interactions-disabled
- Default value
- false
legendPosition
- Type
- WebChartLegendPositions | undefined
Sets the legend's position on the chart.
Note: Not applicable to gauges.
- Attribute
- legend-position
legendValueLabelFormatter
When the pie chart label contains either a numeric value or a percentage (which can be set through the displayNumericValueOnLegendItems and displayPercentageOnLegendItems properties from the pie chart model), this property can be used to format the numeric value and/or percentage. If the returned string contains HTML tags they will be interpreted as such.
- Example
- // Set the pie chart model to display both numeric value and percentage.pieChartModel.displayNumericValueOnLegendItems = true;pieChartModel.displayPercentageOnLegendItems = true;// Render the numeric value and percentage in bold and italic respectively, with 2 decimal places.chartElement.legendValueLabelFormatter = (value, percentage) => {return `<strong><u>${Number(value).toFixed(2)}</u></strong> (<em>${Number(percentage).toFixed(2)}%</em>)`;};

Note: Applicable to pie charts only.
legendVisibility
- Type
- boolean
When true, the legend is visible on the chart.
Note: Not applicable to gauges.
- Attribute
- legend-visibility
- Default value
- false
loaderColors
- Type
- LoaderColors | undefined
Defines the colors for the loader animation.
- Example
- // Set a blue curtain and a red spinner for the loader animationchartComponent.loaderColors = { curtainColor: [30, 144, 255, 255], spinnerColor: [255, 0, 0, 255] };
mapLayerId
- Since
- ArcGIS Maps SDK for JavaScript 5.2
The ID of the map layer containing the chart. Can be used in conjunction with the chartIndex property. The map layer ID can be found by inspecting the layer's properties.
If mapLayerId is set without chartIndex, the first chart in the layer will be rendered.
Use layer, mapLayerId, and layerItemId independently; only one should be set at a time.
- Attribute
- map-layer-id
- Example
- <arcgis-chart map-layer-id="1a116fff2bf-layer-2" chart-index="2"></arcgis-chart>
messageOverrides
Custom messages for translated strings on the chart. If the returned string contains HTML tags they will be interpreted as such.
The customizable messages can be found thru the CommonStringsIdentity variable.
- Example
- // User sets the xAxisField to a field that doesn't exist in the dataset.barChartModel.xAxisField = "wrong_field_name";// Overrides the default message when there's a query error instead of displaying the default "Failure to read input data." message.chartElement.messageOverrides = {errorStrings: {errors: {queryError:"<b><u>The input data provided is invalid, please ensure the xAxisField is correctly specified.</u></b>"},},};

model
- Type
- ChartModel | WebChart | undefined
Provides an API to interact with the chart's configuration.
model accepts either a ChartModel instance or a WebChart object.
ChartModel: A chart model class instance, which can be created using the createModel function.- This is the recommended approach as it ensures the chart configuration is valid and compatible with the component.
WebChart: A plain chart configuration object that follows the WebChart specification.
nullAsValid
- Type
- boolean
When true, null values are considered as valid.
By default, when the data contains only null values, the chart dataset is considered empty:
- The @arcgisBadDataWarningRaise event will be sent.
- The "No data available to display" warning message will be displayed in the chart container.
- Attribute
- null-as-valid
- Default value
- false
placeholder
Placeholder text displayed in the chart container when no chart is configured. If the string contains HTML tags they will be interpreted as such.
- Attribute
- placeholder
- Example
- chartElement.placeholder = "<strong>Welcome!</strong><br/>Read the <a href=\"https://developers.arcgis.com/javascript/latest/charts/charts-intro/\">charts introduction page</a> to get started.";

popupTemplateFieldInfosEnabled
When true, field aliases from layer's popupTemplate are used to render field names in tooltips, axes and legend on the chart.
- Attribute
- popup-template-field-infos-enabled
- Default value
- false
referenceElement
- Type
- HTMLElement | string | undefined
- Since
- ArcGIS Maps SDK for JavaScript 5.2
By assigning the id attribute of the Map component to this property, you can position the chart component anywhere in the DOM while still maintaining a connection to the Map.
- Attribute
- reference-element
- Example
- <arcgis-map id="my-map"></arcgis-map><arcgis-chart reference-element="my-map"></arcgis-chart>
returnFeaturesExtent
- Type
- boolean
When true, the feature extent is returned in the payload of @arcgisDataProcessComplete
and @arcgisSelectionComplete events.
Applies only to:
- Charts using an aggregation.
- Data sources using a feature layer compatible with envelope aggregation.
The extent is returned through the featuresExtentField variable.
Note: Not applicable to gauges.
- Attribute
- return-features-extent
- Default value
- false
returnSelectionIndexes
- Type
- boolean
When true, selection indexes are computed and returned whenever a selection is made on or passed to the chart.
Note: Not applicable to gauges.
- Attribute
- return-selection-indexes
- Default value
- false
returnSelectionOIDs
When true, object ids are computed and returned whenever a selection is made on or passed to the chart.
Only considered for data sources using a feature layer.
Note: Not applicable to gauges or charts configured with imagery layers.
- Attribute
- return-selection-oi-ds
- Default value
- false
rotated
- Type
- boolean
When true, the chart is rotated 90 degrees so that the x-axis becomes vertical and the y-axis becomes horizontal.
Note: Applicable to bar charts, box plots, combo bar line charts and line charts.
- Attribute
- rotated
- Default value
- false
rotation
- Type
- boolean
When true, the chart is rotated 90 degrees so that the x-axis becomes vertical and the y-axis becomes horizontal.
Note: Applicable to bar chart, line chart, combo bar line chart and box plot.
- Attribute
- rotation
- Default value
- false
runtimeDataFilters
- Type
- WebChartDataFilters | undefined
Applies runtime data filters to the chart, features will be filtered based on the provided key value pairs.
Supported keys are where, objectIds, geometry,
spatialRelationship, distance,
units, timeExtent, and gdbVersion.
- Example
- // This example filters the chart to show only features with the name "Katrina",// object IDs 12, 19, and 27, within a specified geometry, within 10 miles and a specific time extent.const start = new Date(2005, 8, 23).getTime();const end = new Date(2005, 8, 28).getTime();chartComponent.runtimeDataFilters = {where: "Name = 'Katrina'",objectIds: [12, 19, 27],geometry: {xmin: -130,ymin: 20,xmax: -60,ymax: 55,},spatialRelationship: "contains",distance: 10,units: "miles",timeExtent: [start, end]};
secondaryYAxisLabelFormatter
- Type
- AxisLabelFormatCallback | undefined
Callback function used to format the secondary y-axis labels. If the returned string contains HTML tags they will be interpreted as such.
- Example
- // Render a custom secondary y-axis label with the value formatted as a compact currency.chartElement.secondaryYAxisLabelFormatter = (value) => {const formattedValue = new Intl.NumberFormat("en-US", {style: "currency",currency: "USD",notation: "compact",maximumFractionDigits: 1,}).format(value);return `<strong>${formattedValue}</strong>`;};

Note: Applicable to bar, line, and combo bar line charts configured with dual axes through the setSeriesToSecondaryYAxis method.
selectionData
- Type
- SelectionData | undefined
Applies a programmatic selection to the chart. The payload can target chart elements by selectionOIDs,
by selectionIndexes, or by selectionItems.
Selection by object IDs
When passing in a selectionOIDs array, the chart will match the provided object IDs with the chart's data items and apply the selection.
- Examples
- // This selects the chart data items (`Mid East` and `Great Lakes`) that contains the object IDs "3118" and "6544".chartElement.selectionData = {selectionOIDs: [3118, 6544],};

Selection by indexes
When passing in a
selectionIndexesmap, the chart will match the provided indexes with the chart's data items and apply the selection.// This selects the first and third chart data items.chartElement.selectionData = {selectionIndexes: new Map([// Selects the first and third data items ("Bronx" and "Manhattan") for the first series ("Entire home/apt").[0, { indexesToSelect: [0, 2] }],// Selects the second data item ("Brooklyn") for the second series ("Private room").[1, { indexesToSelect: [1] }],// With no indexesToSelect provided, all data items for the third series ("Shared room") are selected.[2, {}],]),};
Selection by items
When passing in a
selectionItemsarray, the chart will match the provided items with the chart's data items and apply the selection.// This selects the first chart data item with the matching items.chartElement.selectionData = {selectionItems: [{// The field name and valueneighbourhood_group: "Manhattan",// The y-series field name and value, 0 indicates the first series.COUNT_OBJECTID_0: "",},],};
Note: Not applicable to gauges.
selectionManager
- Type
- SelectionManager | undefined
- Since
- ArcGIS Maps SDK for JavaScript 5.1
Use this property to supply a custom selection manager for charts. This is useful when applications want to share selection sets between components, without relying on the view's SelectionManager.
- Example
- // Sync chart's selection manager with another component's selection manager (e.g. feature table)chartElement.selectionManager = featureTableElement.selectionManager;
selectionTheme
- Type
- SelectionTheme | undefined
Customizes the visual style applied to selected and non-selected chart data items (bars, slices, markers, boxes etc.).
- The
selectedElementsThemeproperty controls the appearance of selected elements. - The
nonSelectedElementsThemeproperty controls the appearance of elements that are not selected.
- Example
- chartElement.selectionTheme = {// The selected elements will have a magenta outline with a width of 3 pixels and will be scaled up by 10%.selectedElementsTheme: {elementOutlineColor: [255, 0, 237, 255],elementOutlineWidth: 3,transformation: {scale: 1.1,},},// The non-selected elements will be scaled down by 20% and have their opacity reduced to 50%.nonSelectedElementsTheme: {transformation: {scale: 0.8,opacity: 0.5,},},};

Note: Not applicable to gauges.
setTimeBinningInfoWhenNotProvided
- Type
- boolean
When true, the time binning unit and size is automatically set when not provided via the temporalBinningSize or temporalBinningUnit properties of the chart model.
The time binning unit and size information for the chart will be derived from the dataset's date minimum and maximum values to compute an interval that best fits the date range.
Note: Only applicable to charts with temporal binning enabled (bar chart, combo bar line chart, line chart, radar chart).
- Attribute
- set-time-binning-info-when-not-provided
- Default value
- false
showEmptySeries
- Type
- boolean
- Since
- ArcGIS Maps SDK for JavaScript 5.1
When true, empty series are shown on the chart and in the legend. A series is empty when it has no data for its category or when data filters exclude all its data.
This property is available for bar, line, combo bar-line, and radar charts, and is most useful when the chart has multiple series.
By default, empty series are hidden from the chart and the legend.
- Attribute
- show-empty-series
- Default value
- false
- Example
- // In this example, we first set a data filter to only include features with a room type of "Entire home/apt" or "Private room".// The "Shared room" series will be empty after applying the data filter.chartElement.runtimeDataFilters = {where: "room_type = 'Entire home/apt' OR room_type = 'Private room'",};// With the `showEmptySeries` property set to `true`,// the "Shared room" series will still be displayed on the chart and in the legend, even though it was filtered out.chartElement.showEmptySeries = true;

Note: Not applicable to gauges.
showLicenseWatermark
- Type
- boolean
- Since
- ArcGIS Maps SDK for JavaScript 5.1
When true, the license watermark is displayed on the lower left corner of the chart.
- Attribute
- show-license-watermark
- Default value
- false
skipChartCreationQueue
- Type
- boolean
- Since
- ArcGIS Maps SDK for JavaScript 5.1
When true, charts will render immediately without waiting for other charts to finish rendering.
By default, charts are queued so that only one chart renders at a time.
- Attribute
- skip-chart-creation-queue
- Default value
- false
syncChartsSelection
- Type
- boolean
- Since
- ArcGIS Maps SDK for JavaScript 5.1
When true, the selection will be synchronized between charts configured with the same layer.
- Attribute
- sync-charts-selection
- Default value
- false
- Example
- // Both charts are configured with the same layer.// The "Private room" slice is selected on the pie chart and the selection is reflected on the bar chart.chartElement1.syncChartsSelection = true;chartElement2.syncChartsSelection = true;

syncSelection
- Type
- boolean
Whether to synchronize the selection between chart components from the same layer.
- Attribute
- sync-selection
- Default value
- false
syncSelectionsBetweenChartAndLayerViewPolicy
When true, chart selections will be synchronized with the view's SelectionManager.
- Attribute
- sync-selections-between-chart-and-layer-view-policy
- Default value
- "disabled"
syncViewSelection
- Type
- boolean
- Since
- ArcGIS Maps SDK for JavaScript 5.1
When true, chart selections will be synchronized with the view's SelectionManager.
- Attribute
- sync-view-selection
- Default value
- false
- Example
- <!-- Selecting the `Asia` slice on the chart will select the corresponding features on the map. --><arcgis-map item-id="87936e6706144627b7c067ebd515da0c"><arcgis-chartmap-layer-id="1a116fff2bf-layer-2"chart-index="3"slot="bottom-right"sync-view-selection></arcgis-chart></arcgis-map>

syncViewTimeExtent
- Type
- boolean
- Since
- ArcGIS Maps SDK for JavaScript 5.1
When true, the chart will be refreshed when the view's timeExtent changes.
Note: Not supported for histogram.
- Attribute
- sync-view-time-extent
- Default value
- false
syncViewTimeZone
- Type
- boolean
- Since
- ArcGIS Maps SDK for JavaScript 5.1
When true, the chart's data will be in sync with the view's timeZone.
Note: Applicable only to bar, line, combo bar-line, heat and radar charts that use temporal data.
For binned data, the layer must support the /queryBins operation. Otherwise, the chart ignores the view's time zone.
- Attribute
- sync-view-time-zone
- Default value
- false
syncViewTimeZoneInclusionList
- Type
- (typeof WebChartTypes.BarSeries | typeof WebChartTypes.ComboLineAndBarSeries | typeof WebChartTypes.HeatSeries | typeof WebChartTypes.LineSeries | typeof WebChartTypes.RadarSeries)[]
List of chart types to include from syncing the view's timeZone with the data. Currently heat charts are included by default.
Note: This applies only to charts supporting temporal data. Additionally if the data is binned, it applies only if the layer has the
capacity to handle the /queryBins operation. For any other case the chart will ignore the view's time zone regardless of the content of this list.
timeZone
Defines the time zone used to display date and time values in the chart. The underlying data is not modified.
| America/New_York | Europe/Helsinki |
|---|---|
![]() | ![]() |
Note: Applicable only to bar, line, combo bar-line, and heat and radar charts that use temporal data.
For binned data, the layer must support the /queryBins operation. Otherwise, the chart ignores
the view's time zone.
- Attribute
- time-zone
- Example
- // Display date and time values in the specified time zone.chartElement.timeZone = "Europe/Helsinki";
togglingLegendItemsDisabled
When true, disables the toggling of series or slices from the legend items. Clicking on the legend items will not hide or show the corresponding elements on the chart.
Note: Only applicable to charts with multiple series and while the legend is displayed.
- Attribute
- toggling-legend-items-disabled
- Default value
- false
tooltipFormatter
- Type
- TooltipFormatters | undefined
Callback function used to format the tooltips when hovering over a chart element. If the returned string contains HTML tags they will be interpreted as such.
- Example
- // Render a custom tooltip with the series name, x-value, and stat value.chartElement.tooltipFormatter = (props) => `<div><div><strong>${props.seriesName}</strong> in <strong>${props.xValue}</strong></div><div>Total listings: <strong>${props.statValue}</strong></div></div>`;

Note: Not applicable to gauges.
truncateLongTitles
- Type
- boolean
- Since
- ArcGIS Maps SDK for JavaScript 5.2
When true, the chart title, subtitle, and footer are limited to two lines. Text that exceeds the available space is
truncated with an ellipsis, helping reserve more space for the chart itself. Axis titles are not affected.
By default, these labels wrap according to the available space without a two-line limit.
With truncateLongTitles | Without truncateLongTitles |
|---|---|
![]() | ![]() |
- Attribute
- truncate-long-titles
- Default value
- false
updateSplitBySeries
Whether to automatically add the missing series to cover the split-by values not referenced in the configuration.
- This property only applies to plain chart configuration object that's constructed following the WebChart specification.
- In 5.2,
addMissingSeriesisfalseby default. If it is set totrue, the missing series will be added. - In 6.0,
addMissingSeriesistrueby default. - When
seriesTemplateis omitted, the first existing series from the configuration will be copied to be used as a model for the missing ones. The chart won't render if the series template is not set and there's no series in the configuration.
- In 5.2,
- If a chart is configured using a chart model, this property is not necessary as the split-by series will be updated automatically when the model's properties are changed.
Note: Applicable only to bar chart, box plot, line chart and radar chart when a split-by field is used.
useAnimatedCharts
- Type
- boolean
Enable animation on the chart.
- Attribute
- use-animated-charts
- Default value
- false
usePopupTemplateFieldsInfo
- Type
- boolean
Allows the use of the fields alias from the layer.popupTemplate when rendering the field names on the chart (e.g. tooltips, axes, legend).
- Attribute
- use-popup-template-fields-info
- Default value
- false
view
Used to access the feature layer view instance in order to perform client side queries.
An explicitly assigned view takes precedence over the view inferred from
referenceElement or an ancestor map component.
Set this property to undefined to resume using the inferred view.
Reading this property returns the effective view.
xAxisLabelFormatter
- Type
- AxisLabelFormatCallback | undefined
Callback function used to format the x-axis labels. If the returned string contains HTML tags they will be interpreted as such.
- Example
- // Render a custom x-axis label with underlined string and bolded value.chartElement.xAxisLabelFormatter = (value) => {return `<u>Neighbourhood Group:</u> <strong>${value}</strong>`;};

Note: Only applicable to charts with x-axis labels displayed.
yAxisLabelFormatter
- Type
- AxisLabelFormatCallback | undefined
Callback function used to format the y-axis labels. If the returned string contains HTML tags they will be interpreted as such.
- Example
- // Render a custom y-axis label with underlined string and bolded value.chartElement.yAxisLabelFormatter = (value) => {return `<u>Rental Listings:</u> <strong>${value}</strong>`;};

Note: Only applicable to charts with y-axis labels displayed.
zeroCountAsValid
- Type
- boolean
- Since
- ArcGIS Maps SDK for JavaScript 5.2
When true, count=0 is considered a valid statistic.
By default, when the aggregation type is "count" and the data contains only values equal to 0, the chart dataset is considered empty:
- The @arcgisBadDataWarningRaise event will be sent.
- The "No data available to display" warning message will be displayed in the chart container.
- Attribute
- zero-count-as-valid
- Default value
- false
Methods
| Method | Signature |
|---|---|
| clearSelection(): Promise<void> | |
| inherited | componentOnReady(): Promise<this> |
| destroy(): Promise<void> | |
| deprecated | errorAlert(errorMessage?: string): Promise<void> |
| exportAsCSV(options?: CSVOptions): Promise<void> | |
| exportAsImage(format?: DownloadableChartImagesTypes): Promise<void> | |
| loadModel(): Promise<void> | |
| notify(message?: string, heading?: string): Promise<void> | |
| refresh(props?: {
updateData?: boolean;
resetAxesBounds?: boolean;
}): Promise<void> | |
| resetZoom(): Promise<void> | |
| switchSelection(): Promise<void> |
componentOnReady
- Signature
-
componentOnReady (): Promise<this>
Creates a promise that resolves once the component is fully loaded.
- Returns
- Promise<this>
- Example
- const arcgisChart = document.createElement("arcgis-chart");document.body.append(arcgisChart);await arcgisChart.componentOnReady();console.log("arcgis-chart is ready to go!");
exportAsCSV
- Signature
-
exportAsCSV (options?: CSVOptions): Promise<void>
Export the current chart's data as a CSV file.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| options | The options to customize the exported CSV file. | |
- Example
- // Export the chart's data as a CSV file with custom options.await chartElement.exportAsCSV({columns: ["neighbourhood_group", "room_type", "Count"],delimiter: "|",includeHeader: false,quoteAll: true,locale: "fr"});
The exported CSV file will contain the following data:
sep=|"Bronx"|"Entire home/apt"|"379""Bronx"|"Private room"|"652""Bronx"|"Shared room"|"60""Brooklyn"|"Entire home/apt"|"9 559"...Note: Not supported for gauges, scatterplots and radar charts.
exportAsImage
- Signature
-
exportAsImage (format?: DownloadableChartImagesTypes): Promise<void>
Exports and downloads the current chart as an image.
- Supported formats:
png(default),jpeg,jpg,webp, andsvg.- When
webpformat is used on Safari, it will fallback topng.
- When
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| format | The image format to export the chart as. Default: | |
loadModel
- Signature
-
loadModel (): Promise<void>
Returns a promise that resolves when the chart model is fully loaded.
This method should be used when loading a chart with layerItemId and chartIndex, and further customization of the chart model is needed.
- Example
- <!-- Load a chart from a layer item --><arcgis-chart layer-item-id="8871626e970a4f3e9d6113ec63a92f2f" chart-index="2" />// Get a reference to the chart element in the DOMconst chartElement = document.querySelector("arcgis-chart");// Call the method to ensure the model is fully loaded before making changesawait chartElement.loadModel();// Once the model is loaded, use the model's properties/methods to customizechartElement.model.titleText = "New Title";
notify
- Signature
-
notify (message?: string, heading?: string): Promise<void>
Passes external messages to the chart component and displays them in the chart's container. When a model update is overriding the notification modal, consider waiting for the @arcgisRenderingComplete event.
Parameters
- Example
- <!-- Buttons to show and clear notifications --><button id="show-notification" type="button">Show notification</button><button id="clear-notification" type="button">Clear notification</button>// When the "Show notification" button is clicked, the chart's container will display a custom message and heading.document.querySelector("#show-notification").addEventListener("click", () => {chartElement.notify("This is a notification message.","Notification heading",);});// When the "Clear notification" button is clicked, the chart's container will be cleared and hidden.document.querySelector("#clear-notification").addEventListener("click", () => {chartElement.notify();});
refresh
- Signature
-
refresh (props?: { updateData?: boolean; resetAxesBounds?: boolean; }): Promise<void>
Re-render the chart.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| props | Properties to control the refresh behavior: | |
Events
| Name | Type |
|---|---|
| deprecated | |
| deprecated |
arcgisAxesMinMaxChange
arcgisAxesMinMaxChange: CustomEvent<AxesMinMaxChangePayload> Emitted when the chart's axes minimum or maximum values are computed.
- Example
- const chartElement = document.querySelector("arcgis-chart");chartElement.addEventListener("arcgisAxesMinMaxChange", (event) => {const { bounds, model } = event.detail;// Handle the new bounds and model});
arcgisBadDataWarningRaise
arcgisBadDataWarningRaise: CustomEvent<DataWarningObject> Emitted when the chart's data is incompatible with its model. Bad data such as empty dataset, axis logarithmic scale being incompatible with the data will trigger this event. The event details contain information about the error.
- Example
- const chartElement = document.querySelector("arcgis-chart");chartElement.addEventListener("arcgisBadDataWarningRaise", (event) => {const { keyword, header, message, params } = event.detail;// Handle the bad data warning});
arcgisChartNotFoundWarning
arcgisChartNotFoundWarning: CustomEvent<string> Emitted when the chart is not found for the given chartIndex property with a valid layerItemId.
- Example
- const chartElement = document.querySelector("arcgis-chart");chartElement.addEventListener("arcgisChartNotFoundWarning", (event) => {const warningMessage = event.detail;// Handle the warning message});
arcgisConfigChange
arcgisConfigChange: CustomEvent<{
newConfig: WebChart | undefined;
oldConfig: WebChart | undefined;
functionCalled: string | undefined;
}> Emitted when the chart configuration is changed.
- Example
- const chartElement = document.querySelector("arcgis-chart");chartElement.addEventListener("arcgisConfigChange", (event) => {const { newConfig, oldConfig, functionCalled } = event.detail;// Handle the configuration change});
arcgisDataFetchComplete
arcgisDataFetchComplete: CustomEvent<WebChartDataTypes> Emitted once the chart data has been fetched but not yet fully processed. This event can be used to see all the slices before they get grouped into the 'other' slice during the post-processing step for pie charts. The event details contain the pie chart's data with its ungrouped slices.
Note: Applicable to pie charts only.
arcgisDataProcessComplete
arcgisDataProcessComplete: CustomEvent<DataProcessCompletePayload> Emitted once the chart data is updated and any subsequent updates to the chart's data. The event details contain the chart's data.
- Example
- const chartElement = document.querySelector("arcgis-chart");chartElement.addEventListener("arcgisDataProcessComplete", (event) => {const { chartData, model } = event.detail;// Handle the processed chart data});
arcgisDataProcessError
arcgisDataProcessError: CustomEvent<void> Emitted when an error occurred while fetching or processing the data for the chart.
- Example
- const chartElement = document.querySelector("arcgis-chart");chartElement.addEventListener("arcgisDataProcessError", () => {// Handle the data process error});
arcgisInvalidConfigWarningRaise
arcgisInvalidConfigWarningRaise: CustomEvent<DataWarningObject> Emitted when an invalid configuration is detected.
arcgisLegendItemVisibilityChange
arcgisLegendItemVisibilityChange: CustomEvent<LegendItemVisibilityChangePayload> Emitted once a legend item visibility has been changed. The event details contain the toggled item's visibility and related information (series or slice id).
- Example
- const chartElement = document.querySelector("arcgis-chart");chartElement.addEventListener("arcgisLegendItemVisibilityChange", (event) => {const { legendItemVisibility, model } = event.detail;// Handle the legend item visibility change});
arcgisNoRenderPropChange
arcgisNoRenderPropChange: CustomEvent<NoRenderPropChangePayload> Emitted when a no-render property (rotated, legendPosition, legendVisibility, view and featureIndex) is changed.
arcgisRenderingComplete
arcgisRenderingComplete: CustomEvent<void> Emitted once the chart is created and the rendering is complete. This event also emits with any subsequent chart updates, including when the chart is refreshed or when the configuration is changed.
- Example
- const chartElement = document.querySelector("arcgis-chart");chartElement.addEventListener("arcgisRenderingComplete", () => {// Handle the rendering complete event});
arcgisRuntimeError
arcgisRuntimeError: CustomEvent<void> Emitted when an error occurred that prevents the chart from being created or updated.
- Example
- const chartElement = document.querySelector("arcgis-chart");chartElement.addEventListener("arcgisRuntimeError", () => {// Handle the runtime error});
arcgisSelectionComplete
arcgisSelectionComplete: CustomEvent<SelectionCompletePayload> Emitted when a selection is applied to the chart.
The selectionData event detail contains various information about the selection, including the selected OIDs.
- Example
- const chartElement = document.querySelector("arcgis-chart");chartElement.addEventListener("arcgisSelectionComplete", (event) => {const { selectionData, model } = event.detail;// Handle the selection complete event});
arcgisSeriesColorChange
arcgisSeriesColorChange: CustomEvent<SeriesColorChangePayload> Emitted once one of the chart's series color has been assigned or changed.
arcgisSeriesOrder
arcgisSeriesOrder: CustomEvent<string[]> Emitted when the chart is created and at every update to confirm the order of the series on the chart. The event details contain the modified series' indexes and names.
- Example
- const chartElement = document.querySelector("arcgis-chart");chartElement.addEventListener("arcgisSeriesOrder", (event) => {// Handle the series order change});
arcgisUpdateComplete
arcgisUpdateComplete: CustomEvent<ValidationStatus> Emitted once the chart is updated.
Slots
| Name | Description |
|---|---|
| Slot for the arcgis-charts-action-bar component or calcite-action-bar component. |
action-bar
Slot for the arcgis-charts-action-bar component or calcite-action-bar component.





