arcgis-charts
Skill1 starsChanged 6 months agoMITView on GitHub
Add data charts to a mapping app with the ArcGIS Maps SDK for JavaScript 5.1 charts components: the arcgis-chart element driven by a model from createModel() (bar, line, pie, scatterplot, histogram, box plot, gauge, heat), bound to a FeatureLayer or imagery, time series, and map-chart selection sync. Use this skill whenever the user visualizes feature attributes as a chart or links a chart to the map.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- GeoDaoyu/arcgis-maps-sdk-js-ai-contexttheir own version, first seen Nov 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- GeoDaoyu/arcgis-maps-sdk-js-ai-context★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository73 other files it gives its agents.
- skills/arcgis-3d-layers/AGENTS.mdAGENTS.md
- skills/arcgis-advanced-layers/AGENTS.mdAGENTS.md
- skills/arcgis-ai-components/AGENTS.mdAGENTS.md
- skills/arcgis-arcade/AGENTS.mdAGENTS.md
- skills/arcgis-authentication/AGENTS.mdAGENTS.md
- skills/arcgis-charts/AGENTS.mdAGENTS.md
- skills/arcgis-cim-symbols/AGENTS.mdAGENTS.md
- skills/arcgis-coding-components/AGENTS.mdAGENTS.md
- skills/arcgis-coordinates-projection/AGENTS.mdAGENTS.md
- skills/arcgis-core-maps/AGENTS.mdAGENTS.md
- skills/arcgis-core-utilities/AGENTS.mdAGENTS.md
- skills/arcgis-custom-rendering/AGENTS.mdAGENTS.md
- skills/arcgis-editing/AGENTS.mdAGENTS.md
- skills/arcgis-embeddable-maps/AGENTS.mdAGENTS.md
- skills/arcgis-feature-effects/AGENTS.mdAGENTS.md
- skills/arcgis-geometry-operations/AGENTS.mdAGENTS.md
- skills/arcgis-imagery/AGENTS.mdAGENTS.md
- skills/arcgis-interaction/AGENTS.mdAGENTS.md
- skills/arcgis-knowledge-graphs/AGENTS.mdAGENTS.md
- skills/arcgis-layers/AGENTS.mdAGENTS.md
- skills/arcgis-map-tools/AGENTS.mdAGENTS.md
- skills/arcgis-parquet/AGENTS.mdAGENTS.md
- skills/arcgis-performance/AGENTS.mdAGENTS.md
- skills/arcgis-popup-templates/AGENTS.mdAGENTS.md
- skills/arcgis-portal-content/AGENTS.mdAGENTS.md
- skills/arcgis-rest-services/AGENTS.mdAGENTS.md
- skills/arcgis-scene-environment/AGENTS.mdAGENTS.md
- skills/arcgis-smart-mapping/AGENTS.mdAGENTS.md
- skills/arcgis-spatial-analysis/AGENTS.mdAGENTS.md
- skills/arcgis-starter-app/AGENTS.mdAGENTS.md
- skills/arcgis-tables-forms/AGENTS.mdAGENTS.md
- skills/arcgis-time-animation/AGENTS.mdAGENTS.md
- skills/arcgis-utility-networks/AGENTS.mdAGENTS.md
- skills/arcgis-visualization/AGENTS.mdAGENTS.md
- skills/arcgis-widgets-advanced/AGENTS.mdAGENTS.md
- skills/arcgis-widgets-ui/AGENTS.mdAGENTS.md
- skills/hello-world/AGENTS.mdAGENTS.md
- arcgis-3d-layersSkill
- arcgis-advanced-layersSkill
- arcgis-ai-componentsSkill
- arcgis-arcadeSkill
- arcgis-authenticationSkill
- arcgis-cim-symbolsSkill
- arcgis-coding-componentsSkill
- arcgis-coordinates-projectionSkill
- arcgis-core-mapsSkill
- arcgis-core-utilitiesSkill
- arcgis-custom-renderingSkill
- arcgis-editingSkill
- arcgis-embeddable-mapsSkill
- arcgis-feature-effectsSkill
- arcgis-geometry-operationsSkill
- arcgis-imagerySkill
- arcgis-interactionSkill
- arcgis-knowledge-graphsSkill
- arcgis-layersSkill
- arcgis-map-toolsSkill
- arcgis-parquetSkill
- arcgis-performanceSkill
- arcgis-popup-templatesSkill
- The first 60 shown.
The file
Files
Charts
When to use: Activate this skill whenever the user visualizes feature attributes as a chart (bar/line/scatter/histogram/pie) or links a chart to the map.
Overview
The charts components render a layer's attributes as interactive charts, optionally linked to the map.
- Problem it solves: turning attribute data into readable, interactive charts.
- Who it serves: developers building dashboards and analytical views.
- Pattern it teaches: bind
arcgis-chartto a layer + a model fromcreateModel(); sync selection with the map. - What it does NOT cover: map symbology (see
arcgis-visualization) or the layers themselves (arcgis-layers).
Quick Start
import "@arcgis/charts-components/components/arcgis-chart";
import { createModel } from "@arcgis/charts-components/model/shared/setup-utils"; // no ".js"
const model = await createModel({ layer, chartType: "barChart" });
model.xAxisField = "sub_region";
model.aggregationType = "count";
const chart = document.querySelector("arcgis-chart")!;
chart.layer = layer;
chart.model = model;Decision Tree
- What chart?
- Categories → bar/pie; trend → line; correlation → scatter; distribution → histogram.
- Time series?
- Yes → line chart over a date field.
- Link to the map?
- Yes → sync chart selection with feature selection on the map.
Default: bar chart bound to a FeatureLayer; line chart for time series.
Import Patterns
Direct ESM (recommended for npm/Vite/Webpack)
import "@arcgis/charts-components/components/arcgis-chart";Dynamic Imports (CDN)
<!-- One module script loads core and every component package, charts included (a classic
<script> without type="module" fails: "Cannot use import statement outside a module") -->
<script type="module" src="https://js.arcgis.com/5.1/"></script>Map Components (recommended for new projects)
import "@arcgis/map-components/components/arcgis-map";Key Concepts
Concept 1: The chart is driven by a model, not a config object
arcgis-chart has no public config property (the typings have none; an internal one exists at
runtime and setting it draws nothing). A chart is a model (or a saved WebChart from the
layer) plus a layer. Build the model with createModel():
createModel({ layer, chartType })—chartTypeis one of"barChart","lineChart","comboBarLineChart","pieChart","scatterplot","histogram","boxPlot","gauge","radarChart","heatChart".- Then set the model's fields:
xAxisField,numericFields,aggregationType("count","sum","avg", …),splitByField,binTemporalData… - In 5.1 import it from
@arcgis/charts-components/model/shared/setup-utilswithout.js: the package's export map has no.jsentry, so the path the release notes print fails in Vite ("Missing specifier"). The import from the package index is deprecated (removed in 6.0).
Concept 2: Binding to a layer
Set chart.layer (a FeatureLayer, a FeatureLayerView, or since 5.1 an ImageryLayer,
ImageryTileLayer or WCSLayer for histograms and scatterplots). The chart queries the layer for
the values it plots. A layer with saved charts can be shown with chart.layer = layer +
chart.chartIndex = 0.
Concept 3: Map-chart interactivity
Give the chart the view (chart.view = view) and turn on syncViewSelection (5.1; it replaces
syncSelectionsBetweenChartAndLayerViewPolicy) to keep chart and map selection in step. The
arcgisSelectionComplete event carries { selectionData, model }.
Concept 4: Version pin: Calcite 5.2 breaks charts 5.1
Measured on 2026-10-27: with @esri/calcite-components 5.2.0 (what ^5.1.1 resolves to today),
arcgis-chart 5.1.27 never renders — amCharts throws "Unknown color syntax: light-dark(...)" and
arcgisDataProcessComplete never fires. With Calcite 5.1.2 it renders. Pin "~5.1.2" until the
charts package is updated.
Common Pitfalls (Top 3)
Pitfall 1: Inventing a config object for the chart
// ❌ Anti-pattern
chartEl.layer = featureLayer;
chartEl.config = { type: "bar", category: { field: "TYPE" }, aggregation: "count" };// ✅ Correct
const model = await createModel({ layer: featureLayer, chartType: "barChart" });
model.xAxisField = "TYPE";
model.aggregationType = "count";
chartEl.layer = featureLayer;
chartEl.model = model;Impact: measured with 5.1.27: the made-up config is ignored, no model is created and
arcgisDataProcessComplete never fires — an empty chart with no error. It only "compiles" if the
element is cast to a loose type.
Pitfall 2: Charting unaggregated huge datasets
// ❌ Anti-pattern
// Plotting hundreds of thousands of raw rows// ✅ Correct
model.aggregationType = "count"; // group by xAxisField; histograms binImpact: slow charts and unreadable visuals.
Pitfall 3: Letting Calcite float to 5.2
// ❌ Anti-pattern (package.json)
"@esri/calcite-components": "^5.1.1"// ✅ Correct (until charts-components is updated)
"@esri/calcite-components": "~5.1.2"Impact: measured on 2026-10-27: ^5.1.1 installs Calcite 5.2.0, and with it arcgis-chart
5.1.27 never draws (amCharts: "Unknown color syntax: light-dark(...)"). No chart, no useful error
in the UI. With 5.1.2 the same code renders.
When to Read references/
| If you need... | Read |
| arcgis-chart / model signatures | references/api-detail.md |
| Bar / line / map-link examples | references/examples.md |
| More pitfalls (5+ extended) | references/pitfalls.md |
Related Skills
arcgis-layers— the data behind the chartarcgis-interaction— selection to link with the maparcgis-visualization— symbolize the same data on the map
Reference Samples
Changelog
- 0.2.0 (2026-10-27): SDK 5.1. Rewritten on the real API:
arcgis-charthas noconfig; charts arecreateModel()+model(measured: the old code rendered nothing).createModelimport without.js; Calcite 5.2 breaks charts 5.1 (measured, pin~5.1.2);syncViewSelectionand the 5.1 renames; module CDN script (the 5.1 core script already brings charts). Run intests/runtime/casos/arcgis-charts.ts. - 0.1.0 (2026-05-31): Initial release.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

