@squirkle-ui/charts 0.0.0-stage → 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/LICENSE +21 -0
- package/README.md +33 -2
- package/dist/styles.css +38 -0
- package/dist/types/components/ChartFrame.vue.d.ts +95 -0
- package/dist/types/components/SqBarChart.vue.d.ts +254 -0
- package/dist/types/components/SqDonutChart.vue.d.ts +186 -0
- package/dist/types/components/SqLineChart.vue.d.ts +230 -0
- package/dist/types/components/SqSparkline.vue.d.ts +61 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/utils.d.ts +28 -0
- package/dist/vue2/index.cjs +455 -0
- package/dist/vue2/index.cjs.map +1 -0
- package/dist/vue2/index.mjs +455 -0
- package/dist/vue2/index.mjs.map +1 -0
- package/dist/vue3/index.cjs +975 -0
- package/dist/vue3/index.cjs.map +1 -0
- package/dist/vue3/index.mjs +975 -0
- package/dist/vue3/index.mjs.map +1 -0
- package/dist/vue3/styles.css +38 -0
- package/package.json +60 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 KheangLov
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +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
|
+
|
|
5
|
+
## Install
|
|
6
|
+
```bash
|
|
7
|
+
npm i @squirkle-ui/charts @squirkle-ui/ui
|
|
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
|
|
14
|
+
```ts
|
|
15
|
+
import { SqLineChart } from '@squirkle-ui/charts' // Vue 3
|
|
16
|
+
// import { SqLineChart } from '@squirkle-ui/charts/vue2' // Vue 2.7
|
|
17
|
+
import '@squirkle-ui/charts/styles.css'
|
|
18
|
+
```
|
|
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
|
+
|
|
32
|
+
|
|
33
|
+
## License
|
|
34
|
+
MIT © KheangLov · [Source and issues](https://github.com/KheangLov/squirkle-ui)
|
package/dist/styles.css
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/* Categorical series slots — validated order (light #fff / dark #161925 surfaces). */
|
|
2
|
+
:root, .sq-theme--light {
|
|
3
|
+
--sq-series-1: #2a78d6; --sq-series-2: #eb6834; --sq-series-3: #1baf7a; --sq-series-4: #eda100;
|
|
4
|
+
--sq-series-5: #e87ba4; --sq-series-6: #008300; --sq-series-7: #6250d6; --sq-series-8: #e34948;
|
|
5
|
+
}
|
|
6
|
+
.sq-theme--dark {
|
|
7
|
+
--sq-series-1: #3987e5; --sq-series-2: #d95926; --sq-series-3: #199e70; --sq-series-4: #c98500;
|
|
8
|
+
--sq-series-5: #d55181; --sq-series-6: #008300; --sq-series-7: #9085e9; --sq-series-8: #e66767;
|
|
9
|
+
}
|
|
10
|
+
.sq-chart { --sq-bg: var(--sq-surface); --sq-bd: var(--sq-border); --sq-bw: 1px; --sq-r: var(--sq-radius-xl); margin: 0; padding: var(--sq-space-4); color: var(--sq-on-surface); min-width: 0; }
|
|
11
|
+
.sq-chart--flat { --sq-bw: 0px; --sq-bg: transparent; padding: 0; }
|
|
12
|
+
.sq-chart__title { font-size: var(--sq-text-md); font-weight: var(--sq-weight-semibold); }
|
|
13
|
+
.sq-chart__subtitle { font-size: var(--sq-text-xs); color: var(--sq-muted); }
|
|
14
|
+
.sq-chart__caption { margin-bottom: var(--sq-space-2); }
|
|
15
|
+
.sq-chart__legend { display: flex; flex-wrap: wrap; gap: var(--sq-space-1) var(--sq-space-4); margin-bottom: var(--sq-space-2); font-size: var(--sq-text-xs); color: var(--sq-on-surface-variant); }
|
|
16
|
+
.sq-chart__legend-item { display: inline-flex; align-items: center; gap: 6px; }
|
|
17
|
+
.sq-chart__swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
|
|
18
|
+
.sq-chart__plot { position: relative; width: 100%; }
|
|
19
|
+
.sq-chart__plot svg { display: block; overflow: visible; }
|
|
20
|
+
.sq-chart__grid line { stroke: var(--sq-border); stroke-width: 1; }
|
|
21
|
+
.sq-chart__axis text { fill: var(--sq-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
|
|
22
|
+
.sq-chart__line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
|
|
23
|
+
.sq-chart__area { opacity: 0.14; }
|
|
24
|
+
.sq-chart__dot { stroke: var(--sq-surface); stroke-width: 2; }
|
|
25
|
+
.sq-chart__crosshair { stroke: var(--sq-border-strong); stroke-dasharray: 3 3; }
|
|
26
|
+
.sq-chart__bar, .sq-chart__arc { transition: opacity var(--sq-duration) var(--sq-ease); cursor: default; }
|
|
27
|
+
.sq-chart__bar--dim, .sq-chart__arc--dim { opacity: 0.35; }
|
|
28
|
+
.sq-chart__tooltip { --sq-r: var(--sq-radius-md); position: absolute; z-index: 2; min-width: 140px; padding: 8px 10px; background: var(--sq-surface-raised); border: 1px solid var(--sq-border); box-shadow: var(--sq-elevation-3); font-size: var(--sq-text-xs); pointer-events: none; }
|
|
29
|
+
.sq-chart__tooltip-title { font-weight: var(--sq-weight-semibold); margin-bottom: 4px; }
|
|
30
|
+
.sq-chart__tooltip-row { display: flex; align-items: center; gap: 6px; color: var(--sq-on-surface-variant); }
|
|
31
|
+
.sq-chart__tooltip-row b { margin-inline-start: auto; padding-inline-start: 12px; color: var(--sq-on-surface); font-variant-numeric: tabular-nums; }
|
|
32
|
+
.sq-chart__donut { position: relative; display: flex; justify-content: center; }
|
|
33
|
+
.sq-chart__donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
|
|
34
|
+
.sq-chart__donut-value { font-size: var(--sq-text-2xl); font-weight: var(--sq-weight-bold); font-variant-numeric: tabular-nums; }
|
|
35
|
+
.sq-chart__donut-label { font-size: var(--sq-text-xs); color: var(--sq-muted); }
|
|
36
|
+
.sq-sparkline { display: inline-block; overflow: visible; vertical-align: middle; }
|
|
37
|
+
.sq-sparkline__line { fill: none; stroke-width: 2; stroke-linecap: round; }
|
|
38
|
+
.sq-sparkline__area { opacity: 0.12; }
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
/** Card, caption, legend and an accessible data table shared by every chart (internal). */
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
|
+
title: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: undefined;
|
|
9
|
+
};
|
|
10
|
+
subtitle: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: undefined;
|
|
13
|
+
};
|
|
14
|
+
flat: BooleanConstructor;
|
|
15
|
+
legend: {
|
|
16
|
+
type: PropType<{
|
|
17
|
+
name: string;
|
|
18
|
+
color: string;
|
|
19
|
+
}[]>;
|
|
20
|
+
default: () => never[];
|
|
21
|
+
};
|
|
22
|
+
table: {
|
|
23
|
+
type: PropType<{
|
|
24
|
+
head: string[];
|
|
25
|
+
rows: (string | number)[][];
|
|
26
|
+
}>;
|
|
27
|
+
default: () => {
|
|
28
|
+
head: never[];
|
|
29
|
+
rows: never[];
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
33
|
+
title: {
|
|
34
|
+
type: StringConstructor;
|
|
35
|
+
default: undefined;
|
|
36
|
+
};
|
|
37
|
+
subtitle: {
|
|
38
|
+
type: StringConstructor;
|
|
39
|
+
default: undefined;
|
|
40
|
+
};
|
|
41
|
+
flat: BooleanConstructor;
|
|
42
|
+
legend: {
|
|
43
|
+
type: PropType<{
|
|
44
|
+
name: string;
|
|
45
|
+
color: string;
|
|
46
|
+
}[]>;
|
|
47
|
+
default: () => never[];
|
|
48
|
+
};
|
|
49
|
+
table: {
|
|
50
|
+
type: PropType<{
|
|
51
|
+
head: string[];
|
|
52
|
+
rows: (string | number)[][];
|
|
53
|
+
}>;
|
|
54
|
+
default: () => {
|
|
55
|
+
head: never[];
|
|
56
|
+
rows: never[];
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
}>> & Readonly<{}>, {
|
|
60
|
+
flat: boolean;
|
|
61
|
+
title: string;
|
|
62
|
+
subtitle: string;
|
|
63
|
+
legend: {
|
|
64
|
+
name: string;
|
|
65
|
+
color: string;
|
|
66
|
+
}[];
|
|
67
|
+
table: {
|
|
68
|
+
head: string[];
|
|
69
|
+
rows: (string | number)[][];
|
|
70
|
+
};
|
|
71
|
+
}, {}, {
|
|
72
|
+
SqShape: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
73
|
+
watchKey: {
|
|
74
|
+
type: (ObjectConstructor | BooleanConstructor | ArrayConstructor | StringConstructor | NumberConstructor)[];
|
|
75
|
+
default: undefined;
|
|
76
|
+
};
|
|
77
|
+
clip: BooleanConstructor;
|
|
78
|
+
}>, {
|
|
79
|
+
active: import("vue").Ref<boolean, boolean>;
|
|
80
|
+
w: import("vue").Ref<number, number>;
|
|
81
|
+
h: import("vue").Ref<number, number>;
|
|
82
|
+
bw: import("vue").Ref<number, number>;
|
|
83
|
+
d: import("vue").ComputedRef<string>;
|
|
84
|
+
strokeD: import("vue").ComputedRef<string>;
|
|
85
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
86
|
+
watchKey: {
|
|
87
|
+
type: (ObjectConstructor | BooleanConstructor | ArrayConstructor | StringConstructor | NumberConstructor)[];
|
|
88
|
+
default: undefined;
|
|
89
|
+
};
|
|
90
|
+
clip: BooleanConstructor;
|
|
91
|
+
}>> & Readonly<{}>, {
|
|
92
|
+
clip: boolean;
|
|
93
|
+
watchKey: string | number | boolean | unknown[] | Record<string, any>;
|
|
94
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
95
|
+
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
import { type Series } from '../utils';
|
|
3
|
+
/** Grouped or stacked bars with squircle data-ends, vertical or horizontal. */
|
|
4
|
+
declare const _default: typeof __VLS_export;
|
|
5
|
+
export default _default;
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
7
|
+
labels: {
|
|
8
|
+
type: PropType<string[]>;
|
|
9
|
+
default: () => never[];
|
|
10
|
+
};
|
|
11
|
+
series: {
|
|
12
|
+
type: PropType<Series[]>;
|
|
13
|
+
default: () => never[];
|
|
14
|
+
};
|
|
15
|
+
title: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
default: undefined;
|
|
18
|
+
};
|
|
19
|
+
subtitle: {
|
|
20
|
+
type: StringConstructor;
|
|
21
|
+
default: undefined;
|
|
22
|
+
};
|
|
23
|
+
height: {
|
|
24
|
+
type: NumberConstructor;
|
|
25
|
+
default: number;
|
|
26
|
+
};
|
|
27
|
+
stacked: BooleanConstructor;
|
|
28
|
+
horizontal: BooleanConstructor;
|
|
29
|
+
radius: {
|
|
30
|
+
type: NumberConstructor;
|
|
31
|
+
default: number;
|
|
32
|
+
};
|
|
33
|
+
flat: BooleanConstructor;
|
|
34
|
+
format: {
|
|
35
|
+
type: PropType<(v: number) => string>;
|
|
36
|
+
default: undefined;
|
|
37
|
+
};
|
|
38
|
+
}>, {
|
|
39
|
+
fmtCell: (v: number | null | undefined) => string;
|
|
40
|
+
box: import("vue").Ref<HTMLElement | null, HTMLElement | null>;
|
|
41
|
+
w: import("vue").Ref<number, number>;
|
|
42
|
+
hover: import("vue").Ref<{
|
|
43
|
+
cat: number;
|
|
44
|
+
x: number;
|
|
45
|
+
y: number;
|
|
46
|
+
} | null, {
|
|
47
|
+
cat: number;
|
|
48
|
+
x: number;
|
|
49
|
+
y: number;
|
|
50
|
+
} | {
|
|
51
|
+
cat: number;
|
|
52
|
+
x: number;
|
|
53
|
+
y: number;
|
|
54
|
+
} | null>;
|
|
55
|
+
y: import("vue").ComputedRef<{
|
|
56
|
+
ticks: number[];
|
|
57
|
+
min: number;
|
|
58
|
+
max: number;
|
|
59
|
+
}>;
|
|
60
|
+
bars: import("vue").ComputedRef<{
|
|
61
|
+
key: string;
|
|
62
|
+
d: string;
|
|
63
|
+
color: string;
|
|
64
|
+
cat: number;
|
|
65
|
+
cx: number;
|
|
66
|
+
cy: number;
|
|
67
|
+
}[]>;
|
|
68
|
+
gridLine: (t: number) => {
|
|
69
|
+
x1: number;
|
|
70
|
+
x2: number;
|
|
71
|
+
y1: number;
|
|
72
|
+
y2: number;
|
|
73
|
+
};
|
|
74
|
+
valueTick: (t: number) => {
|
|
75
|
+
x: number;
|
|
76
|
+
y: number;
|
|
77
|
+
'text-anchor': string;
|
|
78
|
+
'dominant-baseline'?: undefined;
|
|
79
|
+
} | {
|
|
80
|
+
x: number;
|
|
81
|
+
y: number;
|
|
82
|
+
'text-anchor': string;
|
|
83
|
+
'dominant-baseline': string;
|
|
84
|
+
};
|
|
85
|
+
catTick: (i: number) => {
|
|
86
|
+
x: number;
|
|
87
|
+
y: number;
|
|
88
|
+
'text-anchor': string;
|
|
89
|
+
'dominant-baseline': string;
|
|
90
|
+
} | {
|
|
91
|
+
x: number;
|
|
92
|
+
y: number;
|
|
93
|
+
'text-anchor': string;
|
|
94
|
+
'dominant-baseline'?: undefined;
|
|
95
|
+
};
|
|
96
|
+
colorOf: (i: number) => string;
|
|
97
|
+
fmt: (v: number) => string;
|
|
98
|
+
tipStyle: import("vue").ComputedRef<{
|
|
99
|
+
right?: undefined;
|
|
100
|
+
top?: undefined;
|
|
101
|
+
left?: undefined;
|
|
102
|
+
} | {
|
|
103
|
+
right: string;
|
|
104
|
+
top: string;
|
|
105
|
+
left?: undefined;
|
|
106
|
+
} | {
|
|
107
|
+
left: string;
|
|
108
|
+
top: string;
|
|
109
|
+
right?: undefined;
|
|
110
|
+
}>;
|
|
111
|
+
legend: import("vue").ComputedRef<{
|
|
112
|
+
name: string;
|
|
113
|
+
color: string;
|
|
114
|
+
}[]>;
|
|
115
|
+
table: import("vue").ComputedRef<{
|
|
116
|
+
head: string[];
|
|
117
|
+
rows: (string | number)[][];
|
|
118
|
+
}>;
|
|
119
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
120
|
+
labels: {
|
|
121
|
+
type: PropType<string[]>;
|
|
122
|
+
default: () => never[];
|
|
123
|
+
};
|
|
124
|
+
series: {
|
|
125
|
+
type: PropType<Series[]>;
|
|
126
|
+
default: () => never[];
|
|
127
|
+
};
|
|
128
|
+
title: {
|
|
129
|
+
type: StringConstructor;
|
|
130
|
+
default: undefined;
|
|
131
|
+
};
|
|
132
|
+
subtitle: {
|
|
133
|
+
type: StringConstructor;
|
|
134
|
+
default: undefined;
|
|
135
|
+
};
|
|
136
|
+
height: {
|
|
137
|
+
type: NumberConstructor;
|
|
138
|
+
default: number;
|
|
139
|
+
};
|
|
140
|
+
stacked: BooleanConstructor;
|
|
141
|
+
horizontal: BooleanConstructor;
|
|
142
|
+
radius: {
|
|
143
|
+
type: NumberConstructor;
|
|
144
|
+
default: number;
|
|
145
|
+
};
|
|
146
|
+
flat: BooleanConstructor;
|
|
147
|
+
format: {
|
|
148
|
+
type: PropType<(v: number) => string>;
|
|
149
|
+
default: undefined;
|
|
150
|
+
};
|
|
151
|
+
}>> & Readonly<{}>, {
|
|
152
|
+
flat: boolean;
|
|
153
|
+
title: string;
|
|
154
|
+
subtitle: string;
|
|
155
|
+
labels: string[];
|
|
156
|
+
series: Series[];
|
|
157
|
+
height: number;
|
|
158
|
+
format: (v: number) => string;
|
|
159
|
+
stacked: boolean;
|
|
160
|
+
horizontal: boolean;
|
|
161
|
+
radius: number;
|
|
162
|
+
}, {}, {
|
|
163
|
+
ChartFrame: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
164
|
+
title: {
|
|
165
|
+
type: StringConstructor;
|
|
166
|
+
default: undefined;
|
|
167
|
+
};
|
|
168
|
+
subtitle: {
|
|
169
|
+
type: StringConstructor;
|
|
170
|
+
default: undefined;
|
|
171
|
+
};
|
|
172
|
+
flat: BooleanConstructor;
|
|
173
|
+
legend: {
|
|
174
|
+
type: PropType<{
|
|
175
|
+
name: string;
|
|
176
|
+
color: string;
|
|
177
|
+
}[]>;
|
|
178
|
+
default: () => never[];
|
|
179
|
+
};
|
|
180
|
+
table: {
|
|
181
|
+
type: PropType<{
|
|
182
|
+
head: string[];
|
|
183
|
+
rows: (string | number)[][];
|
|
184
|
+
}>;
|
|
185
|
+
default: () => {
|
|
186
|
+
head: never[];
|
|
187
|
+
rows: never[];
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
191
|
+
title: {
|
|
192
|
+
type: StringConstructor;
|
|
193
|
+
default: undefined;
|
|
194
|
+
};
|
|
195
|
+
subtitle: {
|
|
196
|
+
type: StringConstructor;
|
|
197
|
+
default: undefined;
|
|
198
|
+
};
|
|
199
|
+
flat: BooleanConstructor;
|
|
200
|
+
legend: {
|
|
201
|
+
type: PropType<{
|
|
202
|
+
name: string;
|
|
203
|
+
color: string;
|
|
204
|
+
}[]>;
|
|
205
|
+
default: () => never[];
|
|
206
|
+
};
|
|
207
|
+
table: {
|
|
208
|
+
type: PropType<{
|
|
209
|
+
head: string[];
|
|
210
|
+
rows: (string | number)[][];
|
|
211
|
+
}>;
|
|
212
|
+
default: () => {
|
|
213
|
+
head: never[];
|
|
214
|
+
rows: never[];
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
}>> & Readonly<{}>, {
|
|
218
|
+
flat: boolean;
|
|
219
|
+
title: string;
|
|
220
|
+
subtitle: string;
|
|
221
|
+
legend: {
|
|
222
|
+
name: string;
|
|
223
|
+
color: string;
|
|
224
|
+
}[];
|
|
225
|
+
table: {
|
|
226
|
+
head: string[];
|
|
227
|
+
rows: (string | number)[][];
|
|
228
|
+
};
|
|
229
|
+
}, {}, {
|
|
230
|
+
SqShape: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
231
|
+
watchKey: {
|
|
232
|
+
type: (ObjectConstructor | BooleanConstructor | ArrayConstructor | StringConstructor | NumberConstructor)[];
|
|
233
|
+
default: undefined;
|
|
234
|
+
};
|
|
235
|
+
clip: BooleanConstructor;
|
|
236
|
+
}>, {
|
|
237
|
+
active: import("vue").Ref<boolean, boolean>;
|
|
238
|
+
w: import("vue").Ref<number, number>;
|
|
239
|
+
h: import("vue").Ref<number, number>;
|
|
240
|
+
bw: import("vue").Ref<number, number>;
|
|
241
|
+
d: import("vue").ComputedRef<string>;
|
|
242
|
+
strokeD: import("vue").ComputedRef<string>;
|
|
243
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
244
|
+
watchKey: {
|
|
245
|
+
type: (ObjectConstructor | BooleanConstructor | ArrayConstructor | StringConstructor | NumberConstructor)[];
|
|
246
|
+
default: undefined;
|
|
247
|
+
};
|
|
248
|
+
clip: BooleanConstructor;
|
|
249
|
+
}>> & Readonly<{}>, {
|
|
250
|
+
clip: boolean;
|
|
251
|
+
watchKey: string | number | boolean | unknown[] | Record<string, any>;
|
|
252
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
253
|
+
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
254
|
+
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
import { type DonutDatum } from '../utils';
|
|
3
|
+
/** Pie / donut with a 2px surface gap between segments; legend always shown for 2+ segments. */
|
|
4
|
+
declare const _default: typeof __VLS_export;
|
|
5
|
+
export default _default;
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
7
|
+
data: {
|
|
8
|
+
type: PropType<DonutDatum[]>;
|
|
9
|
+
default: () => never[];
|
|
10
|
+
};
|
|
11
|
+
title: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
default: undefined;
|
|
14
|
+
};
|
|
15
|
+
subtitle: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
default: undefined;
|
|
18
|
+
};
|
|
19
|
+
size: {
|
|
20
|
+
type: NumberConstructor;
|
|
21
|
+
default: number;
|
|
22
|
+
};
|
|
23
|
+
/** Ring thickness as a fraction of the radius; 1 = pie. */
|
|
24
|
+
thickness: {
|
|
25
|
+
type: NumberConstructor;
|
|
26
|
+
default: number;
|
|
27
|
+
};
|
|
28
|
+
totalLabel: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
32
|
+
flat: BooleanConstructor;
|
|
33
|
+
format: {
|
|
34
|
+
type: PropType<(v: number) => string>;
|
|
35
|
+
default: undefined;
|
|
36
|
+
};
|
|
37
|
+
}>, {
|
|
38
|
+
hover: import("vue").Ref<number, number>;
|
|
39
|
+
total: import("vue").ComputedRef<number>;
|
|
40
|
+
fmt: (v: number) => string;
|
|
41
|
+
arcs: import("vue").ComputedRef<{
|
|
42
|
+
label: string;
|
|
43
|
+
color: string;
|
|
44
|
+
d: string;
|
|
45
|
+
}[]>;
|
|
46
|
+
legend: import("vue").ComputedRef<{
|
|
47
|
+
name: string;
|
|
48
|
+
color: string;
|
|
49
|
+
}[]>;
|
|
50
|
+
table: import("vue").ComputedRef<{
|
|
51
|
+
head: string[];
|
|
52
|
+
rows: (string | number)[][];
|
|
53
|
+
}>;
|
|
54
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
55
|
+
data: {
|
|
56
|
+
type: PropType<DonutDatum[]>;
|
|
57
|
+
default: () => never[];
|
|
58
|
+
};
|
|
59
|
+
title: {
|
|
60
|
+
type: StringConstructor;
|
|
61
|
+
default: undefined;
|
|
62
|
+
};
|
|
63
|
+
subtitle: {
|
|
64
|
+
type: StringConstructor;
|
|
65
|
+
default: undefined;
|
|
66
|
+
};
|
|
67
|
+
size: {
|
|
68
|
+
type: NumberConstructor;
|
|
69
|
+
default: number;
|
|
70
|
+
};
|
|
71
|
+
/** Ring thickness as a fraction of the radius; 1 = pie. */
|
|
72
|
+
thickness: {
|
|
73
|
+
type: NumberConstructor;
|
|
74
|
+
default: number;
|
|
75
|
+
};
|
|
76
|
+
totalLabel: {
|
|
77
|
+
type: StringConstructor;
|
|
78
|
+
default: string;
|
|
79
|
+
};
|
|
80
|
+
flat: BooleanConstructor;
|
|
81
|
+
format: {
|
|
82
|
+
type: PropType<(v: number) => string>;
|
|
83
|
+
default: undefined;
|
|
84
|
+
};
|
|
85
|
+
}>> & Readonly<{}>, {
|
|
86
|
+
flat: boolean;
|
|
87
|
+
title: string;
|
|
88
|
+
subtitle: string;
|
|
89
|
+
size: number;
|
|
90
|
+
data: DonutDatum[];
|
|
91
|
+
format: (v: number) => string;
|
|
92
|
+
thickness: number;
|
|
93
|
+
totalLabel: string;
|
|
94
|
+
}, {}, {
|
|
95
|
+
ChartFrame: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
96
|
+
title: {
|
|
97
|
+
type: StringConstructor;
|
|
98
|
+
default: undefined;
|
|
99
|
+
};
|
|
100
|
+
subtitle: {
|
|
101
|
+
type: StringConstructor;
|
|
102
|
+
default: undefined;
|
|
103
|
+
};
|
|
104
|
+
flat: BooleanConstructor;
|
|
105
|
+
legend: {
|
|
106
|
+
type: PropType<{
|
|
107
|
+
name: string;
|
|
108
|
+
color: string;
|
|
109
|
+
}[]>;
|
|
110
|
+
default: () => never[];
|
|
111
|
+
};
|
|
112
|
+
table: {
|
|
113
|
+
type: PropType<{
|
|
114
|
+
head: string[];
|
|
115
|
+
rows: (string | number)[][];
|
|
116
|
+
}>;
|
|
117
|
+
default: () => {
|
|
118
|
+
head: never[];
|
|
119
|
+
rows: never[];
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
123
|
+
title: {
|
|
124
|
+
type: StringConstructor;
|
|
125
|
+
default: undefined;
|
|
126
|
+
};
|
|
127
|
+
subtitle: {
|
|
128
|
+
type: StringConstructor;
|
|
129
|
+
default: undefined;
|
|
130
|
+
};
|
|
131
|
+
flat: BooleanConstructor;
|
|
132
|
+
legend: {
|
|
133
|
+
type: PropType<{
|
|
134
|
+
name: string;
|
|
135
|
+
color: string;
|
|
136
|
+
}[]>;
|
|
137
|
+
default: () => never[];
|
|
138
|
+
};
|
|
139
|
+
table: {
|
|
140
|
+
type: PropType<{
|
|
141
|
+
head: string[];
|
|
142
|
+
rows: (string | number)[][];
|
|
143
|
+
}>;
|
|
144
|
+
default: () => {
|
|
145
|
+
head: never[];
|
|
146
|
+
rows: never[];
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
}>> & Readonly<{}>, {
|
|
150
|
+
flat: boolean;
|
|
151
|
+
title: string;
|
|
152
|
+
subtitle: string;
|
|
153
|
+
legend: {
|
|
154
|
+
name: string;
|
|
155
|
+
color: string;
|
|
156
|
+
}[];
|
|
157
|
+
table: {
|
|
158
|
+
head: string[];
|
|
159
|
+
rows: (string | number)[][];
|
|
160
|
+
};
|
|
161
|
+
}, {}, {
|
|
162
|
+
SqShape: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
163
|
+
watchKey: {
|
|
164
|
+
type: (ObjectConstructor | BooleanConstructor | ArrayConstructor | StringConstructor | NumberConstructor)[];
|
|
165
|
+
default: undefined;
|
|
166
|
+
};
|
|
167
|
+
clip: BooleanConstructor;
|
|
168
|
+
}>, {
|
|
169
|
+
active: import("vue").Ref<boolean, boolean>;
|
|
170
|
+
w: import("vue").Ref<number, number>;
|
|
171
|
+
h: import("vue").Ref<number, number>;
|
|
172
|
+
bw: import("vue").Ref<number, number>;
|
|
173
|
+
d: import("vue").ComputedRef<string>;
|
|
174
|
+
strokeD: import("vue").ComputedRef<string>;
|
|
175
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
176
|
+
watchKey: {
|
|
177
|
+
type: (ObjectConstructor | BooleanConstructor | ArrayConstructor | StringConstructor | NumberConstructor)[];
|
|
178
|
+
default: undefined;
|
|
179
|
+
};
|
|
180
|
+
clip: BooleanConstructor;
|
|
181
|
+
}>> & Readonly<{}>, {
|
|
182
|
+
clip: boolean;
|
|
183
|
+
watchKey: string | number | boolean | unknown[] | Record<string, any>;
|
|
184
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
185
|
+
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
186
|
+
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|