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.
|
@@ -17071,7 +17071,7 @@ function JQuerySparkLine({
|
|
|
17071
17071
|
switch (slPropData.slType) {
|
|
17072
17072
|
case SL_TYPE.LINE:
|
|
17073
17073
|
{
|
|
17074
|
-
$(sparkRef.current).sparkline(slPropData.dataArr, {
|
|
17074
|
+
$(sparkRef.current).sparkline([...slPropData.dataArr], {
|
|
17075
17075
|
type: "line",
|
|
17076
17076
|
width: `${width}px`,
|
|
17077
17077
|
height: `${height}px`,
|
|
@@ -17088,7 +17088,7 @@ function JQuerySparkLine({
|
|
|
17088
17088
|
break;
|
|
17089
17089
|
case SL_TYPE.BAR:
|
|
17090
17090
|
{
|
|
17091
|
-
$(sparkRef.current).sparkline(slPropData.dataArr, {
|
|
17091
|
+
$(sparkRef.current).sparkline([...slPropData.dataArr], {
|
|
17092
17092
|
type: "bar",
|
|
17093
17093
|
width: `${width}px`,
|
|
17094
17094
|
height: `${height}px`,
|
|
@@ -17103,7 +17103,7 @@ function JQuerySparkLine({
|
|
|
17103
17103
|
break;
|
|
17104
17104
|
case SL_TYPE.BOX:
|
|
17105
17105
|
{
|
|
17106
|
-
$(sparkRef.current).sparkline(slPropData.dataArr, {
|
|
17106
|
+
$(sparkRef.current).sparkline([...slPropData.dataArr], {
|
|
17107
17107
|
type: "box",
|
|
17108
17108
|
width: `${width}px`,
|
|
17109
17109
|
height: `${height}px`,
|
|
@@ -17116,7 +17116,7 @@ function JQuerySparkLine({
|
|
|
17116
17116
|
break;
|
|
17117
17117
|
case SL_TYPE.DISCRETE:
|
|
17118
17118
|
{
|
|
17119
|
-
$(sparkRef.current).sparkline(slPropData.dataArr, {
|
|
17119
|
+
$(sparkRef.current).sparkline([...slPropData.dataArr], {
|
|
17120
17120
|
type: "discrete",
|
|
17121
17121
|
width: `${width}`,
|
|
17122
17122
|
height: `${height}px`,
|
|
@@ -17128,14 +17128,14 @@ function JQuerySparkLine({
|
|
|
17128
17128
|
break;
|
|
17129
17129
|
case SL_TYPE.PIE:
|
|
17130
17130
|
{
|
|
17131
|
-
$(sparkRef.current).sparkline(slPropData.dataArr, {
|
|
17131
|
+
$(sparkRef.current).sparkline([...slPropData.dataArr], {
|
|
17132
17132
|
type: "pie",
|
|
17133
17133
|
// width: `${40}px`,
|
|
17134
17134
|
height: `${height}px`,
|
|
17135
17135
|
borderWidth: 0,
|
|
17136
17136
|
offset: slPropData.slStyle?.offset || 0,
|
|
17137
17137
|
tooltipFormatter: function(sparkline, options, fields) {
|
|
17138
|
-
const total = slPropData.dataArr.reduce((a, b) => a + b, 0);
|
|
17138
|
+
const total = [...slPropData.dataArr].reduce((a, b) => a + b, 0);
|
|
17139
17139
|
const value = fields.value;
|
|
17140
17140
|
const percent = total > 0 ? (value / total * 100).toFixed(2) : 0;
|
|
17141
17141
|
const formattedValue = formatValue2(value);
|