2.0.0 • Published 4 months ago

@sveltejs-labs/chart.js v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

@sveltejs-labs/chart.js

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

npm version NPM Version

Install

Install this library with peer dependencies:

bun add @sveltejs-labs/chart.js chart.js
# or
pnpm add @sveltejs-labs/chart.js chart.js
# or
yarn add @sveltejs-labs/chart.js chart.js
# or
npm i @sveltejs-labs/chart.js chart.js

Usage

<script>
  import { Line } from '@sveltejs-labs/chart.js'
</script>

<Line data={...} />

Custom Size

In order for Chart.js to obey the custom size you need to set maintainAspectRatio to false, example:

<Line {data} width={100} height={50} options={{ maintainAspectRatio: false }} />

License

Read LICENSE.md

2.0.0

4 months ago

1.1.0

4 months ago

1.0.0

4 months ago

0.0.3

4 months ago

0.0.2

4 months ago

0.0.1

4 months ago