@spteck/fluentui-react-charts 1.0.10 → 1.0.11
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/fluentui-react-charts.cjs.development.js +101 -60
- 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 +101 -61
- package/dist/fluentui-react-charts.esm.js.map +1 -1
- package/dist/hooks/useChartUtils.d.ts +24 -0
- package/package.json +1 -1
|
@@ -782,6 +782,22 @@ var lightenColor = function lightenColor(hex, amount) {
|
|
|
782
782
|
var getFluentPalette = function getFluentPalette(_theme) {
|
|
783
783
|
return ['#4e79a7', '#f28e2c', '#e15759', '#76b7b2', '#59a14f', '#edc949', '#af7aa1', '#ff9da7', '#9c755f', '#bab0ab', '#8cd17d', '#b6992d', '#d37295', '#fabfd2', '#79706e'];
|
|
784
784
|
};
|
|
785
|
+
/**
|
|
786
|
+
* Returns animation configuration for instant interactions.
|
|
787
|
+
* Disables hover/tooltip animations for immediate response.
|
|
788
|
+
*/
|
|
789
|
+
var getInstantInteractionAnimations = function getInstantInteractionAnimations() {
|
|
790
|
+
return {
|
|
791
|
+
animation: false,
|
|
792
|
+
transitions: {
|
|
793
|
+
active: {
|
|
794
|
+
animation: {
|
|
795
|
+
duration: 0
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
};
|
|
800
|
+
};
|
|
785
801
|
/**
|
|
786
802
|
* Smart Fluent tooltip generator with chart-type awareness.
|
|
787
803
|
* Optimized for fast performance with reduced animation delays.
|
|
@@ -931,7 +947,8 @@ function useChartUtils(theme) {
|
|
|
931
947
|
getFluentPalette: getFluentPalette,
|
|
932
948
|
createFluentTooltip: createFluentTooltip,
|
|
933
949
|
createAxisLabelFormatter: createAxisLabelFormatter,
|
|
934
|
-
debounce: debounce
|
|
950
|
+
debounce: debounce,
|
|
951
|
+
getInstantInteractionAnimations: getInstantInteractionAnimations
|
|
935
952
|
};
|
|
936
953
|
}, [theme]);
|
|
937
954
|
}
|
|
@@ -1034,7 +1051,8 @@ function AreaChart(_ref) {
|
|
|
1034
1051
|
var _useChartUtils = useChartUtils(theme),
|
|
1035
1052
|
lightenColor = _useChartUtils.lightenColor,
|
|
1036
1053
|
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
1037
|
-
createFluentTooltip = _useChartUtils.createFluentTooltip
|
|
1054
|
+
createFluentTooltip = _useChartUtils.createFluentTooltip,
|
|
1055
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
1038
1056
|
var seriesColors = useMemo(function () {
|
|
1039
1057
|
return data.reduce(function (acc, series, idx) {
|
|
1040
1058
|
var base = getFluentPalette(theme)[idx % getFluentPalette(theme).length];
|
|
@@ -1097,9 +1115,10 @@ function AreaChart(_ref) {
|
|
|
1097
1115
|
labelColor = _useMemo.labelColor,
|
|
1098
1116
|
gridColor = _useMemo.gridColor;
|
|
1099
1117
|
var options = useMemo(function () {
|
|
1100
|
-
return {
|
|
1118
|
+
return _extends({
|
|
1101
1119
|
responsive: true,
|
|
1102
|
-
maintainAspectRatio: false
|
|
1120
|
+
maintainAspectRatio: false
|
|
1121
|
+
}, getInstantInteractionAnimations(), {
|
|
1103
1122
|
plugins: {
|
|
1104
1123
|
title: {
|
|
1105
1124
|
display: !!title,
|
|
@@ -1156,7 +1175,7 @@ function AreaChart(_ref) {
|
|
|
1156
1175
|
}
|
|
1157
1176
|
}
|
|
1158
1177
|
}
|
|
1159
|
-
};
|
|
1178
|
+
});
|
|
1160
1179
|
}, [title, showDatalabels, theme, fontFamily, fontSize, labelColor, gridColor, stacked, createFluentTooltip]);
|
|
1161
1180
|
return React__default.createElement("div", {
|
|
1162
1181
|
className: styles.chartWithLegend
|
|
@@ -1195,7 +1214,8 @@ function BarChart(_ref) {
|
|
|
1195
1214
|
var _useChartUtils = useChartUtils(theme),
|
|
1196
1215
|
lightenColor = _useChartUtils.lightenColor,
|
|
1197
1216
|
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
1198
|
-
createFluentTooltip = _useChartUtils.createFluentTooltip
|
|
1217
|
+
createFluentTooltip = _useChartUtils.createFluentTooltip,
|
|
1218
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
1199
1219
|
var styles = useGraphGlobalStyles();
|
|
1200
1220
|
var seriesColors = useMemo(function () {
|
|
1201
1221
|
return data.reduce(function (acc, series, idx) {
|
|
@@ -1259,9 +1279,10 @@ function BarChart(_ref) {
|
|
|
1259
1279
|
labelColor = _useMemo.labelColor,
|
|
1260
1280
|
gridColor = _useMemo.gridColor;
|
|
1261
1281
|
var options = useMemo(function () {
|
|
1262
|
-
return {
|
|
1282
|
+
return _extends({
|
|
1263
1283
|
responsive: true,
|
|
1264
|
-
maintainAspectRatio: false
|
|
1284
|
+
maintainAspectRatio: false
|
|
1285
|
+
}, getInstantInteractionAnimations(), {
|
|
1265
1286
|
plugins: {
|
|
1266
1287
|
title: {
|
|
1267
1288
|
display: !!title,
|
|
@@ -1344,7 +1365,7 @@ function BarChart(_ref) {
|
|
|
1344
1365
|
}
|
|
1345
1366
|
}
|
|
1346
1367
|
})
|
|
1347
|
-
};
|
|
1368
|
+
});
|
|
1348
1369
|
}, [title, showDatalabels, theme, fontFamily, fontSize, labelColor, gridColor, stacked, createFluentTooltip]);
|
|
1349
1370
|
return React__default.createElement("div", {
|
|
1350
1371
|
className: styles.chartWithLegend
|
|
@@ -1386,7 +1407,8 @@ function BarHorizontalChart(_ref) {
|
|
|
1386
1407
|
var _useChartUtils = useChartUtils(theme),
|
|
1387
1408
|
lightenColor = _useChartUtils.lightenColor,
|
|
1388
1409
|
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
1389
|
-
createFluentTooltip = _useChartUtils.createFluentTooltip
|
|
1410
|
+
createFluentTooltip = _useChartUtils.createFluentTooltip,
|
|
1411
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
1390
1412
|
var seriesColors = useMemo(function () {
|
|
1391
1413
|
return data.reduce(function (acc, series, idx) {
|
|
1392
1414
|
var base = getFluentPalette(theme)[idx % getFluentPalette(theme).length];
|
|
@@ -1445,10 +1467,11 @@ function BarHorizontalChart(_ref) {
|
|
|
1445
1467
|
labelColor = _useMemo.labelColor,
|
|
1446
1468
|
gridColor = _useMemo.gridColor;
|
|
1447
1469
|
var options = useMemo(function () {
|
|
1448
|
-
return {
|
|
1470
|
+
return _extends({
|
|
1449
1471
|
indexAxis: 'y',
|
|
1450
1472
|
responsive: true,
|
|
1451
|
-
maintainAspectRatio: false
|
|
1473
|
+
maintainAspectRatio: false
|
|
1474
|
+
}, getInstantInteractionAnimations(), {
|
|
1452
1475
|
plugins: {
|
|
1453
1476
|
title: {
|
|
1454
1477
|
display: !!title,
|
|
@@ -1505,7 +1528,7 @@ function BarHorizontalChart(_ref) {
|
|
|
1505
1528
|
}
|
|
1506
1529
|
}
|
|
1507
1530
|
}
|
|
1508
|
-
};
|
|
1531
|
+
});
|
|
1509
1532
|
}, [title, showDatalabels, theme, fontFamily, fontSize, labelColor, gridColor, stacked, createFluentTooltip]);
|
|
1510
1533
|
return React__default.createElement("div", {
|
|
1511
1534
|
className: styles.chartWithLegend
|
|
@@ -1545,7 +1568,8 @@ function BubbleChart(_ref) {
|
|
|
1545
1568
|
var _useChartUtils = useChartUtils(theme),
|
|
1546
1569
|
lightenColor = _useChartUtils.lightenColor,
|
|
1547
1570
|
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
1548
|
-
createFluentTooltip = _useChartUtils.createFluentTooltip
|
|
1571
|
+
createFluentTooltip = _useChartUtils.createFluentTooltip,
|
|
1572
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
1549
1573
|
var styles = useGraphGlobalStyles();
|
|
1550
1574
|
var seriesColors = useMemo(function () {
|
|
1551
1575
|
return data.reduce(function (acc, series, idx) {
|
|
@@ -1600,9 +1624,10 @@ function BubbleChart(_ref) {
|
|
|
1600
1624
|
gridColor = _useMemo.gridColor;
|
|
1601
1625
|
var options = useMemo(function () {
|
|
1602
1626
|
var _data$2;
|
|
1603
|
-
return {
|
|
1627
|
+
return _extends({
|
|
1604
1628
|
responsive: true,
|
|
1605
|
-
maintainAspectRatio: false
|
|
1629
|
+
maintainAspectRatio: false
|
|
1630
|
+
}, getInstantInteractionAnimations(), {
|
|
1606
1631
|
plugins: {
|
|
1607
1632
|
title: {
|
|
1608
1633
|
display: !!title,
|
|
@@ -1658,7 +1683,7 @@ function BubbleChart(_ref) {
|
|
|
1658
1683
|
}
|
|
1659
1684
|
}
|
|
1660
1685
|
}
|
|
1661
|
-
};
|
|
1686
|
+
});
|
|
1662
1687
|
}, [title, showDataLabels, theme, getPrimary, getSecondary, data, fontFamily, fontSize, labelColor, gridColor, createFluentTooltip]);
|
|
1663
1688
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
1664
1689
|
className: styles.chartWithLegend
|
|
@@ -1699,7 +1724,8 @@ function ComboChart(_ref) {
|
|
|
1699
1724
|
var _useChartUtils = useChartUtils(theme),
|
|
1700
1725
|
lightenColor = _useChartUtils.lightenColor,
|
|
1701
1726
|
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
1702
|
-
createFluentTooltip = _useChartUtils.createFluentTooltip
|
|
1727
|
+
createFluentTooltip = _useChartUtils.createFluentTooltip,
|
|
1728
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
1703
1729
|
var seriesColors = useMemo(function () {
|
|
1704
1730
|
return data.reduce(function (acc, series, idx) {
|
|
1705
1731
|
var base = getFluentPalette(theme)[idx % getFluentPalette(theme).length];
|
|
@@ -1772,9 +1798,10 @@ function ComboChart(_ref) {
|
|
|
1772
1798
|
labelColor = _useMemo.labelColor,
|
|
1773
1799
|
gridColor = _useMemo.gridColor;
|
|
1774
1800
|
var options = useMemo(function () {
|
|
1775
|
-
return {
|
|
1801
|
+
return _extends({
|
|
1776
1802
|
responsive: true,
|
|
1777
|
-
maintainAspectRatio: false
|
|
1803
|
+
maintainAspectRatio: false
|
|
1804
|
+
}, getInstantInteractionAnimations(), {
|
|
1778
1805
|
plugins: {
|
|
1779
1806
|
title: {
|
|
1780
1807
|
display: !!title,
|
|
@@ -1831,7 +1858,7 @@ function ComboChart(_ref) {
|
|
|
1831
1858
|
stacked: false
|
|
1832
1859
|
}
|
|
1833
1860
|
}
|
|
1834
|
-
};
|
|
1861
|
+
});
|
|
1835
1862
|
}, [title, showDataLabels, theme, fontFamily, fontSize, labelColor, gridColor, createFluentTooltip]);
|
|
1836
1863
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
1837
1864
|
className: styles.chartWithLegend
|
|
@@ -1890,7 +1917,8 @@ function DoughnutChart(_ref) {
|
|
|
1890
1917
|
var _useChartUtils = useChartUtils(theme),
|
|
1891
1918
|
lightenColor = _useChartUtils.lightenColor,
|
|
1892
1919
|
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
1893
|
-
createFluentTooltip = _useChartUtils.createFluentTooltip
|
|
1920
|
+
createFluentTooltip = _useChartUtils.createFluentTooltip,
|
|
1921
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
1894
1922
|
var _useState = useState([]),
|
|
1895
1923
|
hiddenLabels = _useState[0],
|
|
1896
1924
|
setHiddenLabels = _useState[1];
|
|
@@ -1965,9 +1993,10 @@ function DoughnutChart(_ref) {
|
|
|
1965
1993
|
});
|
|
1966
1994
|
}, [allLabels, valueMap, colors]);
|
|
1967
1995
|
var options = useMemo(function () {
|
|
1968
|
-
return {
|
|
1996
|
+
return _extends({
|
|
1969
1997
|
responsive: true,
|
|
1970
|
-
maintainAspectRatio: false
|
|
1998
|
+
maintainAspectRatio: false
|
|
1999
|
+
}, getInstantInteractionAnimations(), {
|
|
1971
2000
|
plugins: {
|
|
1972
2001
|
legend: {
|
|
1973
2002
|
display: false
|
|
@@ -1999,7 +2028,7 @@ function DoughnutChart(_ref) {
|
|
|
1999
2028
|
}
|
|
2000
2029
|
}
|
|
2001
2030
|
}
|
|
2002
|
-
};
|
|
2031
|
+
});
|
|
2003
2032
|
}, [title, theme, showDataLabels, createFluentTooltip]);
|
|
2004
2033
|
return React__default.createElement("div", {
|
|
2005
2034
|
className: styles.chartWithLegend
|
|
@@ -2040,7 +2069,8 @@ function FloatingBarChart(_ref) {
|
|
|
2040
2069
|
var _useChartUtils = useChartUtils(theme),
|
|
2041
2070
|
lightenColor = _useChartUtils.lightenColor,
|
|
2042
2071
|
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
2043
|
-
createFluentTooltip = _useChartUtils.createFluentTooltip
|
|
2072
|
+
createFluentTooltip = _useChartUtils.createFluentTooltip,
|
|
2073
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
2044
2074
|
var seriesColors = useMemo(function () {
|
|
2045
2075
|
return data.reduce(function (acc, series, idx) {
|
|
2046
2076
|
var base = getFluentPalette(theme)[idx % getFluentPalette(theme).length];
|
|
@@ -2100,9 +2130,10 @@ function FloatingBarChart(_ref) {
|
|
|
2100
2130
|
labelColor = _useMemo.labelColor,
|
|
2101
2131
|
gridColor = _useMemo.gridColor;
|
|
2102
2132
|
var options = useMemo(function () {
|
|
2103
|
-
return {
|
|
2133
|
+
return _extends({
|
|
2104
2134
|
responsive: true,
|
|
2105
|
-
maintainAspectRatio: false
|
|
2135
|
+
maintainAspectRatio: false
|
|
2136
|
+
}, getInstantInteractionAnimations(), {
|
|
2106
2137
|
plugins: {
|
|
2107
2138
|
title: {
|
|
2108
2139
|
display: !!title,
|
|
@@ -2157,7 +2188,7 @@ function FloatingBarChart(_ref) {
|
|
|
2157
2188
|
}
|
|
2158
2189
|
}
|
|
2159
2190
|
}
|
|
2160
|
-
};
|
|
2191
|
+
});
|
|
2161
2192
|
}, [title, theme, showDataLabels, labelColor, fontFamily, fontSize, gridColor, createFluentTooltip]);
|
|
2162
2193
|
return React__default.createElement("div", {
|
|
2163
2194
|
className: styles.chartWithLegend
|
|
@@ -2199,7 +2230,8 @@ function LineChart(_ref) {
|
|
|
2199
2230
|
var _useChartUtils = useChartUtils(theme),
|
|
2200
2231
|
lightenColor = _useChartUtils.lightenColor,
|
|
2201
2232
|
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
2202
|
-
createFluentTooltip = _useChartUtils.createFluentTooltip
|
|
2233
|
+
createFluentTooltip = _useChartUtils.createFluentTooltip,
|
|
2234
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
2203
2235
|
var seriesColors = useMemo(function () {
|
|
2204
2236
|
return data.reduce(function (acc, series, idx) {
|
|
2205
2237
|
var base = getFluentPalette(theme)[idx % getFluentPalette(theme).length];
|
|
@@ -2262,9 +2294,10 @@ function LineChart(_ref) {
|
|
|
2262
2294
|
labelColor = _useMemo.labelColor,
|
|
2263
2295
|
gridColor = _useMemo.gridColor;
|
|
2264
2296
|
var options = useMemo(function () {
|
|
2265
|
-
return {
|
|
2297
|
+
return _extends({
|
|
2266
2298
|
responsive: true,
|
|
2267
|
-
maintainAspectRatio: false
|
|
2299
|
+
maintainAspectRatio: false
|
|
2300
|
+
}, getInstantInteractionAnimations(), {
|
|
2268
2301
|
plugins: {
|
|
2269
2302
|
title: {
|
|
2270
2303
|
display: !!title,
|
|
@@ -2319,7 +2352,7 @@ function LineChart(_ref) {
|
|
|
2319
2352
|
}
|
|
2320
2353
|
}
|
|
2321
2354
|
}
|
|
2322
|
-
};
|
|
2355
|
+
});
|
|
2323
2356
|
}, [title, theme, showDataLabels, labelColor, fontFamily, fontSize, gridColor, createFluentTooltip]);
|
|
2324
2357
|
return React__default.createElement("div", {
|
|
2325
2358
|
className: styles.chartWithLegend
|
|
@@ -2427,9 +2460,10 @@ function PieChart(_ref) {
|
|
|
2427
2460
|
chartData = _useMemo2.chartData,
|
|
2428
2461
|
legendEntries = _useMemo2.legendEntries;
|
|
2429
2462
|
var options = useMemo(function () {
|
|
2430
|
-
return {
|
|
2463
|
+
return _extends({
|
|
2431
2464
|
responsive: true,
|
|
2432
|
-
maintainAspectRatio: false
|
|
2465
|
+
maintainAspectRatio: false
|
|
2466
|
+
}, getInstantInteractionAnimations(), {
|
|
2433
2467
|
plugins: {
|
|
2434
2468
|
tooltip: createFluentTooltip(theme),
|
|
2435
2469
|
legend: {
|
|
@@ -2458,7 +2492,7 @@ function PieChart(_ref) {
|
|
|
2458
2492
|
}
|
|
2459
2493
|
}
|
|
2460
2494
|
}
|
|
2461
|
-
};
|
|
2495
|
+
});
|
|
2462
2496
|
}, [theme, title, showDataLabels]);
|
|
2463
2497
|
return React__default.createElement("div", {
|
|
2464
2498
|
className: styles.chartWithLegend
|
|
@@ -2519,7 +2553,8 @@ function PolarChart(_ref) {
|
|
|
2519
2553
|
theme = _ref$theme === void 0 ? webLightTheme : _ref$theme;
|
|
2520
2554
|
var _useChartUtils = useChartUtils(theme),
|
|
2521
2555
|
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
2522
|
-
lightenColor = _useChartUtils.lightenColor
|
|
2556
|
+
lightenColor = _useChartUtils.lightenColor,
|
|
2557
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
2523
2558
|
var _useState = useState([]),
|
|
2524
2559
|
hiddenLabels = _useState[0],
|
|
2525
2560
|
setHiddenLabels = _useState[1];
|
|
@@ -2582,9 +2617,10 @@ function PolarChart(_ref) {
|
|
|
2582
2617
|
};
|
|
2583
2618
|
}, [filteredLabels, values, visibleColors]);
|
|
2584
2619
|
var options = useMemo(function () {
|
|
2585
|
-
return {
|
|
2620
|
+
return _extends({
|
|
2586
2621
|
responsive: true,
|
|
2587
|
-
maintainAspectRatio: false
|
|
2622
|
+
maintainAspectRatio: false
|
|
2623
|
+
}, getInstantInteractionAnimations(), {
|
|
2588
2624
|
plugins: {
|
|
2589
2625
|
title: {
|
|
2590
2626
|
display: !!title,
|
|
@@ -2631,7 +2667,7 @@ function PolarChart(_ref) {
|
|
|
2631
2667
|
}
|
|
2632
2668
|
}
|
|
2633
2669
|
}
|
|
2634
|
-
};
|
|
2670
|
+
});
|
|
2635
2671
|
}, [theme, title, showDataLabels, createFluentTooltip]);
|
|
2636
2672
|
return React__default.createElement("div", {
|
|
2637
2673
|
className: styles.chartWithLegend
|
|
@@ -2671,7 +2707,8 @@ function RadarChart(_ref) {
|
|
|
2671
2707
|
var styles = useGraphGlobalStyles();
|
|
2672
2708
|
var _useChartUtils = useChartUtils(theme),
|
|
2673
2709
|
lightenColor = _useChartUtils.lightenColor,
|
|
2674
|
-
getFluentPalette = _useChartUtils.getFluentPalette
|
|
2710
|
+
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
2711
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
2675
2712
|
var seriesColors = useMemo(function () {
|
|
2676
2713
|
return data.reduce(function (acc, series, idx) {
|
|
2677
2714
|
var base = getFluentPalette(theme)[idx % getFluentPalette(theme).length];
|
|
@@ -2730,9 +2767,10 @@ function RadarChart(_ref) {
|
|
|
2730
2767
|
labelColor = _useMemo.labelColor,
|
|
2731
2768
|
gridColor = _useMemo.gridColor;
|
|
2732
2769
|
var options = useMemo(function () {
|
|
2733
|
-
return {
|
|
2770
|
+
return _extends({
|
|
2734
2771
|
responsive: true,
|
|
2735
|
-
maintainAspectRatio: false
|
|
2772
|
+
maintainAspectRatio: false
|
|
2773
|
+
}, getInstantInteractionAnimations(), {
|
|
2736
2774
|
plugins: {
|
|
2737
2775
|
title: {
|
|
2738
2776
|
display: !!title,
|
|
@@ -2785,7 +2823,7 @@ function RadarChart(_ref) {
|
|
|
2785
2823
|
}
|
|
2786
2824
|
}
|
|
2787
2825
|
}
|
|
2788
|
-
};
|
|
2826
|
+
});
|
|
2789
2827
|
}, [theme, title, showDataLabels, createFluentTooltip, gridColor, labelColor, fontFamily, fontSize]);
|
|
2790
2828
|
return React__default.createElement("div", {
|
|
2791
2829
|
className: styles.chartWithLegend
|
|
@@ -2824,7 +2862,8 @@ function ScatterChart(_ref) {
|
|
|
2824
2862
|
var _useChartUtils = useChartUtils(theme),
|
|
2825
2863
|
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
2826
2864
|
lightenColor = _useChartUtils.lightenColor,
|
|
2827
|
-
createFluentTooltip = _useChartUtils.createFluentTooltip
|
|
2865
|
+
createFluentTooltip = _useChartUtils.createFluentTooltip,
|
|
2866
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
2828
2867
|
var seriesColors = useMemo(function () {
|
|
2829
2868
|
return data.reduce(function (acc, series, idx) {
|
|
2830
2869
|
var base = getFluentPalette(theme)[idx % getFluentPalette(theme).length];
|
|
@@ -2872,9 +2911,10 @@ function ScatterChart(_ref) {
|
|
|
2872
2911
|
labelColor = _useMemo.labelColor,
|
|
2873
2912
|
gridColor = _useMemo.gridColor;
|
|
2874
2913
|
var options = useMemo(function () {
|
|
2875
|
-
return {
|
|
2914
|
+
return _extends({
|
|
2876
2915
|
responsive: true,
|
|
2877
|
-
maintainAspectRatio: false
|
|
2916
|
+
maintainAspectRatio: false
|
|
2917
|
+
}, getInstantInteractionAnimations(), {
|
|
2878
2918
|
plugins: {
|
|
2879
2919
|
title: {
|
|
2880
2920
|
display: !!title,
|
|
@@ -2932,7 +2972,7 @@ function ScatterChart(_ref) {
|
|
|
2932
2972
|
}
|
|
2933
2973
|
}
|
|
2934
2974
|
}
|
|
2935
|
-
};
|
|
2975
|
+
});
|
|
2936
2976
|
}, [theme, title, showDataLabels, createFluentTooltip, labelColor, fontFamily, fontSize, gridColor]);
|
|
2937
2977
|
return React__default.createElement("div", {
|
|
2938
2978
|
className: styles.chartWithLegend
|
|
@@ -2972,7 +3012,8 @@ function StackedLineChart(_ref) {
|
|
|
2972
3012
|
var _useChartUtils = useChartUtils(theme),
|
|
2973
3013
|
lightenColor = _useChartUtils.lightenColor,
|
|
2974
3014
|
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
2975
|
-
createFluentTooltip = _useChartUtils.createFluentTooltip
|
|
3015
|
+
createFluentTooltip = _useChartUtils.createFluentTooltip,
|
|
3016
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
2976
3017
|
var seriesColors = useMemo(function () {
|
|
2977
3018
|
return data.reduce(function (acc, series, idx) {
|
|
2978
3019
|
var base = getFluentPalette(theme)[idx % getFluentPalette(theme).length];
|
|
@@ -3035,9 +3076,10 @@ function StackedLineChart(_ref) {
|
|
|
3035
3076
|
labelColor = _useMemo.labelColor,
|
|
3036
3077
|
gridColor = _useMemo.gridColor;
|
|
3037
3078
|
var options = useMemo(function () {
|
|
3038
|
-
return {
|
|
3079
|
+
return _extends({
|
|
3039
3080
|
responsive: true,
|
|
3040
|
-
maintainAspectRatio: false
|
|
3081
|
+
maintainAspectRatio: false
|
|
3082
|
+
}, getInstantInteractionAnimations(), {
|
|
3041
3083
|
plugins: {
|
|
3042
3084
|
title: {
|
|
3043
3085
|
display: !!title,
|
|
@@ -3094,7 +3136,7 @@ function StackedLineChart(_ref) {
|
|
|
3094
3136
|
}
|
|
3095
3137
|
}
|
|
3096
3138
|
}
|
|
3097
|
-
};
|
|
3139
|
+
});
|
|
3098
3140
|
}, [theme, title, showDataLabels, createFluentTooltip, labelColor, fontFamily, fontSize, gridColor]);
|
|
3099
3141
|
return React__default.createElement("div", {
|
|
3100
3142
|
className: styles.chartWithLegend
|
|
@@ -3136,7 +3178,8 @@ function SteamChart(_ref) {
|
|
|
3136
3178
|
var styles = useGraphGlobalStyles();
|
|
3137
3179
|
var _useChartUtils = useChartUtils(theme),
|
|
3138
3180
|
lightenColor = _useChartUtils.lightenColor,
|
|
3139
|
-
getFluentPalette = _useChartUtils.getFluentPalette
|
|
3181
|
+
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
3182
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
3140
3183
|
var seriesColors = useMemo(function () {
|
|
3141
3184
|
return data.reduce(function (acc, series, idx) {
|
|
3142
3185
|
var base = getFluentPalette(theme)[idx % getFluentPalette(theme).length];
|
|
@@ -3210,13 +3253,10 @@ function SteamChart(_ref) {
|
|
|
3210
3253
|
labelColor = _useMemo.labelColor,
|
|
3211
3254
|
gridColor = _useMemo.gridColor;
|
|
3212
3255
|
var options = useMemo(function () {
|
|
3213
|
-
return {
|
|
3256
|
+
return _extends({
|
|
3214
3257
|
responsive: true,
|
|
3215
|
-
maintainAspectRatio: false
|
|
3216
|
-
|
|
3217
|
-
duration: 800,
|
|
3218
|
-
easing: 'easeOutQuart'
|
|
3219
|
-
},
|
|
3258
|
+
maintainAspectRatio: false
|
|
3259
|
+
}, getInstantInteractionAnimations(), {
|
|
3220
3260
|
plugins: {
|
|
3221
3261
|
title: {
|
|
3222
3262
|
display: !!title,
|
|
@@ -3282,7 +3322,7 @@ function SteamChart(_ref) {
|
|
|
3282
3322
|
max: showPercent ? 100 : undefined
|
|
3283
3323
|
}
|
|
3284
3324
|
}
|
|
3285
|
-
};
|
|
3325
|
+
});
|
|
3286
3326
|
}, [theme, title, showDataLabels, createFluentTooltip, labelColor, fontFamily, fontSize, gridColor, showPercent]);
|
|
3287
3327
|
return React__default.createElement("div", {
|
|
3288
3328
|
className: styles.chartWithLegend
|
|
@@ -4088,5 +4128,5 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
4088
4128
|
}, renderCards));
|
|
4089
4129
|
};
|
|
4090
4130
|
|
|
4091
|
-
export { AreaChart, BarChart, BarHorizontalChart, BubbleChart, ComboChart, Dashboard, DoughnutChart, FloatingBarChart, LineChart, PieChart, PolarChart, RadarChart, ScatterChart, StackedLineChart, SteamChart, createAxisLabelFormatter, createFluentTooltip, getFluentPalette, lightenColor, useChartUtils, useChartUtils as useGraphUtils };
|
|
4131
|
+
export { AreaChart, BarChart, BarHorizontalChart, BubbleChart, ComboChart, Dashboard, DoughnutChart, FloatingBarChart, LineChart, PieChart, PolarChart, RadarChart, ScatterChart, StackedLineChart, SteamChart, createAxisLabelFormatter, createFluentTooltip, getFluentPalette, getInstantInteractionAnimations, lightenColor, useChartUtils, useChartUtils as useGraphUtils };
|
|
4092
4132
|
//# sourceMappingURL=fluentui-react-charts.esm.js.map
|