impaktapps-design 0.2.58-alpha.3 → 0.2.58-alpha.5
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.
|
@@ -10873,26 +10873,23 @@ function Legend({
|
|
|
10873
10873
|
colorRange,
|
|
10874
10874
|
dataKeyArray
|
|
10875
10875
|
}) {
|
|
10876
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k
|
|
10876
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
10877
10877
|
const legendGlyphSize = ((_b = (_a = value == null ? void 0 : value.main) == null ? void 0 : _a.legend) == null ? void 0 : _b.colorRectWidth) || 15;
|
|
10878
|
-
const xValues = (_c = value == null ? void 0 : value.main) == null ? void 0 : _c.data.map((item) => {
|
|
10879
|
-
return item.x;
|
|
10880
|
-
});
|
|
10881
10878
|
const ordinalColorScale = createOrdinalScale$1({
|
|
10882
|
-
domain: dataKeyArray || ((
|
|
10883
|
-
range: colorRange || ((
|
|
10879
|
+
domain: dataKeyArray || ((_c = value == null ? void 0 : value.main) == null ? void 0 : _c.tooltipDataKey),
|
|
10880
|
+
range: colorRange || ((_e = (_d = value == null ? void 0 : value.style) == null ? void 0 : _d.pieStyle) == null ? void 0 : _e.colorRange)
|
|
10884
10881
|
});
|
|
10885
10882
|
return /* @__PURE__ */ jsxs("div", {
|
|
10886
10883
|
className: "legend",
|
|
10887
10884
|
style: {
|
|
10888
10885
|
paddingLeft: "40px",
|
|
10889
10886
|
paddingRight: "40px",
|
|
10890
|
-
...(
|
|
10887
|
+
...(_g = (_f = value == null ? void 0 : value.style) == null ? void 0 : _f.legendStyle) == null ? void 0 : _g.legend
|
|
10891
10888
|
},
|
|
10892
10889
|
children: [/* @__PURE__ */ jsx("div", {
|
|
10893
10890
|
className: "title",
|
|
10894
|
-
style: (
|
|
10895
|
-
children: (
|
|
10891
|
+
style: (_i = (_h = value == null ? void 0 : value.style) == null ? void 0 : _h.legendStyle) == null ? void 0 : _i.legendTitle,
|
|
10892
|
+
children: (_k = (_j = value == null ? void 0 : value.main) == null ? void 0 : _j.legend) == null ? void 0 : _k.legendTitle
|
|
10896
10893
|
}), /* @__PURE__ */ jsx(Ordinal, {
|
|
10897
10894
|
scale: ordinalColorScale,
|
|
10898
10895
|
labelFormat: (label) => `${label.toUpperCase()}`,
|
|
@@ -10903,7 +10900,7 @@ function Legend({
|
|
|
10903
10900
|
display: "flex",
|
|
10904
10901
|
flexDirection: ((_b2 = (_a2 = value == null ? void 0 : value.main) == null ? void 0 : _a2.legend) == null ? void 0 : _b2.direction) || "row"
|
|
10905
10902
|
},
|
|
10906
|
-
children:
|
|
10903
|
+
children: labels.map((label, i) => {
|
|
10907
10904
|
var _a3, _b3;
|
|
10908
10905
|
return /* @__PURE__ */ jsxs(LegendItem, {
|
|
10909
10906
|
margin: "0 5px",
|
|
@@ -10919,10 +10916,10 @@ function Legend({
|
|
|
10919
10916
|
width: legendGlyphSize,
|
|
10920
10917
|
height: legendGlyphSize
|
|
10921
10918
|
})
|
|
10922
|
-
}), /* @__PURE__ */
|
|
10919
|
+
}), /* @__PURE__ */ jsxs(LegendLabel, {
|
|
10923
10920
|
align: `${((_b3 = (_a3 = value == null ? void 0 : value.main) == null ? void 0 : _a3.legend) == null ? void 0 : _b3.align) || "left"}`,
|
|
10924
10921
|
margin: "0 0 0 4px",
|
|
10925
|
-
children: label.text
|
|
10922
|
+
children: ["", label.text]
|
|
10926
10923
|
})]
|
|
10927
10924
|
}, `legend-quantile-${i}`);
|
|
10928
10925
|
})
|
|
@@ -19777,19 +19774,22 @@ function AnimatedLineSeries(props) {
|
|
|
19777
19774
|
const DrawGraph = ({
|
|
19778
19775
|
value
|
|
19779
19776
|
}) => {
|
|
19780
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s
|
|
19777
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
|
|
19781
19778
|
const data = (_a = value == null ? void 0 : value.main) == null ? void 0 : _a.data;
|
|
19782
19779
|
const arr = value.main.xAxisValue && value.main.yAxisValue ? [value.main.xAxisValue, value.main.yAxisValue] : Object.keys(data[0][0]);
|
|
19783
19780
|
const accessors = {
|
|
19784
19781
|
xAccessor: (d2) => d2[arr[0]],
|
|
19785
19782
|
yAccessor: (d2) => d2[arr[1]]
|
|
19786
19783
|
};
|
|
19784
|
+
const dataKeyArray = data.map((ele) => {
|
|
19785
|
+
return ele.key;
|
|
19786
|
+
});
|
|
19787
19787
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
19788
19788
|
children: [value.main.legendAvailable && /* @__PURE__ */ jsx(Legend, {
|
|
19789
19789
|
value,
|
|
19790
|
-
dataKeyArray
|
|
19790
|
+
dataKeyArray
|
|
19791
19791
|
}), /* @__PURE__ */ jsxs(XYChart, {
|
|
19792
|
-
height: parseInt((
|
|
19792
|
+
height: parseInt((_c = (_b = value.style) == null ? void 0 : _b.containerStyle) == null ? void 0 : _c.height),
|
|
19793
19793
|
xScale: {
|
|
19794
19794
|
type: "band"
|
|
19795
19795
|
},
|
|
@@ -19800,11 +19800,11 @@ const DrawGraph = ({
|
|
|
19800
19800
|
orientation: "left",
|
|
19801
19801
|
hideAxisLine: value.main.hideLeftAxisLine,
|
|
19802
19802
|
label: value.main.leftLabel,
|
|
19803
|
-
left: ((
|
|
19804
|
-
labelOffset: ((
|
|
19803
|
+
left: ((_e = (_d = value.style) == null ? void 0 : _d.labelStyle) == null ? void 0 : _e.leftLabelMargin) || 70,
|
|
19804
|
+
labelOffset: ((_g = (_f = value.style) == null ? void 0 : _f.labelStyle) == null ? void 0 : _g.leftLabelOffset) || 32,
|
|
19805
19805
|
labelProps: {
|
|
19806
|
-
fill: (
|
|
19807
|
-
fontSize: (
|
|
19806
|
+
fill: (_i = (_h = value.style) == null ? void 0 : _h.labelStyle) == null ? void 0 : _i.labelColor,
|
|
19807
|
+
fontSize: (_k = (_j = value.style) == null ? void 0 : _j.labelStyle) == null ? void 0 : _k.fontSize
|
|
19808
19808
|
},
|
|
19809
19809
|
tickLabelProps: (e3) => {
|
|
19810
19810
|
var _a2, _b2;
|
|
@@ -19817,8 +19817,8 @@ const DrawGraph = ({
|
|
|
19817
19817
|
hideAxisLine: value.main.hideBottomAxisLine,
|
|
19818
19818
|
label: value.main.bottomLabel,
|
|
19819
19819
|
labelProps: {
|
|
19820
|
-
fill: (
|
|
19821
|
-
fontSize: (
|
|
19820
|
+
fill: (_m = (_l = value.style) == null ? void 0 : _l.labelStyle) == null ? void 0 : _m.labelColor,
|
|
19821
|
+
fontSize: (_o = (_n = value.style) == null ? void 0 : _n.labelStyle) == null ? void 0 : _o.fontSize
|
|
19822
19822
|
},
|
|
19823
19823
|
tickLabelProps: (e3) => {
|
|
19824
19824
|
var _a2, _b2;
|
|
@@ -19826,22 +19826,25 @@ const DrawGraph = ({
|
|
|
19826
19826
|
fill: (_b2 = (_a2 = value.style) == null ? void 0 : _a2.labelStyle) == null ? void 0 : _b2.labelColor
|
|
19827
19827
|
};
|
|
19828
19828
|
},
|
|
19829
|
-
labelOffset: ((
|
|
19829
|
+
labelOffset: ((_q = (_p = value.style) == null ? void 0 : _p.labelStyle) == null ? void 0 : _q.bottomLabelOffset) || 32
|
|
19830
19830
|
}), /* @__PURE__ */ jsx(AnimatedGrid, {
|
|
19831
19831
|
columns: value.main.grid,
|
|
19832
|
-
numTicks: value.main.numHidden ? 0 : ((
|
|
19833
|
-
}), (
|
|
19832
|
+
numTicks: value.main.numHidden ? 0 : ((_r = value.main) == null ? void 0 : _r.data[0].length) - 1
|
|
19833
|
+
}), (_s = value.main) == null ? void 0 : _s.data.map((elem, i) => {
|
|
19834
19834
|
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
19835
|
-
return /* @__PURE__ */ jsx(
|
|
19836
|
-
|
|
19837
|
-
|
|
19838
|
-
|
|
19839
|
-
|
|
19840
|
-
|
|
19841
|
-
|
|
19842
|
-
|
|
19843
|
-
|
|
19844
|
-
|
|
19835
|
+
return /* @__PURE__ */ jsx(
|
|
19836
|
+
AnimatedLineSeries,
|
|
19837
|
+
{
|
|
19838
|
+
dataKey: elem.key,
|
|
19839
|
+
data: elem.value,
|
|
19840
|
+
fill: (_b2 = (_a2 = value.style) == null ? void 0 : _a2.lineStyle) == null ? void 0 : _b2.lineAreaColor,
|
|
19841
|
+
fillOpacity: (_d2 = (_c2 = value.style) == null ? void 0 : _c2.lineStyle) == null ? void 0 : _d2.lineAreaOpacity,
|
|
19842
|
+
floodColor: "green",
|
|
19843
|
+
floodOpacity: 1,
|
|
19844
|
+
stroke: (_f2 = (_e2 = value.style) == null ? void 0 : _e2.lineStyle) == null ? void 0 : _f2.colorRange[i],
|
|
19845
|
+
...accessors
|
|
19846
|
+
}
|
|
19847
|
+
);
|
|
19845
19848
|
}), /* @__PURE__ */ jsx(Tooltip, {
|
|
19846
19849
|
snapTooltipToDatumX: true,
|
|
19847
19850
|
snapTooltipToDatumY: true,
|