Skip to content

The ArcGIS Maps SDK for JavaScript‘s Charts components are a collection of pre-built UI components for creating charts in web applications with minimal code. This package contains the Chart component and the Charts Action Bar component.

<arcgis-chart layer-item-id="8871626e970a4f3e9d6113ec63a92f2f" chart-index="0">
<arcgis-charts-action-bar slot="action-bar"></arcgis-charts-action-bar>
</arcgis-chart>

Get started

You can include this package in your application using either the ArcGIS CDN or by installing from npm. Visit the full Get Started guide for working with the ArcGIS CDN, npm, CSS, frameworks and more.

CDN

Include the library in the <head> section of your HTML:

<!-- Load the ArcGIS Maps SDK for JavaScript from CDN -->
<script type="module" src="https://js.arcgis.com/5.0/"></script>

This only needs to be done once in your application. No specific import is needed to use a component.

npm

Run the following command to install the package:

npm install @arcgis/charts-components

Afterwards, you’ll need to individually import each component you use.

import "@arcgis/charts-components/components/arcgis-chart";
import "@arcgis/charts-components/components/arcgis-charts-action-bar";