@stealthscale/component-charts 0.2.1 → 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 +29 -13
- 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 +9 -8
- /package/dist/{recipe-BbGw00ut.js → recipes-BbGw00ut.js} +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export const dropped = {"ViolinPlotProps": {"conditions": 284, "foreign": 1038}};
|
|
2
|
+
export const parts = {"ViolinPlotProps": [{"accepts": "boolean", "fallback": "", "kind": "option", "name": "animate", "refers": [], "required": false, "says": "Whether the violins grow in, which they do only outside reduced motion."}, {"accepts": "number", "fallback": "", "kind": "option", "name": "bandwidth", "refers": [], "required": false, "says": "Standard deviation of the Gaussian kernel for every group, in the values' own units. Silverman's bandwidth of each group unless stated."}, {"accepts": "ReactNode", "fallback": "", "kind": "option", "name": "caption", "refers": ["react.ReactElement", "react.ReactPortal"], "required": false, "says": "Finding the chart shows, in words, which names the figure."}, {"accepts": "ReactNode", "fallback": "", "kind": "option", "name": "children", "refers": ["react.ReactElement", "react.ReactPortal"], "required": false, "says": "Recharts elements rendered inside the chart after the violins, such as a `ReferenceLine`."}, {"accepts": "ChartColor", "fallback": "", "kind": "option", "name": "color", "refers": ["kit.ChartColor"], "required": false, "says": "Palette the violins take their color from. The theme's first series color unless stated."}, {"accepts": "ReactNode", "fallback": "", "kind": "option", "name": "countLabel", "refers": ["react.ReactElement", "react.ReactPortal"], "required": false, "says": "Name of the number of values in the tooltip."}, {"accepts": "number", "fallback": "", "kind": "option", "name": "defaultIndex", "refers": [], "required": false, "says": "Index of the group the tooltip shows when the chart first renders. None unless stated."}, {"accepts": "ReactNode", "fallback": "", "kind": "option", "name": "densityLabel", "refers": ["react.ReactElement", "react.ReactPortal"], "required": false, "says": "Name of the outline in the key."}, {"accepts": "ReactNode", "fallback": "", "kind": "option", "name": "empty", "refers": ["react.ReactElement", "react.ReactPortal"], "required": false, "says": "Message the chart renders in the plot's place while no group has a value."}, {"accepts": "boolean", "fallback": "", "kind": "option", "name": "grid", "refers": [], "required": false, "says": "Whether lines cross the plot at the value ticks."}, {"accepts": "readonly ViolinGroup[]", "fallback": "", "kind": "option", "name": "groups", "refers": ["kit.ViolinGroup"], "required": true, "says": "Groups the chart compares, in the order the category axis lists them."}, {"accepts": "string", "fallback": "", "kind": "option", "name": "label", "refers": [], "required": true, "says": "Accessible name of the chart's keyboard layer, such as \"Response times by cache\"."}, {"accepts": "boolean", "fallback": "", "kind": "option", "name": "legend", "refers": [], "required": false, "says": "Whether the key naming the violin's parts renders below the plot."}, {"accepts": "string", "fallback": "", "kind": "option", "name": "locale", "refers": [], "required": false, "says": "Locale the values are written in. The locale in scope unless stated."}, {"accepts": "ReactNode", "fallback": "", "kind": "option", "name": "medianLabel", "refers": ["react.ReactElement", "react.ReactPortal"], "required": false, "says": "Name of the median in the tooltip and the key."}, {"accepts": "ReactNode", "fallback": "", "kind": "option", "name": "peaksLabel", "refers": ["react.ReactElement", "react.ReactPortal"], "required": false, "says": "Name of the values the density peaks at in the tooltip."}, {"accepts": "boolean", "fallback": "", "kind": "option", "name": "quartiles", "refers": [], "required": false, "says": "Whether the whisker line, the quartile bar and the median point render inside each violin."}, {"accepts": "ReactNode", "fallback": "", "kind": "option", "name": "quartilesLabel", "refers": ["react.ReactElement", "react.ReactPortal"], "required": false, "says": "Name of the first quartile to the third in the tooltip and the key."}, {"accepts": "ReactNode", "fallback": "", "kind": "option", "name": "rangeLabel", "refers": ["react.ReactElement", "react.ReactPortal"], "required": false, "says": "Name of the smallest value to the largest in the tooltip."}, {"accepts": "\"golden\" | \"landscape\" | \"portrait\" | \"rows\" | \"square\" | \"ultrawide\" | \"video\" | \"wide\"", "fallback": "", "kind": "variant", "name": "ratio", "refers": [], "required": false, "says": "Aspect ratio of the plot and of the empty state in its place, one of the theme's ratios, or `rows` for a plot as tall as its rows."}, {"accepts": "number", "fallback": "", "kind": "option", "name": "resolution", "refers": [], "required": false, "says": "Number of points each density is sampled at, at least 2. 64 unless stated."}, {"accepts": "AxisDomain", "fallback": "", "kind": "option", "name": "valueDomain", "refers": ["recharts.AxisDomain", "recharts.AxisDomainItem", "recharts.NumberDomain"], "required": false, "says": "Domain of the value axis in recharts' terms, such as `[0, 500]`. Rounded around the values unless stated."}, {"accepts": "NumberFormatOptions", "fallback": "", "kind": "option", "name": "valueOptions", "refers": [], "required": false, "says": "`Intl.NumberFormat` options the value ticks and the tooltip's values are written with."}]};
|
|
3
|
+
export const shapes = {"react.ReactElement": [{"accepts": "string | JSXElementConstructor<any>", "name": "type", "says": ""}, {"accepts": "unknown", "name": "props", "says": ""}, {"accepts": "string | null", "name": "key", "says": ""}], "react.ReactPortal": [{"accepts": "ReactNode", "name": "children", "says": ""}, {"accepts": "string | JSXElementConstructor<any>", "name": "type", "says": ""}, {"accepts": "unknown", "name": "props", "says": ""}, {"accepts": "string | null", "name": "key", "says": ""}], "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.ViolinGroup": [{"accepts": "string", "name": "key", "says": "Key of the group."}, {"accepts": "string", "name": "label", "says": "Name of the group, which the category axis and the tooltip write."}, {"accepts": "readonly unknown[]", "name": "values", "says": "Values of the group, one per thing measured. A value that is not a finite number is left out."}], "recharts.AxisDomain": [{"accepts": "", "name": "readonly string[]", "says": ""}, {"accepts": "", "name": "readonly number[]", "says": ""}, {"accepts": "", "name": "([dataMin, dataMax]: NumberDomain, allowDataOverflow: boolean) => NumberDomain", "says": ""}, {"accepts": "", "name": "readonly [AxisDomainItem, AxisDomainItem]", "says": ""}], "recharts.AxisDomainItem": [{"accepts": "", "name": "string", "says": ""}, {"accepts": "", "name": "number", "says": ""}, {"accepts": "", "name": "(d: number) => string | number", "says": ""}]};
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
//#region src/sankey-chart/examples/visitors.ts
|
|
2
|
+
/**
|
|
3
|
+
* Keys of the visitors' nodes: four channels, the sign-up, the trial and four outcomes.
|
|
4
|
+
*/
|
|
5
|
+
const STEPS = [
|
|
6
|
+
"organic",
|
|
7
|
+
"paid",
|
|
8
|
+
"social",
|
|
9
|
+
"email",
|
|
10
|
+
"signup",
|
|
11
|
+
"trial",
|
|
12
|
+
"left",
|
|
13
|
+
"free",
|
|
14
|
+
"subscribed",
|
|
15
|
+
"cancelled"
|
|
16
|
+
];
|
|
17
|
+
/**
|
|
18
|
+
* Lists September's 25,900 visitors: 7,000 signed up, 4,200 of them started a trial and 1,500
|
|
19
|
+
* subscribed.
|
|
20
|
+
*/
|
|
21
|
+
const VISITORS = [
|
|
22
|
+
{
|
|
23
|
+
from: "organic",
|
|
24
|
+
to: "signup",
|
|
25
|
+
value: 3100
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
from: "organic",
|
|
29
|
+
to: "left",
|
|
30
|
+
value: 9300
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
from: "paid",
|
|
34
|
+
to: "signup",
|
|
35
|
+
value: 2e3
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
from: "paid",
|
|
39
|
+
to: "left",
|
|
40
|
+
value: 4800
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
from: "social",
|
|
44
|
+
to: "signup",
|
|
45
|
+
value: 700
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
from: "social",
|
|
49
|
+
to: "left",
|
|
50
|
+
value: 3400
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
from: "email",
|
|
54
|
+
to: "signup",
|
|
55
|
+
value: 1200
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
from: "email",
|
|
59
|
+
to: "left",
|
|
60
|
+
value: 1400
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
from: "signup",
|
|
64
|
+
to: "trial",
|
|
65
|
+
value: 4200
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
from: "signup",
|
|
69
|
+
to: "free",
|
|
70
|
+
value: 2800
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
from: "trial",
|
|
74
|
+
to: "subscribed",
|
|
75
|
+
value: 1500
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
from: "trial",
|
|
79
|
+
to: "cancelled",
|
|
80
|
+
value: 2700
|
|
81
|
+
}
|
|
82
|
+
];
|
|
83
|
+
/**
|
|
84
|
+
* Keys of the income statement's nodes: three lines of revenue, the revenue, its cost, the gross
|
|
85
|
+
* profit and where the gross profit went.
|
|
86
|
+
*/
|
|
87
|
+
const LINES = [
|
|
88
|
+
"subscriptions",
|
|
89
|
+
"services",
|
|
90
|
+
"hardware",
|
|
91
|
+
"revenue",
|
|
92
|
+
"cost",
|
|
93
|
+
"gross",
|
|
94
|
+
"research",
|
|
95
|
+
"sales",
|
|
96
|
+
"admin",
|
|
97
|
+
"operating"
|
|
98
|
+
];
|
|
99
|
+
/**
|
|
100
|
+
* Lists a year's income statement in euros: €11.7M of revenue, €7.4M of gross profit and €1.5M of
|
|
101
|
+
* operating profit.
|
|
102
|
+
*/
|
|
103
|
+
const INCOME = [
|
|
104
|
+
{
|
|
105
|
+
from: "subscriptions",
|
|
106
|
+
to: "revenue",
|
|
107
|
+
value: 82e5
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
from: "services",
|
|
111
|
+
to: "revenue",
|
|
112
|
+
value: 21e5
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
from: "hardware",
|
|
116
|
+
to: "revenue",
|
|
117
|
+
value: 14e5
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
from: "revenue",
|
|
121
|
+
to: "cost",
|
|
122
|
+
value: 43e5
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
from: "revenue",
|
|
126
|
+
to: "gross",
|
|
127
|
+
value: 74e5
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
from: "gross",
|
|
131
|
+
to: "research",
|
|
132
|
+
value: 26e5
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
from: "gross",
|
|
136
|
+
to: "sales",
|
|
137
|
+
value: 22e5
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
from: "gross",
|
|
141
|
+
to: "admin",
|
|
142
|
+
value: 11e5
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
from: "gross",
|
|
146
|
+
to: "operating",
|
|
147
|
+
value: 15e5
|
|
148
|
+
}
|
|
149
|
+
];
|
|
150
|
+
/**
|
|
151
|
+
* Keys of the checkout's nodes.
|
|
152
|
+
*/
|
|
153
|
+
const CHECKOUT = [
|
|
154
|
+
"cart",
|
|
155
|
+
"checkout",
|
|
156
|
+
"ordered",
|
|
157
|
+
"abandoned",
|
|
158
|
+
"refunded"
|
|
159
|
+
];
|
|
160
|
+
/**
|
|
161
|
+
* Lists a week's carts: 900 went to the checkout, 620 ordered, 40 were refunded, and 25 of those
|
|
162
|
+
* came back to the cart, which closes a loop.
|
|
163
|
+
*/
|
|
164
|
+
const LOOPED = [
|
|
165
|
+
{
|
|
166
|
+
from: "cart",
|
|
167
|
+
to: "checkout",
|
|
168
|
+
value: 900
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
from: "checkout",
|
|
172
|
+
to: "ordered",
|
|
173
|
+
value: 620
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
from: "checkout",
|
|
177
|
+
to: "abandoned",
|
|
178
|
+
value: 280
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
from: "ordered",
|
|
182
|
+
to: "refunded",
|
|
183
|
+
value: 40
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
from: "refunded",
|
|
187
|
+
to: "cart",
|
|
188
|
+
value: 25
|
|
189
|
+
}
|
|
190
|
+
];
|
|
191
|
+
/**
|
|
192
|
+
* Keys of the support queue's nodes.
|
|
193
|
+
*/
|
|
194
|
+
const QUEUE = [
|
|
195
|
+
"email",
|
|
196
|
+
"chat",
|
|
197
|
+
"phone",
|
|
198
|
+
"triage",
|
|
199
|
+
"solved",
|
|
200
|
+
"escalated"
|
|
201
|
+
];
|
|
202
|
+
/**
|
|
203
|
+
* Lists a week's tickets: triage receives 1,200 and sends on 1,050, so 150 are lost there.
|
|
204
|
+
*/
|
|
205
|
+
const LEAKY = [
|
|
206
|
+
{
|
|
207
|
+
from: "email",
|
|
208
|
+
to: "triage",
|
|
209
|
+
value: 640
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
from: "chat",
|
|
213
|
+
to: "triage",
|
|
214
|
+
value: 410
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
from: "phone",
|
|
218
|
+
to: "triage",
|
|
219
|
+
value: 150
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
from: "triage",
|
|
223
|
+
to: "solved",
|
|
224
|
+
value: 860
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
from: "triage",
|
|
228
|
+
to: "escalated",
|
|
229
|
+
value: 190
|
|
230
|
+
}
|
|
231
|
+
];
|
|
232
|
+
/**
|
|
233
|
+
* Returns the keys as nodes named through a function, such as the page's words, each with the
|
|
234
|
+
* palette a map states for its key.
|
|
235
|
+
*
|
|
236
|
+
* @param keys - The nodes' keys in the walk's order.
|
|
237
|
+
* @param name - Returns a node's name from its key.
|
|
238
|
+
* @param colors - The palette of each node that states one, by key.
|
|
239
|
+
*/
|
|
240
|
+
function named(keys, name, colors = {}) {
|
|
241
|
+
return keys.map((key) => ({
|
|
242
|
+
color: colors[key],
|
|
243
|
+
key,
|
|
244
|
+
label: name(key)
|
|
245
|
+
}));
|
|
246
|
+
}
|
|
247
|
+
//#endregion
|
|
248
|
+
export { LOOPED as a, VISITORS as c, LINES as i, named as l, INCOME as n, QUEUE as o, LEAKY as r, STEPS as s, CHECKOUT as t };
|