@michmich112/svelte-chartjs
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

svelte-chartjs

npm version FOSSA Status npm

Svelte wrapper for chart.js Open for PRs and contributions!

Full Documentation and demo here

Installation

npm i svelte-chartjs

Usage

<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 }}
/>

License

FOSSA Status

Readme

Keywords

Package Sidebar

Install

npm i @michmich112/svelte-chartjs

Weekly Downloads

1

Version

1.1.1

License

MIT

Unpacked Size

910 kB

Total Files

18

Last publish

Collaborators

  • michmich112