Skip to content

aureliomarcoag/svelte-chartjs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published

Languages

  • Svelte 38.9%
  • JavaScript 30.9%
  • CSS 21.0%
  • HTML 9.2%