impaktapps-design 0.2.92 → 0.2.94-alpha.1

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,25 @@ function Legend({
10873
10873
  colorRange,
10874
10874
  dataKeyArray
10875
10875
  }) {
10876
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
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
10878
  const ordinalColorScale = createOrdinalScale$1({
10879
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.barStyle) == null ? void 0 : _e.colorRange) || ((_g = (_f = value == null ? void 0 : value.style) == null ? void 0 : _f.pieStyle) == null ? void 0 : _g.colorRange) || ((_i = (_h = value == null ? void 0 : value.style) == null ? void 0 : _h.lineStyle) == null ? void 0 : _i.colorRange)
10880
+ range: colorRange || ((_e = (_d = value == null ? void 0 : value.style) == null ? void 0 : _d.pieStyle) == null ? void 0 : _e.colorRange)
10881
10881
  });
10882
10882
  return /* @__PURE__ */ jsxs("div", {
10883
10883
  className: "legend",
10884
10884
  style: {
10885
10885
  paddingLeft: "40px",
10886
10886
  paddingRight: "40px",
10887
- ...(_k = (_j = value == null ? void 0 : value.style) == null ? void 0 : _j.legendStyle) == null ? void 0 : _k.legend
10887
+ ...(_g = (_f = value == null ? void 0 : value.style) == null ? void 0 : _f.legendStyle) == null ? void 0 : _g.legend
10888
10888
  },
10889
10889
  children: [/* @__PURE__ */ jsx("div", {
10890
10890
  className: "title",
10891
- style: (_m = (_l = value == null ? void 0 : value.style) == null ? void 0 : _l.legendStyle) == null ? void 0 : _m.legendTitle,
10892
- children: (_o = (_n = value == null ? void 0 : value.main) == null ? void 0 : _n.legend) == null ? void 0 : _o.legendTitle
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
10893
10893
  }), /* @__PURE__ */ jsx(Ordinal, {
10894
10894
  scale: ordinalColorScale,
10895
- labelFormat: (label) => `${label.toUpperCase()}`,
10896
10895
  children: (labels) => {
10897
10896
  var _a2, _b2;
10898
10897
  return /* @__PURE__ */ jsx("div", {
@@ -10976,7 +10975,7 @@ function DrawBarGraph({
10976
10975
  range: [((_e = (_d = (_c = value.style) == null ? void 0 : _c.barStyle) == null ? void 0 : _d.color) == null ? void 0 : _e.firstBarColor) || "#aeeef8", ((_h = (_g = (_f = value.style) == null ? void 0 : _f.barStyle) == null ? void 0 : _g.color) == null ? void 0 : _h.secondBarColor) || "#e5fd3d", ((_k = (_j = (_i = value.style) == null ? void 0 : _i.barStyle) == null ? void 0 : _j.color) == null ? void 0 : _k.thirdBarColor) || "#9caff6"]
10977
10976
  });
10978
10977
  const xMax = width2 - margin2.left - margin2.right;
10979
- const yMax = height2 - margin2.top - margin2.bottom - 0;
10978
+ const yMax = height2 - margin2.top - 100;
10980
10979
  dateScale.rangeRound([0, xMax]);
10981
10980
  cityScale.rangeRound([0, dateScale.bandwidth()]);
10982
10981
  tempScale.range([yMax, 0]);
@@ -11384,32 +11383,15 @@ ParentSize$1.propTypes = {
11384
11383
  children: PropTypes.func.isRequired
11385
11384
  };
11386
11385
  const Product1 = [
11387
- {
11388
- "key": "key1",
11389
- "value": [
11390
- { "x": "01:00", "y": 123 },
11391
- { "x": "02:00", "y": 118 },
11392
- { "x": "03:00", "y": 141 },
11393
- { "x": "04:00", "y": 114 },
11394
- { "x": "05:00", "y": 108 },
11395
- { "x": "06:00", "y": 123 },
11396
- { "x": "07:00", "y": 128 },
11397
- { "x": "08:00", "y": 134 },
11398
- { "x": "09:00", "y": 131 },
11399
- { "x": "10:00", "y": 134 },
11400
- { "x": "11:00", "y": 118 },
11401
- { "x": "11:00", "y": 10 },
11402
- { "x": "12:00", "y": 130 },
11403
- { "x": "13:00", "y": 133 },
11404
- { "x": "14:00", "y": 132 },
11405
- { "x": "15:00", "y": 1 },
11406
- { "x": "15:00", "y": 137 },
11407
- { "x": "16:00", "y": 120 }
11408
- ]
11409
- }
11386
+ { x: "a", y: 100 },
11387
+ { x: "b", y: 50 },
11388
+ { x: "c", y: 100 },
11389
+ { x: "d", y: 80 },
11390
+ { x: "f", y: 100 },
11391
+ { x: "g", y: 50 }
11410
11392
  ];
11411
11393
  const finalDataProvider = (type2, value, theme) => {
11412
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t5, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J;
11394
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t5, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F;
11413
11395
  switch (type2) {
11414
11396
  case "BarGraph":
11415
11397
  case "StackBarGraph":
@@ -11485,7 +11467,7 @@ const finalDataProvider = (type2, value, theme) => {
11485
11467
  case "PieGraph":
11486
11468
  return {
11487
11469
  main: {
11488
- data: ((_h = value == null ? void 0 : value.main) == null ? void 0 : _h.data) && ((_i = value.main.data) == null ? void 0 : _i.length) > 0 ? (_j = value == null ? void 0 : value.main) == null ? void 0 : _j.data : [{ label: "Kotak", value: 500 }, { label: "SBI", value: 700 }, { label: "HDFC", value: 900 }],
11470
+ data: ((_h = value == null ? void 0 : value.main) == null ? void 0 : _h.data) || [{ branch: "Kotak", value: 500 }, { branch: "SBI", value: 700 }, { branch: "HDFC", value: 900 }],
11489
11471
  header: "Pie Graph",
11490
11472
  bottomLabel: "Name of Employe",
11491
11473
  leftLabel: "Value",
@@ -11499,7 +11481,7 @@ const finalDataProvider = (type2, value, theme) => {
11499
11481
  legendTitle: "Our Assests",
11500
11482
  direction: "row",
11501
11483
  align: "right",
11502
- ...(_k = value == null ? void 0 : value.main) == null ? void 0 : _k.legend
11484
+ ...(_i = value == null ? void 0 : value.main) == null ? void 0 : _i.legend
11503
11485
  }
11504
11486
  },
11505
11487
  style: {
@@ -11509,7 +11491,7 @@ const finalDataProvider = (type2, value, theme) => {
11509
11491
  height: "310",
11510
11492
  borderRadius: "20px",
11511
11493
  padding: "10px 0 2px 0",
11512
- ...(_l = value == null ? void 0 : value.style) == null ? void 0 : _l.containerStyle
11494
+ ...(_j = value == null ? void 0 : value.style) == null ? void 0 : _j.containerStyle
11513
11495
  },
11514
11496
  headerStyle: {
11515
11497
  fontWeight: 500,
@@ -11520,17 +11502,17 @@ const finalDataProvider = (type2, value, theme) => {
11520
11502
  width: "100%",
11521
11503
  fontSize: "18px",
11522
11504
  color: theme.palette.text.primary,
11523
- ...(_m = value == null ? void 0 : value.style) == null ? void 0 : _m.headerStyle
11505
+ ...(_k = value == null ? void 0 : value.style) == null ? void 0 : _k.headerStyle
11524
11506
  },
11525
11507
  tooltipStyle: {
11526
- ...(_n = value == null ? void 0 : value.style) == null ? void 0 : _n.tooltipStyle
11508
+ ...(_l = value == null ? void 0 : value.style) == null ? void 0 : _l.tooltipStyle
11527
11509
  },
11528
11510
  labelStyle: {
11529
11511
  labelColor: theme.palette.text.primary,
11530
11512
  labelOffset: 45,
11531
11513
  leftLabelMargin: "70",
11532
11514
  topLabelMargin: "-40",
11533
- ...(_o = value == null ? void 0 : value.style) == null ? void 0 : _o.labelStyle
11515
+ ...(_m = value == null ? void 0 : value.style) == null ? void 0 : _m.labelStyle
11534
11516
  },
11535
11517
  legendStyle: {
11536
11518
  legend: {
@@ -11543,34 +11525,33 @@ const finalDataProvider = (type2, value, theme) => {
11543
11525
  border: "1px solid rgba(255, 255, 255, 0.3)",
11544
11526
  borderRadius: " 8px",
11545
11527
  margin: "5px 5px",
11546
- ...(_q = (_p = value == null ? void 0 : value.style) == null ? void 0 : _p.legendStyle) == null ? void 0 : _q.legend
11528
+ ...(_o = (_n = value == null ? void 0 : value.style) == null ? void 0 : _n.legendStyle) == null ? void 0 : _o.legend
11547
11529
  },
11548
11530
  legendTitle: {
11549
11531
  fontWeight: 500,
11550
11532
  marginBottom: "5px",
11551
11533
  fontFamily: "roboto",
11552
11534
  fontSize: "10px",
11553
- ...(_s = (_r = value == null ? void 0 : value.style) == null ? void 0 : _r.legendStyle) == null ? void 0 : _s.legendTitle
11535
+ ...(_q = (_p = value == null ? void 0 : value.style) == null ? void 0 : _p.legendStyle) == null ? void 0 : _q.legendTitle
11554
11536
  }
11555
11537
  },
11556
11538
  pieStyle: {
11557
- colorRange: theme.chartColours.pieChartColours || ["#3f51b5", "rgba(200,0,31,0.9)", "rgba(25,200,205,0.6)"],
11539
+ colorRange: ["#3f51b5", "rgba(200,0,31,0.9)", "rgba(25,200,205,0.6)"],
11558
11540
  outerRadius: 120,
11559
11541
  innerRadius: 60,
11560
11542
  cornerRadius: 2,
11561
11543
  padAngle: 6e-3,
11562
- ...(_t5 = value == null ? void 0 : value.style) == null ? void 0 : _t5.pieStyle
11544
+ ...(_r = value == null ? void 0 : value.style) == null ? void 0 : _r.pieStyle
11563
11545
  }
11564
11546
  }
11565
11547
  };
11566
11548
  case "LineGraph":
11567
11549
  return {
11568
11550
  main: {
11569
- data: ((_v = (_u = value == null ? void 0 : value.main) == null ? void 0 : _u.data) == null ? void 0 : _v.length) > 0 ? (_w = value == null ? void 0 : value.main) == null ? void 0 : _w.data : Product1,
11551
+ data: ((_s = value == null ? void 0 : value.main) == null ? void 0 : _s.data) || [Product1],
11570
11552
  header: "Line Graph Dynamic",
11571
11553
  bottomLabel: "Name of Employe",
11572
11554
  leftLabel: "Value",
11573
- legendAvailable: true,
11574
11555
  gridHidden: true,
11575
11556
  numHidden: false,
11576
11557
  tooltipDataKey: ["MAMA New Project", "Second", "Third"],
@@ -11581,10 +11562,11 @@ const finalDataProvider = (type2, value, theme) => {
11581
11562
  ...value == null ? void 0 : value.main,
11582
11563
  legend: {
11583
11564
  labelColor: theme.palette.text.primary,
11565
+ legendTitle: "Our Assests",
11584
11566
  direction: "row",
11585
11567
  align: "right",
11586
11568
  colorRectWidth: 20,
11587
- ...(_x = value == null ? void 0 : value.main) == null ? void 0 : _x.legend
11569
+ ...(_t5 = value == null ? void 0 : value.main) == null ? void 0 : _t5.legend
11588
11570
  }
11589
11571
  },
11590
11572
  style: {
@@ -11594,7 +11576,7 @@ const finalDataProvider = (type2, value, theme) => {
11594
11576
  height: "300",
11595
11577
  borderRadius: "20px",
11596
11578
  padding: "10px 0 2px 0",
11597
- ...(_y = value == null ? void 0 : value.style) == null ? void 0 : _y.containerStyle
11579
+ ...(_u = value == null ? void 0 : value.style) == null ? void 0 : _u.containerStyle
11598
11580
  },
11599
11581
  headerStyle: {
11600
11582
  fontWeight: 500,
@@ -11605,35 +11587,35 @@ const finalDataProvider = (type2, value, theme) => {
11605
11587
  width: "100%",
11606
11588
  fontSize: "18px",
11607
11589
  color: theme.palette.text.primary,
11608
- ...(_z = value == null ? void 0 : value.style) == null ? void 0 : _z.headerStyle
11590
+ ...(_v = value == null ? void 0 : value.style) == null ? void 0 : _v.headerStyle
11609
11591
  },
11610
11592
  labelStyle: {
11611
11593
  labelColor: theme.palette.text.primary,
11612
11594
  bottomLabelOffset: 20,
11613
11595
  leftLabelOffset: 50,
11614
11596
  leftLabelMargin: 80,
11615
- ...(_A = value == null ? void 0 : value.style) == null ? void 0 : _A.labelStyle
11597
+ ...(_w = value == null ? void 0 : value.style) == null ? void 0 : _w.labelStyle
11616
11598
  },
11617
11599
  lineStyle: {
11618
- colorRange: theme.chartColours.lineChartColours || ["#3f51b5", "rgba(200,0,31,0.9)", "rgba(25,200,205,0.6)"],
11600
+ colorRange: ["#3f51b5", "rgba(200,0,31,0.9)", "rgba(25,200,205,0.6)"],
11619
11601
  lineAreaColor: "none",
11620
11602
  lineAreaOpacity: 0.2,
11621
- ...(_B = value == null ? void 0 : value.style) == null ? void 0 : _B.lineStyle
11603
+ ...(_x = value == null ? void 0 : value.style) == null ? void 0 : _x.lineStyle
11622
11604
  }
11623
11605
  }
11624
11606
  };
11625
11607
  case "HorizontalBarGraph":
11626
11608
  return {
11627
11609
  main: {
11628
- data: ((_C = value == null ? void 0 : value.main) == null ? void 0 : _C.data) || [{ y: "Anant Sharma", x: 60 }, { y: "Pankaj Chauhan", x: 60 }, { y: "satendra Raghav", x: 150 }, { y: "Vivek Pahadi", x: 80 }, { y: "Siddarth verma", x: 100 }],
11610
+ data: ((_y = value == null ? void 0 : value.main) == null ? void 0 : _y.data) || [{ y: "Anant Sharma", x: 60 }, { y: "Pankaj Chauhan", x: 60 }, { y: "satendra Raghav", x: 150 }, { y: "Vivek Pahadi", x: 80 }, { y: "Siddarth verma", x: 100 }],
11629
11611
  header: " ",
11630
11612
  bottomLabel: "Name of Employe",
11631
11613
  leftLabel: "Value",
11632
11614
  axisLeft: true,
11633
11615
  axisBottom: true,
11634
11616
  hideBottomTicks: false,
11635
- hideLeftTicks: ((_D = value == null ? void 0 : value.main) == null ? void 0 : _D.data) ? true : false,
11636
- hideLeftAxisLine: ((_E = value == null ? void 0 : value.main) == null ? void 0 : _E.data) ? true : false,
11617
+ hideLeftTicks: ((_z = value == null ? void 0 : value.main) == null ? void 0 : _z.data) ? true : false,
11618
+ hideLeftAxisLine: ((_A = value == null ? void 0 : value.main) == null ? void 0 : _A.data) ? true : false,
11637
11619
  hideBottomAxisLine: false,
11638
11620
  bottomAxisWidth: "10px",
11639
11621
  ...value.main
@@ -11645,7 +11627,7 @@ const finalDataProvider = (type2, value, theme) => {
11645
11627
  height: "300",
11646
11628
  borderRadius: "20px",
11647
11629
  padding: "10px 0 2px 0",
11648
- ...(_F = value == null ? void 0 : value.style) == null ? void 0 : _F.containerStyle
11630
+ ...(_B = value == null ? void 0 : value.style) == null ? void 0 : _B.containerStyle
11649
11631
  },
11650
11632
  headerStyle: {
11651
11633
  fontWeight: 500,
@@ -11656,12 +11638,12 @@ const finalDataProvider = (type2, value, theme) => {
11656
11638
  width: "100%",
11657
11639
  fontSize: "18px",
11658
11640
  color: theme.palette.text.primary,
11659
- ...(_G = value == null ? void 0 : value.style) == null ? void 0 : _G.headerStyle
11641
+ ...(_C = value == null ? void 0 : value.style) == null ? void 0 : _C.headerStyle
11660
11642
  },
11661
11643
  tooltipStyle: {
11662
11644
  padding: "6px",
11663
11645
  borderRadius: "2px",
11664
- ...(_H = value == null ? void 0 : value.style) == null ? void 0 : _H.tooltipStyle
11646
+ ...(_D = value == null ? void 0 : value.style) == null ? void 0 : _D.tooltipStyle
11665
11647
  },
11666
11648
  labelStyle: {
11667
11649
  margin: { top: 10, left: 110, right: 40, bottom: 40 },
@@ -11672,11 +11654,11 @@ const finalDataProvider = (type2, value, theme) => {
11672
11654
  tickColor: theme.palette.text.primary,
11673
11655
  rightAxisWidth: "0.3px",
11674
11656
  fontSize: "10px",
11675
- ...(_I = value == null ? void 0 : value.style) == null ? void 0 : _I.labelStyle
11657
+ ...(_E = value == null ? void 0 : value.style) == null ? void 0 : _E.labelStyle
11676
11658
  },
11677
11659
  barStyle: {
11678
11660
  color: "#6c5efb",
11679
- ...(_J = value == null ? void 0 : value.style) == null ? void 0 : _J.barStyle
11661
+ ...(_F = value == null ? void 0 : value.style) == null ? void 0 : _F.barStyle
11680
11662
  }
11681
11663
  }
11682
11664
  };
@@ -11720,21 +11702,14 @@ const DrawPieGraph = ({
11720
11702
  parentWidth,
11721
11703
  parentHeight
11722
11704
  }) => {
11723
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
11705
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
11724
11706
  const letters = (_a = value == null ? void 0 : value.main) == null ? void 0 : _a.data;
11725
- const keys2 = Object.keys(letters[0]);
11726
- const arr = ((_b = value == null ? void 0 : value.main) == null ? void 0 : _b.xAxisValue) && ((_c = value == null ? void 0 : value.main) == null ? void 0 : _c.yAxisValue) ? [(_d = value == null ? void 0 : value.main) == null ? void 0 : _d.xAxisValue, (_e = value == null ? void 0 : value.main) == null ? void 0 : _e.yAxisValue] : keys2;
11727
- const labelKeyIndex = keys2.indexOf("label");
11728
- const valueKeyIndex = labelKeyIndex === 0 ? 1 : 0;
11729
- const frequency = (d2) => d2[arr[valueKeyIndex]];
11730
- const getLetterFrequencyColor = (letter, index2) => {
11731
- var _a2, _b2;
11732
- return createOrdinalScale$1({
11733
- domain: letters.map((l2) => l2[arr[index2]]),
11734
- range: (_b2 = (_a2 = value == null ? void 0 : value.style) == null ? void 0 : _a2.pieStyle) == null ? void 0 : _b2.colorRange
11735
- })(letter);
11736
- };
11737
- const dataKeyArray = letters.map((data) => data.label);
11707
+ const arr = ((_b = value == null ? void 0 : value.main) == null ? void 0 : _b.xAxisValue) && ((_c = value == null ? void 0 : value.main) == null ? void 0 : _c.yAxisValue) ? [(_d = value == null ? void 0 : value.main) == null ? void 0 : _d.xAxisValue, (_e = value == null ? void 0 : value.main) == null ? void 0 : _e.yAxisValue] : Object.keys(letters[0]);
11708
+ const frequency = (d2) => d2[arr[1]];
11709
+ const getLetterFrequencyColor = createOrdinalScale$1({
11710
+ domain: letters.map((l2) => l2[arr[0]]),
11711
+ range: (_g = (_f = value == null ? void 0 : value.style) == null ? void 0 : _f.pieStyle) == null ? void 0 : _g.colorRange
11712
+ });
11738
11713
  const {
11739
11714
  tooltipData,
11740
11715
  tooltipLeft,
@@ -11758,9 +11733,8 @@ const DrawPieGraph = ({
11758
11733
  const top2 = centerY + 20;
11759
11734
  const pieSortValues = (a2, b10) => a2 - b10;
11760
11735
  return /* @__PURE__ */ jsxs(Fragment, {
11761
- children: [((_f = value == null ? void 0 : value.main) == null ? void 0 : _f.legendAvailable) && /* @__PURE__ */ jsx(Legend, {
11762
- value,
11763
- dataKeyArray
11736
+ children: [((_h = value == null ? void 0 : value.main) == null ? void 0 : _h.legendAvailable) && /* @__PURE__ */ jsx(Legend, {
11737
+ value
11764
11738
  }), /* @__PURE__ */ jsx("svg", {
11765
11739
  width: parentWidth,
11766
11740
  height: parentHeight,
@@ -11772,18 +11746,17 @@ const DrawPieGraph = ({
11772
11746
  data: letters,
11773
11747
  pieSortValues,
11774
11748
  pieValue: frequency,
11775
- outerRadius: (_h = (_g = value == null ? void 0 : value.style) == null ? void 0 : _g.pieStyle) == null ? void 0 : _h.outerRadius,
11776
- innerRadius: (_j = (_i = value == null ? void 0 : value.style) == null ? void 0 : _i.pieStyle) == null ? void 0 : _j.innerRadius,
11777
- cornerRadius: (_l = (_k = value == null ? void 0 : value.style) == null ? void 0 : _k.pieStyle) == null ? void 0 : _l.cornerRadius,
11778
- padAngle: (_n = (_m = value == null ? void 0 : value.style) == null ? void 0 : _m.pieStyle) == null ? void 0 : _n.padAngle,
11749
+ outerRadius: (_j = (_i = value == null ? void 0 : value.style) == null ? void 0 : _i.pieStyle) == null ? void 0 : _j.outerRadius,
11750
+ innerRadius: (_l = (_k = value == null ? void 0 : value.style) == null ? void 0 : _k.pieStyle) == null ? void 0 : _l.innerRadius,
11751
+ cornerRadius: (_n = (_m = value == null ? void 0 : value.style) == null ? void 0 : _m.pieStyle) == null ? void 0 : _n.cornerRadius,
11752
+ padAngle: (_p = (_o = value == null ? void 0 : value.style) == null ? void 0 : _o.pieStyle) == null ? void 0 : _p.padAngle,
11779
11753
  children: (pie2) => {
11780
11754
  return pie2.arcs.map((arc2, index2) => {
11781
11755
  var _a2, _b2, _c2, _d2;
11782
- const indexParam = ((_b2 = (_a2 = value == null ? void 0 : value.style) == null ? void 0 : _a2.pieStyle) == null ? void 0 : _b2.showPieLabel) ? labelKeyIndex : valueKeyIndex;
11783
- const letter = arc2.data[arr[indexParam]];
11756
+ const letter = ((_b2 = (_a2 = value == null ? void 0 : value.style) == null ? void 0 : _a2.pieStyle) == null ? void 0 : _b2.showPieLabel) ? arc2.data[arr[0]] : arc2.data[arr[1]];
11784
11757
  const [centriodX, centriodY] = pie2.path.centroid(arc2);
11785
11758
  const arcPath = pie2.path(arc2);
11786
- const arcFill = getLetterFrequencyColor(letter, indexParam);
11759
+ const arcFill = getLetterFrequencyColor(letter);
11787
11760
  return /* @__PURE__ */ jsxs("g", {
11788
11761
  onMouseOut: hideTooltip,
11789
11762
  onMouseOver: (e3) => handleMouse(e3, arc2.data),
@@ -19802,16 +19775,14 @@ const DrawGraph = ({
19802
19775
  }) => {
19803
19776
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
19804
19777
  const data = (_a = value == null ? void 0 : value.main) == null ? void 0 : _a.data;
19805
- const arr = value.main.xAxisValue && value.main.yAxisValue ? [value.main.xAxisValue, value.main.yAxisValue] : Object.keys(data[0].value[0]);
19778
+ const arr = value.main.xAxisValue && value.main.yAxisValue ? [value.main.xAxisValue, value.main.yAxisValue] : Object.keys(data[0][0]);
19806
19779
  const accessors = {
19807
19780
  xAccessor: (d2) => d2[arr[0]],
19808
19781
  yAccessor: (d2) => d2[arr[1]]
19809
19782
  };
19810
- const dataKeyArray = data.map((ele) => ele.key);
19811
19783
  return /* @__PURE__ */ jsxs(Fragment, {
19812
19784
  children: [value.main.legendAvailable && /* @__PURE__ */ jsx(Legend, {
19813
- value,
19814
- dataKeyArray
19785
+ value
19815
19786
  }), /* @__PURE__ */ jsxs(XYChart, {
19816
19787
  height: parseInt((_c = (_b = value.style) == null ? void 0 : _b.containerStyle) == null ? void 0 : _c.height),
19817
19788
  xScale: {
@@ -19853,12 +19824,12 @@ const DrawGraph = ({
19853
19824
  labelOffset: ((_q = (_p = value.style) == null ? void 0 : _p.labelStyle) == null ? void 0 : _q.bottomLabelOffset) || 32
19854
19825
  }), /* @__PURE__ */ jsx(AnimatedGrid, {
19855
19826
  columns: value.main.grid,
19856
- numTicks: value.main.numHidden ? 0 : ((_r = value.main) == null ? void 0 : _r.data[0].value.length) - 1
19827
+ numTicks: value.main.numHidden ? 0 : ((_r = value.main) == null ? void 0 : _r.data[0].length) - 1
19857
19828
  }), (_s = value.main) == null ? void 0 : _s.data.map((elem, i) => {
19858
19829
  var _a2, _b2, _c2, _d2, _e2, _f2;
19859
19830
  return /* @__PURE__ */ jsx(AnimatedLineSeries, {
19860
- dataKey: elem.key,
19861
- data: elem.value,
19831
+ dataKey: value.main.tooltipDataKey[i],
19832
+ data: elem,
19862
19833
  fill: (_b2 = (_a2 = value.style) == null ? void 0 : _a2.lineStyle) == null ? void 0 : _b2.lineAreaColor,
19863
19834
  fillOpacity: (_d2 = (_c2 = value.style) == null ? void 0 : _c2.lineStyle) == null ? void 0 : _d2.lineAreaOpacity,
19864
19835
  floodColor: "green",
@@ -19919,7 +19890,7 @@ var DrawHorizontalBarGraph = withTooltip(({
19919
19890
  barValue
19920
19891
  }) => {
19921
19892
  var _a, _b, _c;
19922
- const xMax = width2 - margin2.left - margin2.right;
19893
+ const xMax = width2 - margin2.left - margin2.right + 100;
19923
19894
  const yMax = height2 - margin2.top - margin2.bottom;
19924
19895
  const tooltipStyles2 = {
19925
19896
  ...defaultStyles,
@@ -20069,7 +20040,7 @@ const ProgressBar = ({
20069
20040
  value,
20070
20041
  theme
20071
20042
  }) => {
20072
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t5, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S;
20043
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t5, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R;
20073
20044
  const [progress2, setProgress] = useState(((_b = (_a = value == null ? void 0 : value.main) == null ? void 0 : _a.data) == null ? void 0 : _b.achieved) / ((_d = (_c = value == null ? void 0 : value.main) == null ? void 0 : _c.data) == null ? void 0 : _d.total) * 100);
20074
20045
  useEffect(() => {
20075
20046
  var _a2, _b2, _c2, _d2;
@@ -20097,7 +20068,7 @@ const ProgressBar = ({
20097
20068
  children: /* @__PURE__ */ jsx("div", {
20098
20069
  className: "progress-bar-fill",
20099
20070
  style: {
20100
- width: `${progress2}%`,
20071
+ width: progress2 > 100 ? "100%" : `${progress2}%`,
20101
20072
  backgroundColor: ((_g = value == null ? void 0 : value.style) == null ? void 0 : _g.progressBarFillColor) || getColor()[1],
20102
20073
  height: "100%",
20103
20074
  borderRadius: "10px",
@@ -20163,7 +20134,7 @@ const ProgressBar = ({
20163
20134
  children: /* @__PURE__ */ jsx("div", {
20164
20135
  className: "progress-bar-fill",
20165
20136
  style: {
20166
- width: `${progress2}%`,
20137
+ width: progress2 > 100 ? "100%" : `${progress2}%`,
20167
20138
  backgroundColor: getColor()[1],
20168
20139
  height: "100%",
20169
20140
  borderRadius: "10px",
@@ -20238,7 +20209,7 @@ const ProgressBar = ({
20238
20209
  color: ((_L = (_K = theme == null ? void 0 : theme.palette) == null ? void 0 : _K.text) == null ? void 0 : _L.primary) || "#121926",
20239
20210
  fontWeight: 500
20240
20211
  },
20241
- children: ((_M = value == null ? void 0 : value.main) == null ? void 0 : _M.daysCount) ? Math.round(((_O = (_N = value == null ? void 0 : value.main) == null ? void 0 : _N.data) == null ? void 0 : _O.achieved) / ((_P = value == null ? void 0 : value.main) == null ? void 0 : _P.daysCount)) + ((_Q = value == null ? void 0 : value.main) == null ? void 0 : _Q.bottomLabel_3_averageLabel) || "/day" : (_S = (_R = value == null ? void 0 : value.main) == null ? void 0 : _R.data) == null ? void 0 : _S.bottomLabel_3_value
20212
+ children: Math.max(0, ((_N = (_M = value == null ? void 0 : value.main) == null ? void 0 : _M.data) == null ? void 0 : _N.remaining) || ((_P = (_O = value == null ? void 0 : value.main) == null ? void 0 : _O.data) == null ? void 0 : _P.total) - ((_R = (_Q = value == null ? void 0 : value.main) == null ? void 0 : _Q.data) == null ? void 0 : _R.achieved))
20242
20213
  })]
20243
20214
  })]
20244
20215
  })]
@@ -44002,4 +43973,3 @@ const CustomTimer = ({
44002
43973
  });
44003
43974
  };
44004
43975
  export { BarGraph, ImpaktAppsCard as Card, HorizontalBarGraph, LineGraph, PieGraph, ProgressBar, SpeedoMeter, CustomTimer as Timer };
44005
- //# sourceMappingURL=impaktapps-design.es.js.map