Package Exports
- @michmich112/svelte-chartjs
- @michmich112/svelte-chartjs/lib/index.js
- @michmich112/svelte-chartjs/lib/index.mjs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@michmich112/svelte-chartjs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
svelte-chartjs
Svelte wrapper for chart.js Open for PRs and contributions!
Full Documentation and demo here
Installation
npm i svelte-chartjsUsage
<script>
import Line from "svelte-chartjs/src/Line.svelte"
</script>
<Line data={...} />Custom Size
In order for Chart.js to obey the custom size you need to set maintainAspectRatio to false, example:
<Bar
data={data}
width={100}
height={50}
options={{ maintainAspectRatio: false }}
/>