pace-table-lib 1.0.19 → 1.0.21

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.
@@ -17090,7 +17090,7 @@
17090
17090
  switch (slPropData.slType) {
17091
17091
  case SL_TYPE.LINE:
17092
17092
  {
17093
- $(sparkRef.current).sparkline(slPropData.dataArr, {
17093
+ $(sparkRef.current).sparkline([...slPropData.dataArr], {
17094
17094
  type: "line",
17095
17095
  width: `${width}px`,
17096
17096
  height: `${height}px`,
@@ -17107,7 +17107,7 @@
17107
17107
  break;
17108
17108
  case SL_TYPE.BAR:
17109
17109
  {
17110
- $(sparkRef.current).sparkline(slPropData.dataArr, {
17110
+ $(sparkRef.current).sparkline([...slPropData.dataArr], {
17111
17111
  type: "bar",
17112
17112
  width: `${width}px`,
17113
17113
  height: `${height}px`,
@@ -17122,7 +17122,7 @@
17122
17122
  break;
17123
17123
  case SL_TYPE.BOX:
17124
17124
  {
17125
- $(sparkRef.current).sparkline(slPropData.dataArr, {
17125
+ $(sparkRef.current).sparkline([...slPropData.dataArr], {
17126
17126
  type: "box",
17127
17127
  width: `${width}px`,
17128
17128
  height: `${height}px`,
@@ -17135,7 +17135,7 @@
17135
17135
  break;
17136
17136
  case SL_TYPE.DISCRETE:
17137
17137
  {
17138
- $(sparkRef.current).sparkline(slPropData.dataArr, {
17138
+ $(sparkRef.current).sparkline([...slPropData.dataArr], {
17139
17139
  type: "discrete",
17140
17140
  width: `${width}`,
17141
17141
  height: `${height}px`,
@@ -17147,14 +17147,14 @@
17147
17147
  break;
17148
17148
  case SL_TYPE.PIE:
17149
17149
  {
17150
- $(sparkRef.current).sparkline(slPropData.dataArr, {
17150
+ $(sparkRef.current).sparkline([...slPropData.dataArr], {
17151
17151
  type: "pie",
17152
17152
  // width: `${40}px`,
17153
17153
  height: `${height}px`,
17154
17154
  borderWidth: 0,
17155
17155
  offset: slPropData.slStyle?.offset || 0,
17156
17156
  tooltipFormatter: function(sparkline, options, fields) {
17157
- const total = slPropData.dataArr.reduce((a, b) => a + b, 0);
17157
+ const total = [...slPropData.dataArr].reduce((a, b) => a + b, 0);
17158
17158
  const value = fields.value;
17159
17159
  const percent = total > 0 ? (value / total * 100).toFixed(2) : 0;
17160
17160
  const formattedValue = formatValue2(value);