@undp/data-viz 1.4.12 → 1.4.14
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/AreaChart.cjs +1 -1
- package/dist/AreaChart.cjs.map +1 -1
- package/dist/AreaChart.js +25 -24
- package/dist/AreaChart.js.map +1 -1
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.cjs.map +1 -1
- package/dist/BarGraph.js +638 -632
- package/dist/BarGraph.js.map +1 -1
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.cjs.map +1 -1
- package/dist/BeeSwarmChart.js +134 -132
- package/dist/BeeSwarmChart.js.map +1 -1
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.cjs.map +1 -1
- package/dist/BiVariateChoroplethMap.js +35 -34
- package/dist/BiVariateChoroplethMap.js.map +1 -1
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.cjs.map +1 -1
- package/dist/BulletChart.js +226 -224
- package/dist/BulletChart.js.map +1 -1
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.cjs.map +1 -1
- package/dist/ButterflyChart.js +48 -47
- package/dist/ButterflyChart.js.map +1 -1
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.cjs.map +1 -1
- package/dist/ChoroplethMap.js +56 -55
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.js +1 -1
- package/dist/DataCards.cjs +3 -3
- package/dist/DataCards.cjs.map +1 -1
- package/dist/DataCards.js +2 -1
- package/dist/DataCards.js.map +1 -1
- package/dist/DataTable.cjs +1 -1
- package/dist/DataTable.cjs.map +1 -1
- package/dist/DataTable.js +9 -8
- package/dist/DataTable.js.map +1 -1
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.cjs.map +1 -1
- package/dist/DifferenceLineChart.js +1 -0
- package/dist/DifferenceLineChart.js.map +1 -1
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.cjs.map +1 -1
- package/dist/DonutChart.js +77 -76
- package/dist/DonutChart.js.map +1 -1
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.cjs.map +1 -1
- package/dist/DotDensityMap.js +1 -0
- package/dist/DotDensityMap.js.map +1 -1
- package/dist/{DropdownSelect-CeHog_ih.js → DropdownSelect-CtOKZHD0.js} +22 -20
- package/dist/{DropdownSelect-CeHog_ih.js.map → DropdownSelect-CtOKZHD0.js.map} +1 -1
- package/dist/{DropdownSelect-BmE5JaeE.cjs → DropdownSelect-DBDM64B5.cjs} +2 -2
- package/dist/{DropdownSelect-BmE5JaeE.cjs.map → DropdownSelect-DBDM64B5.cjs.map} +1 -1
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.cjs.map +1 -1
- package/dist/DualAxisLineChart.d.ts +3 -1
- package/dist/DualAxisLineChart.js +265 -261
- package/dist/DualAxisLineChart.js.map +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.cjs.map +1 -1
- package/dist/DumbbellChart.js +216 -214
- package/dist/DumbbellChart.js.map +1 -1
- package/dist/GeoHubCompareMaps.cjs +1 -1
- package/dist/GeoHubCompareMaps.cjs.map +1 -1
- package/dist/GeoHubCompareMaps.js +1 -0
- package/dist/GeoHubCompareMaps.js.map +1 -1
- package/dist/GeoHubMap.cjs +1 -1
- package/dist/GeoHubMap.cjs.map +1 -1
- package/dist/GeoHubMap.js +29 -28
- package/dist/GeoHubMap.js.map +1 -1
- package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
- package/dist/GeoHubMapWithLayerSelection.cjs.map +1 -1
- package/dist/GeoHubMapWithLayerSelection.js +34 -33
- package/dist/GeoHubMapWithLayerSelection.js.map +1 -1
- package/dist/{GraphEl-s3ctz7oA.js → GraphEl-N6vuMRw_.js} +6 -2
- package/dist/GraphEl-N6vuMRw_.js.map +1 -0
- package/dist/GraphEl-Zl0W-LK9.cjs +2 -0
- package/dist/GraphEl-Zl0W-LK9.cjs.map +1 -0
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.d.ts +1 -0
- package/dist/GriddedGraphs.js +2 -2
- package/dist/GriddedGraphsFromConfig.d.ts +1 -0
- package/dist/HeatMap.cjs +1 -1
- package/dist/HeatMap.cjs.map +1 -1
- package/dist/HeatMap.js +55 -54
- package/dist/HeatMap.js.map +1 -1
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.js +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
- package/dist/LineChartWithConfidenceInterval.js +22 -21
- package/dist/LineChartWithConfidenceInterval.js.map +1 -1
- package/dist/MultiGraphDashboard.cjs +1 -1
- package/dist/MultiGraphDashboard.d.ts +1 -0
- package/dist/MultiGraphDashboard.js +1 -1
- package/dist/MultiGraphDashboardFromConfig.d.ts +1 -0
- package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.js +1 -1
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.cjs.map +1 -1
- package/dist/MultiLineAltChart.js +34 -33
- package/dist/MultiLineAltChart.js.map +1 -1
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.cjs.map +1 -1
- package/dist/MultiLineChart.js +72 -71
- package/dist/MultiLineChart.js.map +1 -1
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.cjs.map +1 -1
- package/dist/ParetoChart.d.ts +4 -0
- package/dist/ParetoChart.js +317 -312
- package/dist/ParetoChart.js.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +1 -0
- package/dist/PerformanceIntensiveMultiGraphDashboard.js +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +1 -0
- package/dist/PerformanceIntensiveScrollStory.d.ts +1 -0
- package/dist/RadarChart.cjs +1 -1
- package/dist/RadarChart.cjs.map +1 -1
- package/dist/RadarChart.js +27 -26
- package/dist/RadarChart.js.map +1 -1
- package/dist/SankeyChart.cjs +1 -1
- package/dist/SankeyChart.cjs.map +1 -1
- package/dist/SankeyChart.js +30 -29
- package/dist/SankeyChart.js.map +1 -1
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.cjs.map +1 -1
- package/dist/ScatterPlot.js +119 -118
- package/dist/ScatterPlot.js.map +1 -1
- package/dist/ScrollStory.d.ts +1 -0
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.cjs.map +1 -1
- package/dist/SimpleLineChart.js +16 -15
- package/dist/SimpleLineChart.js.map +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.d.ts +1 -0
- package/dist/SingleGraphDashboard.js +2 -2
- package/dist/SingleGraphDashboardFromConfig.d.ts +1 -0
- package/dist/SingleGraphDashboardGeoHubMaps.d.ts +1 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +1 -0
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.d.ts +1 -0
- package/dist/SingleGraphDashboardThreeDGraphs.js +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +1 -0
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.cjs.map +1 -1
- package/dist/SlopeChart.js +46 -45
- package/dist/SlopeChart.js.map +1 -1
- package/dist/SparkLine.cjs +1 -1
- package/dist/SparkLine.cjs.map +1 -1
- package/dist/SparkLine.js +12 -11
- package/dist/SparkLine.js.map +1 -1
- package/dist/StripChart.cjs +1 -1
- package/dist/StripChart.cjs.map +1 -1
- package/dist/StripChart.js +81 -79
- package/dist/StripChart.js.map +1 -1
- package/dist/ThreeDGlobe.cjs +1 -1
- package/dist/ThreeDGlobe.cjs.map +1 -1
- package/dist/ThreeDGlobe.js +1 -0
- package/dist/ThreeDGlobe.js.map +1 -1
- package/dist/TreeMapGraph.cjs +1 -1
- package/dist/TreeMapGraph.cjs.map +1 -1
- package/dist/TreeMapGraph.js +114 -113
- package/dist/TreeMapGraph.js.map +1 -1
- package/dist/Types.d.ts +1 -0
- package/dist/UnitChart.cjs +1 -1
- package/dist/UnitChart.cjs.map +1 -1
- package/dist/UnitChart.js +10 -9
- package/dist/UnitChart.js.map +1 -1
- package/dist/{index-CZLvTu6p.cjs → index-BbNoLJ_w.cjs} +2 -2
- package/dist/{index-CZLvTu6p.cjs.map → index-BbNoLJ_w.cjs.map} +1 -1
- package/dist/{index-DGAaLNu9.js → index-Bc5VF70V.js} +46 -45
- package/dist/{index-DGAaLNu9.js.map → index-Bc5VF70V.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/dist/GraphEl-OzC-icbr.cjs +0 -2
- package/dist/GraphEl-OzC-icbr.cjs.map +0 -1
- package/dist/GraphEl-s3ctz7oA.js.map +0 -1
package/dist/ScatterPlot.js
CHANGED
|
@@ -20,9 +20,9 @@ import { a as ei, R as ii } from "./ReferenceLine-CfAW3vKJ.js";
|
|
|
20
20
|
import { R as ti } from "./RegressionLine-mH7UKOPi.js";
|
|
21
21
|
import { Y as oi } from "./YTicksAndGridLines-B6ah7CRf.js";
|
|
22
22
|
import { a as ai } from "./index-Cdcfp4nk.js";
|
|
23
|
-
import { s as
|
|
23
|
+
import { s as li } from "./pow-e8zx3AQJ.js";
|
|
24
24
|
import { a as Ye } from "./linear-DUdu7l2G.js";
|
|
25
|
-
import { D as
|
|
25
|
+
import { D as ri } from "./delaunay-C1uAf38t.js";
|
|
26
26
|
import { u as si } from "./use-in-view-yS6jzJAp.js";
|
|
27
27
|
import { m as te } from "./proxy-CkpFesk1.js";
|
|
28
28
|
import { A as Ie } from "./index-CNvov0eg.js";
|
|
@@ -40,25 +40,25 @@ function yi(ye) {
|
|
|
40
40
|
height: D,
|
|
41
41
|
showLabels: oe,
|
|
42
42
|
colors: s,
|
|
43
|
-
colorDomain:
|
|
43
|
+
colorDomain: C,
|
|
44
44
|
radius: O,
|
|
45
|
-
xAxisTitle:
|
|
45
|
+
xAxisTitle: u,
|
|
46
46
|
yAxisTitle: J,
|
|
47
47
|
leftMargin: q,
|
|
48
48
|
rightMargin: de,
|
|
49
49
|
topMargin: pe,
|
|
50
50
|
bottomMargin: ae,
|
|
51
|
-
tooltip:
|
|
51
|
+
tooltip: le,
|
|
52
52
|
onSeriesMouseOver: H,
|
|
53
53
|
refXValues: $,
|
|
54
54
|
refYValues: ve,
|
|
55
55
|
highlightAreaSettings: be,
|
|
56
56
|
selectedColor: B,
|
|
57
57
|
highlightedDataPoints: T,
|
|
58
|
-
maxRadiusValue:
|
|
58
|
+
maxRadiusValue: we,
|
|
59
59
|
maxXValue: z,
|
|
60
60
|
minXValue: j,
|
|
61
|
-
maxYValue:
|
|
61
|
+
maxYValue: Ce,
|
|
62
62
|
minYValue: A,
|
|
63
63
|
onSeriesMouseClick: P,
|
|
64
64
|
rtl: K,
|
|
@@ -67,7 +67,7 @@ function yi(ye) {
|
|
|
67
67
|
regressionLine: U,
|
|
68
68
|
resetSelectionOnDoubleClick: Q,
|
|
69
69
|
detailsOnClick: M,
|
|
70
|
-
noOfXTicks:
|
|
70
|
+
noOfXTicks: re,
|
|
71
71
|
noOfYTicks: se,
|
|
72
72
|
labelColor: Z,
|
|
73
73
|
xSuffix: ne,
|
|
@@ -76,28 +76,28 @@ function yi(ye) {
|
|
|
76
76
|
yPrefix: me,
|
|
77
77
|
styles: x,
|
|
78
78
|
classNames: m,
|
|
79
|
-
animate:
|
|
79
|
+
animate: r,
|
|
80
80
|
dimmedOpacity: k,
|
|
81
81
|
precision: S,
|
|
82
82
|
customLayers: fe
|
|
83
83
|
} = ye, ue = Se(null), p = si(ue, {
|
|
84
|
-
once:
|
|
85
|
-
amount:
|
|
86
|
-
}), [X, Y] = V(void 0), [I, W] = V(void 0), [ge, R] = V(void 0), [he, v] = V(void 0),
|
|
84
|
+
once: r.once,
|
|
85
|
+
amount: r.amount
|
|
86
|
+
}), [X, Y] = V(void 0), [I, W] = V(void 0), [ge, R] = V(void 0), [he, v] = V(void 0), g = {
|
|
87
87
|
top: pe,
|
|
88
|
-
bottom:
|
|
88
|
+
bottom: u ? ae + 50 : ae,
|
|
89
89
|
left: J ? q + 30 : q,
|
|
90
90
|
right: de
|
|
91
|
-
}, _ = o.map((e, d) => ({ ...e, id: `${d}` })), y = L -
|
|
91
|
+
}, _ = o.map((e, d) => ({ ...e, id: `${d}` })), y = L - g.left - g.right, b = D - g.top - g.bottom, w = o.filter((e) => e.radius === void 0 || e.radius === null).length !== o.length ? li().domain([0, we]).range([0.25, O]).nice() : void 0, h = _.filter((e) => !c(e.radius)).length === 0 ? _ : Ge(
|
|
92
92
|
_.filter((e) => !c(e.radius)),
|
|
93
93
|
"radius",
|
|
94
94
|
"desc"
|
|
95
|
-
),
|
|
96
|
-
|
|
97
|
-
(e) =>
|
|
95
|
+
), l = Ye().domain([j, z]).range([0, y]).nice(), n = Ye().domain([A, Ce]).range([b, 0]).nice(), ee = l.ticks(re), ie = n.ticks(se), F = ri.from(
|
|
96
|
+
h.filter((e) => !c(e.x) && !c(e.y)),
|
|
97
|
+
(e) => l(e.x),
|
|
98
98
|
(e) => n(e.y)
|
|
99
99
|
).voronoi([0, 0, y < 0 ? 0 : y, b < 0 ? 0 : b]), Ae = qe(
|
|
100
|
-
o.filter((e) => !c(e.x) && !c(e.y)).map((e) => [
|
|
100
|
+
o.filter((e) => !c(e.x) && !c(e.y)).map((e) => [l(e.x), n(e.y)])
|
|
101
101
|
), f = Be(Ae);
|
|
102
102
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
103
103
|
/* @__PURE__ */ t.jsx(
|
|
@@ -108,7 +108,7 @@ function yi(ye) {
|
|
|
108
108
|
viewBox: `0 0 ${L} ${D}`,
|
|
109
109
|
direction: "ltr",
|
|
110
110
|
ref: ue,
|
|
111
|
-
children: /* @__PURE__ */ t.jsxs("g", { transform: `translate(${
|
|
111
|
+
children: /* @__PURE__ */ t.jsxs("g", { transform: `translate(${g.left},${g.top})`, children: [
|
|
112
112
|
/* @__PURE__ */ t.jsxs(Ie, { children: [
|
|
113
113
|
/* @__PURE__ */ t.jsx(
|
|
114
114
|
ai,
|
|
@@ -116,9 +116,9 @@ function yi(ye) {
|
|
|
116
116
|
areaSettings: be,
|
|
117
117
|
width: y,
|
|
118
118
|
height: b,
|
|
119
|
-
scaleX:
|
|
119
|
+
scaleX: l,
|
|
120
120
|
scaleY: n,
|
|
121
|
-
animate:
|
|
121
|
+
animate: r,
|
|
122
122
|
isInView: p
|
|
123
123
|
}
|
|
124
124
|
),
|
|
@@ -126,9 +126,9 @@ function yi(ye) {
|
|
|
126
126
|
_e,
|
|
127
127
|
{
|
|
128
128
|
areaSettings: je,
|
|
129
|
-
scaleX:
|
|
129
|
+
scaleX: l,
|
|
130
130
|
scaleY: n,
|
|
131
|
-
animate:
|
|
131
|
+
animate: r,
|
|
132
132
|
isInView: p
|
|
133
133
|
}
|
|
134
134
|
)
|
|
@@ -140,7 +140,7 @@ function yi(ye) {
|
|
|
140
140
|
values: ie.filter((e) => e !== 0),
|
|
141
141
|
y: ie.filter((e) => e !== 0).map((e) => n(e)),
|
|
142
142
|
x1: 0,
|
|
143
|
-
x2: y +
|
|
143
|
+
x2: y + g.right,
|
|
144
144
|
styles: {
|
|
145
145
|
gridLines: x?.yAxis?.gridLines,
|
|
146
146
|
labels: x?.yAxis?.labels
|
|
@@ -163,7 +163,7 @@ function yi(ye) {
|
|
|
163
163
|
y1: n(A < 0 ? 0 : A),
|
|
164
164
|
y2: n(A < 0 ? 0 : A),
|
|
165
165
|
x1: 0,
|
|
166
|
-
x2: y +
|
|
166
|
+
x2: y + g.right,
|
|
167
167
|
label: Te(
|
|
168
168
|
A < 0 ? 0 : A,
|
|
169
169
|
"NA",
|
|
@@ -204,7 +204,7 @@ function yi(ye) {
|
|
|
204
204
|
Ze,
|
|
205
205
|
{
|
|
206
206
|
values: ee.filter((e) => e !== 0),
|
|
207
|
-
x: ee.filter((e) => e !== 0).map((e) =>
|
|
207
|
+
x: ee.filter((e) => e !== 0).map((e) => l(e)),
|
|
208
208
|
y1: 0,
|
|
209
209
|
y2: b,
|
|
210
210
|
styles: {
|
|
@@ -225,8 +225,8 @@ function yi(ye) {
|
|
|
225
225
|
/* @__PURE__ */ t.jsx(
|
|
226
226
|
Pe,
|
|
227
227
|
{
|
|
228
|
-
x1:
|
|
229
|
-
x2:
|
|
228
|
+
x1: l(j < 0 ? 0 : j),
|
|
229
|
+
x2: l(j < 0 ? 0 : j),
|
|
230
230
|
y1: 0,
|
|
231
231
|
y2: b,
|
|
232
232
|
label: Te(
|
|
@@ -237,7 +237,7 @@ function yi(ye) {
|
|
|
237
237
|
ne
|
|
238
238
|
),
|
|
239
239
|
labelPos: {
|
|
240
|
-
x:
|
|
240
|
+
x: l(j < 0 ? 0 : j),
|
|
241
241
|
y: b,
|
|
242
242
|
dy: "1em",
|
|
243
243
|
dx: 0
|
|
@@ -262,16 +262,16 @@ function yi(ye) {
|
|
|
262
262
|
y: b + 30,
|
|
263
263
|
style: x?.xAxis?.title,
|
|
264
264
|
className: m?.xAxis?.title,
|
|
265
|
-
text:
|
|
265
|
+
text: u
|
|
266
266
|
}
|
|
267
267
|
)
|
|
268
268
|
] }),
|
|
269
269
|
fe.filter((e) => e.position === "before").map((e) => e.layer),
|
|
270
270
|
/* @__PURE__ */ t.jsxs(Ie, { children: [
|
|
271
|
-
|
|
271
|
+
h.filter((e) => !c(e.x) && !c(e.y)).map((e, d) => /* @__PURE__ */ t.jsx(
|
|
272
272
|
"path",
|
|
273
273
|
{
|
|
274
|
-
d: F.renderCell(
|
|
274
|
+
d: F.renderCell(h.findIndex((a) => a.id === e.id)),
|
|
275
275
|
opacity: 0,
|
|
276
276
|
onMouseEnter: (a) => {
|
|
277
277
|
Y(e), v(a.clientY), R(a.clientX), H?.(e);
|
|
@@ -288,25 +288,25 @@ function yi(ye) {
|
|
|
288
288
|
},
|
|
289
289
|
`${e.label || d}`
|
|
290
290
|
)),
|
|
291
|
-
|
|
291
|
+
h.filter((e) => !c(e.x) && !c(e.y)).map((e, d) => /* @__PURE__ */ t.jsxs(
|
|
292
292
|
te.g,
|
|
293
293
|
{
|
|
294
294
|
variants: {
|
|
295
295
|
initial: {
|
|
296
|
-
x:
|
|
296
|
+
x: l(e.x),
|
|
297
297
|
y: n(e.y),
|
|
298
|
-
opacity: B ? e.color && s[
|
|
298
|
+
opacity: B ? e.color && s[C.indexOf(`${e.color}`)] === B ? 1 : k : X ? X.id === e.id ? 1 : k : T.length !== 0 ? T.indexOf(e.label || "") !== -1 ? 1 : k : 1
|
|
299
299
|
},
|
|
300
300
|
whileInView: {
|
|
301
|
-
x:
|
|
301
|
+
x: l(e.x),
|
|
302
302
|
y: n(e.y),
|
|
303
|
-
opacity: B ? e.color && s[
|
|
304
|
-
transition: { duration:
|
|
303
|
+
opacity: B ? e.color && s[C.indexOf(`${e.color}`)] === B ? 1 : k : X ? X.id === e.id ? 1 : k : T.length !== 0 ? T.indexOf(e.label || "") !== -1 ? 1 : k : 1,
|
|
304
|
+
transition: { duration: r.duration }
|
|
305
305
|
}
|
|
306
306
|
},
|
|
307
307
|
initial: "initial",
|
|
308
308
|
animate: p ? "whileInView" : "initial",
|
|
309
|
-
exit: { opacity: 0, transition: { duration:
|
|
309
|
+
exit: { opacity: 0, transition: { duration: r.duration } },
|
|
310
310
|
onMouseEnter: (a) => {
|
|
311
311
|
Y(e), v(a.clientY), R(a.clientX), H?.(e);
|
|
312
312
|
},
|
|
@@ -325,18 +325,18 @@ function yi(ye) {
|
|
|
325
325
|
{
|
|
326
326
|
cx: 0,
|
|
327
327
|
cy: 0,
|
|
328
|
-
exit: { r: 0, transition: { duration:
|
|
328
|
+
exit: { r: 0, transition: { duration: r.duration } },
|
|
329
329
|
variants: {
|
|
330
330
|
initial: {
|
|
331
331
|
r: 0,
|
|
332
|
-
fill: o.filter((a) => a.color).length === 0 ? s[0] : e.color ? s[
|
|
333
|
-
stroke: o.filter((a) => a.color).length === 0 ? s[0] : e.color ? s[
|
|
332
|
+
fill: o.filter((a) => a.color).length === 0 ? s[0] : e.color ? s[C.indexOf(`${e.color}`)] : N.gray,
|
|
333
|
+
stroke: o.filter((a) => a.color).length === 0 ? s[0] : e.color ? s[C.indexOf(`${e.color}`)] : N.gray
|
|
334
334
|
},
|
|
335
335
|
whileInView: {
|
|
336
|
-
r:
|
|
337
|
-
fill: o.filter((a) => a.color).length === 0 ? s[0] : e.color ? s[
|
|
338
|
-
stroke: o.filter((a) => a.color).length === 0 ? s[0] : e.color ? s[
|
|
339
|
-
transition: { duration:
|
|
336
|
+
r: w ? w(e.radius || 0) : O,
|
|
337
|
+
fill: o.filter((a) => a.color).length === 0 ? s[0] : e.color ? s[C.indexOf(`${e.color}`)] : N.gray,
|
|
338
|
+
stroke: o.filter((a) => a.color).length === 0 ? s[0] : e.color ? s[C.indexOf(`${e.color}`)] : N.gray,
|
|
339
|
+
transition: { duration: r.duration }
|
|
340
340
|
}
|
|
341
341
|
},
|
|
342
342
|
initial: "initial",
|
|
@@ -354,18 +354,18 @@ function yi(ye) {
|
|
|
354
354
|
},
|
|
355
355
|
className: Ne("graph-value text-sm", m?.graphObjectValues),
|
|
356
356
|
y: 0,
|
|
357
|
-
exit: { opacity: 0, transition: { duration:
|
|
357
|
+
exit: { opacity: 0, transition: { duration: r.duration } },
|
|
358
358
|
variants: {
|
|
359
359
|
initial: {
|
|
360
|
-
x:
|
|
360
|
+
x: w ? w(e.radius || 0) : O,
|
|
361
361
|
opacity: 0,
|
|
362
|
-
fill: Z || (o.filter((a) => a.color).length === 0 ? s[0] : e.color ? s[
|
|
362
|
+
fill: Z || (o.filter((a) => a.color).length === 0 ? s[0] : e.color ? s[C.indexOf(`${e.color}`)] : N.gray)
|
|
363
363
|
},
|
|
364
364
|
whileInView: {
|
|
365
|
-
x:
|
|
365
|
+
x: w ? w(e.radius || 0) : O,
|
|
366
366
|
opacity: 1,
|
|
367
|
-
fill: Z || (o.filter((a) => a.color).length === 0 ? s[0] : e.color ? s[
|
|
368
|
-
transition: { duration:
|
|
367
|
+
fill: Z || (o.filter((a) => a.color).length === 0 ? s[0] : e.color ? s[C.indexOf(`${e.color}`)] : N.gray),
|
|
368
|
+
transition: { duration: r.duration }
|
|
369
369
|
}
|
|
370
370
|
},
|
|
371
371
|
initial: "initial",
|
|
@@ -378,21 +378,21 @@ function yi(ye) {
|
|
|
378
378
|
te.text,
|
|
379
379
|
{
|
|
380
380
|
style: {
|
|
381
|
-
fill: Z || (o.filter((a) => a.color).length === 0 ? s[0] : e.color ? s[
|
|
381
|
+
fill: Z || (o.filter((a) => a.color).length === 0 ? s[0] : e.color ? s[C.indexOf(`${e.color}`)] : N.gray),
|
|
382
382
|
...x?.graphObjectValues || {}
|
|
383
383
|
},
|
|
384
384
|
className: Ne("graph-value text-sm", m?.graphObjectValues),
|
|
385
385
|
y: 0,
|
|
386
|
-
exit: { opacity: 0, transition: { duration:
|
|
386
|
+
exit: { opacity: 0, transition: { duration: r.duration } },
|
|
387
387
|
variants: {
|
|
388
388
|
initial: {
|
|
389
|
-
x:
|
|
389
|
+
x: w ? w(e.radius || 0) : O,
|
|
390
390
|
opacity: 0
|
|
391
391
|
},
|
|
392
392
|
whileInView: {
|
|
393
|
-
x:
|
|
393
|
+
x: w ? w(e.radius || 0) : O,
|
|
394
394
|
opacity: 1,
|
|
395
|
-
transition: { duration:
|
|
395
|
+
transition: { duration: r.duration }
|
|
396
396
|
}
|
|
397
397
|
},
|
|
398
398
|
initial: "initial",
|
|
@@ -411,13 +411,13 @@ function yi(ye) {
|
|
|
411
411
|
{
|
|
412
412
|
text: e.text,
|
|
413
413
|
color: e.color,
|
|
414
|
-
x:
|
|
414
|
+
x: l(e.value),
|
|
415
415
|
y1: 0,
|
|
416
416
|
y2: b,
|
|
417
|
-
textSide:
|
|
417
|
+
textSide: l(e.value) > y * 0.75 || K ? "left" : "right",
|
|
418
418
|
classNames: e.classNames,
|
|
419
419
|
styles: e.styles,
|
|
420
|
-
animate:
|
|
420
|
+
animate: r,
|
|
421
421
|
isInView: p
|
|
422
422
|
},
|
|
423
423
|
d
|
|
@@ -432,7 +432,7 @@ function yi(ye) {
|
|
|
432
432
|
x2: y,
|
|
433
433
|
classNames: e.classNames,
|
|
434
434
|
styles: e.styles,
|
|
435
|
-
animate:
|
|
435
|
+
animate: r,
|
|
436
436
|
isInView: p
|
|
437
437
|
},
|
|
438
438
|
d
|
|
@@ -440,11 +440,11 @@ function yi(ye) {
|
|
|
440
440
|
/* @__PURE__ */ t.jsx("g", { children: Oe.map((e, d) => {
|
|
441
441
|
const a = Je(
|
|
442
442
|
{
|
|
443
|
-
x: e.xCoordinate ?
|
|
443
|
+
x: e.xCoordinate ? l(e.xCoordinate) + (e.xOffset || 0) : 0 + (e.xOffset || 0),
|
|
444
444
|
y: e.yCoordinate ? n(e.yCoordinate) + (e.yOffset || 0) - 8 : 0 + (e.yOffset || 0) - 8
|
|
445
445
|
},
|
|
446
446
|
{
|
|
447
|
-
x: e.xCoordinate ?
|
|
447
|
+
x: e.xCoordinate ? l(e.xCoordinate) : 0,
|
|
448
448
|
y: e.yCoordinate ? n(e.yCoordinate) : 0
|
|
449
449
|
},
|
|
450
450
|
c(e.connectorRadius) ? 3.5 : e.connectorRadius
|
|
@@ -452,15 +452,15 @@ function yi(ye) {
|
|
|
452
452
|
y1: a.y,
|
|
453
453
|
x1: a.x,
|
|
454
454
|
y2: e.yCoordinate ? n(e.yCoordinate) + (e.yOffset || 0) : 0 + (e.yOffset || 0),
|
|
455
|
-
x2: e.xCoordinate ?
|
|
455
|
+
x2: e.xCoordinate ? l(e.xCoordinate) + (e.xOffset || 0) : 0 + (e.xOffset || 0),
|
|
456
456
|
cy: e.yCoordinate ? n(e.yCoordinate) : 0,
|
|
457
|
-
cx: e.xCoordinate ?
|
|
457
|
+
cx: e.xCoordinate ? l(e.xCoordinate) : 0,
|
|
458
458
|
circleRadius: c(e.connectorRadius) ? 3.5 : e.connectorRadius,
|
|
459
459
|
strokeWidth: e.showConnector === !0 ? 2 : Math.min(e.showConnector || 0, 1)
|
|
460
460
|
} : void 0, E = {
|
|
461
461
|
y: e.yCoordinate ? n(e.yCoordinate) + (e.yOffset || 0) - 8 : 0 + (e.yOffset || 0) - 8,
|
|
462
|
-
x: K ? 0 : e.xCoordinate ?
|
|
463
|
-
width: K ? e.xCoordinate ?
|
|
462
|
+
x: K ? 0 : e.xCoordinate ? l(e.xCoordinate) + (e.xOffset || 0) : 0 + (e.xOffset || 0),
|
|
463
|
+
width: K ? e.xCoordinate ? l(e.xCoordinate) + (e.xOffset || 0) : 0 + (e.xOffset || 0) : y + g.right - (e.xCoordinate ? l(e.xCoordinate) + (e.xOffset || 0) : 0 + (e.xOffset || 0)),
|
|
464
464
|
maxWidth: e.maxWidth,
|
|
465
465
|
fontWeight: e.fontWeight,
|
|
466
466
|
align: e.align
|
|
@@ -474,7 +474,7 @@ function yi(ye) {
|
|
|
474
474
|
text: e.text,
|
|
475
475
|
classNames: e.classNames,
|
|
476
476
|
styles: e.styles,
|
|
477
|
-
animate:
|
|
477
|
+
animate: r,
|
|
478
478
|
isInView: p
|
|
479
479
|
},
|
|
480
480
|
d
|
|
@@ -492,7 +492,7 @@ function yi(ye) {
|
|
|
492
492
|
className: m?.regLine,
|
|
493
493
|
style: x?.regLine,
|
|
494
494
|
color: typeof U == "string" ? U : void 0,
|
|
495
|
-
animate:
|
|
495
|
+
animate: r,
|
|
496
496
|
isInView: p
|
|
497
497
|
}
|
|
498
498
|
) : null
|
|
@@ -501,11 +501,11 @@ function yi(ye) {
|
|
|
501
501
|
] })
|
|
502
502
|
}
|
|
503
503
|
),
|
|
504
|
-
X &&
|
|
504
|
+
X && le && ge && he ? /* @__PURE__ */ t.jsx(
|
|
505
505
|
Ue,
|
|
506
506
|
{
|
|
507
507
|
data: X,
|
|
508
|
-
body:
|
|
508
|
+
body: le,
|
|
509
509
|
xPos: ge,
|
|
510
510
|
yPos: he,
|
|
511
511
|
backgroundStyle: x?.tooltip,
|
|
@@ -538,25 +538,25 @@ function Qi(ye) {
|
|
|
538
538
|
colors: D,
|
|
539
539
|
sources: oe,
|
|
540
540
|
graphDescription: s,
|
|
541
|
-
showLabels:
|
|
541
|
+
showLabels: C = !1,
|
|
542
542
|
height: O,
|
|
543
|
-
width:
|
|
543
|
+
width: u,
|
|
544
544
|
footNote: J,
|
|
545
545
|
colorDomain: q,
|
|
546
546
|
colorLegendTitle: de,
|
|
547
547
|
radius: pe = 5,
|
|
548
548
|
xAxisTitle: ae = "X Axis",
|
|
549
|
-
yAxisTitle:
|
|
549
|
+
yAxisTitle: le = "Y Axis",
|
|
550
550
|
padding: H,
|
|
551
551
|
backgroundColor: $ = !1,
|
|
552
552
|
leftMargin: ve = 0,
|
|
553
553
|
rightMargin: be = 10,
|
|
554
554
|
topMargin: B = 20,
|
|
555
555
|
bottomMargin: T = 50,
|
|
556
|
-
tooltip:
|
|
556
|
+
tooltip: we,
|
|
557
557
|
relativeHeight: z,
|
|
558
558
|
onSeriesMouseOver: j,
|
|
559
|
-
refXValues:
|
|
559
|
+
refXValues: Ce = [],
|
|
560
560
|
refYValues: A = [],
|
|
561
561
|
highlightAreaSettings: P = [],
|
|
562
562
|
showColorScale: K = !0,
|
|
@@ -565,7 +565,7 @@ function Qi(ye) {
|
|
|
565
565
|
maxRadiusValue: U,
|
|
566
566
|
maxXValue: Q,
|
|
567
567
|
minXValue: M,
|
|
568
|
-
maxYValue:
|
|
568
|
+
maxYValue: re,
|
|
569
569
|
minYValue: se,
|
|
570
570
|
xSuffix: Z = "",
|
|
571
571
|
ySuffix: ne = "",
|
|
@@ -574,7 +574,7 @@ function Qi(ye) {
|
|
|
574
574
|
onSeriesMouseClick: me,
|
|
575
575
|
graphDownload: x = !1,
|
|
576
576
|
dataDownload: m = !1,
|
|
577
|
-
language:
|
|
577
|
+
language: r = "en",
|
|
578
578
|
showNAColor: k = !0,
|
|
579
579
|
minHeight: S = 0,
|
|
580
580
|
annotations: fe = [],
|
|
@@ -588,50 +588,51 @@ function Qi(ye) {
|
|
|
588
588
|
noOfYTicks: R = 5,
|
|
589
589
|
labelColor: he,
|
|
590
590
|
styles: v,
|
|
591
|
-
classNames:
|
|
591
|
+
classNames: g,
|
|
592
592
|
animate: _ = !1,
|
|
593
593
|
dimmedOpacity: y = 0.3,
|
|
594
594
|
precision: b = 2,
|
|
595
|
-
customLayers:
|
|
596
|
-
timeline:
|
|
597
|
-
} = ye, [
|
|
595
|
+
customLayers: w = [],
|
|
596
|
+
timeline: h = { enabled: !1, autoplay: !1, showOnlyActiveDate: !0 }
|
|
597
|
+
} = ye, [l, n] = V(0), [ee, ie] = V(0), [F, Ae] = V(h.autoplay), f = We(
|
|
598
598
|
ke(
|
|
599
599
|
o.filter((i) => i.date !== void 0 && i.date !== null),
|
|
600
600
|
(i) => i.date
|
|
601
|
-
).map((i) => Re(`${i.date}`,
|
|
601
|
+
).map((i) => Re(`${i.date}`, h.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime()),
|
|
602
602
|
(i, G) => hi(i, G)
|
|
603
|
-
), [e, d] = V(
|
|
603
|
+
), [e, d] = V(h.autoplay ? 0 : f.length - 1), [a, Me] = V(void 0), E = Se(null), Ve = Se(null);
|
|
604
604
|
De(() => {
|
|
605
605
|
const i = new ResizeObserver((G) => {
|
|
606
|
-
n(
|
|
606
|
+
n(u || G[0].target.clientWidth || 620), ie(O || G[0].target.clientHeight || 480);
|
|
607
607
|
});
|
|
608
|
-
return E.current && (ie(E.current.clientHeight || 480), n(E.current.clientWidth || 620),
|
|
609
|
-
}, [
|
|
608
|
+
return E.current && (ie(E.current.clientHeight || 480), n(E.current.clientWidth || 620), u || i.observe(E.current)), () => i.disconnect();
|
|
609
|
+
}, [u, O]), De(() => {
|
|
610
610
|
const i = setInterval(
|
|
611
611
|
() => {
|
|
612
612
|
d((G) => G < f.length - 1 ? G + 1 : 0);
|
|
613
613
|
},
|
|
614
|
-
(
|
|
614
|
+
(h.speed || 2) * 1e3
|
|
615
615
|
);
|
|
616
616
|
return F || clearInterval(i), () => clearInterval(i);
|
|
617
|
-
}, [f, F,
|
|
617
|
+
}, [f, F, h.speed]);
|
|
618
618
|
const Le = Fe(
|
|
619
619
|
f,
|
|
620
620
|
e,
|
|
621
|
-
|
|
622
|
-
|
|
621
|
+
h.showOnlyActiveDate,
|
|
622
|
+
h.dateFormat || "yyyy"
|
|
623
623
|
);
|
|
624
624
|
return /* @__PURE__ */ t.jsx(
|
|
625
625
|
"div",
|
|
626
626
|
{
|
|
627
|
-
className: `${p || "light"} flex ${
|
|
628
|
-
dir:
|
|
627
|
+
className: `${p || "light"} flex ${u ? "w-fit grow-0" : "w-full grow"}`,
|
|
628
|
+
dir: r === "he" || r === "ar" ? "rtl" : void 0,
|
|
629
629
|
children: /* @__PURE__ */ t.jsx(
|
|
630
630
|
"div",
|
|
631
631
|
{
|
|
632
632
|
className: Ne(
|
|
633
|
-
`${$ ? $ === !0 ? "bg-primary-gray-200 dark:bg-primary-gray-650 " : "" : "bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${
|
|
634
|
-
u
|
|
633
|
+
`${$ ? $ === !0 ? "bg-primary-gray-200 dark:bg-primary-gray-650 " : "" : "bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${r || "en"}`,
|
|
634
|
+
u ? "w-fit" : "w-full",
|
|
635
|
+
g?.graphContainer
|
|
635
636
|
),
|
|
636
637
|
style: {
|
|
637
638
|
...v?.graphContainer || {},
|
|
@@ -654,17 +655,17 @@ function Qi(ye) {
|
|
|
654
655
|
description: v?.description
|
|
655
656
|
},
|
|
656
657
|
classNames: {
|
|
657
|
-
title:
|
|
658
|
-
description:
|
|
658
|
+
title: g?.title,
|
|
659
|
+
description: g?.description
|
|
659
660
|
},
|
|
660
661
|
graphTitle: L,
|
|
661
662
|
graphDescription: s,
|
|
662
|
-
width:
|
|
663
|
+
width: u,
|
|
663
664
|
graphDownload: x ? Ve.current : void 0,
|
|
664
665
|
dataDownload: m ? o.map((i) => i.data).filter((i) => i !== void 0).length > 0 ? o.map((i) => i.data).filter((i) => i !== void 0) : o.filter((i) => i !== void 0) : null
|
|
665
666
|
}
|
|
666
667
|
) : null,
|
|
667
|
-
|
|
668
|
+
h.enabled && f.length > 0 && Le ? /* @__PURE__ */ t.jsxs("div", { className: "flex gap-6 items-center", dir: "ltr", children: [
|
|
668
669
|
/* @__PURE__ */ t.jsx(
|
|
669
670
|
"button",
|
|
670
671
|
{
|
|
@@ -700,7 +701,7 @@ function Qi(ye) {
|
|
|
700
701
|
K && o.filter((i) => i.color).length !== 0 ? /* @__PURE__ */ t.jsx(
|
|
701
702
|
xi,
|
|
702
703
|
{
|
|
703
|
-
width:
|
|
704
|
+
width: u,
|
|
704
705
|
colorLegendTitle: de,
|
|
705
706
|
colors: D || N[p].categoricalColors.colors,
|
|
706
707
|
colorDomain: q || ke(
|
|
@@ -717,22 +718,22 @@ function Qi(ye) {
|
|
|
717
718
|
className: "flex flex-col grow justify-center w-full leading-0",
|
|
718
719
|
ref: E,
|
|
719
720
|
"aria-label": "Graph area",
|
|
720
|
-
children: (
|
|
721
|
+
children: (u || l) && (O || ee) ? /* @__PURE__ */ t.jsx(
|
|
721
722
|
yi,
|
|
722
723
|
{
|
|
723
724
|
data: gi(
|
|
724
725
|
o,
|
|
725
|
-
|
|
726
|
+
h.dateFormat || "yyyy"
|
|
726
727
|
).filter(
|
|
727
|
-
(i) =>
|
|
728
|
+
(i) => h.enabled ? i.date === He(
|
|
728
729
|
new Date(f[e]),
|
|
729
|
-
|
|
730
|
+
h.dateFormat || "yyyy"
|
|
730
731
|
) : i
|
|
731
732
|
),
|
|
732
|
-
width:
|
|
733
|
+
width: u || l,
|
|
733
734
|
height: Math.max(
|
|
734
735
|
S,
|
|
735
|
-
O || (z ? S ? (
|
|
736
|
+
O || (z ? S ? (u || l) * z > S ? (u || l) * z : S : (u || l) * z : ee)
|
|
736
737
|
),
|
|
737
738
|
colorDomain: o.filter((i) => i.color).length === 0 ? [] : q || ke(
|
|
738
739
|
o.filter((i) => i.color),
|
|
@@ -740,16 +741,16 @@ function Qi(ye) {
|
|
|
740
741
|
).map((i) => i.color),
|
|
741
742
|
colors: o.filter((i) => i.color).length === 0 ? D ? [D] : [N.primaryColors["blue-600"]] : D || N[p].categoricalColors.colors,
|
|
742
743
|
xAxisTitle: ae,
|
|
743
|
-
yAxisTitle:
|
|
744
|
-
refXValues:
|
|
744
|
+
yAxisTitle: le,
|
|
745
|
+
refXValues: Ce,
|
|
745
746
|
refYValues: A,
|
|
746
|
-
showLabels:
|
|
747
|
+
showLabels: C,
|
|
747
748
|
radius: pe,
|
|
748
749
|
leftMargin: ve,
|
|
749
750
|
rightMargin: be,
|
|
750
751
|
topMargin: B,
|
|
751
752
|
bottomMargin: T,
|
|
752
|
-
tooltip:
|
|
753
|
+
tooltip: we,
|
|
753
754
|
onSeriesMouseOver: j,
|
|
754
755
|
highlightAreaSettings: P,
|
|
755
756
|
highlightedDataPoints: o.filter((i) => i.label).length === 0 ? [] : Oe,
|
|
@@ -767,18 +768,18 @@ function Qi(ye) {
|
|
|
767
768
|
) > 0 ? 0 : Math.min(
|
|
768
769
|
...o.map((i) => i.x).filter((i) => i != null)
|
|
769
770
|
) : M,
|
|
770
|
-
maxYValue: c(
|
|
771
|
+
maxYValue: c(re) ? Math.max(
|
|
771
772
|
...o.map((i) => i.y).filter((i) => i != null)
|
|
772
773
|
) > 0 ? Math.max(
|
|
773
774
|
...o.map((i) => i.y).filter((i) => i != null)
|
|
774
|
-
) : 0 :
|
|
775
|
+
) : 0 : re,
|
|
775
776
|
minYValue: c(se) ? Math.min(
|
|
776
777
|
...o.map((i) => i.y).filter((i) => i != null)
|
|
777
778
|
) > 0 ? 0 : Math.min(
|
|
778
779
|
...o.map((i) => i.y).filter((i) => i != null)
|
|
779
780
|
) : se,
|
|
780
781
|
onSeriesMouseClick: me,
|
|
781
|
-
rtl:
|
|
782
|
+
rtl: r === "he" || r === "ar",
|
|
782
783
|
annotations: fe,
|
|
783
784
|
customHighlightAreaSettings: ue,
|
|
784
785
|
regressionLine: X,
|
|
@@ -792,11 +793,11 @@ function Qi(ye) {
|
|
|
792
793
|
xPrefix: ce,
|
|
793
794
|
yPrefix: xe,
|
|
794
795
|
styles: v,
|
|
795
|
-
classNames:
|
|
796
|
+
classNames: g,
|
|
796
797
|
animate: _ === !0 ? { duration: 0.5, once: !0, amount: 0.5 } : _ || { duration: 0, once: !0, amount: 0 },
|
|
797
798
|
dimmedOpacity: y,
|
|
798
799
|
precision: b,
|
|
799
|
-
customLayers:
|
|
800
|
+
customLayers: w
|
|
800
801
|
}
|
|
801
802
|
) : null
|
|
802
803
|
}
|
|
@@ -807,12 +808,12 @@ function Qi(ye) {
|
|
|
807
808
|
{
|
|
808
809
|
styles: { footnote: v?.footnote, source: v?.source },
|
|
809
810
|
classNames: {
|
|
810
|
-
footnote:
|
|
811
|
-
source:
|
|
811
|
+
footnote: g?.footnote,
|
|
812
|
+
source: g?.source
|
|
812
813
|
},
|
|
813
814
|
sources: oe,
|
|
814
815
|
footNote: J,
|
|
815
|
-
width:
|
|
816
|
+
width: u
|
|
816
817
|
}
|
|
817
818
|
) : null
|
|
818
819
|
] })
|