impaktapps-design 0.2.995-alpha.21 → 0.2.995-alpha.23
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/impaktapps-design.es.js +22 -16
- package/dist/impaktapps-design.es.js.map +1 -1
- package/dist/impaktapps-design.umd.js +12 -12
- package/dist/impaktapps-design.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/component/BarGraph/DrawBarGraph.tsx +1 -1
- package/src/component/BarGraph/DrawHorizontalBarGraph.tsx +1 -1
- package/src/component/LineGraph/DrawLineGraph.tsx +1 -1
- package/src/component/PieGraph/DrawPieGraph.tsx +4 -3
|
@@ -18016,7 +18016,7 @@ function DrawBarGraph({
|
|
|
18016
18016
|
margin: margin2,
|
|
18017
18017
|
value
|
|
18018
18018
|
}) {
|
|
18019
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
18019
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
18020
18020
|
const data = value.main.data;
|
|
18021
18021
|
const keys2 = Object.keys(data[0]).filter((d2) => d2 !== value.main.xAxisValue);
|
|
18022
18022
|
const [hoveredBar, setHoveredBar] = useState({
|
|
@@ -18100,7 +18100,7 @@ function DrawBarGraph({
|
|
|
18100
18100
|
}
|
|
18101
18101
|
return width2 < 10 ? null : /* @__PURE__ */ jsxs("div", {
|
|
18102
18102
|
children: [value.main.legendAvailable && keys2.length > 1 && /* @__PURE__ */ jsx$1(Legend, {
|
|
18103
|
-
dataKeyArray: keys2,
|
|
18103
|
+
dataKeyArray: (_b = (_a = value.main) == null ? void 0 : _a.legendLabels) != null ? _b : keys2,
|
|
18104
18104
|
colorRange: value.style.barStyle.colorRange,
|
|
18105
18105
|
value,
|
|
18106
18106
|
theme: theme.myTheme
|
|
@@ -18132,8 +18132,8 @@ function DrawBarGraph({
|
|
|
18132
18132
|
style: {
|
|
18133
18133
|
display: hoveredBar.date ? "block" : "none"
|
|
18134
18134
|
},
|
|
18135
|
-
x: value.main.type === "StackBarGraph" ? ((
|
|
18136
|
-
width: value.main.type !== "StackBarGraph" ? calcWidthofBar(hoveredBar.date) : Math.min((
|
|
18135
|
+
x: value.main.type === "StackBarGraph" ? ((_c = hoveredBar.date) == null ? void 0 : _c.bars[hoveredBar.city].x) - (Math.min((_d = hoveredBar.date) == null ? void 0 : _d.bars[0].width, 15) - ((_e = hoveredBar.date) == null ? void 0 : _e.bars[0].width)) / 2 : ((_f = hoveredBar.date) == null ? void 0 : _f.x0) - (Math.min((_g = hoveredBar.date) == null ? void 0 : _g.bars[0].width, 15) - ((_h = hoveredBar.date) == null ? void 0 : _h.bars[0].width)) * ((_i = hoveredBar.date) == null ? void 0 : _i.bars.length) / 2 || 0,
|
|
18136
|
+
width: value.main.type !== "StackBarGraph" ? calcWidthofBar(hoveredBar.date) : Math.min((_j = hoveredBar.date) == null ? void 0 : _j.bars[0].width, 15),
|
|
18137
18137
|
height: yMax,
|
|
18138
18138
|
fill: theme.myTheme.palette.secondary.main,
|
|
18139
18139
|
opacity: 1
|
|
@@ -18638,7 +18638,7 @@ const DrawPieGraph = ({
|
|
|
18638
18638
|
parentWidth,
|
|
18639
18639
|
parentHeight
|
|
18640
18640
|
}) => {
|
|
18641
|
-
var _a, _b, _c, _d;
|
|
18641
|
+
var _a, _b, _c, _d, _e, _f;
|
|
18642
18642
|
const {
|
|
18643
18643
|
TooltipInPortal
|
|
18644
18644
|
} = useTooltipInPortal({
|
|
@@ -18698,7 +18698,7 @@ const DrawPieGraph = ({
|
|
|
18698
18698
|
children: [value.main.legendAvailable && smallScreen && /* @__PURE__ */ jsx$1(Legend, {
|
|
18699
18699
|
value,
|
|
18700
18700
|
colorRange: value.style.pieStyle.colorRange,
|
|
18701
|
-
dataKeyArray,
|
|
18701
|
+
dataKeyArray: (_f = (_e = value.main) == null ? void 0 : _e.legendLabels) != null ? _f : dataKeyArray,
|
|
18702
18702
|
theme: theme.myTheme
|
|
18703
18703
|
}), /* @__PURE__ */ jsx$1("svg", {
|
|
18704
18704
|
width: smallScreen ? parentWidth : 0.7 * parentWidth,
|
|
@@ -18799,7 +18799,13 @@ const DrawPieGraph = ({
|
|
|
18799
18799
|
}, Math.random()), /* @__PURE__ */ jsx$1("div", {
|
|
18800
18800
|
style: {
|
|
18801
18801
|
display: smallScreen ? "none" : "flex"
|
|
18802
|
-
}
|
|
18802
|
+
},
|
|
18803
|
+
children: value.main.legendAvailable && /* @__PURE__ */ jsx$1(Legend, {
|
|
18804
|
+
value,
|
|
18805
|
+
colorRange: value.style.pieStyle.colorRange,
|
|
18806
|
+
dataKeyArray,
|
|
18807
|
+
theme: theme.myTheme
|
|
18808
|
+
})
|
|
18803
18809
|
})]
|
|
18804
18810
|
})
|
|
18805
18811
|
});
|
|
@@ -21191,7 +21197,7 @@ const DrawGraph = ({
|
|
|
21191
21197
|
margin: margin2,
|
|
21192
21198
|
value
|
|
21193
21199
|
}) => {
|
|
21194
|
-
var _a;
|
|
21200
|
+
var _a, _b, _c;
|
|
21195
21201
|
const data = value.main.data;
|
|
21196
21202
|
const arr = Object.keys(data[0]).filter((d2) => d2 !== value.main.xAxisValue);
|
|
21197
21203
|
const xValues = data.map((d2) => d2[value.main.xAxisValue]);
|
|
@@ -21209,7 +21215,7 @@ const DrawGraph = ({
|
|
|
21209
21215
|
children: [value.main.legendAvailable && /* @__PURE__ */ jsx$1(Legend, {
|
|
21210
21216
|
value,
|
|
21211
21217
|
colorRange: value.style.lineStyle.colorRange,
|
|
21212
|
-
dataKeyArray: arr,
|
|
21218
|
+
dataKeyArray: (_b = (_a = value.main) == null ? void 0 : _a.legendLabels) != null ? _b : arr,
|
|
21213
21219
|
theme: theme.myTheme
|
|
21214
21220
|
}), /* @__PURE__ */ jsxs(XYChart, {
|
|
21215
21221
|
margin: margin2,
|
|
@@ -21247,16 +21253,16 @@ const DrawGraph = ({
|
|
|
21247
21253
|
fontWeight: "normal"
|
|
21248
21254
|
},
|
|
21249
21255
|
tickLabelProps: (e3) => {
|
|
21250
|
-
var _a2,
|
|
21256
|
+
var _a2, _b2;
|
|
21251
21257
|
return {
|
|
21252
21258
|
fill: "black",
|
|
21253
21259
|
fontSize: 10,
|
|
21254
21260
|
textAnchor: ((_a2 = value.main) == null ? void 0 : _a2.bottomAxisAngle) ? "start" : "middle",
|
|
21255
|
-
angle: ((
|
|
21261
|
+
angle: ((_b2 = value.main) == null ? void 0 : _b2.bottomAxisAngle) ? 45 : 0
|
|
21256
21262
|
};
|
|
21257
21263
|
},
|
|
21258
21264
|
tickStroke: "black",
|
|
21259
|
-
labelOffset: ((
|
|
21265
|
+
labelOffset: ((_c = value.main) == null ? void 0 : _c.bottomAxisAngle) ? 45 : 20
|
|
21260
21266
|
}), /* @__PURE__ */ jsx$1(Grid, {
|
|
21261
21267
|
stroke: "black",
|
|
21262
21268
|
lineStyle: {
|
|
@@ -21379,7 +21385,7 @@ var DrawHorizontalBarGraph = ({
|
|
|
21379
21385
|
margin: margin2,
|
|
21380
21386
|
barValue
|
|
21381
21387
|
}) => {
|
|
21382
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
21388
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
21383
21389
|
const [hoveredBar, setHoveredBar] = useState({
|
|
21384
21390
|
date: null,
|
|
21385
21391
|
city: null
|
|
@@ -21463,7 +21469,7 @@ var DrawHorizontalBarGraph = ({
|
|
|
21463
21469
|
}
|
|
21464
21470
|
return width2 < 10 ? null : /* @__PURE__ */ jsxs("div", {
|
|
21465
21471
|
children: [barValue.main.legendAvailable && keys2.length > 1 && /* @__PURE__ */ jsx$1(Legend, {
|
|
21466
|
-
dataKeyArray: keys2,
|
|
21472
|
+
dataKeyArray: (_b = (_a = barValue.main) == null ? void 0 : _a.legendLabels) != null ? _b : keys2,
|
|
21467
21473
|
colorRange: barValue.style.barStyle.colorRange,
|
|
21468
21474
|
value: barValue,
|
|
21469
21475
|
theme: theme.myTheme
|
|
@@ -21495,9 +21501,9 @@ var DrawHorizontalBarGraph = ({
|
|
|
21495
21501
|
style: {
|
|
21496
21502
|
display: hoveredBar.date ? "block" : "none"
|
|
21497
21503
|
},
|
|
21498
|
-
y: barValue.main.type === "HorizontalStackBarGraph" ? ((
|
|
21504
|
+
y: barValue.main.type === "HorizontalStackBarGraph" ? ((_c = hoveredBar.date) == null ? void 0 : _c.bars[hoveredBar.city].y) - (Math.min((_d = hoveredBar.date) == null ? void 0 : _d.bars[0].height, 15) - ((_e = hoveredBar.date) == null ? void 0 : _e.bars[0].height)) / 2 : ((_f = hoveredBar.date) == null ? void 0 : _f.y0) - (Math.min((_g = hoveredBar.date) == null ? void 0 : _g.bars[0].height, 15) - ((_h = hoveredBar.date) == null ? void 0 : _h.bars[0].height)) * ((_i = hoveredBar.date) == null ? void 0 : _i.bars.length) / 2 || 0,
|
|
21499
21505
|
width: xMax,
|
|
21500
|
-
height: barValue.main.type !== "HorizontalStackBarGraph" ? calcWidthofBar(hoveredBar.date) : Math.min((
|
|
21506
|
+
height: barValue.main.type !== "HorizontalStackBarGraph" ? calcWidthofBar(hoveredBar.date) : Math.min((_j = hoveredBar.date) == null ? void 0 : _j.bars[0].height, 15),
|
|
21501
21507
|
fill: theme.myTheme.palette.secondary.main,
|
|
21502
21508
|
opacity: 1
|
|
21503
21509
|
}), barValue.main.type === "HorizontalStackBarGraph" ? /* @__PURE__ */ jsx$1(BarStackHorizontal, {
|