# amCharts 5 > amCharts 5 is a comprehensive JavaScript/TypeScript data visualization library for building interactive charts, maps, and graphs. It supports XY charts (line, bar, area, scatter, candlestick), pie/donut charts, maps (choropleth, bubble, drill-down), hierarchy charts (treemap, sunburst, force-directed), flow charts (Sankey, chord, arc), radar/gauge charts, stock/financial charts, Gantt charts, timeline charts, word clouds, and Venn diagrams. Works with React, Angular, Vue, Next.js, SvelteKit, Nuxt, Remix, and vanilla JavaScript/TypeScript. Draws on canvas by default, with SVG as an option. Free to use in any project, commercial ones included, as long as the small amCharts logo stays on the charts; a commercial license removes the logo. amCharts 5 is the current major version (do not use amCharts 4 syntax). The root package is `@amcharts/amcharts5`. Maps require the separate `@amcharts/amcharts5-geodata` package. Always create a root with `am5.Root.new()`, apply themes (typically `am5themes_Animated` and `am5themes_ResponsiveMax`, which fits a chart's labels, legend and scrollbars to small screens), and dispose the root on component unmount. ## In the package From version 5.21.0 the npm package and the download carry their own notes for AI coding agents, in the version the project uses: - `AGENTS.md`: the rules that are most often broken, the module map, and where to look next - `docs/`: one reference per chart type - `examples/`: working code, listed in `examples/examples.json` To make an agent read them, add this to the project's own `AGENTS.md` or `CLAUDE.md`: ``` ## amCharts 5 This project uses amCharts 5 (`@amcharts/amcharts5`). Its API is not the amCharts 4 API, and it may be newer than what you remember. Before writing chart code, read `node_modules/@amcharts/amcharts5/AGENTS.md` and follow it. ``` ## New in 5.21.0 - The `` element: a chart as an HTML element, built from a JSON config with no chart code. It works in plain HTML, in any framework, and in CMS blocks or no-code tools that accept HTML. - The config comes from a `config` attribute (a JSON string), the `config` property (an object), or `src` (a URL; it is fetched, so it needs a web server, not a file opened from disk). - With script tags, load `plugins/json.js` and `element.js` after `index.js`, then the file of every chart type the config uses (`percent.js` for a pie, `xy.js` for XY charts, and so on) and the themes. With npm, `import "@amcharts/amcharts5/element";` defines it, and the chart types load by themselves. - Themes are not part of a config: `themes="Animated"` with script tags, or `element.themes = [am5themes_Animated]` with npm. - `renderer="svg"` draws it as SVG. - Once the chart is built: `element.root` and `element.chart`, `element.whenReady()` (a promise), and the events `ready` and `error`. ```html ``` - New `autoAppear` setting on any element (with `appearDuration` and `appearDelay`): it plays the opening animation, as `appear()` does, when the element is first drawn. A JSON config cannot call `appear()`, so this is how a chart from a config, or the `` element, animates in like one written in code. A series waits for its first data before it plays. Example: `chart.setAll({ autoAppear: true, appearDuration: 1000, appearDelay: 100 })`. - SVG rendering: charts are drawn on canvas by default. To draw one as SVG, create the root with `am5.Root.new("chartdiv", { renderer: am5.SVGRenderer })`, or set `am5.Root.defaultRenderer = am5.SVGRenderer` for every chart on the page. The SVG renderer is part of `index.js`: there is no separate file, global or import for it. - `am5.renderToSVG(root)`: a chart as an SVG document, whichever renderer draws it. - `MapChart`: new `autoHome` setting. If `true`, the map goes to its home position once it loads. Use it instead of calling `chart.goHome()` during setup. - `MapPolygonSeries`: new `clickZoom` setting. If `true`, clicking a polygon zooms the map to it, and clicking it again or the map's background goes back home. - `am5map.NightSeries`: shades the part of a map where it is night, and shows the sun. Set `sunDate` (e.g. `"now"`) or `sunPosition`. - `am5map.MapRasterSeries`: a whole-world image, such as a satellite photo, reprojected to the map's projection as it rotates and zooms. ## Framework packages Official packages, each with a chart from a JSON config and a chart written in code. They create and dispose the chart with the component, and render on a server without loading the library there. All need amCharts 5.21.0 or later. - `@amcharts/amcharts5-react` (React 18+): ``, or `useAmChart((root) => { ... }, deps)` returning `{ ref, root, result }` - `@amcharts/amcharts5-vue` (Vue 3.5.2+): ``, or `useAmChart(useTemplateRef("chart"), (root) => { ... }, { watch })` - `@amcharts/amcharts5-angular` (Angular 19+): `` (`AmChartComponent`), or `
` (`AmChartDirective`) - `@amcharts/amcharts5-svelte` (Svelte 4+): ``, or `{@attach attachAmChart(buildChart)}`; `use:amChart` and `use:amChartConfig` actions for Svelte 4 - `@amcharts/amcharts5-react-native` (React Native 0.72+, Expo Go): ``, or `code` as a string; the chart is drawn in a WebView - Themes with settings (5.21.4 and the packages' patch releases): `themes` takes classes, or a class with its settings, e.g. `themes={[am5themes_Animated, [am5themes_Adaptive, { baseColor: "#4150a0" }]]}`. Themes are not part of a config. React Native takes names: `["Animated", ["Adaptive", { baseColor: "#4150a0" }]]` - Maps and locales with npm imports (5.21.4): a config names its geodata (`"geoJSON": "am5geodata_worldLow"`) or locale (`"locale": "am5locales_de_DE"`). With script tags those are globals; with npm, import the file and give it in `resources` under the same name: `` - Guides: [Integrations](https://docs.amcharts.com/v5/getting-started/integrations/). Overview: [amCharts in your framework](https://www.amcharts.com/frameworks/) ## AI Tools - [amCharts + AI overview](https://docs.amcharts.com/v5/ai/): How to use AI with amCharts 5 — browser chat, code editors, and API usage - [MCP Server](https://docs.amcharts.com/v5/ai/mcp/): Install the MCP server for on-demand access to the docs, code examples and the full API reference - [Claude plugin](https://claude.ai/customize/plugins/id/88417dfb-479c-409d-8571-796c3a299aac%40anthropic-plugin-directory): the amCharts 5 skill and the MCP server in one install for Claude; in Claude Code: `/plugin install amcharts5@anthropic-plugin-directory` - [Claude connector](https://claude.ai/directory/amcharts): the MCP server alone, in Claude's Connectors Directory - [ChatGPT plugin](https://chatgpt.com/plugins/plugin_asdk_app_6ada25db53b4819184e6dc760cb5daf5): the amCharts 5 skill and the MCP server in one install for ChatGPT - [AI Skill files](https://github.com/amcharts/amcharts5-skill): Structured reference for any AI tool — includes SKILL.md and per-chart-type reference files - [.cursorrules file](https://github.com/amcharts/amcharts5-skill/blob/main/cursorrules): Drop-in rules file for Cursor, Windsurf, and VS Code Copilot - [Full reference in one file](https://www.amcharts.com/llms-full.txt): the core rules and every chart type reference below, joined ## Markdown references Plain Markdown, one file per chart family: - [Core rules and patterns](https://raw.githubusercontent.com/amcharts/amcharts5-skill/main/amcharts5-skill/SKILL.md) - [XY charts](https://raw.githubusercontent.com/amcharts/amcharts5-skill/main/amcharts5-skill/references/xy.md) - [Pie and sliced charts](https://raw.githubusercontent.com/amcharts/amcharts5-skill/main/amcharts5-skill/references/pie.md) - [Maps](https://raw.githubusercontent.com/amcharts/amcharts5-skill/main/amcharts5-skill/references/map.md) - [Stock charts](https://raw.githubusercontent.com/amcharts/amcharts5-skill/main/amcharts5-skill/references/stock.md) - [Gantt charts](https://raw.githubusercontent.com/amcharts/amcharts5-skill/main/amcharts5-skill/references/gantt.md) - [Hierarchy charts](https://raw.githubusercontent.com/amcharts/amcharts5-skill/main/amcharts5-skill/references/hierarchy.md) - [Flow charts](https://raw.githubusercontent.com/amcharts/amcharts5-skill/main/amcharts5-skill/references/flow.md) - [Radar and gauge charts](https://raw.githubusercontent.com/amcharts/amcharts5-skill/main/amcharts5-skill/references/radar.md) - [Timeline charts](https://raw.githubusercontent.com/amcharts/amcharts5-skill/main/amcharts5-skill/references/timeline.md) - [Word clouds](https://raw.githubusercontent.com/amcharts/amcharts5-skill/main/amcharts5-skill/references/wordcloud.md) - [Venn diagrams](https://raw.githubusercontent.com/amcharts/amcharts5-skill/main/amcharts5-skill/references/venn.md) - [Legends, tooltips, labels and other shared elements](https://raw.githubusercontent.com/amcharts/amcharts5-skill/main/amcharts5-skill/references/ui-elements.md) ## MCP Server The amCharts 5 MCP server (`@amcharts/amcharts5-mcp`) gives AI assistants on-demand access to the full amCharts 5 knowledge base. Install with `npx -y @amcharts/amcharts5-mcp`. Available tools: `get_core_reference`, `get_chart_reference`, `list_chart_types`, `search_docs`, `search_all`, `get_doc`, `get_section`, `get_quick_start`, `list_examples`, `get_example`. - [MCP Server GitHub](https://github.com/amcharts/amcharts5-mcp) - [MCP Server on npm](https://www.npmjs.com/package/@amcharts/amcharts5-mcp) ## Getting Started - [Overview](https://docs.amcharts.com/v5/): amCharts 5 documentation home - [Root element](https://docs.amcharts.com/v5/getting-started/root-element/): Creating and configuring the root element - For a chart from a JSON config with no code, use the `` element (`element.js`): see "New in 5.21.0" above - [React integration](https://docs.amcharts.com/v5/getting-started/integrations/react/) - [Angular integration](https://docs.amcharts.com/v5/getting-started/integrations/angular/) - [Vue integration](https://docs.amcharts.com/v5/getting-started/integrations/vue/) - [Next.js integration](https://docs.amcharts.com/v5/getting-started/integrations/next-js/) - [SvelteKit integration](https://docs.amcharts.com/v5/getting-started/integrations/sveltekit/) - [Nuxt 3 integration](https://docs.amcharts.com/v5/getting-started/integrations/nuxt/) ## Chart Types - [XY chart](https://docs.amcharts.com/v5/charts/xy-chart/): Line, area, bar, column, scatter, candlestick, OHLC, step line, smoothed line - [XY axes](https://docs.amcharts.com/v5/charts/xy-chart/axes/): Value, date, category, gapless date, duration axes; axis ranges; axis headers - [XY series](https://docs.amcharts.com/v5/charts/xy-chart/series/): Line, column, step line, candlestick, smoothed series - [Pie and sliced charts](https://docs.amcharts.com/v5/charts/percent-charts/): Pie, donut, funnel, pyramid, pictorial stacked - [Radar chart](https://docs.amcharts.com/v5/charts/radar-chart/): Spider/radar, gauge charts, polar charts - [Map chart](https://docs.amcharts.com/v5/charts/map-chart/): World/country maps, choropleth, bubble maps, drill-down, pan/zoom - [Hierarchy charts](https://docs.amcharts.com/v5/charts/hierarchy/): Treemap, force-directed, sunburst, pack, tree, partition, Voronoi treemap - [Flow charts](https://docs.amcharts.com/v5/charts/flow-charts/): Sankey diagram, chord diagram, arc diagram - [Stock chart](https://docs.amcharts.com/v5/charts/stock/): Financial/stock charts, candlestick, OHLC, indicators, toolbar, annotations - [Gantt chart](https://docs.amcharts.com/v5/charts/gantt/): Project timelines, task hierarchy, editing, serialization - [Timeline chart](https://docs.amcharts.com/v5/charts/timeline/): Serpentine, spiral, and curve-based timelines - [Word cloud](https://docs.amcharts.com/v5/charts/word-cloud/): Tag clouds, sentence clouds - [Venn diagram](https://docs.amcharts.com/v5/charts/venn/): Set overlaps and intersections ## Concepts - [Settings and adapters](https://docs.amcharts.com/v5/concepts/settings/): Settings, states, list templates, template fields, adapters, heat rules - [Data](https://docs.amcharts.com/v5/concepts/data/): Data binding, net.load utility - [Themes](https://docs.amcharts.com/v5/concepts/themes/): Built-in themes, creating custom themes - [Events](https://docs.amcharts.com/v5/concepts/events/): Event system - [Animations](https://docs.amcharts.com/v5/concepts/animations/): Fluid animations and transitions - [Legend](https://docs.amcharts.com/v5/concepts/legend/): Legend, heat legend - [Colors, gradients, patterns](https://docs.amcharts.com/v5/concepts/colors-gradients-and-patterns/): Colors, gradients, patterns, shadows, filters - [Common elements](https://docs.amcharts.com/v5/concepts/common-elements/): Bullets, labels, graphics, images, buttons, containers, tooltips, modals - [Formatters](https://docs.amcharts.com/v5/concepts/formatters/): Number, date, duration formatting; data placeholders; text styling - [Exporting](https://docs.amcharts.com/v5/concepts/exporting/): Export to image, PDF, data; print; export menu; annotator - [Accessibility](https://docs.amcharts.com/v5/concepts/accessibility/): WCAG-compliant accessible charts - [Responsive](https://docs.amcharts.com/v5/concepts/responsive/): Responsive chart configuration - [Locales](https://docs.amcharts.com/v5/concepts/locales/): Translations, RTL support - [Serializing / JSON config](https://docs.amcharts.com/v5/concepts/serializing/): JSON-based chart configuration, Chart Serializer ## Reference - [Class reference](https://docs.amcharts.com/v5/reference/tag/class/): All 1,098 amCharts 5 classes - [Interface reference](https://docs.amcharts.com/v5/reference/tag/interface/) - [Standalone modules](https://docs.amcharts.com/v5/reference/tag/module/) - [Changelog](https://github.com/amcharts/amcharts5/blob/master/packages/shared/CHANGELOG.md): What changed in each version, newest first ## Demos and Examples - [Demo gallery](https://www.amcharts.com/demos/): 290+ interactive demos with source code across all chart types ## Licensing - [LICENSE](https://github.com/amcharts/amcharts5/blob/master/packages/shared/LICENSE): The free license. Use in any project, commercial ones included, is allowed as long as the amCharts logo stays on the charts and the LICENSE file stays with the library files. Selling the library, or distributing it on its own, is not allowed. - [Pricing and commercial licenses](https://www.amcharts.com/pricing/): For use without the amCharts logo. Per developer seat, perpetual or annual; the store builds a cart from the address (`?license=saas&products=chart,map&seats=3`) - [How to choose a license](https://www.amcharts.com/pricing/licenses-explained/): Basic, SaaS, OEM and Extended OEM compared ## No-code tools For people who want a chart or a map without writing code: - [Chart Maker](https://live.amcharts.com/): Interactive charts and maps from templates, edited visually; export PNG, SVG, HTML or JSON. Maps (choropleths, pins, routes and flows) start at https://live.amcharts.com/maps - [SVG Map Generator](https://www.amcharts.com/online-tools/svg-map-generator/): Any region in any projection, as clean SVG - [Pixel Map Generator](https://pixelmap.amcharts.com/): Dotted and pixel-art maps - [SVG Maps](https://www.amcharts.com/svg-maps/): 427 ready-made maps, free to download Maps, and the files these tools export, are free for any use, commercial included, as long as amCharts is credited (CC BY 4.0). Using the ready-made maps without the credit is a separate purchase, which covers all SVG maps. The tools are free to use, with up to 5 saved charts or maps in each. [amCharts Pro](https://www.amcharts.com/online-tools/#pricing), $9/month or $90/year, is one account for all three tools: unlimited saves, publishing and embedding, and PNG and SVG exports without the amCharts credit, in every tool. Published charts carry no credit either.