1 | # Vue Charts.CSS
|
2 |
|
3 | <img src="https://vue-charts-css.github.io/docs/assets/img/logo-animation.svg" width="125"/>
|
4 |
|
5 | Visualization helps end-users understand data. **Vue Charts.CSS** helps frontend developers turn data into beautiful *interactive* charts and graphs using the powerful [Charts.CSS framework](https://chartscss.org).
|
6 |
|
7 | ![Version](https://badgen.net/npm/v/vue.charts.css) ![Size](https://badgen.net/badgesize/normal/Vue-Charts-CSS/vue.charts.css/main/dist/vue-charts-css.min.js) ![Size GZIP](https://badgen.net/badgesize/gzip/Vue-Charts-CSS/vue.charts.css/main/dist/vue-charts-css.min.js) ![Size Brotli](https://badgen.net/badgesize/brotli/Vue-Charts-CSS/vue.charts.css/main/dist/vue-charts-css.min.js)
|
8 |
|
9 | [Get Started | Learn more | Docs](https://vue-charts-css.github.io/docs/get-started/)
|
10 |
|
11 | ## Dependencies
|
12 |
|
13 | + [Charts.CSS](https://github.com/ChartsCSS/charts.css)
|
14 | + Vue 3
|
15 |
|
16 | <details><summary>Need Vue 2 support?</summary>
|
17 |
|
18 | Vue Charts CSS is built for Vue 3, however you can still use the Vue 2 supported version of Vue Charts CSS by locking to the `1.x.x` versions of the package.
|
19 |
|
20 | Make sure your `package.json` file has the following:
|
21 |
|
22 | ```json
|
23 | "dependencies": {
|
24 | "vue.charts.css": "^1.0.1"
|
25 | }
|
26 | ```
|
27 |
|
28 | Vue 2 is supported under the `vue2` branch and `1.x.x` versions of the package. However, it is highly recommended upgrading to Vue 3 for long-term support.
|
29 | </details>
|
30 |
|
31 | ## Install
|
32 |
|
33 | [View Install Guide](https://vue-charts-css.github.io/docs/get-started/installation).
|
34 |
|
35 | ### With Package Managers
|
36 |
|
37 | NPM
|
38 | ```
|
39 | npm install vue.charts.css
|
40 | ```
|
41 |
|
42 | Yarn
|
43 | ```
|
44 | yarn add vue.charts.css
|
45 | ```
|
46 |
|
47 | ## Documentation
|
48 |
|
49 | [Read Guides & Documentation](https://vue-charts-css.github.io/docs/).
|
50 |
|
51 | ```vue
|
52 | <charts-css
|
53 | heading="Team's Coffee Count"
|
54 | type="bar"
|
55 | :labels="['Mon', 'Tue', 'Wed']"
|
56 | :datasets="datasets"
|
57 | />
|
58 | ```
|
59 |
|
60 | ```vue
|
61 | <script>
|
62 | export default {
|
63 | data()
|
64 | {
|
65 | return {
|
66 | datasets: [
|
67 | {
|
68 | name: "Ben",
|
69 | values: [2, 4, 3],
|
70 | },
|
71 | {
|
72 | name: "Josie",
|
73 | values: [7, 6, 3, 4],
|
74 | },
|
75 | {
|
76 | name: "Tim",
|
77 | values: [12, 278, 0, 0],
|
78 | },
|
79 | ],
|
80 | };
|
81 | },
|
82 | }
|
83 | </script>
|
84 | ```
|
85 |
|
86 | ## License
|
87 |
|
88 | **Vue Charts.CSS** and **Charts.CSS** are licensed under the [MIT license](https://opensource.org/licenses/MIT).
|
89 |
|
90 | **Vue Charts.CSS** is not affiliated with the creators of **Charts.CSS**.
|