impaktapps-design 0.2.993-alpha.253 → 0.2.993-alpha.255

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.
@@ -18661,7 +18661,7 @@ function DrawBarGraph({
18661
18661
  value
18662
18662
  }) {
18663
18663
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
18664
- const graphData = ((_b = (_a = value.main) == null ? void 0 : _a.data) == null ? void 0 : _b.length) ? value.main.data : [];
18664
+ const graphData = ((_b = (_a = value.main) == null ? void 0 : _a.data) == null ? void 0 : _b.length) ? value.main.data : [{}];
18665
18665
  const disableLeftLabel = (_c = value.main) == null ? void 0 : _c.disableLeftLabel;
18666
18666
  const xAxisValue = ((_d = value.main) == null ? void 0 : _d.xAxisValue) || "label";
18667
18667
  const labelsArray = Object.keys(graphData[0]).filter((d2) => d2 !== xAxisValue);
@@ -19194,7 +19194,7 @@ const DrawPieGraph = ({
19194
19194
  parentWidth,
19195
19195
  parentHeight
19196
19196
  }) => {
19197
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
19197
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
19198
19198
  const {
19199
19199
  TooltipInPortal
19200
19200
  } = useTooltipInPortal({
@@ -19216,8 +19216,8 @@ const DrawPieGraph = ({
19216
19216
  const colorMap = (_f = value.style) == null ? void 0 : _f.colorMap;
19217
19217
  const defaultColour = (_h = (_g = theme.myTheme.palette) == null ? void 0 : _g.primary) == null ? void 0 : _h.main;
19218
19218
  const legendLabels = (_i = value.main) == null ? void 0 : _i.legendLabels;
19219
- const outerRadius = (_k = (_j = value.main) == null ? void 0 : _j.outerRadius) != null ? _k : 117;
19220
- const innerRadius = (_m = (_l = value.main) == null ? void 0 : _l.innerRadius) != null ? _m : 63;
19219
+ const outerRadius = 117;
19220
+ const innerRadius = 63;
19221
19221
  const getPieColor = createOrdinalScale$1({
19222
19222
  domain: pieData.map((l2) => l2[keyLabel]),
19223
19223
  range: dataKeyArray.map((key) => {
@@ -22778,10 +22778,10 @@ var DrawHorizontalBarGraph = ({
22778
22778
  }) => {
22779
22779
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
22780
22780
  const [hoveredBar, setHoveredBar] = useState({});
22781
- const graphData = ((_b = (_a = barValue.main) == null ? void 0 : _a.data) == null ? void 0 : _b.length) ? barValue.main.data : [];
22781
+ const graphData = ((_b = (_a = barValue.main) == null ? void 0 : _a.data) == null ? void 0 : _b.length) ? barValue.main.data : [{}];
22782
22782
  const disableLeftLabel = (_c = barValue.main) == null ? void 0 : _c.disableLeftLabel;
22783
22783
  const xAxisValue = ((_d = barValue.main) == null ? void 0 : _d.xAxisValue) || "label";
22784
- const labelsArray = Object.keys(graphData[0]).filter((d2) => d2 !== xAxisValue);
22784
+ const labelsArray = graphData.length ? Object.keys(graphData[0]).filter((d2) => d2 !== xAxisValue) : [];
22785
22785
  const legendAvailable = (_f = (_e = barValue == null ? void 0 : barValue.main) == null ? void 0 : _e.legendAvailable) != null ? _f : true;
22786
22786
  const colorMap = (_g = barValue.style) == null ? void 0 : _g.colorMap;
22787
22787
  const legendLabels = (_h = barValue.main) == null ? void 0 : _h.legendLabels;