@squirkle-ui/charts 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -3
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,15 +1,34 @@
|
|
|
1
1
|
# @squirkle-ui/charts
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
SVG charts that follow the theme for [Squirkle UI](https://www.npmjs.com/package/squirkle-ui). Works with Vue 3 and Vue 2.7.
|
|
4
4
|
|
|
5
|
+
## Install
|
|
5
6
|
```bash
|
|
6
7
|
npm i @squirkle-ui/charts @squirkle-ui/ui
|
|
7
8
|
```
|
|
9
|
+
Or get every component and add-on with [`squirkle-ui`](https://www.npmjs.com/package/squirkle-ui) and import from `squirkle-ui/charts`.
|
|
10
|
+
|
|
11
|
+
Peer dependencies: `vue`, `@squirkle-ui/ui`. Set up `@squirkle-ui/ui` first (`app.use(createSquirkle())` and `@squirkle-ui/ui/styles.css`).
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
8
14
|
```ts
|
|
9
15
|
import { SqLineChart } from '@squirkle-ui/charts' // Vue 3
|
|
10
16
|
// import { SqLineChart } from '@squirkle-ui/charts/vue2' // Vue 2.7
|
|
11
17
|
import '@squirkle-ui/charts/styles.css'
|
|
12
18
|
```
|
|
13
|
-
|
|
19
|
+
```vue
|
|
20
|
+
<template>
|
|
21
|
+
<SqLineChart :labels="['Q1', 'Q2', 'Q3', 'Q4']" :series="[{ name: 'Revenue', data: [12, 18, 15, 22] }]" area smooth />
|
|
22
|
+
<SqBarChart :labels="['A', 'B']" :series="[{ name: 'Units', data: [4, 7] }]" stacked />
|
|
23
|
+
<SqDonutChart :data="[{ label: 'Web', value: 60 }, { label: 'App', value: 40 }]" />
|
|
24
|
+
<SqSparkline :data="[3, 5, 4, 8]" />
|
|
25
|
+
</template>
|
|
26
|
+
<script setup lang="ts">
|
|
27
|
+
import { SqLineChart, SqBarChart, SqDonutChart, SqSparkline } from '@squirkle-ui/charts'
|
|
28
|
+
</script>
|
|
29
|
+
```
|
|
30
|
+
Series colours come from the theme (`--sq-series-1` … `--sq-series-8`) and switch with light/dark.
|
|
31
|
+
|
|
14
32
|
|
|
15
|
-
|
|
33
|
+
## License
|
|
34
|
+
MIT © KheangLov · [Source and issues](https://github.com/KheangLov/squirkle-ui)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@squirkle-ui/charts",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Lightweight SVG charts with squircle styling for Squirkle UI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -46,13 +46,13 @@
|
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"vue": "^2.7.0 || ^3.3.0",
|
|
49
|
-
"@squirkle-ui/ui": "^0.1.
|
|
49
|
+
"@squirkle-ui/ui": "^0.1.1"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@squirkle-ui/core": "^0.1.
|
|
52
|
+
"@squirkle-ui/core": "^0.1.1"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@squirkle-ui/ui": "^0.1.
|
|
55
|
+
"@squirkle-ui/ui": "^0.1.1"
|
|
56
56
|
},
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public"
|