pace-table-lib 1.0.20 → 1.0.22
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);
|
|
@@ -18014,6 +18014,7 @@
|
|
|
18014
18014
|
const baseStyle = {
|
|
18015
18015
|
...style,
|
|
18016
18016
|
...dataCellFont,
|
|
18017
|
+
fontWeight: "bold",
|
|
18017
18018
|
background: outerDivBg
|
|
18018
18019
|
};
|
|
18019
18020
|
const isLastRow = rowIndex === rowCount - 1;
|
|
@@ -18022,7 +18023,6 @@
|
|
|
18022
18023
|
const isSparkLineCol = isSparkLineVisible && !isSlAtStart && columnIndex === columnCount - 1;
|
|
18023
18024
|
const isPercentageMode = DataField.hasOwnProperty("percentageBy") && DataField.percentageBy && DataField.percentageBy?.toLowerCase() !== "absolute";
|
|
18024
18025
|
let rawValue;
|
|
18025
|
-
let isBold = true;
|
|
18026
18026
|
const bgColorForTotals = getBgColorForCell(rowCount - fixedRowCount, dataColors);
|
|
18027
18027
|
if (isColTotalOn && isRowTotalOn && !headerAtStart && isLastRow && isLastCol) {
|
|
18028
18028
|
baseStyle.background = bgColorForTotals;
|
|
@@ -18050,10 +18050,10 @@
|
|
|
18050
18050
|
tableData.columnTotalRow[colIdxHeat].columnTotal
|
|
18051
18051
|
);
|
|
18052
18052
|
}
|
|
18053
|
-
|
|
18053
|
+
baseStyle.fontWeight = dataCellFont.fontWeight;
|
|
18054
18054
|
} else {
|
|
18055
18055
|
rawValue = measuresBySlice[rowIdxHeat]?.measures?.[colIdxHeat];
|
|
18056
|
-
|
|
18056
|
+
baseStyle.fontWeight = dataCellFont.fontWeight;
|
|
18057
18057
|
}
|
|
18058
18058
|
if (isSparkLineCol && isSparkLineVisible && !isSlAtStart) {
|
|
18059
18059
|
const dataArr = measuresBySlice[rowIdxHeat]?.measures;
|
|
@@ -18071,8 +18071,7 @@
|
|
|
18071
18071
|
formattedValue = formatValue(rawValue, VALUE_FORMAT_OBJ.PERCENT_SHORT);
|
|
18072
18072
|
}
|
|
18073
18073
|
let finalStyle = {
|
|
18074
|
-
...baseStyle
|
|
18075
|
-
fontWeight: isBold ? "bold" : "normal"
|
|
18074
|
+
...baseStyle
|
|
18076
18075
|
};
|
|
18077
18076
|
if (conditionalFormatObj) {
|
|
18078
18077
|
if (conditionalFormatObj.fontFamily) finalStyle.fontFamily = conditionalFormatObj.fontFamily;
|