@sveltejs-labs/chart.js
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

@sveltejs-labs/chart.js

@sveltejs-labs/chart.js logo

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

Package Sidebar

Install

npm i @sveltejs-labs/chart.js

Weekly Downloads

213

Version

2.0.0

License

MIT

Unpacked Size

13 kB

Total Files

25

Last publish

Collaborators

  • minsoochoo