/svelte.charts.css

Generate beautiful charts with CSS and Svelte: full accessibility and no hassle.

Primary LanguageJavaScript

Svelte Charts.CSS

This is a port of vue.charts.css for use in Svelte rather than Vue.

The API is mostly the same, so you should be able to refer to their documentation for usage.

Dependencies

Install

With Package Managers

NPM

npm install charts.css svelte.charts.css

Documentation

For in depth documentation please adapt the vue.charts.css documentation. The API should be mostly the same, just with Svelte instead of Vue.

Example

<script>
  let datasets = [
    {
        name: "Ben",
        values: [2, 4, 3],
    },
    {
        name: "Josie",
        values: [7, 6, 3, 4],
    },
    {
        name: "Tim",
        values: [12, 278, 0, 0],
    },
  ],
</script>

<SvelteChartCss
    heading = "Team's Coffee Count"
    type = "bar"
    labels = { ["Mon", "Tue", "Wed"] }
    datasets = { datasets }
/>

License

Svelte Charts.CSS and Charts.CSS are licensed under the MIT license.

Svelte Charts.CSS is not affiliated with the creators of Charts.CSS.