@mlw-packages/react-components 1.10.14 → 1.10.16
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.
- package/dist/index.js +4 -18
- package/dist/index.mjs +4 -18
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -15982,10 +15982,7 @@ var DraggableTooltipComponent = ({
|
|
|
15982
15982
|
);
|
|
15983
15983
|
const val = typeof value === "number" ? value : Number(value) || 0;
|
|
15984
15984
|
const isLine = seriesTypeMap?.[key] === "line";
|
|
15985
|
-
const defaultFormatted = isLine ? `${(
|
|
15986
|
-
minimumFractionDigits: 2,
|
|
15987
|
-
maximumFractionDigits: 2
|
|
15988
|
-
})}%` : val.toLocaleString("pt-BR", {
|
|
15985
|
+
const defaultFormatted = isLine ? `${val.toFixed(2)}%` : val.toLocaleString("pt-BR", {
|
|
15989
15986
|
maximumFractionDigits: 0
|
|
15990
15987
|
});
|
|
15991
15988
|
const displayValue = valueFormatter ? valueFormatter({
|
|
@@ -16171,10 +16168,7 @@ var RechartTooltipWithTotal = ({
|
|
|
16171
16168
|
const baseColor = finalColors[entry.dataKey] || entry.color || "#999";
|
|
16172
16169
|
const isNeg = value < 0;
|
|
16173
16170
|
const isLine = seriesTypeMap?.[entry.dataKey] === "line";
|
|
16174
|
-
const defaultFormatted = isLine ? `${(
|
|
16175
|
-
minimumFractionDigits: 2,
|
|
16176
|
-
maximumFractionDigits: 2
|
|
16177
|
-
})}%` : value.toLocaleString("pt-BR", {
|
|
16171
|
+
const defaultFormatted = isLine ? `${value.toFixed(2)}%` : value.toLocaleString("pt-BR", {
|
|
16178
16172
|
maximumFractionDigits: 0
|
|
16179
16173
|
});
|
|
16180
16174
|
const displayValue = valueFormatter ? valueFormatter({
|
|
@@ -16286,10 +16280,7 @@ var TooltipSimple = ({
|
|
|
16286
16280
|
pct = axisSum > 0 ? Math.abs(value) / axisSum * 100 : 0;
|
|
16287
16281
|
}
|
|
16288
16282
|
const isLine = seriesTypeMap?.[entry.dataKey] === "line";
|
|
16289
|
-
const defaultFormatted = isLine ? `${(
|
|
16290
|
-
minimumFractionDigits: 2,
|
|
16291
|
-
maximumFractionDigits: 2
|
|
16292
|
-
})}%` : value.toLocaleString("pt-BR", {
|
|
16283
|
+
const defaultFormatted = isLine ? `${value.toFixed(2)}%` : value.toLocaleString("pt-BR", {
|
|
16293
16284
|
maximumFractionDigits: 0
|
|
16294
16285
|
});
|
|
16295
16286
|
const displayValue = valueFormatter ? valueFormatter({
|
|
@@ -17721,15 +17712,10 @@ var renderInsideBarLabel = (color, valueFormatter) => {
|
|
|
17721
17712
|
};
|
|
17722
17713
|
};
|
|
17723
17714
|
|
|
17724
|
-
// src/utils/calcDivision.ts
|
|
17725
|
-
var calcDivision = (dividend, divisor) => {
|
|
17726
|
-
return dividend / divisor;
|
|
17727
|
-
};
|
|
17728
|
-
|
|
17729
17715
|
// src/components/ui/charts/utils/formatters.ts
|
|
17730
17716
|
function formatLinePercentage(value) {
|
|
17731
17717
|
const numValue = typeof value === "number" ? value : typeof value === "string" ? parseFloat(value) : 0;
|
|
17732
|
-
const percentage =
|
|
17718
|
+
const percentage = numValue;
|
|
17733
17719
|
const formattedPercentage = typeof percentage === "number" ? percentage.toFixed(1).replace(".", ",") : String(percentage).replace(".", ",");
|
|
17734
17720
|
return `${formattedPercentage}%`;
|
|
17735
17721
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -15939,10 +15939,7 @@ var DraggableTooltipComponent = ({
|
|
|
15939
15939
|
);
|
|
15940
15940
|
const val = typeof value === "number" ? value : Number(value) || 0;
|
|
15941
15941
|
const isLine = seriesTypeMap?.[key] === "line";
|
|
15942
|
-
const defaultFormatted = isLine ? `${(
|
|
15943
|
-
minimumFractionDigits: 2,
|
|
15944
|
-
maximumFractionDigits: 2
|
|
15945
|
-
})}%` : val.toLocaleString("pt-BR", {
|
|
15942
|
+
const defaultFormatted = isLine ? `${val.toFixed(2)}%` : val.toLocaleString("pt-BR", {
|
|
15946
15943
|
maximumFractionDigits: 0
|
|
15947
15944
|
});
|
|
15948
15945
|
const displayValue = valueFormatter ? valueFormatter({
|
|
@@ -16128,10 +16125,7 @@ var RechartTooltipWithTotal = ({
|
|
|
16128
16125
|
const baseColor = finalColors[entry.dataKey] || entry.color || "#999";
|
|
16129
16126
|
const isNeg = value < 0;
|
|
16130
16127
|
const isLine = seriesTypeMap?.[entry.dataKey] === "line";
|
|
16131
|
-
const defaultFormatted = isLine ? `${(
|
|
16132
|
-
minimumFractionDigits: 2,
|
|
16133
|
-
maximumFractionDigits: 2
|
|
16134
|
-
})}%` : value.toLocaleString("pt-BR", {
|
|
16128
|
+
const defaultFormatted = isLine ? `${value.toFixed(2)}%` : value.toLocaleString("pt-BR", {
|
|
16135
16129
|
maximumFractionDigits: 0
|
|
16136
16130
|
});
|
|
16137
16131
|
const displayValue = valueFormatter ? valueFormatter({
|
|
@@ -16243,10 +16237,7 @@ var TooltipSimple = ({
|
|
|
16243
16237
|
pct = axisSum > 0 ? Math.abs(value) / axisSum * 100 : 0;
|
|
16244
16238
|
}
|
|
16245
16239
|
const isLine = seriesTypeMap?.[entry.dataKey] === "line";
|
|
16246
|
-
const defaultFormatted = isLine ? `${(
|
|
16247
|
-
minimumFractionDigits: 2,
|
|
16248
|
-
maximumFractionDigits: 2
|
|
16249
|
-
})}%` : value.toLocaleString("pt-BR", {
|
|
16240
|
+
const defaultFormatted = isLine ? `${value.toFixed(2)}%` : value.toLocaleString("pt-BR", {
|
|
16250
16241
|
maximumFractionDigits: 0
|
|
16251
16242
|
});
|
|
16252
16243
|
const displayValue = valueFormatter ? valueFormatter({
|
|
@@ -17678,15 +17669,10 @@ var renderInsideBarLabel = (color, valueFormatter) => {
|
|
|
17678
17669
|
};
|
|
17679
17670
|
};
|
|
17680
17671
|
|
|
17681
|
-
// src/utils/calcDivision.ts
|
|
17682
|
-
var calcDivision = (dividend, divisor) => {
|
|
17683
|
-
return dividend / divisor;
|
|
17684
|
-
};
|
|
17685
|
-
|
|
17686
17672
|
// src/components/ui/charts/utils/formatters.ts
|
|
17687
17673
|
function formatLinePercentage(value) {
|
|
17688
17674
|
const numValue = typeof value === "number" ? value : typeof value === "string" ? parseFloat(value) : 0;
|
|
17689
|
-
const percentage =
|
|
17675
|
+
const percentage = numValue;
|
|
17690
17676
|
const formattedPercentage = typeof percentage === "number" ? percentage.toFixed(1).replace(".", ",") : String(percentage).replace(".", ",");
|
|
17691
17677
|
return `${formattedPercentage}%`;
|
|
17692
17678
|
}
|