# CDN files

> Pinned and latest URLs, and what each file is.

Source: https://82chart.com/en/docs/cdn/

82chart.com serves the files itself. Versioned URLs never change, so browsers cache them for a year. Use them on production sites.

| File | What it is |
| --- | --- |
| `/cdn/v0.3.0/82chart.min.js` | For a script tag. Defines the global `Chart82` and registers `<chart-82>`. |
| `/cdn/v0.3.0/82chart.esm.js` | A single ES module for `<script type="module">`. |
| `/cdn/v0.3.0/82chart.css` | Card, tooltip and legend styles (light and dark). |
| `/cdn/latest/…` | Always the newest version, cached for an hour. For trying things out. |

## As an ES module

```html
<link rel="stylesheet" href="https://82chart.com/cdn/v0.3.0/82chart.css">
<div id="chart"></div>
<script type="module">
  import { createChart } from 'https://82chart.com/cdn/v0.3.0/82chart.esm.js';
  createChart('#chart', { type: 'line', data: { labels: ['Mon', 'Tue', 'Wed'], series: [{ data: [3, 5, 4] }] } });
</script>
```

## What the Chart82 global holds

`createChart`, `renderToSVG`, `defineChartElement`, the number helpers `korean`, `compact` and `comma`, `registerLocale`, the palettes `PALETTE_LIGHT` and `PALETTE_DARK`, and `VERSION`: the same as the npm package exports.

> You may also download the files and host them yourself. It is MIT licensed: change and redistribute freely.
