Documentation
@chartts/coreVanilla JS
Framework-free. Works with plain HTML, Web Components, or any JavaScript environment.
Installation
npm install @chartts/core
Basic usage
import { LineChart } from '@chartts/core'
const chart = new LineChart(document.getElementById('chart'), {
data,
x: 'month',
y: 'revenue'
})Updates
Call chart.update({ data: newData }) to update the chart. Call chart.destroy() to clean up event listeners and DOM elements.
CDN
Use Chart.ts from a CDN without a build step:
<script type="module">
import { LineChart } from 'https://cdn.chartts.com/core'
</script>
Also available on jsdelivr and unpkg:
https://cdn.jsdelivr.net/npm/@chartts/core/+esm
https://unpkg.com/@chartts/core