@ai-matrx/design-system 0.49.48 → 0.49.50
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/CHANGELOG.md +16 -0
- package/README.md +10 -0
- package/dist/data-table/drill-chart.cjs +10 -1
- package/dist/data-table/drill-chart.cjs.map +1 -1
- package/dist/data-table/drill-chart.js +10 -1
- package/dist/data-table/drill-chart.js.map +1 -1
- package/dist/data-table/index.cjs +30 -19
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.js +30 -19
- package/dist/data-table/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -460,7 +460,16 @@ function drillChartAxisNumber(measure, value) {
|
|
|
460
460
|
const compact = Math.abs(value) < 1e3 && !Number.isInteger(value) ? String(Math.round(value * 10) / 10) : formatCount2(value, { style: "compact" });
|
|
461
461
|
if (!measure?.format) return compact;
|
|
462
462
|
const said = measure.format(value);
|
|
463
|
-
|
|
463
|
+
if (said.length <= 7) return said;
|
|
464
|
+
const printed = said.match(/^([^\d-]*)(-?\d[\d,]*(?:\.\d+)?)/);
|
|
465
|
+
if (!printed) return compact;
|
|
466
|
+
const numeric = printed[2];
|
|
467
|
+
if (!numeric) return compact;
|
|
468
|
+
const n = Number(numeric.replace(/,/g, ""));
|
|
469
|
+
if (!Number.isFinite(n)) return compact;
|
|
470
|
+
const prefix = printed[1]?.trim() ?? "";
|
|
471
|
+
const shown = Math.abs(n) < 1e3 && !Number.isInteger(n) ? String(Math.round(n * 10) / 10) : formatCount2(n, { style: "compact" });
|
|
472
|
+
return prefix.length <= 1 ? `${prefix}${shown}` : shown;
|
|
464
473
|
}
|
|
465
474
|
var axisNumber = drillChartAxisNumber;
|
|
466
475
|
function MatrxDrillChart({
|