impaktapps-design 0.2.993-alpha.249 → 0.2.993-alpha.250

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.
@@ -19157,7 +19157,7 @@ const finalDataProvider = (type2, value, theme) => {
19157
19157
  legendAvailable: true,
19158
19158
  xAxisValue: "label",
19159
19159
  ...value.main,
19160
- data: ((_a = value.main.data) == null ? void 0 : _a.length) ? value.main.data : [{}],
19160
+ data: ((_a = value.main.data) == null ? void 0 : _a.length) ? value.main.data : [],
19161
19161
  legend: {
19162
19162
  direction: "row",
19163
19163
  ...value.main.legend
@@ -22190,7 +22190,7 @@ const DrawAreaGraph = ({
22190
22190
  const colorMap = (_i = (_h = areaValue.style) == null ? void 0 : _h.areaStyle) == null ? void 0 : _i.colorMap;
22191
22191
  const defaultColour = (_k = (_j = theme.myTheme.palette) == null ? void 0 : _j.primary) == null ? void 0 : _k.main;
22192
22192
  const isSmallScreen = width2 < 600;
22193
- const longestLabelLength = useMemo(() => Math.max(...chartData.map((d2) => String(d2[xAxisValue]).length)), [chartData, xAxisValue]);
22193
+ const longestLabelLength = useMemo(() => chartData.length ? Math.max(...chartData.map((d2) => String(d2[xAxisValue]).length)) : 0, [chartData, xAxisValue]);
22194
22194
  const dynamicBottomMargin = Math.ceil(longestLabelLength * PX_PER_CHAR$1 * LABEL_ROTATION$1);
22195
22195
  const margin2 = {
22196
22196
  ...marginProp,
@@ -22544,7 +22544,7 @@ const DrawStackBarLineGraph = ({
22544
22544
  const tooltipUnit = (_m = stackBarLineValue == null ? void 0 : stackBarLineValue.main) == null ? void 0 : _m.tooltipUnit;
22545
22545
  const trendColor = (_n = colorMap == null ? void 0 : colorMap[growthRateKey]) != null ? _n : "#E24B4A";
22546
22546
  const isSmallScreen = width2 < 600;
22547
- const longestLabelLength = useMemo(() => Math.max(...chartData.map((d2) => String(d2[xAxisValue]).length)), [chartData, xAxisValue]);
22547
+ const longestLabelLength = useMemo(() => chartData.length ? Math.max(...chartData.map((d2) => String(d2[xAxisValue]).length)) : 0, [chartData, xAxisValue]);
22548
22548
  const dynamicBottomMargin = Math.ceil(longestLabelLength * PX_PER_CHAR * LABEL_ROTATION);
22549
22549
  const margin2 = {
22550
22550
  ...marginProp,