@spteck/fluentui-react-charts 1.1.5 → 1.1.7
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/charts/BarChart/BarChart.d.ts +3 -1
- package/dist/charts/ComboChart/ComboChart.d.ts +3 -1
- package/dist/charts/Doughnut/DoughnutChart.d.ts +3 -1
- package/dist/charts/PieChart/PieChart.d.ts +3 -1
- package/dist/charts/areaChart/AreaChart.d.ts +3 -1
- package/dist/charts/barHorizontalChart/BarHotizontalChart.d.ts +3 -1
- package/dist/charts/bubbleChart/BubbleChart.d.ts +3 -1
- package/dist/charts/floatBarChart/FloatBarChart.d.ts +3 -1
- package/dist/charts/lineChart/LineChart.d.ts +3 -1
- package/dist/charts/polarChart/PolarChart.d.ts +3 -1
- package/dist/charts/radarChart/RadarChart.d.ts +3 -1
- package/dist/charts/scatterChart/ScatterChart.d.ts +3 -1
- package/dist/charts/stackedLineChart/StackedLineChart.d.ts +3 -1
- package/dist/charts/steamChart/SteamChart.d.ts +3 -1
- package/dist/fluentui-react-charts.cjs.development.js +108 -43
- package/dist/fluentui-react-charts.cjs.development.js.map +1 -1
- package/dist/fluentui-react-charts.cjs.production.min.js +1 -1
- package/dist/fluentui-react-charts.cjs.production.min.js.map +1 -1
- package/dist/fluentui-react-charts.esm.js +108 -43
- package/dist/fluentui-react-charts.esm.js.map +1 -1
- package/dist/hooks/useChartUtils.d.ts +2 -0
- package/dist/models/ICardChartContainer.d.ts +2 -0
- package/package.json +1 -1
|
@@ -852,6 +852,12 @@ opts) {
|
|
|
852
852
|
var dataset = item.dataset;
|
|
853
853
|
var datasetLabel = 'label' in dataset && typeof dataset.label === 'string' ? dataset.label : 'Value';
|
|
854
854
|
var raw = item.raw;
|
|
855
|
+
// Prepare number formatter based on opts
|
|
856
|
+
var numberFormatter = typeof (opts == null ? void 0 : opts.numberFormat) === 'function' ? opts.numberFormat : new Intl.NumberFormat(opts == null ? void 0 : opts.locale, typeof (opts == null ? void 0 : opts.numberFormat) === 'object' ? opts == null ? void 0 : opts.numberFormat : undefined).format;
|
|
857
|
+
// Helper to format numeric values for tooltips using the configured formatter
|
|
858
|
+
var formatVal = function formatVal(v) {
|
|
859
|
+
return typeof v === 'number' ? numberFormatter(v) : String(v);
|
|
860
|
+
};
|
|
855
861
|
// determine extraField value, precedence: dataset.extraField > opts.extraField
|
|
856
862
|
var extra;
|
|
857
863
|
if (dataset && dataset.extraField !== undefined) {
|
|
@@ -872,22 +878,22 @@ opts) {
|
|
|
872
878
|
var x = raw.x,
|
|
873
879
|
y = raw.y,
|
|
874
880
|
r = raw.r;
|
|
875
|
-
return datasetLabel + " \u2014 x: " + x + ", y: " + y + ", r: " + r + suffix;
|
|
881
|
+
return datasetLabel + " \u2014 x: " + formatVal(x) + ", y: " + formatVal(y) + ", r: " + formatVal(r) + suffix;
|
|
876
882
|
}
|
|
877
883
|
// Scatter format { x, y }
|
|
878
884
|
if (typeof raw === 'object' && raw !== null && 'x' in raw && 'y' in raw) {
|
|
879
885
|
var _x = raw.x,
|
|
880
886
|
_y = raw.y;
|
|
881
|
-
return datasetLabel + " \u2014 x: " + _x + ", y: " + _y + suffix;
|
|
887
|
+
return datasetLabel + " \u2014 x: " + formatVal(_x) + ", y: " + formatVal(_y) + suffix;
|
|
882
888
|
}
|
|
883
889
|
// Floating bar [min, max]
|
|
884
890
|
if (Array.isArray(raw) && raw.length === 2) {
|
|
885
891
|
var min = raw[0],
|
|
886
892
|
max = raw[1];
|
|
887
|
-
return datasetLabel + ": " + min + " \u2013 " + max + suffix;
|
|
893
|
+
return datasetLabel + ": " + formatVal(min) + " \u2013 " + formatVal(max) + suffix;
|
|
888
894
|
}
|
|
889
895
|
// Default: single number or string
|
|
890
|
-
return datasetLabel + ": " + raw + suffix;
|
|
896
|
+
return datasetLabel + ": " + formatVal(raw) + suffix;
|
|
891
897
|
},
|
|
892
898
|
beforeTitle: function beforeTitle() {
|
|
893
899
|
return '';
|
|
@@ -1104,7 +1110,9 @@ function AreaChart(_ref) {
|
|
|
1104
1110
|
stacked = _ref$stacked === void 0 ? false : _ref$stacked,
|
|
1105
1111
|
renderTooltipLabel = _ref.renderTooltipLabel,
|
|
1106
1112
|
_ref$paletteId = _ref.paletteId,
|
|
1107
|
-
paletteId = _ref$paletteId === void 0 ? 1 : _ref$paletteId
|
|
1113
|
+
paletteId = _ref$paletteId === void 0 ? 1 : _ref$paletteId,
|
|
1114
|
+
numberFormat = _ref.numberFormat,
|
|
1115
|
+
locale = _ref.locale;
|
|
1108
1116
|
var _useState = useState(function () {
|
|
1109
1117
|
var _data$;
|
|
1110
1118
|
return data.length > 1 ? data.map(function (s) {
|
|
@@ -1213,7 +1221,9 @@ function AreaChart(_ref) {
|
|
|
1213
1221
|
display: false
|
|
1214
1222
|
},
|
|
1215
1223
|
tooltip: createFluentTooltip(theme, {
|
|
1216
|
-
extraField: renderTooltipLabel
|
|
1224
|
+
extraField: renderTooltipLabel,
|
|
1225
|
+
numberFormat: numberFormat,
|
|
1226
|
+
locale: locale
|
|
1217
1227
|
})
|
|
1218
1228
|
},
|
|
1219
1229
|
scales: {
|
|
@@ -1245,7 +1255,7 @@ function AreaChart(_ref) {
|
|
|
1245
1255
|
}
|
|
1246
1256
|
}
|
|
1247
1257
|
});
|
|
1248
|
-
}, [title, showDatalabels, theme, fontFamily, fontSize, labelColor, gridColor, stacked, createFluentTooltip]);
|
|
1258
|
+
}, [title, showDatalabels, theme, fontFamily, fontSize, labelColor, gridColor, stacked, createFluentTooltip, numberFormat, locale]);
|
|
1249
1259
|
return React__default.createElement("div", {
|
|
1250
1260
|
className: styles.chartWithLegend
|
|
1251
1261
|
}, React__default.createElement("div", {
|
|
@@ -1274,7 +1284,9 @@ function BarChart(_ref) {
|
|
|
1274
1284
|
theme = _ref.theme,
|
|
1275
1285
|
renderTooltipLabel = _ref.renderTooltipLabel,
|
|
1276
1286
|
_ref$paletteId = _ref.paletteId,
|
|
1277
|
-
paletteId = _ref$paletteId === void 0 ? 1 : _ref$paletteId
|
|
1287
|
+
paletteId = _ref$paletteId === void 0 ? 1 : _ref$paletteId,
|
|
1288
|
+
numberFormat = _ref.numberFormat,
|
|
1289
|
+
locale = _ref.locale;
|
|
1278
1290
|
var _useState = useState(function () {
|
|
1279
1291
|
var _data$;
|
|
1280
1292
|
return data.length > 1 ? data.map(function (s) {
|
|
@@ -1383,7 +1395,9 @@ function BarChart(_ref) {
|
|
|
1383
1395
|
display: false
|
|
1384
1396
|
},
|
|
1385
1397
|
tooltip: createFluentTooltip(theme, {
|
|
1386
|
-
extraField: renderTooltipLabel
|
|
1398
|
+
extraField: renderTooltipLabel,
|
|
1399
|
+
numberFormat: numberFormat,
|
|
1400
|
+
locale: locale
|
|
1387
1401
|
})
|
|
1388
1402
|
},
|
|
1389
1403
|
scales: _extends({
|
|
@@ -1441,7 +1455,7 @@ function BarChart(_ref) {
|
|
|
1441
1455
|
}
|
|
1442
1456
|
})
|
|
1443
1457
|
});
|
|
1444
|
-
}, [title, showDatalabels, theme, fontFamily, fontSize, labelColor, gridColor, stacked, createFluentTooltip]);
|
|
1458
|
+
}, [title, showDatalabels, theme, fontFamily, fontSize, labelColor, gridColor, stacked, createFluentTooltip, numberFormat, locale]);
|
|
1445
1459
|
return React__default.createElement("div", {
|
|
1446
1460
|
className: styles.chartWithLegend
|
|
1447
1461
|
}, React__default.createElement("div", {
|
|
@@ -1472,7 +1486,9 @@ function BarHorizontalChart(_ref) {
|
|
|
1472
1486
|
theme = _ref.theme,
|
|
1473
1487
|
renderTooltipLabel = _ref.renderTooltipLabel,
|
|
1474
1488
|
_ref$paletteId = _ref.paletteId,
|
|
1475
|
-
paletteId = _ref$paletteId === void 0 ? 1 : _ref$paletteId
|
|
1489
|
+
paletteId = _ref$paletteId === void 0 ? 1 : _ref$paletteId,
|
|
1490
|
+
numberFormat = _ref.numberFormat,
|
|
1491
|
+
locale = _ref.locale;
|
|
1476
1492
|
var _useState = useState(function () {
|
|
1477
1493
|
var _data$;
|
|
1478
1494
|
return data.length > 1 ? data.map(function (s) {
|
|
@@ -1578,7 +1594,9 @@ function BarHorizontalChart(_ref) {
|
|
|
1578
1594
|
display: false
|
|
1579
1595
|
},
|
|
1580
1596
|
tooltip: createFluentTooltip(theme, {
|
|
1581
|
-
extraField: renderTooltipLabel
|
|
1597
|
+
extraField: renderTooltipLabel,
|
|
1598
|
+
numberFormat: numberFormat,
|
|
1599
|
+
locale: locale
|
|
1582
1600
|
})
|
|
1583
1601
|
},
|
|
1584
1602
|
scales: {
|
|
@@ -1610,7 +1628,7 @@ function BarHorizontalChart(_ref) {
|
|
|
1610
1628
|
}
|
|
1611
1629
|
}
|
|
1612
1630
|
});
|
|
1613
|
-
}, [title, showDatalabels, theme, fontFamily, fontSize, labelColor, gridColor, stacked, createFluentTooltip]);
|
|
1631
|
+
}, [title, showDatalabels, theme, fontFamily, fontSize, labelColor, gridColor, stacked, createFluentTooltip, numberFormat, locale]);
|
|
1614
1632
|
return React__default.createElement("div", {
|
|
1615
1633
|
className: styles.chartWithLegend
|
|
1616
1634
|
}, React__default.createElement("div", {
|
|
@@ -1640,7 +1658,9 @@ function BubbleChart(_ref) {
|
|
|
1640
1658
|
_ref$theme = _ref.theme,
|
|
1641
1659
|
theme = _ref$theme === void 0 ? webLightTheme : _ref$theme,
|
|
1642
1660
|
_ref$paletteId = _ref.paletteId,
|
|
1643
|
-
paletteId = _ref$paletteId === void 0 ? 1 : _ref$paletteId
|
|
1661
|
+
paletteId = _ref$paletteId === void 0 ? 1 : _ref$paletteId,
|
|
1662
|
+
numberFormat = _ref.numberFormat,
|
|
1663
|
+
locale = _ref.locale;
|
|
1644
1664
|
var _useState = useState(function () {
|
|
1645
1665
|
var _data$;
|
|
1646
1666
|
return data.length > 1 ? data.map(function (s) {
|
|
@@ -1740,7 +1760,9 @@ function BubbleChart(_ref) {
|
|
|
1740
1760
|
display: false
|
|
1741
1761
|
},
|
|
1742
1762
|
tooltip: createFluentTooltip(theme, {
|
|
1743
|
-
extraField: renderTooltipLabel
|
|
1763
|
+
extraField: renderTooltipLabel,
|
|
1764
|
+
numberFormat: numberFormat,
|
|
1765
|
+
locale: locale
|
|
1744
1766
|
})
|
|
1745
1767
|
},
|
|
1746
1768
|
scales: {
|
|
@@ -1771,7 +1793,7 @@ function BubbleChart(_ref) {
|
|
|
1771
1793
|
}
|
|
1772
1794
|
}
|
|
1773
1795
|
});
|
|
1774
|
-
}, [title, showDataLabels, theme, getPrimary, getSecondary, data, fontFamily, fontSize, labelColor, gridColor, createFluentTooltip]);
|
|
1796
|
+
}, [title, showDataLabels, theme, getPrimary, getSecondary, data, fontFamily, fontSize, labelColor, gridColor, createFluentTooltip, numberFormat, locale]);
|
|
1775
1797
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
1776
1798
|
className: styles.chartWithLegend
|
|
1777
1799
|
}, React__default.createElement("div", {
|
|
@@ -1804,7 +1826,9 @@ function ComboChart(_ref) {
|
|
|
1804
1826
|
axesMode = _ref$axesMode === void 0 ? 'legacy' : _ref$axesMode,
|
|
1805
1827
|
renderTooltipLabel = _ref.renderTooltipLabel,
|
|
1806
1828
|
_ref$paletteId = _ref.paletteId,
|
|
1807
|
-
paletteId = _ref$paletteId === void 0 ? 1 : _ref$paletteId
|
|
1829
|
+
paletteId = _ref$paletteId === void 0 ? 1 : _ref$paletteId,
|
|
1830
|
+
numberFormat = _ref.numberFormat,
|
|
1831
|
+
locale = _ref.locale;
|
|
1808
1832
|
var _useState = useState(function () {
|
|
1809
1833
|
return data.map(function (s) {
|
|
1810
1834
|
return s.label;
|
|
@@ -1925,7 +1949,9 @@ function ComboChart(_ref) {
|
|
|
1925
1949
|
display: false
|
|
1926
1950
|
},
|
|
1927
1951
|
tooltip: createFluentTooltip(theme, {
|
|
1928
|
-
extraField: renderTooltipLabel
|
|
1952
|
+
extraField: renderTooltipLabel,
|
|
1953
|
+
numberFormat: numberFormat,
|
|
1954
|
+
locale: locale
|
|
1929
1955
|
})
|
|
1930
1956
|
}
|
|
1931
1957
|
});
|
|
@@ -2064,7 +2090,9 @@ function DoughnutChart(_ref) {
|
|
|
2064
2090
|
theme = _ref$theme === void 0 ? webLightTheme : _ref$theme,
|
|
2065
2091
|
renderTooltipLabel = _ref.renderTooltipLabel,
|
|
2066
2092
|
_ref$paletteId = _ref.paletteId,
|
|
2067
|
-
paletteId = _ref$paletteId === void 0 ? 1 : _ref$paletteId
|
|
2093
|
+
paletteId = _ref$paletteId === void 0 ? 1 : _ref$paletteId,
|
|
2094
|
+
numberFormat = _ref.numberFormat,
|
|
2095
|
+
locale = _ref.locale;
|
|
2068
2096
|
var styles = useGraphGlobalStyles();
|
|
2069
2097
|
var _useChartUtils = useChartUtils(theme),
|
|
2070
2098
|
lightenColor = _useChartUtils.lightenColor,
|
|
@@ -2154,7 +2182,9 @@ function DoughnutChart(_ref) {
|
|
|
2154
2182
|
display: false
|
|
2155
2183
|
},
|
|
2156
2184
|
tooltip: createFluentTooltip(theme, {
|
|
2157
|
-
extraField: renderTooltipLabel
|
|
2185
|
+
extraField: renderTooltipLabel,
|
|
2186
|
+
numberFormat: numberFormat,
|
|
2187
|
+
locale: locale
|
|
2158
2188
|
}),
|
|
2159
2189
|
title: {
|
|
2160
2190
|
display: !!title,
|
|
@@ -2213,7 +2243,9 @@ function FloatingBarChart(_ref) {
|
|
|
2213
2243
|
theme = _ref$theme === void 0 ? webLightTheme : _ref$theme,
|
|
2214
2244
|
renderTooltipLabel = _ref.renderTooltipLabel,
|
|
2215
2245
|
_ref$paletteId = _ref.paletteId,
|
|
2216
|
-
paletteId = _ref$paletteId === void 0 ? 1 : _ref$paletteId
|
|
2246
|
+
paletteId = _ref$paletteId === void 0 ? 1 : _ref$paletteId,
|
|
2247
|
+
numberFormat = _ref.numberFormat,
|
|
2248
|
+
locale = _ref.locale;
|
|
2217
2249
|
var _useState = useState(function () {
|
|
2218
2250
|
var _data$;
|
|
2219
2251
|
return data.length > 1 ? data.map(function (s) {
|
|
@@ -2319,7 +2351,9 @@ function FloatingBarChart(_ref) {
|
|
|
2319
2351
|
display: false
|
|
2320
2352
|
},
|
|
2321
2353
|
tooltip: createFluentTooltip(theme, {
|
|
2322
|
-
extraField: renderTooltipLabel
|
|
2354
|
+
extraField: renderTooltipLabel,
|
|
2355
|
+
numberFormat: numberFormat,
|
|
2356
|
+
locale: locale
|
|
2323
2357
|
})
|
|
2324
2358
|
},
|
|
2325
2359
|
scales: {
|
|
@@ -2349,7 +2383,7 @@ function FloatingBarChart(_ref) {
|
|
|
2349
2383
|
}
|
|
2350
2384
|
}
|
|
2351
2385
|
});
|
|
2352
|
-
}, [title, theme, showDataLabels, labelColor, fontFamily, fontSize, gridColor, createFluentTooltip]);
|
|
2386
|
+
}, [title, theme, showDataLabels, labelColor, fontFamily, fontSize, gridColor, createFluentTooltip, numberFormat, locale]);
|
|
2353
2387
|
return React__default.createElement("div", {
|
|
2354
2388
|
className: styles.chartWithLegend
|
|
2355
2389
|
}, React__default.createElement("div", {
|
|
@@ -2380,7 +2414,9 @@ function LineChart(_ref) {
|
|
|
2380
2414
|
theme = _ref$theme === void 0 ? webLightTheme : _ref$theme,
|
|
2381
2415
|
renderTooltipLabel = _ref.renderTooltipLabel,
|
|
2382
2416
|
_ref$paletteId = _ref.paletteId,
|
|
2383
|
-
paletteId = _ref$paletteId === void 0 ? 1 : _ref$paletteId
|
|
2417
|
+
paletteId = _ref$paletteId === void 0 ? 1 : _ref$paletteId,
|
|
2418
|
+
numberFormat = _ref.numberFormat,
|
|
2419
|
+
locale = _ref.locale;
|
|
2384
2420
|
var _useState = useState(function () {
|
|
2385
2421
|
var _data$;
|
|
2386
2422
|
return data.length > 1 ? data.map(function (s) {
|
|
@@ -2489,7 +2525,9 @@ function LineChart(_ref) {
|
|
|
2489
2525
|
display: false
|
|
2490
2526
|
},
|
|
2491
2527
|
tooltip: createFluentTooltip(theme, {
|
|
2492
|
-
extraField: renderTooltipLabel
|
|
2528
|
+
extraField: renderTooltipLabel,
|
|
2529
|
+
numberFormat: numberFormat,
|
|
2530
|
+
locale: locale
|
|
2493
2531
|
})
|
|
2494
2532
|
},
|
|
2495
2533
|
scales: {
|
|
@@ -2550,7 +2588,9 @@ function PieChart(_ref) {
|
|
|
2550
2588
|
theme = _ref$theme === void 0 ? webLightTheme : _ref$theme,
|
|
2551
2589
|
renderTooltipLabel = _ref.renderTooltipLabel,
|
|
2552
2590
|
_ref$paletteId = _ref.paletteId,
|
|
2553
|
-
paletteId = _ref$paletteId === void 0 ? 1 : _ref$paletteId
|
|
2591
|
+
paletteId = _ref$paletteId === void 0 ? 1 : _ref$paletteId,
|
|
2592
|
+
numberFormat = _ref.numberFormat,
|
|
2593
|
+
locale = _ref.locale;
|
|
2554
2594
|
var _useChartUtils = useChartUtils(theme),
|
|
2555
2595
|
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
2556
2596
|
lightenColor = _useChartUtils.lightenColor;
|
|
@@ -2635,7 +2675,9 @@ function PieChart(_ref) {
|
|
|
2635
2675
|
}, getInstantInteractionAnimations(), {
|
|
2636
2676
|
plugins: {
|
|
2637
2677
|
tooltip: createFluentTooltip(theme, {
|
|
2638
|
-
extraField: renderTooltipLabel
|
|
2678
|
+
extraField: renderTooltipLabel,
|
|
2679
|
+
numberFormat: numberFormat,
|
|
2680
|
+
locale: locale
|
|
2639
2681
|
}),
|
|
2640
2682
|
legend: {
|
|
2641
2683
|
display: false
|
|
@@ -2724,7 +2766,9 @@ function PolarChart(_ref) {
|
|
|
2724
2766
|
theme = _ref$theme === void 0 ? webLightTheme : _ref$theme,
|
|
2725
2767
|
renderTooltipLabel = _ref.renderTooltipLabel,
|
|
2726
2768
|
_ref$paletteId = _ref.paletteId,
|
|
2727
|
-
paletteId = _ref$paletteId === void 0 ? 1 : _ref$paletteId
|
|
2769
|
+
paletteId = _ref$paletteId === void 0 ? 1 : _ref$paletteId,
|
|
2770
|
+
numberFormat = _ref.numberFormat,
|
|
2771
|
+
locale = _ref.locale;
|
|
2728
2772
|
var _useChartUtils = useChartUtils(theme),
|
|
2729
2773
|
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
2730
2774
|
lightenColor = _useChartUtils.lightenColor,
|
|
@@ -2822,7 +2866,9 @@ function PolarChart(_ref) {
|
|
|
2822
2866
|
}
|
|
2823
2867
|
},
|
|
2824
2868
|
tooltip: createFluentTooltip(theme, {
|
|
2825
|
-
extraField: renderTooltipLabel
|
|
2869
|
+
extraField: renderTooltipLabel,
|
|
2870
|
+
numberFormat: numberFormat,
|
|
2871
|
+
locale: locale
|
|
2826
2872
|
}),
|
|
2827
2873
|
legend: {
|
|
2828
2874
|
display: false
|
|
@@ -2844,7 +2890,7 @@ function PolarChart(_ref) {
|
|
|
2844
2890
|
}
|
|
2845
2891
|
}
|
|
2846
2892
|
});
|
|
2847
|
-
}, [theme, title, showDataLabels, createFluentTooltip]);
|
|
2893
|
+
}, [theme, title, showDataLabels, createFluentTooltip, numberFormat, locale]);
|
|
2848
2894
|
return React__default.createElement("div", {
|
|
2849
2895
|
className: styles.chartWithLegend
|
|
2850
2896
|
}, React__default.createElement("div", {
|
|
@@ -2875,7 +2921,9 @@ function RadarChart(_ref) {
|
|
|
2875
2921
|
theme = _ref$theme === void 0 ? webLightTheme : _ref$theme,
|
|
2876
2922
|
renderTooltipLabel = _ref.renderTooltipLabel,
|
|
2877
2923
|
_ref$paletteId = _ref.paletteId,
|
|
2878
|
-
paletteId = _ref$paletteId === void 0 ? 1 : _ref$paletteId
|
|
2924
|
+
paletteId = _ref$paletteId === void 0 ? 1 : _ref$paletteId,
|
|
2925
|
+
numberFormat = _ref.numberFormat,
|
|
2926
|
+
locale = _ref.locale;
|
|
2879
2927
|
var _useState = useState(function () {
|
|
2880
2928
|
return data.map(function (s) {
|
|
2881
2929
|
return s.label;
|
|
@@ -2975,7 +3023,9 @@ function RadarChart(_ref) {
|
|
|
2975
3023
|
}
|
|
2976
3024
|
},
|
|
2977
3025
|
tooltip: createFluentTooltip(theme, {
|
|
2978
|
-
extraField: renderTooltipLabel
|
|
3026
|
+
extraField: renderTooltipLabel,
|
|
3027
|
+
numberFormat: numberFormat,
|
|
3028
|
+
locale: locale
|
|
2979
3029
|
}),
|
|
2980
3030
|
legend: {
|
|
2981
3031
|
display: false
|
|
@@ -3006,7 +3056,7 @@ function RadarChart(_ref) {
|
|
|
3006
3056
|
}
|
|
3007
3057
|
}
|
|
3008
3058
|
});
|
|
3009
|
-
}, [theme, title, showDataLabels, createFluentTooltip, gridColor, labelColor, fontFamily, fontSize]);
|
|
3059
|
+
}, [theme, title, showDataLabels, createFluentTooltip, gridColor, labelColor, fontFamily, fontSize, numberFormat, locale]);
|
|
3010
3060
|
return React__default.createElement("div", {
|
|
3011
3061
|
className: styles.chartWithLegend
|
|
3012
3062
|
}, React__default.createElement("div", {
|
|
@@ -3035,7 +3085,9 @@ function ScatterChart(_ref) {
|
|
|
3035
3085
|
theme = _ref$theme === void 0 ? webLightTheme : _ref$theme,
|
|
3036
3086
|
renderTooltipLabel = _ref.renderTooltipLabel,
|
|
3037
3087
|
_ref$paletteId = _ref.paletteId,
|
|
3038
|
-
paletteId = _ref$paletteId === void 0 ? 1 : _ref$paletteId
|
|
3088
|
+
paletteId = _ref$paletteId === void 0 ? 1 : _ref$paletteId,
|
|
3089
|
+
numberFormat = _ref.numberFormat,
|
|
3090
|
+
locale = _ref.locale;
|
|
3039
3091
|
var _useState = useState(function () {
|
|
3040
3092
|
return data.map(function (s) {
|
|
3041
3093
|
return s.label;
|
|
@@ -3128,7 +3180,9 @@ function ScatterChart(_ref) {
|
|
|
3128
3180
|
display: false
|
|
3129
3181
|
},
|
|
3130
3182
|
tooltip: createFluentTooltip(theme, {
|
|
3131
|
-
extraField: renderTooltipLabel
|
|
3183
|
+
extraField: renderTooltipLabel,
|
|
3184
|
+
numberFormat: numberFormat,
|
|
3185
|
+
locale: locale
|
|
3132
3186
|
})
|
|
3133
3187
|
},
|
|
3134
3188
|
scales: {
|
|
@@ -3161,7 +3215,7 @@ function ScatterChart(_ref) {
|
|
|
3161
3215
|
}
|
|
3162
3216
|
}
|
|
3163
3217
|
});
|
|
3164
|
-
}, [theme, title, showDataLabels, createFluentTooltip, labelColor, fontFamily, fontSize, gridColor]);
|
|
3218
|
+
}, [theme, title, showDataLabels, createFluentTooltip, labelColor, fontFamily, fontSize, gridColor, numberFormat, locale]);
|
|
3165
3219
|
return React__default.createElement("div", {
|
|
3166
3220
|
className: styles.chartWithLegend
|
|
3167
3221
|
}, React__default.createElement("div", {
|
|
@@ -3190,7 +3244,9 @@ function StackedLineChart(_ref) {
|
|
|
3190
3244
|
theme = _ref$theme === void 0 ? webLightTheme : _ref$theme,
|
|
3191
3245
|
renderTooltipLabel = _ref.renderTooltipLabel,
|
|
3192
3246
|
_ref$paletteId = _ref.paletteId,
|
|
3193
|
-
paletteId = _ref$paletteId === void 0 ? 1 : _ref$paletteId
|
|
3247
|
+
paletteId = _ref$paletteId === void 0 ? 1 : _ref$paletteId,
|
|
3248
|
+
numberFormat = _ref.numberFormat,
|
|
3249
|
+
locale = _ref.locale;
|
|
3194
3250
|
var _useState = useState(function () {
|
|
3195
3251
|
var _data$;
|
|
3196
3252
|
return data.length > 1 ? data.map(function (s) {
|
|
@@ -3299,7 +3355,9 @@ function StackedLineChart(_ref) {
|
|
|
3299
3355
|
display: false
|
|
3300
3356
|
},
|
|
3301
3357
|
tooltip: createFluentTooltip(theme, {
|
|
3302
|
-
extraField: renderTooltipLabel
|
|
3358
|
+
extraField: renderTooltipLabel,
|
|
3359
|
+
numberFormat: numberFormat,
|
|
3360
|
+
locale: locale
|
|
3303
3361
|
})
|
|
3304
3362
|
},
|
|
3305
3363
|
scales: {
|
|
@@ -3331,7 +3389,7 @@ function StackedLineChart(_ref) {
|
|
|
3331
3389
|
}
|
|
3332
3390
|
}
|
|
3333
3391
|
});
|
|
3334
|
-
}, [theme, title, showDataLabels, createFluentTooltip, labelColor, fontFamily, fontSize, gridColor]);
|
|
3392
|
+
}, [theme, title, showDataLabels, createFluentTooltip, labelColor, fontFamily, fontSize, gridColor, numberFormat, locale]);
|
|
3335
3393
|
return React__default.createElement("div", {
|
|
3336
3394
|
className: styles.chartWithLegend
|
|
3337
3395
|
}, React__default.createElement("div", {
|
|
@@ -3360,7 +3418,9 @@ function SteamChart(_ref) {
|
|
|
3360
3418
|
theme = _ref$theme === void 0 ? webLightTheme : _ref$theme,
|
|
3361
3419
|
renderTooltipLabel = _ref.renderTooltipLabel,
|
|
3362
3420
|
_ref$paletteId = _ref.paletteId,
|
|
3363
|
-
paletteId = _ref$paletteId === void 0 ? 1 : _ref$paletteId
|
|
3421
|
+
paletteId = _ref$paletteId === void 0 ? 1 : _ref$paletteId,
|
|
3422
|
+
numberFormat = _ref.numberFormat,
|
|
3423
|
+
locale = _ref.locale;
|
|
3364
3424
|
var _useState = useState(function () {
|
|
3365
3425
|
var _data$;
|
|
3366
3426
|
return data.length > 1 ? data.map(function (s) {
|
|
@@ -3482,7 +3542,9 @@ function SteamChart(_ref) {
|
|
|
3482
3542
|
display: false
|
|
3483
3543
|
},
|
|
3484
3544
|
tooltip: createFluentTooltip(theme, {
|
|
3485
|
-
extraField: renderTooltipLabel
|
|
3545
|
+
extraField: renderTooltipLabel,
|
|
3546
|
+
numberFormat: numberFormat,
|
|
3547
|
+
locale: locale
|
|
3486
3548
|
})
|
|
3487
3549
|
},
|
|
3488
3550
|
interaction: {
|
|
@@ -3523,7 +3585,7 @@ function SteamChart(_ref) {
|
|
|
3523
3585
|
}
|
|
3524
3586
|
}
|
|
3525
3587
|
});
|
|
3526
|
-
}, [theme, title, showDataLabels, createFluentTooltip, labelColor, fontFamily, fontSize, gridColor, showPercent]);
|
|
3588
|
+
}, [theme, title, showDataLabels, createFluentTooltip, labelColor, fontFamily, fontSize, gridColor, showPercent, numberFormat, locale]);
|
|
3527
3589
|
return React__default.createElement("div", {
|
|
3528
3590
|
className: styles.chartWithLegend
|
|
3529
3591
|
}, React__default.createElement("div", {
|
|
@@ -3569,7 +3631,10 @@ var chartProps = function chartProps(chart) {
|
|
|
3569
3631
|
},
|
|
3570
3632
|
// forward optional renderTooltipLabel if provided on the chart config
|
|
3571
3633
|
renderTooltipLabel: chart.renderTooltipLabel,
|
|
3572
|
-
paletteId: chart.paletteId
|
|
3634
|
+
paletteId: chart.paletteId,
|
|
3635
|
+
// forward optional number formatting options
|
|
3636
|
+
numberFormat: chart.numberFormat,
|
|
3637
|
+
locale: chart.locale
|
|
3573
3638
|
};
|
|
3574
3639
|
};
|
|
3575
3640
|
var getChartComponent = function getChartComponent(chart, theme) {
|