@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
|
@@ -789,6 +789,22 @@ var lightenColor = function lightenColor(hex, amount) {
|
|
|
789
789
|
var getFluentPalette = function getFluentPalette(_theme) {
|
|
790
790
|
return ['#4e79a7', '#f28e2c', '#e15759', '#76b7b2', '#59a14f', '#edc949', '#af7aa1', '#ff9da7', '#9c755f', '#bab0ab', '#8cd17d', '#b6992d', '#d37295', '#fabfd2', '#79706e'];
|
|
791
791
|
};
|
|
792
|
+
/**
|
|
793
|
+
* Returns animation configuration for instant interactions.
|
|
794
|
+
* Disables hover/tooltip animations for immediate response.
|
|
795
|
+
*/
|
|
796
|
+
var getInstantInteractionAnimations = function getInstantInteractionAnimations() {
|
|
797
|
+
return {
|
|
798
|
+
animation: false,
|
|
799
|
+
transitions: {
|
|
800
|
+
active: {
|
|
801
|
+
animation: {
|
|
802
|
+
duration: 0
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
};
|
|
807
|
+
};
|
|
792
808
|
/**
|
|
793
809
|
* Smart Fluent tooltip generator with chart-type awareness.
|
|
794
810
|
* Optimized for fast performance with reduced animation delays.
|
|
@@ -938,7 +954,8 @@ function useChartUtils(theme) {
|
|
|
938
954
|
getFluentPalette: getFluentPalette,
|
|
939
955
|
createFluentTooltip: createFluentTooltip,
|
|
940
956
|
createAxisLabelFormatter: createAxisLabelFormatter,
|
|
941
|
-
debounce: debounce
|
|
957
|
+
debounce: debounce,
|
|
958
|
+
getInstantInteractionAnimations: getInstantInteractionAnimations
|
|
942
959
|
};
|
|
943
960
|
}, [theme]);
|
|
944
961
|
}
|
|
@@ -1041,7 +1058,8 @@ function AreaChart(_ref) {
|
|
|
1041
1058
|
var _useChartUtils = useChartUtils(theme),
|
|
1042
1059
|
lightenColor = _useChartUtils.lightenColor,
|
|
1043
1060
|
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
1044
|
-
createFluentTooltip = _useChartUtils.createFluentTooltip
|
|
1061
|
+
createFluentTooltip = _useChartUtils.createFluentTooltip,
|
|
1062
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
1045
1063
|
var seriesColors = React.useMemo(function () {
|
|
1046
1064
|
return data.reduce(function (acc, series, idx) {
|
|
1047
1065
|
var base = getFluentPalette(theme)[idx % getFluentPalette(theme).length];
|
|
@@ -1104,9 +1122,10 @@ function AreaChart(_ref) {
|
|
|
1104
1122
|
labelColor = _useMemo.labelColor,
|
|
1105
1123
|
gridColor = _useMemo.gridColor;
|
|
1106
1124
|
var options = React.useMemo(function () {
|
|
1107
|
-
return {
|
|
1125
|
+
return _extends({
|
|
1108
1126
|
responsive: true,
|
|
1109
|
-
maintainAspectRatio: false
|
|
1127
|
+
maintainAspectRatio: false
|
|
1128
|
+
}, getInstantInteractionAnimations(), {
|
|
1110
1129
|
plugins: {
|
|
1111
1130
|
title: {
|
|
1112
1131
|
display: !!title,
|
|
@@ -1163,7 +1182,7 @@ function AreaChart(_ref) {
|
|
|
1163
1182
|
}
|
|
1164
1183
|
}
|
|
1165
1184
|
}
|
|
1166
|
-
};
|
|
1185
|
+
});
|
|
1167
1186
|
}, [title, showDatalabels, theme, fontFamily, fontSize, labelColor, gridColor, stacked, createFluentTooltip]);
|
|
1168
1187
|
return React__default.createElement("div", {
|
|
1169
1188
|
className: styles.chartWithLegend
|
|
@@ -1202,7 +1221,8 @@ function BarChart(_ref) {
|
|
|
1202
1221
|
var _useChartUtils = useChartUtils(theme),
|
|
1203
1222
|
lightenColor = _useChartUtils.lightenColor,
|
|
1204
1223
|
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
1205
|
-
createFluentTooltip = _useChartUtils.createFluentTooltip
|
|
1224
|
+
createFluentTooltip = _useChartUtils.createFluentTooltip,
|
|
1225
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
1206
1226
|
var styles = useGraphGlobalStyles();
|
|
1207
1227
|
var seriesColors = React.useMemo(function () {
|
|
1208
1228
|
return data.reduce(function (acc, series, idx) {
|
|
@@ -1266,9 +1286,10 @@ function BarChart(_ref) {
|
|
|
1266
1286
|
labelColor = _useMemo.labelColor,
|
|
1267
1287
|
gridColor = _useMemo.gridColor;
|
|
1268
1288
|
var options = React.useMemo(function () {
|
|
1269
|
-
return {
|
|
1289
|
+
return _extends({
|
|
1270
1290
|
responsive: true,
|
|
1271
|
-
maintainAspectRatio: false
|
|
1291
|
+
maintainAspectRatio: false
|
|
1292
|
+
}, getInstantInteractionAnimations(), {
|
|
1272
1293
|
plugins: {
|
|
1273
1294
|
title: {
|
|
1274
1295
|
display: !!title,
|
|
@@ -1351,7 +1372,7 @@ function BarChart(_ref) {
|
|
|
1351
1372
|
}
|
|
1352
1373
|
}
|
|
1353
1374
|
})
|
|
1354
|
-
};
|
|
1375
|
+
});
|
|
1355
1376
|
}, [title, showDatalabels, theme, fontFamily, fontSize, labelColor, gridColor, stacked, createFluentTooltip]);
|
|
1356
1377
|
return React__default.createElement("div", {
|
|
1357
1378
|
className: styles.chartWithLegend
|
|
@@ -1393,7 +1414,8 @@ function BarHorizontalChart(_ref) {
|
|
|
1393
1414
|
var _useChartUtils = useChartUtils(theme),
|
|
1394
1415
|
lightenColor = _useChartUtils.lightenColor,
|
|
1395
1416
|
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
1396
|
-
createFluentTooltip = _useChartUtils.createFluentTooltip
|
|
1417
|
+
createFluentTooltip = _useChartUtils.createFluentTooltip,
|
|
1418
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
1397
1419
|
var seriesColors = React.useMemo(function () {
|
|
1398
1420
|
return data.reduce(function (acc, series, idx) {
|
|
1399
1421
|
var base = getFluentPalette(theme)[idx % getFluentPalette(theme).length];
|
|
@@ -1452,10 +1474,11 @@ function BarHorizontalChart(_ref) {
|
|
|
1452
1474
|
labelColor = _useMemo.labelColor,
|
|
1453
1475
|
gridColor = _useMemo.gridColor;
|
|
1454
1476
|
var options = React.useMemo(function () {
|
|
1455
|
-
return {
|
|
1477
|
+
return _extends({
|
|
1456
1478
|
indexAxis: 'y',
|
|
1457
1479
|
responsive: true,
|
|
1458
|
-
maintainAspectRatio: false
|
|
1480
|
+
maintainAspectRatio: false
|
|
1481
|
+
}, getInstantInteractionAnimations(), {
|
|
1459
1482
|
plugins: {
|
|
1460
1483
|
title: {
|
|
1461
1484
|
display: !!title,
|
|
@@ -1512,7 +1535,7 @@ function BarHorizontalChart(_ref) {
|
|
|
1512
1535
|
}
|
|
1513
1536
|
}
|
|
1514
1537
|
}
|
|
1515
|
-
};
|
|
1538
|
+
});
|
|
1516
1539
|
}, [title, showDatalabels, theme, fontFamily, fontSize, labelColor, gridColor, stacked, createFluentTooltip]);
|
|
1517
1540
|
return React__default.createElement("div", {
|
|
1518
1541
|
className: styles.chartWithLegend
|
|
@@ -1552,7 +1575,8 @@ function BubbleChart(_ref) {
|
|
|
1552
1575
|
var _useChartUtils = useChartUtils(theme),
|
|
1553
1576
|
lightenColor = _useChartUtils.lightenColor,
|
|
1554
1577
|
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
1555
|
-
createFluentTooltip = _useChartUtils.createFluentTooltip
|
|
1578
|
+
createFluentTooltip = _useChartUtils.createFluentTooltip,
|
|
1579
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
1556
1580
|
var styles = useGraphGlobalStyles();
|
|
1557
1581
|
var seriesColors = React.useMemo(function () {
|
|
1558
1582
|
return data.reduce(function (acc, series, idx) {
|
|
@@ -1607,9 +1631,10 @@ function BubbleChart(_ref) {
|
|
|
1607
1631
|
gridColor = _useMemo.gridColor;
|
|
1608
1632
|
var options = React.useMemo(function () {
|
|
1609
1633
|
var _data$2;
|
|
1610
|
-
return {
|
|
1634
|
+
return _extends({
|
|
1611
1635
|
responsive: true,
|
|
1612
|
-
maintainAspectRatio: false
|
|
1636
|
+
maintainAspectRatio: false
|
|
1637
|
+
}, getInstantInteractionAnimations(), {
|
|
1613
1638
|
plugins: {
|
|
1614
1639
|
title: {
|
|
1615
1640
|
display: !!title,
|
|
@@ -1665,7 +1690,7 @@ function BubbleChart(_ref) {
|
|
|
1665
1690
|
}
|
|
1666
1691
|
}
|
|
1667
1692
|
}
|
|
1668
|
-
};
|
|
1693
|
+
});
|
|
1669
1694
|
}, [title, showDataLabels, theme, getPrimary, getSecondary, data, fontFamily, fontSize, labelColor, gridColor, createFluentTooltip]);
|
|
1670
1695
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
1671
1696
|
className: styles.chartWithLegend
|
|
@@ -1706,7 +1731,8 @@ function ComboChart(_ref) {
|
|
|
1706
1731
|
var _useChartUtils = useChartUtils(theme),
|
|
1707
1732
|
lightenColor = _useChartUtils.lightenColor,
|
|
1708
1733
|
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
1709
|
-
createFluentTooltip = _useChartUtils.createFluentTooltip
|
|
1734
|
+
createFluentTooltip = _useChartUtils.createFluentTooltip,
|
|
1735
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
1710
1736
|
var seriesColors = React.useMemo(function () {
|
|
1711
1737
|
return data.reduce(function (acc, series, idx) {
|
|
1712
1738
|
var base = getFluentPalette(theme)[idx % getFluentPalette(theme).length];
|
|
@@ -1779,9 +1805,10 @@ function ComboChart(_ref) {
|
|
|
1779
1805
|
labelColor = _useMemo.labelColor,
|
|
1780
1806
|
gridColor = _useMemo.gridColor;
|
|
1781
1807
|
var options = React.useMemo(function () {
|
|
1782
|
-
return {
|
|
1808
|
+
return _extends({
|
|
1783
1809
|
responsive: true,
|
|
1784
|
-
maintainAspectRatio: false
|
|
1810
|
+
maintainAspectRatio: false
|
|
1811
|
+
}, getInstantInteractionAnimations(), {
|
|
1785
1812
|
plugins: {
|
|
1786
1813
|
title: {
|
|
1787
1814
|
display: !!title,
|
|
@@ -1838,7 +1865,7 @@ function ComboChart(_ref) {
|
|
|
1838
1865
|
stacked: false
|
|
1839
1866
|
}
|
|
1840
1867
|
}
|
|
1841
|
-
};
|
|
1868
|
+
});
|
|
1842
1869
|
}, [title, showDataLabels, theme, fontFamily, fontSize, labelColor, gridColor, createFluentTooltip]);
|
|
1843
1870
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
1844
1871
|
className: styles.chartWithLegend
|
|
@@ -1897,7 +1924,8 @@ function DoughnutChart(_ref) {
|
|
|
1897
1924
|
var _useChartUtils = useChartUtils(theme),
|
|
1898
1925
|
lightenColor = _useChartUtils.lightenColor,
|
|
1899
1926
|
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
1900
|
-
createFluentTooltip = _useChartUtils.createFluentTooltip
|
|
1927
|
+
createFluentTooltip = _useChartUtils.createFluentTooltip,
|
|
1928
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
1901
1929
|
var _useState = React.useState([]),
|
|
1902
1930
|
hiddenLabels = _useState[0],
|
|
1903
1931
|
setHiddenLabels = _useState[1];
|
|
@@ -1972,9 +2000,10 @@ function DoughnutChart(_ref) {
|
|
|
1972
2000
|
});
|
|
1973
2001
|
}, [allLabels, valueMap, colors]);
|
|
1974
2002
|
var options = React.useMemo(function () {
|
|
1975
|
-
return {
|
|
2003
|
+
return _extends({
|
|
1976
2004
|
responsive: true,
|
|
1977
|
-
maintainAspectRatio: false
|
|
2005
|
+
maintainAspectRatio: false
|
|
2006
|
+
}, getInstantInteractionAnimations(), {
|
|
1978
2007
|
plugins: {
|
|
1979
2008
|
legend: {
|
|
1980
2009
|
display: false
|
|
@@ -2006,7 +2035,7 @@ function DoughnutChart(_ref) {
|
|
|
2006
2035
|
}
|
|
2007
2036
|
}
|
|
2008
2037
|
}
|
|
2009
|
-
};
|
|
2038
|
+
});
|
|
2010
2039
|
}, [title, theme, showDataLabels, createFluentTooltip]);
|
|
2011
2040
|
return React__default.createElement("div", {
|
|
2012
2041
|
className: styles.chartWithLegend
|
|
@@ -2047,7 +2076,8 @@ function FloatingBarChart(_ref) {
|
|
|
2047
2076
|
var _useChartUtils = useChartUtils(theme),
|
|
2048
2077
|
lightenColor = _useChartUtils.lightenColor,
|
|
2049
2078
|
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
2050
|
-
createFluentTooltip = _useChartUtils.createFluentTooltip
|
|
2079
|
+
createFluentTooltip = _useChartUtils.createFluentTooltip,
|
|
2080
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
2051
2081
|
var seriesColors = React.useMemo(function () {
|
|
2052
2082
|
return data.reduce(function (acc, series, idx) {
|
|
2053
2083
|
var base = getFluentPalette(theme)[idx % getFluentPalette(theme).length];
|
|
@@ -2107,9 +2137,10 @@ function FloatingBarChart(_ref) {
|
|
|
2107
2137
|
labelColor = _useMemo.labelColor,
|
|
2108
2138
|
gridColor = _useMemo.gridColor;
|
|
2109
2139
|
var options = React.useMemo(function () {
|
|
2110
|
-
return {
|
|
2140
|
+
return _extends({
|
|
2111
2141
|
responsive: true,
|
|
2112
|
-
maintainAspectRatio: false
|
|
2142
|
+
maintainAspectRatio: false
|
|
2143
|
+
}, getInstantInteractionAnimations(), {
|
|
2113
2144
|
plugins: {
|
|
2114
2145
|
title: {
|
|
2115
2146
|
display: !!title,
|
|
@@ -2164,7 +2195,7 @@ function FloatingBarChart(_ref) {
|
|
|
2164
2195
|
}
|
|
2165
2196
|
}
|
|
2166
2197
|
}
|
|
2167
|
-
};
|
|
2198
|
+
});
|
|
2168
2199
|
}, [title, theme, showDataLabels, labelColor, fontFamily, fontSize, gridColor, createFluentTooltip]);
|
|
2169
2200
|
return React__default.createElement("div", {
|
|
2170
2201
|
className: styles.chartWithLegend
|
|
@@ -2206,7 +2237,8 @@ function LineChart(_ref) {
|
|
|
2206
2237
|
var _useChartUtils = useChartUtils(theme),
|
|
2207
2238
|
lightenColor = _useChartUtils.lightenColor,
|
|
2208
2239
|
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
2209
|
-
createFluentTooltip = _useChartUtils.createFluentTooltip
|
|
2240
|
+
createFluentTooltip = _useChartUtils.createFluentTooltip,
|
|
2241
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
2210
2242
|
var seriesColors = React.useMemo(function () {
|
|
2211
2243
|
return data.reduce(function (acc, series, idx) {
|
|
2212
2244
|
var base = getFluentPalette(theme)[idx % getFluentPalette(theme).length];
|
|
@@ -2269,9 +2301,10 @@ function LineChart(_ref) {
|
|
|
2269
2301
|
labelColor = _useMemo.labelColor,
|
|
2270
2302
|
gridColor = _useMemo.gridColor;
|
|
2271
2303
|
var options = React.useMemo(function () {
|
|
2272
|
-
return {
|
|
2304
|
+
return _extends({
|
|
2273
2305
|
responsive: true,
|
|
2274
|
-
maintainAspectRatio: false
|
|
2306
|
+
maintainAspectRatio: false
|
|
2307
|
+
}, getInstantInteractionAnimations(), {
|
|
2275
2308
|
plugins: {
|
|
2276
2309
|
title: {
|
|
2277
2310
|
display: !!title,
|
|
@@ -2326,7 +2359,7 @@ function LineChart(_ref) {
|
|
|
2326
2359
|
}
|
|
2327
2360
|
}
|
|
2328
2361
|
}
|
|
2329
|
-
};
|
|
2362
|
+
});
|
|
2330
2363
|
}, [title, theme, showDataLabels, labelColor, fontFamily, fontSize, gridColor, createFluentTooltip]);
|
|
2331
2364
|
return React__default.createElement("div", {
|
|
2332
2365
|
className: styles.chartWithLegend
|
|
@@ -2434,9 +2467,10 @@ function PieChart(_ref) {
|
|
|
2434
2467
|
chartData = _useMemo2.chartData,
|
|
2435
2468
|
legendEntries = _useMemo2.legendEntries;
|
|
2436
2469
|
var options = React.useMemo(function () {
|
|
2437
|
-
return {
|
|
2470
|
+
return _extends({
|
|
2438
2471
|
responsive: true,
|
|
2439
|
-
maintainAspectRatio: false
|
|
2472
|
+
maintainAspectRatio: false
|
|
2473
|
+
}, getInstantInteractionAnimations(), {
|
|
2440
2474
|
plugins: {
|
|
2441
2475
|
tooltip: createFluentTooltip(theme),
|
|
2442
2476
|
legend: {
|
|
@@ -2465,7 +2499,7 @@ function PieChart(_ref) {
|
|
|
2465
2499
|
}
|
|
2466
2500
|
}
|
|
2467
2501
|
}
|
|
2468
|
-
};
|
|
2502
|
+
});
|
|
2469
2503
|
}, [theme, title, showDataLabels]);
|
|
2470
2504
|
return React__default.createElement("div", {
|
|
2471
2505
|
className: styles.chartWithLegend
|
|
@@ -2526,7 +2560,8 @@ function PolarChart(_ref) {
|
|
|
2526
2560
|
theme = _ref$theme === void 0 ? reactComponents.webLightTheme : _ref$theme;
|
|
2527
2561
|
var _useChartUtils = useChartUtils(theme),
|
|
2528
2562
|
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
2529
|
-
lightenColor = _useChartUtils.lightenColor
|
|
2563
|
+
lightenColor = _useChartUtils.lightenColor,
|
|
2564
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
2530
2565
|
var _useState = React.useState([]),
|
|
2531
2566
|
hiddenLabels = _useState[0],
|
|
2532
2567
|
setHiddenLabels = _useState[1];
|
|
@@ -2589,9 +2624,10 @@ function PolarChart(_ref) {
|
|
|
2589
2624
|
};
|
|
2590
2625
|
}, [filteredLabels, values, visibleColors]);
|
|
2591
2626
|
var options = React.useMemo(function () {
|
|
2592
|
-
return {
|
|
2627
|
+
return _extends({
|
|
2593
2628
|
responsive: true,
|
|
2594
|
-
maintainAspectRatio: false
|
|
2629
|
+
maintainAspectRatio: false
|
|
2630
|
+
}, getInstantInteractionAnimations(), {
|
|
2595
2631
|
plugins: {
|
|
2596
2632
|
title: {
|
|
2597
2633
|
display: !!title,
|
|
@@ -2638,7 +2674,7 @@ function PolarChart(_ref) {
|
|
|
2638
2674
|
}
|
|
2639
2675
|
}
|
|
2640
2676
|
}
|
|
2641
|
-
};
|
|
2677
|
+
});
|
|
2642
2678
|
}, [theme, title, showDataLabels, createFluentTooltip]);
|
|
2643
2679
|
return React__default.createElement("div", {
|
|
2644
2680
|
className: styles.chartWithLegend
|
|
@@ -2678,7 +2714,8 @@ function RadarChart(_ref) {
|
|
|
2678
2714
|
var styles = useGraphGlobalStyles();
|
|
2679
2715
|
var _useChartUtils = useChartUtils(theme),
|
|
2680
2716
|
lightenColor = _useChartUtils.lightenColor,
|
|
2681
|
-
getFluentPalette = _useChartUtils.getFluentPalette
|
|
2717
|
+
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
2718
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
2682
2719
|
var seriesColors = React.useMemo(function () {
|
|
2683
2720
|
return data.reduce(function (acc, series, idx) {
|
|
2684
2721
|
var base = getFluentPalette(theme)[idx % getFluentPalette(theme).length];
|
|
@@ -2737,9 +2774,10 @@ function RadarChart(_ref) {
|
|
|
2737
2774
|
labelColor = _useMemo.labelColor,
|
|
2738
2775
|
gridColor = _useMemo.gridColor;
|
|
2739
2776
|
var options = React.useMemo(function () {
|
|
2740
|
-
return {
|
|
2777
|
+
return _extends({
|
|
2741
2778
|
responsive: true,
|
|
2742
|
-
maintainAspectRatio: false
|
|
2779
|
+
maintainAspectRatio: false
|
|
2780
|
+
}, getInstantInteractionAnimations(), {
|
|
2743
2781
|
plugins: {
|
|
2744
2782
|
title: {
|
|
2745
2783
|
display: !!title,
|
|
@@ -2792,7 +2830,7 @@ function RadarChart(_ref) {
|
|
|
2792
2830
|
}
|
|
2793
2831
|
}
|
|
2794
2832
|
}
|
|
2795
|
-
};
|
|
2833
|
+
});
|
|
2796
2834
|
}, [theme, title, showDataLabels, createFluentTooltip, gridColor, labelColor, fontFamily, fontSize]);
|
|
2797
2835
|
return React__default.createElement("div", {
|
|
2798
2836
|
className: styles.chartWithLegend
|
|
@@ -2831,7 +2869,8 @@ function ScatterChart(_ref) {
|
|
|
2831
2869
|
var _useChartUtils = useChartUtils(theme),
|
|
2832
2870
|
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
2833
2871
|
lightenColor = _useChartUtils.lightenColor,
|
|
2834
|
-
createFluentTooltip = _useChartUtils.createFluentTooltip
|
|
2872
|
+
createFluentTooltip = _useChartUtils.createFluentTooltip,
|
|
2873
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
2835
2874
|
var seriesColors = React.useMemo(function () {
|
|
2836
2875
|
return data.reduce(function (acc, series, idx) {
|
|
2837
2876
|
var base = getFluentPalette(theme)[idx % getFluentPalette(theme).length];
|
|
@@ -2879,9 +2918,10 @@ function ScatterChart(_ref) {
|
|
|
2879
2918
|
labelColor = _useMemo.labelColor,
|
|
2880
2919
|
gridColor = _useMemo.gridColor;
|
|
2881
2920
|
var options = React.useMemo(function () {
|
|
2882
|
-
return {
|
|
2921
|
+
return _extends({
|
|
2883
2922
|
responsive: true,
|
|
2884
|
-
maintainAspectRatio: false
|
|
2923
|
+
maintainAspectRatio: false
|
|
2924
|
+
}, getInstantInteractionAnimations(), {
|
|
2885
2925
|
plugins: {
|
|
2886
2926
|
title: {
|
|
2887
2927
|
display: !!title,
|
|
@@ -2939,7 +2979,7 @@ function ScatterChart(_ref) {
|
|
|
2939
2979
|
}
|
|
2940
2980
|
}
|
|
2941
2981
|
}
|
|
2942
|
-
};
|
|
2982
|
+
});
|
|
2943
2983
|
}, [theme, title, showDataLabels, createFluentTooltip, labelColor, fontFamily, fontSize, gridColor]);
|
|
2944
2984
|
return React__default.createElement("div", {
|
|
2945
2985
|
className: styles.chartWithLegend
|
|
@@ -2979,7 +3019,8 @@ function StackedLineChart(_ref) {
|
|
|
2979
3019
|
var _useChartUtils = useChartUtils(theme),
|
|
2980
3020
|
lightenColor = _useChartUtils.lightenColor,
|
|
2981
3021
|
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
2982
|
-
createFluentTooltip = _useChartUtils.createFluentTooltip
|
|
3022
|
+
createFluentTooltip = _useChartUtils.createFluentTooltip,
|
|
3023
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
2983
3024
|
var seriesColors = React.useMemo(function () {
|
|
2984
3025
|
return data.reduce(function (acc, series, idx) {
|
|
2985
3026
|
var base = getFluentPalette(theme)[idx % getFluentPalette(theme).length];
|
|
@@ -3042,9 +3083,10 @@ function StackedLineChart(_ref) {
|
|
|
3042
3083
|
labelColor = _useMemo.labelColor,
|
|
3043
3084
|
gridColor = _useMemo.gridColor;
|
|
3044
3085
|
var options = React.useMemo(function () {
|
|
3045
|
-
return {
|
|
3086
|
+
return _extends({
|
|
3046
3087
|
responsive: true,
|
|
3047
|
-
maintainAspectRatio: false
|
|
3088
|
+
maintainAspectRatio: false
|
|
3089
|
+
}, getInstantInteractionAnimations(), {
|
|
3048
3090
|
plugins: {
|
|
3049
3091
|
title: {
|
|
3050
3092
|
display: !!title,
|
|
@@ -3101,7 +3143,7 @@ function StackedLineChart(_ref) {
|
|
|
3101
3143
|
}
|
|
3102
3144
|
}
|
|
3103
3145
|
}
|
|
3104
|
-
};
|
|
3146
|
+
});
|
|
3105
3147
|
}, [theme, title, showDataLabels, createFluentTooltip, labelColor, fontFamily, fontSize, gridColor]);
|
|
3106
3148
|
return React__default.createElement("div", {
|
|
3107
3149
|
className: styles.chartWithLegend
|
|
@@ -3143,7 +3185,8 @@ function SteamChart(_ref) {
|
|
|
3143
3185
|
var styles = useGraphGlobalStyles();
|
|
3144
3186
|
var _useChartUtils = useChartUtils(theme),
|
|
3145
3187
|
lightenColor = _useChartUtils.lightenColor,
|
|
3146
|
-
getFluentPalette = _useChartUtils.getFluentPalette
|
|
3188
|
+
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
3189
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
3147
3190
|
var seriesColors = React.useMemo(function () {
|
|
3148
3191
|
return data.reduce(function (acc, series, idx) {
|
|
3149
3192
|
var base = getFluentPalette(theme)[idx % getFluentPalette(theme).length];
|
|
@@ -3217,13 +3260,10 @@ function SteamChart(_ref) {
|
|
|
3217
3260
|
labelColor = _useMemo.labelColor,
|
|
3218
3261
|
gridColor = _useMemo.gridColor;
|
|
3219
3262
|
var options = React.useMemo(function () {
|
|
3220
|
-
return {
|
|
3263
|
+
return _extends({
|
|
3221
3264
|
responsive: true,
|
|
3222
|
-
maintainAspectRatio: false
|
|
3223
|
-
|
|
3224
|
-
duration: 800,
|
|
3225
|
-
easing: 'easeOutQuart'
|
|
3226
|
-
},
|
|
3265
|
+
maintainAspectRatio: false
|
|
3266
|
+
}, getInstantInteractionAnimations(), {
|
|
3227
3267
|
plugins: {
|
|
3228
3268
|
title: {
|
|
3229
3269
|
display: !!title,
|
|
@@ -3289,7 +3329,7 @@ function SteamChart(_ref) {
|
|
|
3289
3329
|
max: showPercent ? 100 : undefined
|
|
3290
3330
|
}
|
|
3291
3331
|
}
|
|
3292
|
-
};
|
|
3332
|
+
});
|
|
3293
3333
|
}, [theme, title, showDataLabels, createFluentTooltip, labelColor, fontFamily, fontSize, gridColor, showPercent]);
|
|
3294
3334
|
return React__default.createElement("div", {
|
|
3295
3335
|
className: styles.chartWithLegend
|
|
@@ -4113,6 +4153,7 @@ exports.SteamChart = SteamChart;
|
|
|
4113
4153
|
exports.createAxisLabelFormatter = createAxisLabelFormatter;
|
|
4114
4154
|
exports.createFluentTooltip = createFluentTooltip;
|
|
4115
4155
|
exports.getFluentPalette = getFluentPalette;
|
|
4156
|
+
exports.getInstantInteractionAnimations = getInstantInteractionAnimations;
|
|
4116
4157
|
exports.lightenColor = lightenColor;
|
|
4117
4158
|
exports.useChartUtils = useChartUtils;
|
|
4118
4159
|
exports.useGraphUtils = useChartUtils;
|