@panneau/ui 5.0.0-alpha.39 → 5.0.0-alpha.41
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 +4 -1
- package/dist/chart-legend/ChartLegend.css +73 -0
- package/dist/chart-legend/ChartLegend.d.ts +32 -0
- package/dist/chart-legend/ChartLegend.d.ts.map +1 -0
- package/dist/chart-legend/ChartLegend.js +76 -0
- package/dist/chart-legend/ChartLegend.js.map +1 -0
- package/dist/chart-legend/ChartLegend.module.js +26 -0
- package/dist/chart-legend/ChartLegend.module.js.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/line-chart/LineChart.css +31 -0
- package/dist/line-chart/LineChart.d.ts +24 -1
- package/dist/line-chart/LineChart.d.ts.map +1 -1
- package/dist/line-chart/LineChart.js +517 -533
- package/dist/line-chart/LineChart.js.map +1 -1
- package/dist/line-chart/LineChart.module.js +9 -1
- package/dist/line-chart/LineChart.module.js.map +1 -1
- package/dist/sparkline/Sparkline.css +44 -0
- package/dist/sparkline/Sparkline.d.ts +23 -0
- package/dist/sparkline/Sparkline.d.ts.map +1 -0
- package/dist/sparkline/Sparkline.js +164 -0
- package/dist/sparkline/Sparkline.js.map +1 -0
- package/dist/sparkline/Sparkline.module.js +20 -0
- package/dist/sparkline/Sparkline.module.js.map +1 -0
- package/dist/sparkline/tokens.d.ts +3 -0
- package/dist/sparkline/tokens.d.ts.map +1 -0
- package/dist/sparkline/tokens.js +17 -0
- package/dist/sparkline/tokens.js.map +1 -0
- package/dist/stat/Stat.css +30 -0
- package/dist/stat/Stat.d.ts +15 -1
- package/dist/stat/Stat.d.ts.map +1 -1
- package/dist/stat/Stat.js +48 -33
- package/dist/stat/Stat.js.map +1 -1
- package/dist/stat/Stat.module.js +9 -1
- package/dist/stat/Stat.module.js.map +1 -1
- package/dist/theme/components.d.ts +1 -0
- package/dist/theme/components.d.ts.map +1 -1
- package/dist/theme/components.js +2 -0
- package/dist/theme/components.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { cx } from "../utils/cx.js";
|
|
2
2
|
import { messages } from "../intl/messages.js";
|
|
3
3
|
import { usePanneauIntl } from "../intl/usePanneauIntl.js";
|
|
4
|
+
import { toneClass } from "../theme/toneClass.js";
|
|
4
5
|
import { Skeleton } from "../skeleton/Skeleton.js";
|
|
5
6
|
import { chartColors } from "../theme/chartColors.js";
|
|
6
7
|
import LineChart_module_default from "./LineChart.module.js";
|
|
@@ -20,101 +21,62 @@ var LABEL_GAP = 12;
|
|
|
20
21
|
* with `isInteractive`, the pointer and the arrow keys also show the value of each point.
|
|
21
22
|
*/
|
|
22
23
|
function LineChart(t0) {
|
|
23
|
-
const $ = c(
|
|
24
|
-
const { label, points, formatValue, formatTick, axisLabel, showAxis:
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
const
|
|
24
|
+
const $ = c(91);
|
|
25
|
+
const { label, points: ownPoints, series, stacked: t1, formatValue, formatTick, axisLabel, showAxis: t2, showLast: t3, showMax: t4, isInteractive: t5, domain, curve: t6, height, color: t7, className } = t0;
|
|
26
|
+
const stacked = t1 === void 0 ? false : t1;
|
|
27
|
+
const showAxis = t2 === void 0 ? true : t2;
|
|
28
|
+
const showLast = t3 === void 0 ? true : t3;
|
|
29
|
+
const showMax = t4 === void 0 ? false : t4;
|
|
30
|
+
const isInteractive = t5 === void 0 ? false : t5;
|
|
31
|
+
const curve = t6 === void 0 ? "monotone" : t6;
|
|
32
|
+
const color = t7 === void 0 ? 0 : t7;
|
|
31
33
|
const intl = usePanneauIntl();
|
|
32
|
-
const
|
|
33
|
-
let
|
|
34
|
-
if ($[0] !==
|
|
35
|
-
let
|
|
34
|
+
const t8 = useId();
|
|
35
|
+
let t9;
|
|
36
|
+
if ($[0] !== t8) {
|
|
37
|
+
let t10;
|
|
36
38
|
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
37
|
-
|
|
38
|
-
$[2] =
|
|
39
|
-
} else
|
|
40
|
-
|
|
41
|
-
$[0] =
|
|
42
|
-
$[1] =
|
|
43
|
-
} else
|
|
44
|
-
const gradientId = `panneau-line-chart-${
|
|
39
|
+
t10 = /[^\w-]/g;
|
|
40
|
+
$[2] = t10;
|
|
41
|
+
} else t10 = $[2];
|
|
42
|
+
t9 = t8.replace(t10, "");
|
|
43
|
+
$[0] = t8;
|
|
44
|
+
$[1] = t9;
|
|
45
|
+
} else t9 = $[1];
|
|
46
|
+
const gradientId = `panneau-line-chart-${t9}`;
|
|
45
47
|
const [active, setActive] = useState(null);
|
|
46
|
-
let
|
|
48
|
+
let t10;
|
|
47
49
|
if ($[3] !== formatValue || $[4] !== intl) {
|
|
48
|
-
|
|
50
|
+
t10 = formatValue ?? ((value) => intl.formatNumber(value));
|
|
49
51
|
$[3] = formatValue;
|
|
50
52
|
$[4] = intl;
|
|
51
|
-
$[5] =
|
|
52
|
-
} else
|
|
53
|
-
const format =
|
|
54
|
-
let
|
|
53
|
+
$[5] = t10;
|
|
54
|
+
} else t10 = $[5];
|
|
55
|
+
const format = t10;
|
|
56
|
+
let t11;
|
|
55
57
|
if ($[6] !== color) {
|
|
56
|
-
|
|
58
|
+
t11 = chartColors.categorical(color);
|
|
57
59
|
$[6] = color;
|
|
58
|
-
$[7] =
|
|
59
|
-
} else
|
|
60
|
-
let
|
|
60
|
+
$[7] = t11;
|
|
61
|
+
} else t11 = $[7];
|
|
62
|
+
let t12;
|
|
61
63
|
if ($[8] !== height) {
|
|
62
|
-
|
|
64
|
+
t12 = height !== void 0 ? { "--_panneau-line-chart-height": height } : {};
|
|
63
65
|
$[8] = height;
|
|
64
|
-
$[9] =
|
|
65
|
-
} else
|
|
66
|
-
let t12;
|
|
67
|
-
if ($[10] !== t10 || $[11] !== t11) {
|
|
68
|
-
t12 = {
|
|
69
|
-
"--_panneau-line-chart-color": t10,
|
|
70
|
-
...t11
|
|
71
|
-
};
|
|
72
|
-
$[10] = t10;
|
|
73
|
-
$[11] = t11;
|
|
74
|
-
$[12] = t12;
|
|
75
|
-
} else t12 = $[12];
|
|
76
|
-
const style = t12;
|
|
77
|
-
if (points === void 0) {
|
|
78
|
-
let t13;
|
|
79
|
-
if ($[13] !== className) {
|
|
80
|
-
t13 = cx("panneau-line-chart", LineChart_module_default.chart, className);
|
|
81
|
-
$[13] = className;
|
|
82
|
-
$[14] = t13;
|
|
83
|
-
} else t13 = $[14];
|
|
84
|
-
let t14;
|
|
85
|
-
let t15;
|
|
86
|
-
if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
|
|
87
|
-
t14 = /* @__PURE__ */ jsx("div", {
|
|
88
|
-
className: LineChart_module_default.skeleton,
|
|
89
|
-
children: /* @__PURE__ */ jsx(Skeleton, {
|
|
90
|
-
shape: "rect",
|
|
91
|
-
height: "100%"
|
|
92
|
-
})
|
|
93
|
-
});
|
|
94
|
-
t15 = /* @__PURE__ */ jsx(Skeleton, { width: "100%" });
|
|
95
|
-
$[15] = t14;
|
|
96
|
-
$[16] = t15;
|
|
97
|
-
} else {
|
|
98
|
-
t14 = $[15];
|
|
99
|
-
t15 = $[16];
|
|
100
|
-
}
|
|
101
|
-
let t16;
|
|
102
|
-
if ($[17] !== style || $[18] !== t13) {
|
|
103
|
-
t16 = /* @__PURE__ */ jsxs("div", {
|
|
104
|
-
className: t13,
|
|
105
|
-
style,
|
|
106
|
-
children: [t14, t15]
|
|
107
|
-
});
|
|
108
|
-
$[17] = style;
|
|
109
|
-
$[18] = t13;
|
|
110
|
-
$[19] = t16;
|
|
111
|
-
} else t16 = $[19];
|
|
112
|
-
return t16;
|
|
113
|
-
}
|
|
114
|
-
let lastIndex;
|
|
115
|
-
let plotted;
|
|
116
|
-
let shortLabel;
|
|
66
|
+
$[9] = t12;
|
|
67
|
+
} else t12 = $[9];
|
|
117
68
|
let t13;
|
|
69
|
+
if ($[10] !== t11 || $[11] !== t12) {
|
|
70
|
+
t13 = {
|
|
71
|
+
"--_panneau-line-chart-color": t11,
|
|
72
|
+
...t12
|
|
73
|
+
};
|
|
74
|
+
$[10] = t11;
|
|
75
|
+
$[11] = t12;
|
|
76
|
+
$[12] = t13;
|
|
77
|
+
} else t13 = $[12];
|
|
78
|
+
const style = t13;
|
|
79
|
+
const multiple = series !== void 0 && series.length > 1;
|
|
118
80
|
let t14;
|
|
119
81
|
let t15;
|
|
120
82
|
let t16;
|
|
@@ -126,86 +88,126 @@ function LineChart(t0) {
|
|
|
126
88
|
let t22;
|
|
127
89
|
let t23;
|
|
128
90
|
let t24;
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
91
|
+
if ($[13] !== active || $[14] !== axisLabel || $[15] !== className || $[16] !== color || $[17] !== curve || $[18] !== domain || $[19] !== format || $[20] !== formatTick || $[21] !== gradientId || $[22] !== intl || $[23] !== isInteractive || $[24] !== label || $[25] !== multiple || $[26] !== ownPoints || $[27] !== series || $[28] !== showAxis || $[29] !== showLast || $[30] !== showMax || $[31] !== stacked || $[32] !== style) {
|
|
92
|
+
t24 = Symbol.for("react.early_return_sentinel");
|
|
93
|
+
bb0: {
|
|
94
|
+
const points = series !== void 0 ? series[0]?.points ?? [] : ownPoints;
|
|
95
|
+
if (points === void 0) {
|
|
96
|
+
let t25;
|
|
97
|
+
if ($[44] !== className) {
|
|
98
|
+
t25 = cx("panneau-line-chart", LineChart_module_default.chart, className);
|
|
99
|
+
$[44] = className;
|
|
100
|
+
$[45] = t25;
|
|
101
|
+
} else t25 = $[45];
|
|
102
|
+
let t26;
|
|
103
|
+
let t27;
|
|
104
|
+
if ($[46] === Symbol.for("react.memo_cache_sentinel")) {
|
|
105
|
+
t26 = /* @__PURE__ */ jsx("div", {
|
|
106
|
+
className: LineChart_module_default.skeleton,
|
|
107
|
+
children: /* @__PURE__ */ jsx(Skeleton, {
|
|
108
|
+
shape: "rect",
|
|
109
|
+
height: "100%"
|
|
110
|
+
})
|
|
111
|
+
});
|
|
112
|
+
t27 = /* @__PURE__ */ jsx(Skeleton, { width: "100%" });
|
|
113
|
+
$[46] = t26;
|
|
114
|
+
$[47] = t27;
|
|
115
|
+
} else {
|
|
116
|
+
t26 = $[46];
|
|
117
|
+
t27 = $[47];
|
|
118
|
+
}
|
|
119
|
+
let t28;
|
|
120
|
+
if ($[48] !== style || $[49] !== t25) {
|
|
121
|
+
t28 = /* @__PURE__ */ jsxs("div", {
|
|
122
|
+
className: t25,
|
|
123
|
+
style,
|
|
124
|
+
children: [t26, t27]
|
|
125
|
+
});
|
|
126
|
+
$[48] = style;
|
|
127
|
+
$[49] = t25;
|
|
128
|
+
$[50] = t28;
|
|
129
|
+
} else t28 = $[50];
|
|
130
|
+
t24 = t28;
|
|
131
|
+
break bb0;
|
|
132
|
+
}
|
|
133
|
+
const lines = (series ?? [{
|
|
134
|
+
label,
|
|
135
|
+
points,
|
|
136
|
+
color,
|
|
137
|
+
tone: void 0
|
|
138
|
+
}]).map((line, index) => ({
|
|
139
|
+
label: line.label,
|
|
140
|
+
color: line.color ?? (series !== void 0 ? index : color),
|
|
141
|
+
tone: line.tone,
|
|
142
|
+
values: points.map((_, at) => line.points[at]?.value ?? 0)
|
|
143
|
+
}));
|
|
144
|
+
const tops = lines.map((line_0, index_0) => line_0.values.map((value_0, at_0) => stacked ? lines.slice(0, index_0 + 1).reduce((sum, other) => sum + (other.values[at_0] ?? 0), 0) : value_0));
|
|
145
|
+
const drawn = tops.flat();
|
|
146
|
+
const values = points.map(_temp);
|
|
147
|
+
const scale = niceScale(Math.min(...drawn, 0), Math.max(...drawn, 0), domain);
|
|
148
|
+
const tick = formatTick ?? ((value_1) => intl.formatNumber(value_1, scale.max >= 1e4 ? { notation: "compact" } : {}));
|
|
149
|
+
const y = (value_2) => 100 - (value_2 - scale.min) / (scale.max - scale.min) * 100;
|
|
150
|
+
const plotted = points.map((point_0, index_1) => ({
|
|
151
|
+
x: points.length === 1 ? 50 : index_1 / (points.length - 1) * 100,
|
|
145
152
|
y: y(point_0.value)
|
|
146
|
-
});
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
const labelMax = showMax && maxPoint !== void 0 && maxValue > scale.min && !(labelLast && lastPoint.x - maxPoint.x < LABEL_GAP);
|
|
162
|
-
const activePoint = active !== null ? plotted[active] : void 0;
|
|
163
|
-
const activeData = active !== null ? points[active] : void 0;
|
|
164
|
-
shortLabel = _temp2;
|
|
165
|
-
let t33;
|
|
166
|
-
if ($[61] !== format || $[62] !== intl) {
|
|
167
|
-
t33 = (point_2) => intl.formatMessage(messages.chartPoint, {
|
|
153
|
+
}));
|
|
154
|
+
const line_1 = curve === "linear" ? linearPath(plotted) : monotonePath(plotted);
|
|
155
|
+
const zero = y(Math.min(Math.max(0, scale.min), scale.max));
|
|
156
|
+
const firstPoint = plotted[0];
|
|
157
|
+
const lastIndex = points.length - 1;
|
|
158
|
+
const lastPoint = plotted[lastIndex];
|
|
159
|
+
const maxValue = Math.max(...values);
|
|
160
|
+
const maxIndex = values.indexOf(maxValue);
|
|
161
|
+
const maxPoint = plotted[maxIndex];
|
|
162
|
+
const labelLast = showLast && !multiple && lastPoint !== void 0;
|
|
163
|
+
const labelMax = !multiple && showMax && maxPoint !== void 0 && maxValue > scale.min && !(labelLast && lastPoint.x - maxPoint.x < LABEL_GAP);
|
|
164
|
+
const activePoint = active !== null ? plotted[active] : void 0;
|
|
165
|
+
const activeData = active !== null ? points[active] : void 0;
|
|
166
|
+
const shortLabel = _temp2;
|
|
167
|
+
const describe = (point_2, index_2) => intl.formatMessage(messages.chartPoint, {
|
|
168
168
|
label: point_2.label,
|
|
169
|
-
value:
|
|
169
|
+
value: multiple ? lines.map((line_2) => intl.formatMessage(messages.chartPoint, {
|
|
170
|
+
label: line_2.label,
|
|
171
|
+
value: format(line_2.values[index_2] ?? 0)
|
|
172
|
+
})).join(", ") : format(point_2.value)
|
|
170
173
|
});
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
174
|
+
const plotLine = (line_3) => line_3.map((value_3, index_3) => ({
|
|
175
|
+
x: points.length === 1 ? 50 : index_3 / (points.length - 1) * 100,
|
|
176
|
+
y: y(value_3)
|
|
177
|
+
}));
|
|
178
|
+
let t25;
|
|
179
|
+
if ($[51] !== curve) {
|
|
180
|
+
t25 = (plot) => curve === "linear" ? linearPath(plot) : monotonePath(plot);
|
|
181
|
+
$[51] = curve;
|
|
182
|
+
$[52] = t25;
|
|
183
|
+
} else t25 = $[52];
|
|
184
|
+
const pathOf = t25;
|
|
185
|
+
const colorStyle = _temp3;
|
|
186
|
+
const colorClass = _temp4;
|
|
187
|
+
const point_3 = (event) => {
|
|
179
188
|
const rect = event.currentTarget.getBoundingClientRect();
|
|
180
189
|
if (rect.width > 0 && points.length > 0) {
|
|
181
190
|
const ratio = Math.min(Math.max((event.clientX - rect.left) / rect.width, 0), 1);
|
|
182
191
|
setActive(Math.round(ratio * lastIndex));
|
|
183
192
|
}
|
|
184
193
|
};
|
|
185
|
-
|
|
186
|
-
$[
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
$[69] = t35;
|
|
203
|
-
} else t35 = $[69];
|
|
204
|
-
const move = t35;
|
|
205
|
-
const focused = points[active ?? lastIndex];
|
|
206
|
-
let t36;
|
|
207
|
-
if ($[70] !== active || $[71] !== describe || $[72] !== focused || $[73] !== isInteractive || $[74] !== label || $[75] !== lastIndex || $[76] !== move || $[77] !== point_3) {
|
|
208
|
-
t36 = isInteractive && focused !== void 0 ? {
|
|
194
|
+
let t26;
|
|
195
|
+
if ($[53] !== active || $[54] !== lastIndex) {
|
|
196
|
+
t26 = (event_0) => {
|
|
197
|
+
const current = active ?? lastIndex;
|
|
198
|
+
const next = event_0.key === "ArrowLeft" || event_0.key === "ArrowDown" ? current - 1 : event_0.key === "ArrowRight" || event_0.key === "ArrowUp" ? current + 1 : event_0.key === "Home" ? 0 : event_0.key === "End" ? lastIndex : null;
|
|
199
|
+
if (next !== null) {
|
|
200
|
+
event_0.preventDefault();
|
|
201
|
+
setActive(Math.min(Math.max(next, 0), lastIndex));
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
$[53] = active;
|
|
205
|
+
$[54] = lastIndex;
|
|
206
|
+
$[55] = t26;
|
|
207
|
+
} else t26 = $[55];
|
|
208
|
+
const move = t26;
|
|
209
|
+
const focused = points[active ?? lastIndex];
|
|
210
|
+
const interaction = isInteractive && focused !== void 0 ? {
|
|
209
211
|
role: "slider",
|
|
210
212
|
tabIndex: 0,
|
|
211
213
|
"aria-label": label,
|
|
@@ -213,7 +215,7 @@ function LineChart(t0) {
|
|
|
213
215
|
"aria-valuemin": 0,
|
|
214
216
|
"aria-valuemax": lastIndex,
|
|
215
217
|
"aria-valuenow": active ?? lastIndex,
|
|
216
|
-
"aria-valuetext": describe(focused),
|
|
218
|
+
"aria-valuetext": describe(focused, active ?? lastIndex),
|
|
217
219
|
onPointerMove: point_3,
|
|
218
220
|
onPointerDown: point_3,
|
|
219
221
|
onPointerLeave: () => setActive(null),
|
|
@@ -221,33 +223,14 @@ function LineChart(t0) {
|
|
|
221
223
|
onBlur: () => setActive(null),
|
|
222
224
|
onKeyDown: move
|
|
223
225
|
} : {};
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
$[74] = label;
|
|
229
|
-
$[75] = lastIndex;
|
|
230
|
-
$[76] = move;
|
|
231
|
-
$[77] = point_3;
|
|
232
|
-
$[78] = t36;
|
|
233
|
-
} else t36 = $[78];
|
|
234
|
-
const interaction = t36;
|
|
235
|
-
const widestTick = scale.ticks.map(tick).reduce(_temp3, "");
|
|
236
|
-
let t37;
|
|
237
|
-
if ($[79] !== points) {
|
|
238
|
-
t37 = (index_0) => {
|
|
239
|
-
const previous = points[index_0 - 1];
|
|
240
|
-
const current_1 = points[index_0];
|
|
226
|
+
const widestTick = scale.ticks.map(tick).reduce(_temp5, "");
|
|
227
|
+
const placement = (index_4) => {
|
|
228
|
+
const previous = points[index_4 - 1];
|
|
229
|
+
const current_1 = points[index_4];
|
|
241
230
|
return previous !== void 0 && current_1 !== void 0 && previous.value > current_1.value ? "below" : "above";
|
|
242
231
|
};
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
} else t37 = $[80];
|
|
246
|
-
const placement = t37;
|
|
247
|
-
let t38;
|
|
248
|
-
if ($[81] !== format || $[82] !== points) {
|
|
249
|
-
t38 = (index_1, where, placedAt) => {
|
|
250
|
-
const data = points[index_1];
|
|
232
|
+
const valueLabel = (index_5, where, placedAt) => {
|
|
233
|
+
const data = points[index_5];
|
|
251
234
|
return data !== void 0 ? /* @__PURE__ */ jsx("span", {
|
|
252
235
|
className: LineChart_module_default.valueLabel,
|
|
253
236
|
"data-placement": placedAt,
|
|
@@ -255,374 +238,375 @@ function LineChart(t0) {
|
|
|
255
238
|
children: format(data.value)
|
|
256
239
|
}) : null;
|
|
257
240
|
};
|
|
258
|
-
$[
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
$[
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
$[
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
$[89] = t40;
|
|
308
|
-
} else {
|
|
309
|
-
t39 = $[88];
|
|
310
|
-
t40 = $[89];
|
|
311
|
-
}
|
|
312
|
-
let t41;
|
|
313
|
-
if ($[90] !== gradientId) {
|
|
314
|
-
t41 = /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("linearGradient", {
|
|
315
|
-
id: gradientId,
|
|
316
|
-
x1: "0",
|
|
317
|
-
y1: "0",
|
|
318
|
-
x2: "0",
|
|
319
|
-
y2: "1",
|
|
320
|
-
children: [t39, t40]
|
|
321
|
-
}) });
|
|
322
|
-
$[90] = gradientId;
|
|
323
|
-
$[91] = t41;
|
|
324
|
-
} else t41 = $[91];
|
|
325
|
-
const t42 = showAxis ? scale.ticks.map((value_3) => /* @__PURE__ */ jsx("line", {
|
|
326
|
-
className: LineChart_module_default.grid,
|
|
327
|
-
x1: "0",
|
|
328
|
-
x2: "100",
|
|
329
|
-
y1: y(value_3),
|
|
330
|
-
y2: y(value_3)
|
|
331
|
-
}, value_3)) : null;
|
|
332
|
-
let t43;
|
|
333
|
-
if ($[92] !== zero) {
|
|
334
|
-
t43 = /* @__PURE__ */ jsx("line", {
|
|
335
|
-
className: LineChart_module_default.baseline,
|
|
241
|
+
if ($[56] !== className) {
|
|
242
|
+
t18 = cx("panneau-line-chart", LineChart_module_default.chart, className);
|
|
243
|
+
$[56] = className;
|
|
244
|
+
$[57] = t18;
|
|
245
|
+
} else t18 = $[57];
|
|
246
|
+
t19 = style;
|
|
247
|
+
t20 = showAxis ? "" : void 0;
|
|
248
|
+
t21 = labelLast || labelMax ? "" : void 0;
|
|
249
|
+
if ($[58] !== axisLabel) {
|
|
250
|
+
t22 = axisLabel !== void 0 ? /* @__PURE__ */ jsx("div", {
|
|
251
|
+
className: LineChart_module_default.axisLabel,
|
|
252
|
+
"aria-hidden": "true",
|
|
253
|
+
children: axisLabel
|
|
254
|
+
}) : null;
|
|
255
|
+
$[58] = axisLabel;
|
|
256
|
+
$[59] = t22;
|
|
257
|
+
} else t22 = $[59];
|
|
258
|
+
let t27;
|
|
259
|
+
let t28;
|
|
260
|
+
if ($[60] === Symbol.for("react.memo_cache_sentinel")) {
|
|
261
|
+
t27 = /* @__PURE__ */ jsx("stop", {
|
|
262
|
+
offset: "0",
|
|
263
|
+
className: LineChart_module_default.areaTop
|
|
264
|
+
});
|
|
265
|
+
t28 = /* @__PURE__ */ jsx("stop", {
|
|
266
|
+
offset: "1",
|
|
267
|
+
className: LineChart_module_default.areaBottom
|
|
268
|
+
});
|
|
269
|
+
$[60] = t27;
|
|
270
|
+
$[61] = t28;
|
|
271
|
+
} else {
|
|
272
|
+
t27 = $[60];
|
|
273
|
+
t28 = $[61];
|
|
274
|
+
}
|
|
275
|
+
let t29;
|
|
276
|
+
if ($[62] !== gradientId) {
|
|
277
|
+
t29 = /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("linearGradient", {
|
|
278
|
+
id: gradientId,
|
|
279
|
+
x1: "0",
|
|
280
|
+
y1: "0",
|
|
281
|
+
x2: "0",
|
|
282
|
+
y2: "1",
|
|
283
|
+
children: [t27, t28]
|
|
284
|
+
}) });
|
|
285
|
+
$[62] = gradientId;
|
|
286
|
+
$[63] = t29;
|
|
287
|
+
} else t29 = $[63];
|
|
288
|
+
const t30 = showAxis ? scale.ticks.map((value_5) => /* @__PURE__ */ jsx("line", {
|
|
289
|
+
className: LineChart_module_default.grid,
|
|
336
290
|
x1: "0",
|
|
337
291
|
x2: "100",
|
|
338
|
-
y1:
|
|
339
|
-
y2:
|
|
340
|
-
});
|
|
341
|
-
|
|
342
|
-
$[
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
292
|
+
y1: y(value_5),
|
|
293
|
+
y2: y(value_5)
|
|
294
|
+
}, value_5)) : null;
|
|
295
|
+
let t31;
|
|
296
|
+
if ($[64] !== zero) {
|
|
297
|
+
t31 = /* @__PURE__ */ jsx("line", {
|
|
298
|
+
className: LineChart_module_default.baseline,
|
|
299
|
+
x1: "0",
|
|
300
|
+
x2: "100",
|
|
301
|
+
y1: zero,
|
|
302
|
+
y2: zero
|
|
303
|
+
});
|
|
304
|
+
$[64] = zero;
|
|
305
|
+
$[65] = t31;
|
|
306
|
+
} else t31 = $[65];
|
|
307
|
+
const t32 = multiple && points.length > 1 ? /* @__PURE__ */ jsx("g", {
|
|
308
|
+
className: LineChart_module_default.reveal,
|
|
309
|
+
children: lines.map((line_6, index_6) => {
|
|
310
|
+
const top = plotLine(tops[index_6] ?? []);
|
|
311
|
+
const below = index_6 > 0 ? plotLine(tops[index_6 - 1] ?? []) : top.map((point_4) => ({
|
|
312
|
+
...point_4,
|
|
313
|
+
y: zero
|
|
314
|
+
}));
|
|
315
|
+
const back = pathOf([...below].reverse()).replace(/^M/, "L");
|
|
316
|
+
return /* @__PURE__ */ jsxs("g", {
|
|
317
|
+
className: colorClass(line_6),
|
|
318
|
+
style: colorStyle(line_6),
|
|
319
|
+
children: [stacked ? /* @__PURE__ */ jsx("path", {
|
|
320
|
+
className: LineChart_module_default.stackArea,
|
|
321
|
+
d: `${pathOf(top)} ${back} Z`
|
|
322
|
+
}) : null, /* @__PURE__ */ jsx("path", {
|
|
323
|
+
className: LineChart_module_default.line,
|
|
324
|
+
d: pathOf(top)
|
|
325
|
+
})]
|
|
326
|
+
}, index_6);
|
|
327
|
+
})
|
|
328
|
+
}) : null;
|
|
329
|
+
const t33 = !multiple && firstPoint !== void 0 && lastPoint !== void 0 && points.length > 1 ? /* @__PURE__ */ jsxs("g", {
|
|
330
|
+
className: LineChart_module_default.reveal,
|
|
331
|
+
children: [/* @__PURE__ */ jsx("path", {
|
|
332
|
+
className: LineChart_module_default.area,
|
|
333
|
+
fill: `url(#${gradientId})`,
|
|
334
|
+
d: `${line_1} L${lastPoint.x},${zero} L${firstPoint.x},${zero} Z`
|
|
335
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
336
|
+
className: LineChart_module_default.line,
|
|
337
|
+
d: line_1
|
|
338
|
+
})]
|
|
339
|
+
}) : null;
|
|
340
|
+
let t34;
|
|
341
|
+
if ($[66] !== t29 || $[67] !== t30 || $[68] !== t31 || $[69] !== t32 || $[70] !== t33) {
|
|
342
|
+
t34 = /* @__PURE__ */ jsxs("svg", {
|
|
343
|
+
className: LineChart_module_default.svg,
|
|
344
|
+
viewBox: "0 0 100 100",
|
|
345
|
+
preserveAspectRatio: "none",
|
|
346
|
+
"aria-hidden": "true",
|
|
347
|
+
focusable: "false",
|
|
348
|
+
children: [
|
|
349
|
+
t29,
|
|
350
|
+
t30,
|
|
351
|
+
t31,
|
|
352
|
+
t32,
|
|
353
|
+
t33
|
|
354
|
+
]
|
|
355
|
+
});
|
|
356
|
+
$[66] = t29;
|
|
357
|
+
$[67] = t30;
|
|
358
|
+
$[68] = t31;
|
|
359
|
+
$[69] = t32;
|
|
360
|
+
$[70] = t33;
|
|
361
|
+
$[71] = t34;
|
|
362
|
+
} else t34 = $[71];
|
|
363
|
+
t23 = /* @__PURE__ */ jsxs("div", {
|
|
364
|
+
className: LineChart_module_default.body,
|
|
362
365
|
children: [
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
366
|
+
showAxis ? /* @__PURE__ */ jsxs("div", {
|
|
367
|
+
className: LineChart_module_default.scale,
|
|
368
|
+
"aria-hidden": "true",
|
|
369
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
370
|
+
className: LineChart_module_default.widest,
|
|
371
|
+
children: widestTick
|
|
372
|
+
}), scale.ticks.map((value_4) => /* @__PURE__ */ jsx("span", {
|
|
373
|
+
className: LineChart_module_default.tick,
|
|
374
|
+
style: { top: `${y(value_4)}%` },
|
|
375
|
+
children: tick(value_4)
|
|
376
|
+
}, value_4))]
|
|
377
|
+
}) : null,
|
|
378
|
+
/* @__PURE__ */ jsxs("div", {
|
|
379
|
+
className: LineChart_module_default.plot,
|
|
380
|
+
...interaction,
|
|
381
|
+
children: [
|
|
382
|
+
t34,
|
|
383
|
+
activePoint !== void 0 ? /* @__PURE__ */ jsx("span", {
|
|
384
|
+
className: LineChart_module_default.crosshair,
|
|
385
|
+
style: { left: `${activePoint.x}%` },
|
|
386
|
+
"aria-hidden": "true"
|
|
387
|
+
}) : null,
|
|
388
|
+
/* @__PURE__ */ jsxs("div", {
|
|
389
|
+
className: LineChart_module_default.marks,
|
|
390
|
+
"aria-hidden": "true",
|
|
391
|
+
children: [
|
|
392
|
+
multiple ? lines.map((line_7, index_7) => {
|
|
393
|
+
const at_1 = active ?? lastIndex;
|
|
394
|
+
const value_6 = tops[index_7]?.[at_1];
|
|
395
|
+
const where_0 = plotted[at_1];
|
|
396
|
+
return value_6 !== void 0 && where_0 !== void 0 ? /* @__PURE__ */ jsx("span", {
|
|
397
|
+
className: cx(LineChart_module_default.dot, active !== null && LineChart_module_default.activeDot, colorClass(line_7)),
|
|
398
|
+
style: {
|
|
399
|
+
...colorStyle(line_7),
|
|
400
|
+
...positionOf({
|
|
401
|
+
x: where_0.x,
|
|
402
|
+
y: y(value_6)
|
|
403
|
+
})
|
|
404
|
+
}
|
|
405
|
+
}, index_7) : null;
|
|
406
|
+
}) : null,
|
|
407
|
+
!multiple && points.length === 1 && firstPoint !== void 0 && !labelLast ? /* @__PURE__ */ jsx("span", {
|
|
408
|
+
className: LineChart_module_default.dot,
|
|
409
|
+
style: positionOf(firstPoint)
|
|
410
|
+
}) : null,
|
|
411
|
+
labelMax && maxPoint !== void 0 ? /* @__PURE__ */ jsx("span", {
|
|
412
|
+
className: LineChart_module_default.dot,
|
|
413
|
+
style: positionOf(maxPoint)
|
|
414
|
+
}) : null,
|
|
415
|
+
labelLast && lastPoint !== void 0 ? /* @__PURE__ */ jsx("span", {
|
|
416
|
+
className: LineChart_module_default.dot,
|
|
417
|
+
style: positionOf(lastPoint)
|
|
418
|
+
}) : null,
|
|
419
|
+
activePoint === void 0 && labelMax && maxPoint !== void 0 ? valueLabel(maxIndex, maxPoint, "above") : null,
|
|
420
|
+
activePoint === void 0 && labelLast && lastPoint !== void 0 ? valueLabel(lastIndex, lastPoint, placement(lastIndex)) : null,
|
|
421
|
+
activePoint !== void 0 && activeData !== void 0 && multiple ? /* @__PURE__ */ jsxs("span", {
|
|
422
|
+
className: LineChart_module_default.tooltip,
|
|
423
|
+
"data-placement": "below",
|
|
424
|
+
style: positionOf({
|
|
425
|
+
x: activePoint.x,
|
|
426
|
+
y: 0
|
|
427
|
+
}),
|
|
428
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
429
|
+
className: LineChart_module_default.tooltipLabel,
|
|
430
|
+
children: activeData.label
|
|
431
|
+
}), lines.map((line_8, index_8) => /* @__PURE__ */ jsxs("span", {
|
|
432
|
+
className: LineChart_module_default.tooltipRow,
|
|
433
|
+
children: [
|
|
434
|
+
/* @__PURE__ */ jsx("span", {
|
|
435
|
+
className: cx(LineChart_module_default.swatch, colorClass(line_8)),
|
|
436
|
+
style: colorStyle(line_8)
|
|
437
|
+
}),
|
|
438
|
+
line_8.label,
|
|
439
|
+
/* @__PURE__ */ jsx("strong", {
|
|
440
|
+
className: LineChart_module_default.tooltipValue,
|
|
441
|
+
children: format(line_8.values[active ?? lastIndex] ?? 0)
|
|
442
|
+
})
|
|
443
|
+
]
|
|
444
|
+
}, index_8))]
|
|
445
|
+
}) : null,
|
|
446
|
+
activePoint !== void 0 && activeData !== void 0 && !multiple ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
447
|
+
className: cx(LineChart_module_default.dot, LineChart_module_default.activeDot),
|
|
448
|
+
style: positionOf(activePoint)
|
|
449
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
450
|
+
className: LineChart_module_default.tooltip,
|
|
451
|
+
"data-placement": activePoint.y < 30 ? "below" : "above",
|
|
452
|
+
style: positionOf(activePoint),
|
|
453
|
+
children: [/* @__PURE__ */ jsx("strong", {
|
|
454
|
+
className: LineChart_module_default.tooltipValue,
|
|
455
|
+
children: format(activeData.value)
|
|
456
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
457
|
+
className: LineChart_module_default.tooltipLabel,
|
|
458
|
+
children: activeData.label
|
|
459
|
+
})]
|
|
460
|
+
})] }) : null
|
|
461
|
+
]
|
|
462
|
+
})
|
|
463
|
+
]
|
|
464
|
+
}),
|
|
465
|
+
/* @__PURE__ */ jsx("div", {
|
|
466
|
+
className: LineChart_module_default.dates,
|
|
467
|
+
"aria-hidden": "true",
|
|
468
|
+
children: axisLabelIndices(points.length, MAX_AXIS_LABELS).map((t35) => {
|
|
469
|
+
const { index: index_9, minor } = t35;
|
|
470
|
+
const data_0 = points[index_9];
|
|
471
|
+
const where_1 = plotted[index_9];
|
|
472
|
+
return data_0 !== void 0 && where_1 !== void 0 ? /* @__PURE__ */ jsx("span", {
|
|
473
|
+
className: cx(LineChart_module_default.date, minor && LineChart_module_default.minor),
|
|
474
|
+
"data-edge": points.length === 1 ? void 0 : index_9 === 0 ? "start" : index_9 === lastIndex ? "end" : void 0,
|
|
475
|
+
style: { left: `${where_1.x}%` },
|
|
476
|
+
children: shortLabel(data_0)
|
|
477
|
+
}, index_9) : null;
|
|
478
|
+
})
|
|
479
|
+
})
|
|
367
480
|
]
|
|
368
481
|
});
|
|
369
|
-
|
|
370
|
-
$[
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
$[
|
|
412
|
-
$[
|
|
413
|
-
$[
|
|
414
|
-
$[
|
|
415
|
-
$[24] = domain;
|
|
416
|
-
$[25] = format;
|
|
417
|
-
$[26] = formatTick;
|
|
418
|
-
$[27] = gradientId;
|
|
419
|
-
$[28] = intl;
|
|
420
|
-
$[29] = isInteractive;
|
|
421
|
-
$[30] = label;
|
|
422
|
-
$[31] = points;
|
|
423
|
-
$[32] = showAxis;
|
|
424
|
-
$[33] = showLast;
|
|
425
|
-
$[34] = showMax;
|
|
426
|
-
$[35] = style;
|
|
427
|
-
$[36] = lastIndex;
|
|
428
|
-
$[37] = plotted;
|
|
429
|
-
$[38] = shortLabel;
|
|
430
|
-
$[39] = t13;
|
|
431
|
-
$[40] = t14;
|
|
432
|
-
$[41] = t15;
|
|
433
|
-
$[42] = t16;
|
|
434
|
-
$[43] = t17;
|
|
435
|
-
$[44] = t18;
|
|
436
|
-
$[45] = t19;
|
|
437
|
-
$[46] = t20;
|
|
438
|
-
$[47] = t21;
|
|
439
|
-
$[48] = t22;
|
|
440
|
-
$[49] = t23;
|
|
441
|
-
$[50] = t24;
|
|
442
|
-
$[51] = t25;
|
|
443
|
-
$[52] = t26;
|
|
444
|
-
$[53] = t27;
|
|
445
|
-
$[54] = t28;
|
|
446
|
-
$[55] = t29;
|
|
447
|
-
$[56] = t30;
|
|
448
|
-
$[57] = t31;
|
|
482
|
+
t17 = LineChart_module_default.visuallyHidden;
|
|
483
|
+
if ($[72] !== label) {
|
|
484
|
+
t15 = /* @__PURE__ */ jsx("caption", { children: label });
|
|
485
|
+
$[72] = label;
|
|
486
|
+
$[73] = t15;
|
|
487
|
+
} else t15 = $[73];
|
|
488
|
+
t16 = multiple ? /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [/* @__PURE__ */ jsx("th", {
|
|
489
|
+
scope: "col",
|
|
490
|
+
children: intl.formatMessage(messages.chartDate)
|
|
491
|
+
}), lines.map(_temp6)] }) }) : null;
|
|
492
|
+
t14 = points.map((data_1, index_11) => /* @__PURE__ */ jsxs("tr", { children: [/* @__PURE__ */ jsx("th", {
|
|
493
|
+
scope: "row",
|
|
494
|
+
children: data_1.label
|
|
495
|
+
}), multiple ? lines.map((line_10, at_2) => /* @__PURE__ */ jsx("td", { children: format(line_10.values[index_11] ?? 0) }, at_2)) : /* @__PURE__ */ jsx("td", { children: format(data_1.value) })] }, index_11));
|
|
496
|
+
}
|
|
497
|
+
$[13] = active;
|
|
498
|
+
$[14] = axisLabel;
|
|
499
|
+
$[15] = className;
|
|
500
|
+
$[16] = color;
|
|
501
|
+
$[17] = curve;
|
|
502
|
+
$[18] = domain;
|
|
503
|
+
$[19] = format;
|
|
504
|
+
$[20] = formatTick;
|
|
505
|
+
$[21] = gradientId;
|
|
506
|
+
$[22] = intl;
|
|
507
|
+
$[23] = isInteractive;
|
|
508
|
+
$[24] = label;
|
|
509
|
+
$[25] = multiple;
|
|
510
|
+
$[26] = ownPoints;
|
|
511
|
+
$[27] = series;
|
|
512
|
+
$[28] = showAxis;
|
|
513
|
+
$[29] = showLast;
|
|
514
|
+
$[30] = showMax;
|
|
515
|
+
$[31] = stacked;
|
|
516
|
+
$[32] = style;
|
|
517
|
+
$[33] = t14;
|
|
518
|
+
$[34] = t15;
|
|
519
|
+
$[35] = t16;
|
|
520
|
+
$[36] = t17;
|
|
521
|
+
$[37] = t18;
|
|
522
|
+
$[38] = t19;
|
|
523
|
+
$[39] = t20;
|
|
524
|
+
$[40] = t21;
|
|
525
|
+
$[41] = t22;
|
|
526
|
+
$[42] = t23;
|
|
527
|
+
$[43] = t24;
|
|
449
528
|
} else {
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
t21 = $[47];
|
|
462
|
-
t22 = $[48];
|
|
463
|
-
t23 = $[49];
|
|
464
|
-
t24 = $[50];
|
|
465
|
-
t25 = $[51];
|
|
466
|
-
t26 = $[52];
|
|
467
|
-
t27 = $[53];
|
|
468
|
-
t28 = $[54];
|
|
469
|
-
t29 = $[55];
|
|
470
|
-
t30 = $[56];
|
|
471
|
-
t31 = $[57];
|
|
529
|
+
t14 = $[33];
|
|
530
|
+
t15 = $[34];
|
|
531
|
+
t16 = $[35];
|
|
532
|
+
t17 = $[36];
|
|
533
|
+
t18 = $[37];
|
|
534
|
+
t19 = $[38];
|
|
535
|
+
t20 = $[39];
|
|
536
|
+
t21 = $[40];
|
|
537
|
+
t22 = $[41];
|
|
538
|
+
t23 = $[42];
|
|
539
|
+
t24 = $[43];
|
|
472
540
|
}
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
541
|
+
if (t24 !== Symbol.for("react.early_return_sentinel")) return t24;
|
|
542
|
+
let t25;
|
|
543
|
+
if ($[74] !== t14) {
|
|
544
|
+
t25 = /* @__PURE__ */ jsx("tbody", { children: t14 });
|
|
545
|
+
$[74] = t14;
|
|
546
|
+
$[75] = t25;
|
|
547
|
+
} else t25 = $[75];
|
|
548
|
+
let t26;
|
|
549
|
+
if ($[76] !== t15 || $[77] !== t16 || $[78] !== t25) {
|
|
550
|
+
t26 = /* @__PURE__ */ jsxs("table", { children: [
|
|
551
|
+
t15,
|
|
552
|
+
t16,
|
|
553
|
+
t25
|
|
554
|
+
] });
|
|
555
|
+
$[76] = t15;
|
|
556
|
+
$[77] = t16;
|
|
557
|
+
$[78] = t25;
|
|
558
|
+
$[79] = t26;
|
|
559
|
+
} else t26 = $[79];
|
|
560
|
+
let t27;
|
|
561
|
+
if ($[80] !== t17 || $[81] !== t26) {
|
|
562
|
+
t27 = /* @__PURE__ */ jsx("div", {
|
|
563
|
+
className: t17,
|
|
564
|
+
children: t26
|
|
486
565
|
});
|
|
487
|
-
$[
|
|
488
|
-
$[
|
|
489
|
-
$[
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
if ($[108] !== t21 || $[109] !== t22 || $[110] !== t23 || $[111] !== t24 || $[112] !== t32) {
|
|
499
|
-
t33 = /* @__PURE__ */ jsxs("div", {
|
|
500
|
-
className: t21,
|
|
501
|
-
...t22,
|
|
566
|
+
$[80] = t17;
|
|
567
|
+
$[81] = t26;
|
|
568
|
+
$[82] = t27;
|
|
569
|
+
} else t27 = $[82];
|
|
570
|
+
let t28;
|
|
571
|
+
if ($[83] !== t18 || $[84] !== t19 || $[85] !== t20 || $[86] !== t21 || $[87] !== t22 || $[88] !== t23 || $[89] !== t27) {
|
|
572
|
+
t28 = /* @__PURE__ */ jsxs("figure", {
|
|
573
|
+
className: t18,
|
|
574
|
+
style: t19,
|
|
575
|
+
"data-axis": t20,
|
|
576
|
+
"data-labels": t21,
|
|
502
577
|
children: [
|
|
578
|
+
t22,
|
|
503
579
|
t23,
|
|
504
|
-
|
|
505
|
-
t32
|
|
580
|
+
t27
|
|
506
581
|
]
|
|
507
582
|
});
|
|
508
|
-
$[
|
|
509
|
-
$[
|
|
510
|
-
$[
|
|
511
|
-
$[
|
|
512
|
-
$[
|
|
513
|
-
$[
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
const { index: index_2, minor } = t35;
|
|
519
|
-
const data_0 = points[index_2];
|
|
520
|
-
const where_0 = plotted[index_2];
|
|
521
|
-
return data_0 !== void 0 && where_0 !== void 0 ? /* @__PURE__ */ jsx("span", {
|
|
522
|
-
className: cx(LineChart_module_default.date, minor && LineChart_module_default.minor),
|
|
523
|
-
"data-edge": points.length === 1 ? void 0 : index_2 === 0 ? "start" : index_2 === lastIndex ? "end" : void 0,
|
|
524
|
-
style: { left: `${where_0.x}%` },
|
|
525
|
-
children: shortLabel(data_0)
|
|
526
|
-
}, index_2) : null;
|
|
527
|
-
});
|
|
528
|
-
$[114] = lastIndex;
|
|
529
|
-
$[115] = plotted;
|
|
530
|
-
$[116] = points;
|
|
531
|
-
$[117] = shortLabel;
|
|
532
|
-
$[118] = t34;
|
|
533
|
-
} else t34 = $[118];
|
|
534
|
-
let t35;
|
|
535
|
-
if ($[119] !== t34) {
|
|
536
|
-
t35 = /* @__PURE__ */ jsx("div", {
|
|
537
|
-
className: LineChart_module_default.dates,
|
|
538
|
-
"aria-hidden": "true",
|
|
539
|
-
children: t34
|
|
540
|
-
});
|
|
541
|
-
$[119] = t34;
|
|
542
|
-
$[120] = t35;
|
|
543
|
-
} else t35 = $[120];
|
|
544
|
-
let t36;
|
|
545
|
-
if ($[121] !== t25 || $[122] !== t26 || $[123] !== t33 || $[124] !== t35) {
|
|
546
|
-
t36 = /* @__PURE__ */ jsxs("div", {
|
|
547
|
-
className: t25,
|
|
548
|
-
children: [
|
|
549
|
-
t26,
|
|
550
|
-
t33,
|
|
551
|
-
t35
|
|
552
|
-
]
|
|
553
|
-
});
|
|
554
|
-
$[121] = t25;
|
|
555
|
-
$[122] = t26;
|
|
556
|
-
$[123] = t33;
|
|
557
|
-
$[124] = t35;
|
|
558
|
-
$[125] = t36;
|
|
559
|
-
} else t36 = $[125];
|
|
560
|
-
let t37;
|
|
561
|
-
if ($[126] !== label) {
|
|
562
|
-
t37 = /* @__PURE__ */ jsx("caption", { children: label });
|
|
563
|
-
$[126] = label;
|
|
564
|
-
$[127] = t37;
|
|
565
|
-
} else t37 = $[127];
|
|
566
|
-
let t38;
|
|
567
|
-
if ($[128] !== format || $[129] !== points) {
|
|
568
|
-
let t39;
|
|
569
|
-
if ($[131] !== format) {
|
|
570
|
-
t39 = (data_1, index_3) => /* @__PURE__ */ jsxs("tr", { children: [/* @__PURE__ */ jsx("th", {
|
|
571
|
-
scope: "row",
|
|
572
|
-
children: data_1.label
|
|
573
|
-
}), /* @__PURE__ */ jsx("td", { children: format(data_1.value) })] }, index_3);
|
|
574
|
-
$[131] = format;
|
|
575
|
-
$[132] = t39;
|
|
576
|
-
} else t39 = $[132];
|
|
577
|
-
t38 = points.map(t39);
|
|
578
|
-
$[128] = format;
|
|
579
|
-
$[129] = points;
|
|
580
|
-
$[130] = t38;
|
|
581
|
-
} else t38 = $[130];
|
|
582
|
-
let t39;
|
|
583
|
-
if ($[133] !== t38) {
|
|
584
|
-
t39 = /* @__PURE__ */ jsx("tbody", { children: t38 });
|
|
585
|
-
$[133] = t38;
|
|
586
|
-
$[134] = t39;
|
|
587
|
-
} else t39 = $[134];
|
|
588
|
-
let t40;
|
|
589
|
-
if ($[135] !== t37 || $[136] !== t39) {
|
|
590
|
-
t40 = /* @__PURE__ */ jsx("div", {
|
|
591
|
-
className: LineChart_module_default.visuallyHidden,
|
|
592
|
-
children: /* @__PURE__ */ jsxs("table", { children: [t37, t39] })
|
|
593
|
-
});
|
|
594
|
-
$[135] = t37;
|
|
595
|
-
$[136] = t39;
|
|
596
|
-
$[137] = t40;
|
|
597
|
-
} else t40 = $[137];
|
|
598
|
-
let t41;
|
|
599
|
-
if ($[138] !== t27 || $[139] !== t28 || $[140] !== t29 || $[141] !== t30 || $[142] !== t31 || $[143] !== t36 || $[144] !== t40) {
|
|
600
|
-
t41 = /* @__PURE__ */ jsxs("figure", {
|
|
601
|
-
className: t27,
|
|
602
|
-
style: t28,
|
|
603
|
-
"data-axis": t29,
|
|
604
|
-
"data-labels": t30,
|
|
605
|
-
children: [
|
|
606
|
-
t31,
|
|
607
|
-
t36,
|
|
608
|
-
t40
|
|
609
|
-
]
|
|
610
|
-
});
|
|
611
|
-
$[138] = t27;
|
|
612
|
-
$[139] = t28;
|
|
613
|
-
$[140] = t29;
|
|
614
|
-
$[141] = t30;
|
|
615
|
-
$[142] = t31;
|
|
616
|
-
$[143] = t36;
|
|
617
|
-
$[144] = t40;
|
|
618
|
-
$[145] = t41;
|
|
619
|
-
} else t41 = $[145];
|
|
620
|
-
return t41;
|
|
583
|
+
$[83] = t18;
|
|
584
|
+
$[84] = t19;
|
|
585
|
+
$[85] = t20;
|
|
586
|
+
$[86] = t21;
|
|
587
|
+
$[87] = t22;
|
|
588
|
+
$[88] = t23;
|
|
589
|
+
$[89] = t27;
|
|
590
|
+
$[90] = t28;
|
|
591
|
+
} else t28 = $[90];
|
|
592
|
+
return t28;
|
|
621
593
|
}
|
|
622
594
|
/** The position of a mark on the plot, and its place along the width, to keep its label inside. */
|
|
623
|
-
function
|
|
595
|
+
function _temp6(line_9, index_10) {
|
|
596
|
+
return /* @__PURE__ */ jsx("th", {
|
|
597
|
+
scope: "col",
|
|
598
|
+
children: line_9.label
|
|
599
|
+
}, index_10);
|
|
600
|
+
}
|
|
601
|
+
function _temp5(widest, text) {
|
|
624
602
|
return text.length > widest.length ? text : widest;
|
|
625
603
|
}
|
|
604
|
+
function _temp4(line_5) {
|
|
605
|
+
return line_5.tone !== void 0 ? cx(LineChart_module_default.toned, toneClass(line_5.tone)) : void 0;
|
|
606
|
+
}
|
|
607
|
+
function _temp3(line_4) {
|
|
608
|
+
return { "--_panneau-line-chart-color": chartColors.categorical(line_4.color) };
|
|
609
|
+
}
|
|
626
610
|
function _temp2(point_1) {
|
|
627
611
|
return point_1.shortLabel ?? point_1.label;
|
|
628
612
|
}
|