@stealthscale/component-charts 0.2.2 → 0.2.3
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/dist/cyclonedx/bom.json +1 -1
- package/dist/index.js +1 -14710
- package/dist/pages/area-chart/area-chart.js +1151 -0
- package/dist/pages/area-chart/area-chart.props.js +3 -0
- package/dist/pages/bar-chart/bar-chart.js +990 -0
- package/dist/pages/bar-chart/bar-chart.props.js +3 -0
- package/dist/pages/box-plot/box-plot.js +1585 -0
- package/dist/pages/box-plot/box-plot.props.js +3 -0
- package/dist/pages/bubble-chart/bubble-chart.js +938 -0
- package/dist/pages/bubble-chart/bubble-chart.props.js +3 -0
- package/dist/pages/burndown-chart/burndown-chart.js +805 -0
- package/dist/pages/burndown-chart/burndown-chart.props.js +3 -0
- package/dist/pages/candlestick-chart/candlestick-chart.js +853 -0
- package/dist/pages/candlestick-chart/candlestick-chart.props.js +3 -0
- package/dist/pages/chart/chart.js +1190 -0
- package/dist/pages/chart/chart.props.js +3 -0
- package/dist/pages/chord-diagram/chord-diagram.js +891 -0
- package/dist/pages/chord-diagram/chord-diagram.props.js +3 -0
- package/dist/pages/combo-chart/combo-chart.js +873 -0
- package/dist/pages/combo-chart/combo-chart.props.js +3 -0
- package/dist/pages/distribution-chart/distribution-chart.js +1066 -0
- package/dist/pages/distribution-chart/distribution-chart.props.js +3 -0
- package/dist/pages/donut-chart/donut-chart.js +726 -0
- package/dist/pages/donut-chart/donut-chart.props.js +3 -0
- package/dist/pages/funnel-chart/funnel-chart.js +1094 -0
- package/dist/pages/funnel-chart/funnel-chart.props.js +3 -0
- package/dist/pages/gauge-chart/gauge-chart.js +767 -0
- package/dist/pages/gauge-chart/gauge-chart.props.js +3 -0
- package/dist/pages/heatmap/heatmap.js +1967 -0
- package/dist/pages/heatmap/heatmap.props.js +3 -0
- package/dist/pages/histogram-chart/histogram-chart.js +768 -0
- package/dist/pages/histogram-chart/histogram-chart.props.js +3 -0
- package/dist/pages/horizontal-bar-chart/horizontal-bar-chart.js +701 -0
- package/dist/pages/horizontal-bar-chart/horizontal-bar-chart.props.js +3 -0
- package/dist/pages/line-chart/line-chart.js +1882 -0
- package/dist/pages/line-chart/line-chart.props.js +3 -0
- package/dist/pages/pages.json +393 -0
- package/dist/pages/pareto-chart/pareto-chart.js +669 -0
- package/dist/pages/pareto-chart/pareto-chart.props.js +3 -0
- package/dist/pages/percent-stacked-bar/percent-stacked-bar.js +662 -0
- package/dist/pages/percent-stacked-bar/percent-stacked-bar.props.js +3 -0
- package/dist/pages/pie-chart/pie-chart.js +1007 -0
- package/dist/pages/pie-chart/pie-chart.props.js +3 -0
- package/dist/pages/polar-area-chart/polar-area-chart.js +812 -0
- package/dist/pages/polar-area-chart/polar-area-chart.props.js +3 -0
- package/dist/pages/radar-chart/radar-chart.js +1101 -0
- package/dist/pages/radar-chart/radar-chart.props.js +3 -0
- package/dist/pages/radial-bar-chart/radial-bar-chart.js +766 -0
- package/dist/pages/radial-bar-chart/radial-bar-chart.props.js +3 -0
- package/dist/pages/range-chart/range-chart.js +914 -0
- package/dist/pages/range-chart/range-chart.props.js +3 -0
- package/dist/pages/regression-overlay/regression-overlay.js +494 -0
- package/dist/pages/regression-overlay/regression-overlay.props.js +3 -0
- package/dist/pages/sankey-chart/sankey-chart.js +700 -0
- package/dist/pages/sankey-chart/sankey-chart.props.js +3 -0
- package/dist/pages/scatter-plot/scatter-plot.js +1248 -0
- package/dist/pages/scatter-plot/scatter-plot.props.js +3 -0
- package/dist/pages/sparkbar/sparkbar.js +629 -0
- package/dist/pages/sparkbar/sparkbar.props.js +3 -0
- package/dist/pages/sparkline/sparkline.js +960 -0
- package/dist/pages/sparkline/sparkline.props.js +3 -0
- package/dist/pages/spend-5xQ76WSj.js +185 -0
- package/dist/pages/stacked-area-chart/stacked-area-chart.js +912 -0
- package/dist/pages/stacked-area-chart/stacked-area-chart.props.js +3 -0
- package/dist/pages/stacked-bar-chart/stacked-bar-chart.js +722 -0
- package/dist/pages/stacked-bar-chart/stacked-bar-chart.props.js +3 -0
- package/dist/pages/step-line-chart/step-line-chart.js +573 -0
- package/dist/pages/step-line-chart/step-line-chart.props.js +3 -0
- package/dist/pages/stream-graph/stream-graph.js +1662 -0
- package/dist/pages/stream-graph/stream-graph.props.js +3 -0
- package/dist/pages/sunburst-chart/sunburst-chart.js +1051 -0
- package/dist/pages/sunburst-chart/sunburst-chart.props.js +3 -0
- package/dist/pages/timeline-chart/timeline-chart.js +1124 -0
- package/dist/pages/timeline-chart/timeline-chart.props.js +3 -0
- package/dist/pages/treemap-chart/treemap-chart.js +904 -0
- package/dist/pages/treemap-chart/treemap-chart.props.js +3 -0
- package/dist/pages/violin-plot/violin-plot.js +1303 -0
- package/dist/pages/violin-plot/violin-plot.props.js +3 -0
- package/dist/pages/visitors-oFFVcbIZ.js +248 -0
- package/dist/pages/waterfall-chart/waterfall-chart.js +1195 -0
- package/dist/pages/waterfall-chart/waterfall-chart.props.js +3 -0
- package/dist/shared-DVZJ2nST.js +14711 -0
- package/dist/theme.js +1 -1
- package/locales/en/specimen/area-chart.json +56 -0
- package/locales/en/specimen/bar-chart.json +56 -0
- package/locales/en/specimen/box-plot.json +65 -0
- package/locales/en/specimen/bubble-chart.json +47 -0
- package/locales/en/specimen/burndown-chart.json +46 -0
- package/locales/en/specimen/candlestick-chart.json +42 -0
- package/locales/en/specimen/chart.json +53 -0
- package/locales/en/specimen/chord-diagram.json +69 -0
- package/locales/en/specimen/combo-chart.json +41 -0
- package/locales/en/specimen/distribution-chart.json +47 -0
- package/locales/en/specimen/donut-chart.json +63 -0
- package/locales/en/specimen/funnel-chart.json +84 -0
- package/locales/en/specimen/gauge-chart.json +68 -0
- package/locales/en/specimen/heatmap.json +187 -0
- package/locales/en/specimen/histogram-chart.json +48 -0
- package/locales/en/specimen/horizontal-bar-chart.json +54 -0
- package/locales/en/specimen/line-chart.json +106 -0
- package/locales/en/specimen/pareto-chart.json +43 -0
- package/locales/en/specimen/percent-stacked-bar.json +37 -0
- package/locales/en/specimen/pie-chart.json +80 -0
- package/locales/en/specimen/polar-area-chart.json +90 -0
- package/locales/en/specimen/radar-chart.json +82 -0
- package/locales/en/specimen/radial-bar-chart.json +62 -0
- package/locales/en/specimen/range-chart.json +42 -0
- package/locales/en/specimen/regression-overlay.json +36 -0
- package/locales/en/specimen/sankey-chart.json +89 -0
- package/locales/en/specimen/scatter-plot.json +88 -0
- package/locales/en/specimen/sparkbar.json +51 -0
- package/locales/en/specimen/sparkline.json +70 -0
- package/locales/en/specimen/stacked-area-chart.json +44 -0
- package/locales/en/specimen/stacked-bar-chart.json +34 -0
- package/locales/en/specimen/step-line-chart.json +33 -0
- package/locales/en/specimen/stream-graph.json +54 -0
- package/locales/en/specimen/sunburst-chart.json +110 -0
- package/locales/en/specimen/timeline-chart.json +77 -0
- package/locales/en/specimen/treemap-chart.json +107 -0
- package/locales/en/specimen/violin-plot.json +54 -0
- package/locales/en/specimen/waterfall-chart.json +71 -0
- package/package.json +8 -7
- /package/dist/{recipe-BbGw00ut.js → recipes-BbGw00ut.js} +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export const dropped = {"SparklineProps": {"conditions": 284, "foreign": 1039}};
|
|
2
|
+
export const parts = {"SparklineProps": [{"accepts": "boolean", "fallback": "", "kind": "option", "name": "animate", "refers": [], "required": false, "says": "Whether the line animates in, which it does only outside reduced motion."}, {"accepts": "boolean", "fallback": "", "kind": "option", "name": "area", "refers": [], "required": false, "says": "Whether the chart's gradient fills under the line."}, {"accepts": "number", "fallback": "", "kind": "option", "name": "baseline", "refers": [], "required": false, "says": "Value a dashed line marks across the run, such as a target."}, {"accepts": "ChartColor", "fallback": "", "kind": "option", "name": "color", "refers": ["kit.ChartColor"], "required": false, "says": "Palette the line takes its color from. The theme's first series color unless stated."}, {"accepts": "Curve", "fallback": "", "kind": "option", "name": "curve", "refers": ["kit.Curve"], "required": false, "says": "Path of the line between two values."}, {"accepts": "string", "fallback": "", "kind": "option", "name": "label", "refers": [], "required": false, "says": "Name of a run shown on its own. A run without one is hidden from assistive technology."}, {"accepts": "\"lg\" | \"md\" | \"sm\"", "fallback": "", "kind": "variant", "name": "size", "refers": [], "required": false, "says": "Box on the grid, four times as wide as it is tall."}, {"accepts": "boolean", "fallback": "", "kind": "variant", "name": "stretch", "refers": [], "required": false, "says": "Whether the box fills its container's width at the size's height."}, {"accepts": "readonly SparkValue[]", "fallback": "", "kind": "option", "name": "values", "refers": [], "required": true, "says": "The run, oldest first. A value that is not a finite number leaves a gap."}]};
|
|
3
|
+
export const shapes = {"kit.ChartColor": [{"accepts": "", "name": "\"accent\"", "says": ""}, {"accepts": "", "name": "\"blue\"", "says": ""}, {"accepts": "", "name": "\"cyan\"", "says": ""}, {"accepts": "", "name": "\"error\"", "says": ""}, {"accepts": "", "name": "\"gray\"", "says": ""}, {"accepts": "", "name": "\"green\"", "says": ""}, {"accepts": "", "name": "\"indigo\"", "says": ""}, {"accepts": "", "name": "\"info\"", "says": ""}, {"accepts": "", "name": "\"neutral\"", "says": ""}, {"accepts": "", "name": "\"orange\"", "says": ""}, {"accepts": "", "name": "\"pink\"", "says": ""}, {"accepts": "", "name": "\"primary\"", "says": ""}, {"accepts": "", "name": "\"purple\"", "says": ""}, {"accepts": "", "name": "\"red\"", "says": ""}, {"accepts": "", "name": "\"secondary\"", "says": ""}, {"accepts": "", "name": "\"series.1\"", "says": ""}, {"accepts": "", "name": "\"series.2\"", "says": ""}, {"accepts": "", "name": "\"series.3\"", "says": ""}, {"accepts": "", "name": "\"series.4\"", "says": ""}, {"accepts": "", "name": "\"series.5\"", "says": ""}, {"accepts": "", "name": "\"series.6\"", "says": ""}, {"accepts": "", "name": "\"series.7\"", "says": ""}, {"accepts": "", "name": "\"series.8\"", "says": ""}, {"accepts": "", "name": "\"success\"", "says": ""}, {"accepts": "", "name": "\"teal\"", "says": ""}, {"accepts": "", "name": "\"warning\"", "says": ""}, {"accepts": "", "name": "\"yellow\"", "says": ""}], "kit.Curve": [{"accepts": "", "name": "\"linear\"", "says": ""}, {"accepts": "", "name": "\"monotone\"", "says": ""}]};
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
//#region src/treemap-chart/examples/spend.ts
|
|
2
|
+
/**
|
|
3
|
+
* Lists the data team's services for September: 38,500 in all.
|
|
4
|
+
*/
|
|
5
|
+
const DATA = {
|
|
6
|
+
children: [
|
|
7
|
+
{
|
|
8
|
+
key: "postgres",
|
|
9
|
+
value: 18400
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
key: "kafka",
|
|
13
|
+
value: 9700
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
key: "objects",
|
|
17
|
+
value: 6300
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
key: "redis",
|
|
21
|
+
value: 4100
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
key: "data"
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Lists the platform team's services for September: 36,600 in all.
|
|
28
|
+
*/
|
|
29
|
+
const PLATFORM = [
|
|
30
|
+
{
|
|
31
|
+
key: "kubernetes",
|
|
32
|
+
value: 21800
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
key: "logs",
|
|
36
|
+
value: 7600
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
key: "nat",
|
|
40
|
+
value: 3900
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
key: "balancers",
|
|
44
|
+
value: 2400
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
key: "firewall",
|
|
48
|
+
value: 900
|
|
49
|
+
}
|
|
50
|
+
];
|
|
51
|
+
/**
|
|
52
|
+
* Lists the product team's services for September: 20,300 in all.
|
|
53
|
+
*/
|
|
54
|
+
const PRODUCT = {
|
|
55
|
+
children: [
|
|
56
|
+
{
|
|
57
|
+
key: "search",
|
|
58
|
+
value: 8900
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
key: "functions",
|
|
62
|
+
value: 5200
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
key: "cdn",
|
|
66
|
+
value: 4400
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
key: "gateway",
|
|
70
|
+
value: 1800
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
key: "product"
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Lists September's cloud bill in euros: the data team 38,500, the platform team 36,600 and the
|
|
77
|
+
* product team 20,300, 95,400 in all. Kubernetes and Postgres are the two largest services.
|
|
78
|
+
*/
|
|
79
|
+
const SPEND = [
|
|
80
|
+
DATA,
|
|
81
|
+
{
|
|
82
|
+
children: PLATFORM,
|
|
83
|
+
key: "platform"
|
|
84
|
+
},
|
|
85
|
+
PRODUCT
|
|
86
|
+
];
|
|
87
|
+
/**
|
|
88
|
+
* Lists the bill with a reserved-capacity credit of 6,200 posted to the platform team.
|
|
89
|
+
*/
|
|
90
|
+
const CREDITED = [
|
|
91
|
+
DATA,
|
|
92
|
+
{
|
|
93
|
+
children: [...PLATFORM, {
|
|
94
|
+
key: "credit",
|
|
95
|
+
value: -6200
|
|
96
|
+
}],
|
|
97
|
+
key: "platform"
|
|
98
|
+
},
|
|
99
|
+
PRODUCT
|
|
100
|
+
];
|
|
101
|
+
/**
|
|
102
|
+
* Lists the platform team's spend: Kubernetes at 48,000 and fourteen services from 900 down to 185,
|
|
103
|
+
* 7,595 in all.
|
|
104
|
+
*/
|
|
105
|
+
const TAIL = [{
|
|
106
|
+
children: [{
|
|
107
|
+
key: "kubernetes",
|
|
108
|
+
value: 48e3
|
|
109
|
+
}, ...[
|
|
110
|
+
"cron",
|
|
111
|
+
"mailer",
|
|
112
|
+
"webhooks",
|
|
113
|
+
"metrics",
|
|
114
|
+
"tracing",
|
|
115
|
+
"secrets",
|
|
116
|
+
"dns",
|
|
117
|
+
"registry",
|
|
118
|
+
"snapshots",
|
|
119
|
+
"scanner",
|
|
120
|
+
"queue",
|
|
121
|
+
"status",
|
|
122
|
+
"flags",
|
|
123
|
+
"proxy"
|
|
124
|
+
].map((key, at) => ({
|
|
125
|
+
key,
|
|
126
|
+
value: 900 - at * 55
|
|
127
|
+
}))],
|
|
128
|
+
key: "platform"
|
|
129
|
+
}];
|
|
130
|
+
/**
|
|
131
|
+
* Lists a file share's folders in gigabytes, one level: 7,465 in all, design and video 4,300 of it.
|
|
132
|
+
*/
|
|
133
|
+
const STORAGE = [
|
|
134
|
+
{
|
|
135
|
+
key: "design",
|
|
136
|
+
value: 2400
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
key: "video",
|
|
140
|
+
value: 1900
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
key: "backups",
|
|
144
|
+
value: 1300
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
key: "photos",
|
|
148
|
+
value: 860
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
key: "builds",
|
|
152
|
+
value: 520
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
key: "documents",
|
|
156
|
+
value: 210
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
key: "audio",
|
|
160
|
+
value: 180
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
key: "archive",
|
|
164
|
+
value: 95
|
|
165
|
+
}
|
|
166
|
+
];
|
|
167
|
+
/**
|
|
168
|
+
* Returns the parts as nodes named through a function, such as the page's words, each with the
|
|
169
|
+
* palette a map states for its key.
|
|
170
|
+
*
|
|
171
|
+
* @param parts - The hierarchy to name, top level first.
|
|
172
|
+
* @param name - Returns a part's name from its key.
|
|
173
|
+
* @param colors - The palette of each part that states one, by key.
|
|
174
|
+
*/
|
|
175
|
+
function labelled(parts, name, colors = {}) {
|
|
176
|
+
return parts.map((part) => ({
|
|
177
|
+
children: part.children === void 0 ? void 0 : labelled(part.children, name, colors),
|
|
178
|
+
color: colors[part.key],
|
|
179
|
+
key: part.key,
|
|
180
|
+
label: name(part.key),
|
|
181
|
+
value: part.value
|
|
182
|
+
}));
|
|
183
|
+
}
|
|
184
|
+
//#endregion
|
|
185
|
+
export { labelled as a, TAIL as i, SPEND as n, STORAGE as r, CREDITED as t };
|