@spteck/fluentui-react-charts 1.0.9 → 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 +106 -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 +106 -61
- package/dist/fluentui-react-charts.esm.js.map +1 -1
- package/dist/hooks/useChartUtils.d.ts +25 -0
- package/package.json +1 -1
|
@@ -782,8 +782,25 @@ 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.
|
|
803
|
+
* Optimized for fast performance with reduced animation delays.
|
|
787
804
|
*/
|
|
788
805
|
function createFluentTooltip(theme) {
|
|
789
806
|
var fontFamily = theme.fontFamilyBase;
|
|
@@ -884,6 +901,10 @@ function createFluentTooltip(theme) {
|
|
|
884
901
|
family: fontFamily,
|
|
885
902
|
size: fontSize
|
|
886
903
|
},
|
|
904
|
+
// Performance optimizations for faster tooltip display
|
|
905
|
+
animation: {
|
|
906
|
+
duration: 0
|
|
907
|
+
},
|
|
887
908
|
callbacks: callbacks
|
|
888
909
|
};
|
|
889
910
|
}
|
|
@@ -926,7 +947,8 @@ function useChartUtils(theme) {
|
|
|
926
947
|
getFluentPalette: getFluentPalette,
|
|
927
948
|
createFluentTooltip: createFluentTooltip,
|
|
928
949
|
createAxisLabelFormatter: createAxisLabelFormatter,
|
|
929
|
-
debounce: debounce
|
|
950
|
+
debounce: debounce,
|
|
951
|
+
getInstantInteractionAnimations: getInstantInteractionAnimations
|
|
930
952
|
};
|
|
931
953
|
}, [theme]);
|
|
932
954
|
}
|
|
@@ -1029,7 +1051,8 @@ function AreaChart(_ref) {
|
|
|
1029
1051
|
var _useChartUtils = useChartUtils(theme),
|
|
1030
1052
|
lightenColor = _useChartUtils.lightenColor,
|
|
1031
1053
|
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
1032
|
-
createFluentTooltip = _useChartUtils.createFluentTooltip
|
|
1054
|
+
createFluentTooltip = _useChartUtils.createFluentTooltip,
|
|
1055
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
1033
1056
|
var seriesColors = useMemo(function () {
|
|
1034
1057
|
return data.reduce(function (acc, series, idx) {
|
|
1035
1058
|
var base = getFluentPalette(theme)[idx % getFluentPalette(theme).length];
|
|
@@ -1092,9 +1115,10 @@ function AreaChart(_ref) {
|
|
|
1092
1115
|
labelColor = _useMemo.labelColor,
|
|
1093
1116
|
gridColor = _useMemo.gridColor;
|
|
1094
1117
|
var options = useMemo(function () {
|
|
1095
|
-
return {
|
|
1118
|
+
return _extends({
|
|
1096
1119
|
responsive: true,
|
|
1097
|
-
maintainAspectRatio: false
|
|
1120
|
+
maintainAspectRatio: false
|
|
1121
|
+
}, getInstantInteractionAnimations(), {
|
|
1098
1122
|
plugins: {
|
|
1099
1123
|
title: {
|
|
1100
1124
|
display: !!title,
|
|
@@ -1151,7 +1175,7 @@ function AreaChart(_ref) {
|
|
|
1151
1175
|
}
|
|
1152
1176
|
}
|
|
1153
1177
|
}
|
|
1154
|
-
};
|
|
1178
|
+
});
|
|
1155
1179
|
}, [title, showDatalabels, theme, fontFamily, fontSize, labelColor, gridColor, stacked, createFluentTooltip]);
|
|
1156
1180
|
return React__default.createElement("div", {
|
|
1157
1181
|
className: styles.chartWithLegend
|
|
@@ -1190,7 +1214,8 @@ function BarChart(_ref) {
|
|
|
1190
1214
|
var _useChartUtils = useChartUtils(theme),
|
|
1191
1215
|
lightenColor = _useChartUtils.lightenColor,
|
|
1192
1216
|
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
1193
|
-
createFluentTooltip = _useChartUtils.createFluentTooltip
|
|
1217
|
+
createFluentTooltip = _useChartUtils.createFluentTooltip,
|
|
1218
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
1194
1219
|
var styles = useGraphGlobalStyles();
|
|
1195
1220
|
var seriesColors = useMemo(function () {
|
|
1196
1221
|
return data.reduce(function (acc, series, idx) {
|
|
@@ -1254,9 +1279,10 @@ function BarChart(_ref) {
|
|
|
1254
1279
|
labelColor = _useMemo.labelColor,
|
|
1255
1280
|
gridColor = _useMemo.gridColor;
|
|
1256
1281
|
var options = useMemo(function () {
|
|
1257
|
-
return {
|
|
1282
|
+
return _extends({
|
|
1258
1283
|
responsive: true,
|
|
1259
|
-
maintainAspectRatio: false
|
|
1284
|
+
maintainAspectRatio: false
|
|
1285
|
+
}, getInstantInteractionAnimations(), {
|
|
1260
1286
|
plugins: {
|
|
1261
1287
|
title: {
|
|
1262
1288
|
display: !!title,
|
|
@@ -1339,7 +1365,7 @@ function BarChart(_ref) {
|
|
|
1339
1365
|
}
|
|
1340
1366
|
}
|
|
1341
1367
|
})
|
|
1342
|
-
};
|
|
1368
|
+
});
|
|
1343
1369
|
}, [title, showDatalabels, theme, fontFamily, fontSize, labelColor, gridColor, stacked, createFluentTooltip]);
|
|
1344
1370
|
return React__default.createElement("div", {
|
|
1345
1371
|
className: styles.chartWithLegend
|
|
@@ -1381,7 +1407,8 @@ function BarHorizontalChart(_ref) {
|
|
|
1381
1407
|
var _useChartUtils = useChartUtils(theme),
|
|
1382
1408
|
lightenColor = _useChartUtils.lightenColor,
|
|
1383
1409
|
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
1384
|
-
createFluentTooltip = _useChartUtils.createFluentTooltip
|
|
1410
|
+
createFluentTooltip = _useChartUtils.createFluentTooltip,
|
|
1411
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
1385
1412
|
var seriesColors = useMemo(function () {
|
|
1386
1413
|
return data.reduce(function (acc, series, idx) {
|
|
1387
1414
|
var base = getFluentPalette(theme)[idx % getFluentPalette(theme).length];
|
|
@@ -1440,10 +1467,11 @@ function BarHorizontalChart(_ref) {
|
|
|
1440
1467
|
labelColor = _useMemo.labelColor,
|
|
1441
1468
|
gridColor = _useMemo.gridColor;
|
|
1442
1469
|
var options = useMemo(function () {
|
|
1443
|
-
return {
|
|
1470
|
+
return _extends({
|
|
1444
1471
|
indexAxis: 'y',
|
|
1445
1472
|
responsive: true,
|
|
1446
|
-
maintainAspectRatio: false
|
|
1473
|
+
maintainAspectRatio: false
|
|
1474
|
+
}, getInstantInteractionAnimations(), {
|
|
1447
1475
|
plugins: {
|
|
1448
1476
|
title: {
|
|
1449
1477
|
display: !!title,
|
|
@@ -1500,7 +1528,7 @@ function BarHorizontalChart(_ref) {
|
|
|
1500
1528
|
}
|
|
1501
1529
|
}
|
|
1502
1530
|
}
|
|
1503
|
-
};
|
|
1531
|
+
});
|
|
1504
1532
|
}, [title, showDatalabels, theme, fontFamily, fontSize, labelColor, gridColor, stacked, createFluentTooltip]);
|
|
1505
1533
|
return React__default.createElement("div", {
|
|
1506
1534
|
className: styles.chartWithLegend
|
|
@@ -1540,7 +1568,8 @@ function BubbleChart(_ref) {
|
|
|
1540
1568
|
var _useChartUtils = useChartUtils(theme),
|
|
1541
1569
|
lightenColor = _useChartUtils.lightenColor,
|
|
1542
1570
|
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
1543
|
-
createFluentTooltip = _useChartUtils.createFluentTooltip
|
|
1571
|
+
createFluentTooltip = _useChartUtils.createFluentTooltip,
|
|
1572
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
1544
1573
|
var styles = useGraphGlobalStyles();
|
|
1545
1574
|
var seriesColors = useMemo(function () {
|
|
1546
1575
|
return data.reduce(function (acc, series, idx) {
|
|
@@ -1595,9 +1624,10 @@ function BubbleChart(_ref) {
|
|
|
1595
1624
|
gridColor = _useMemo.gridColor;
|
|
1596
1625
|
var options = useMemo(function () {
|
|
1597
1626
|
var _data$2;
|
|
1598
|
-
return {
|
|
1627
|
+
return _extends({
|
|
1599
1628
|
responsive: true,
|
|
1600
|
-
maintainAspectRatio: false
|
|
1629
|
+
maintainAspectRatio: false
|
|
1630
|
+
}, getInstantInteractionAnimations(), {
|
|
1601
1631
|
plugins: {
|
|
1602
1632
|
title: {
|
|
1603
1633
|
display: !!title,
|
|
@@ -1653,7 +1683,7 @@ function BubbleChart(_ref) {
|
|
|
1653
1683
|
}
|
|
1654
1684
|
}
|
|
1655
1685
|
}
|
|
1656
|
-
};
|
|
1686
|
+
});
|
|
1657
1687
|
}, [title, showDataLabels, theme, getPrimary, getSecondary, data, fontFamily, fontSize, labelColor, gridColor, createFluentTooltip]);
|
|
1658
1688
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
1659
1689
|
className: styles.chartWithLegend
|
|
@@ -1694,7 +1724,8 @@ function ComboChart(_ref) {
|
|
|
1694
1724
|
var _useChartUtils = useChartUtils(theme),
|
|
1695
1725
|
lightenColor = _useChartUtils.lightenColor,
|
|
1696
1726
|
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
1697
|
-
createFluentTooltip = _useChartUtils.createFluentTooltip
|
|
1727
|
+
createFluentTooltip = _useChartUtils.createFluentTooltip,
|
|
1728
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
1698
1729
|
var seriesColors = useMemo(function () {
|
|
1699
1730
|
return data.reduce(function (acc, series, idx) {
|
|
1700
1731
|
var base = getFluentPalette(theme)[idx % getFluentPalette(theme).length];
|
|
@@ -1767,9 +1798,10 @@ function ComboChart(_ref) {
|
|
|
1767
1798
|
labelColor = _useMemo.labelColor,
|
|
1768
1799
|
gridColor = _useMemo.gridColor;
|
|
1769
1800
|
var options = useMemo(function () {
|
|
1770
|
-
return {
|
|
1801
|
+
return _extends({
|
|
1771
1802
|
responsive: true,
|
|
1772
|
-
maintainAspectRatio: false
|
|
1803
|
+
maintainAspectRatio: false
|
|
1804
|
+
}, getInstantInteractionAnimations(), {
|
|
1773
1805
|
plugins: {
|
|
1774
1806
|
title: {
|
|
1775
1807
|
display: !!title,
|
|
@@ -1826,7 +1858,7 @@ function ComboChart(_ref) {
|
|
|
1826
1858
|
stacked: false
|
|
1827
1859
|
}
|
|
1828
1860
|
}
|
|
1829
|
-
};
|
|
1861
|
+
});
|
|
1830
1862
|
}, [title, showDataLabels, theme, fontFamily, fontSize, labelColor, gridColor, createFluentTooltip]);
|
|
1831
1863
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
1832
1864
|
className: styles.chartWithLegend
|
|
@@ -1885,7 +1917,8 @@ function DoughnutChart(_ref) {
|
|
|
1885
1917
|
var _useChartUtils = useChartUtils(theme),
|
|
1886
1918
|
lightenColor = _useChartUtils.lightenColor,
|
|
1887
1919
|
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
1888
|
-
createFluentTooltip = _useChartUtils.createFluentTooltip
|
|
1920
|
+
createFluentTooltip = _useChartUtils.createFluentTooltip,
|
|
1921
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
1889
1922
|
var _useState = useState([]),
|
|
1890
1923
|
hiddenLabels = _useState[0],
|
|
1891
1924
|
setHiddenLabels = _useState[1];
|
|
@@ -1960,9 +1993,10 @@ function DoughnutChart(_ref) {
|
|
|
1960
1993
|
});
|
|
1961
1994
|
}, [allLabels, valueMap, colors]);
|
|
1962
1995
|
var options = useMemo(function () {
|
|
1963
|
-
return {
|
|
1996
|
+
return _extends({
|
|
1964
1997
|
responsive: true,
|
|
1965
|
-
maintainAspectRatio: false
|
|
1998
|
+
maintainAspectRatio: false
|
|
1999
|
+
}, getInstantInteractionAnimations(), {
|
|
1966
2000
|
plugins: {
|
|
1967
2001
|
legend: {
|
|
1968
2002
|
display: false
|
|
@@ -1994,7 +2028,7 @@ function DoughnutChart(_ref) {
|
|
|
1994
2028
|
}
|
|
1995
2029
|
}
|
|
1996
2030
|
}
|
|
1997
|
-
};
|
|
2031
|
+
});
|
|
1998
2032
|
}, [title, theme, showDataLabels, createFluentTooltip]);
|
|
1999
2033
|
return React__default.createElement("div", {
|
|
2000
2034
|
className: styles.chartWithLegend
|
|
@@ -2035,7 +2069,8 @@ function FloatingBarChart(_ref) {
|
|
|
2035
2069
|
var _useChartUtils = useChartUtils(theme),
|
|
2036
2070
|
lightenColor = _useChartUtils.lightenColor,
|
|
2037
2071
|
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
2038
|
-
createFluentTooltip = _useChartUtils.createFluentTooltip
|
|
2072
|
+
createFluentTooltip = _useChartUtils.createFluentTooltip,
|
|
2073
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
2039
2074
|
var seriesColors = useMemo(function () {
|
|
2040
2075
|
return data.reduce(function (acc, series, idx) {
|
|
2041
2076
|
var base = getFluentPalette(theme)[idx % getFluentPalette(theme).length];
|
|
@@ -2095,9 +2130,10 @@ function FloatingBarChart(_ref) {
|
|
|
2095
2130
|
labelColor = _useMemo.labelColor,
|
|
2096
2131
|
gridColor = _useMemo.gridColor;
|
|
2097
2132
|
var options = useMemo(function () {
|
|
2098
|
-
return {
|
|
2133
|
+
return _extends({
|
|
2099
2134
|
responsive: true,
|
|
2100
|
-
maintainAspectRatio: false
|
|
2135
|
+
maintainAspectRatio: false
|
|
2136
|
+
}, getInstantInteractionAnimations(), {
|
|
2101
2137
|
plugins: {
|
|
2102
2138
|
title: {
|
|
2103
2139
|
display: !!title,
|
|
@@ -2152,7 +2188,7 @@ function FloatingBarChart(_ref) {
|
|
|
2152
2188
|
}
|
|
2153
2189
|
}
|
|
2154
2190
|
}
|
|
2155
|
-
};
|
|
2191
|
+
});
|
|
2156
2192
|
}, [title, theme, showDataLabels, labelColor, fontFamily, fontSize, gridColor, createFluentTooltip]);
|
|
2157
2193
|
return React__default.createElement("div", {
|
|
2158
2194
|
className: styles.chartWithLegend
|
|
@@ -2194,7 +2230,8 @@ function LineChart(_ref) {
|
|
|
2194
2230
|
var _useChartUtils = useChartUtils(theme),
|
|
2195
2231
|
lightenColor = _useChartUtils.lightenColor,
|
|
2196
2232
|
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
2197
|
-
createFluentTooltip = _useChartUtils.createFluentTooltip
|
|
2233
|
+
createFluentTooltip = _useChartUtils.createFluentTooltip,
|
|
2234
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
2198
2235
|
var seriesColors = useMemo(function () {
|
|
2199
2236
|
return data.reduce(function (acc, series, idx) {
|
|
2200
2237
|
var base = getFluentPalette(theme)[idx % getFluentPalette(theme).length];
|
|
@@ -2257,9 +2294,10 @@ function LineChart(_ref) {
|
|
|
2257
2294
|
labelColor = _useMemo.labelColor,
|
|
2258
2295
|
gridColor = _useMemo.gridColor;
|
|
2259
2296
|
var options = useMemo(function () {
|
|
2260
|
-
return {
|
|
2297
|
+
return _extends({
|
|
2261
2298
|
responsive: true,
|
|
2262
|
-
maintainAspectRatio: false
|
|
2299
|
+
maintainAspectRatio: false
|
|
2300
|
+
}, getInstantInteractionAnimations(), {
|
|
2263
2301
|
plugins: {
|
|
2264
2302
|
title: {
|
|
2265
2303
|
display: !!title,
|
|
@@ -2314,7 +2352,7 @@ function LineChart(_ref) {
|
|
|
2314
2352
|
}
|
|
2315
2353
|
}
|
|
2316
2354
|
}
|
|
2317
|
-
};
|
|
2355
|
+
});
|
|
2318
2356
|
}, [title, theme, showDataLabels, labelColor, fontFamily, fontSize, gridColor, createFluentTooltip]);
|
|
2319
2357
|
return React__default.createElement("div", {
|
|
2320
2358
|
className: styles.chartWithLegend
|
|
@@ -2422,9 +2460,10 @@ function PieChart(_ref) {
|
|
|
2422
2460
|
chartData = _useMemo2.chartData,
|
|
2423
2461
|
legendEntries = _useMemo2.legendEntries;
|
|
2424
2462
|
var options = useMemo(function () {
|
|
2425
|
-
return {
|
|
2463
|
+
return _extends({
|
|
2426
2464
|
responsive: true,
|
|
2427
|
-
maintainAspectRatio: false
|
|
2465
|
+
maintainAspectRatio: false
|
|
2466
|
+
}, getInstantInteractionAnimations(), {
|
|
2428
2467
|
plugins: {
|
|
2429
2468
|
tooltip: createFluentTooltip(theme),
|
|
2430
2469
|
legend: {
|
|
@@ -2453,7 +2492,7 @@ function PieChart(_ref) {
|
|
|
2453
2492
|
}
|
|
2454
2493
|
}
|
|
2455
2494
|
}
|
|
2456
|
-
};
|
|
2495
|
+
});
|
|
2457
2496
|
}, [theme, title, showDataLabels]);
|
|
2458
2497
|
return React__default.createElement("div", {
|
|
2459
2498
|
className: styles.chartWithLegend
|
|
@@ -2514,7 +2553,8 @@ function PolarChart(_ref) {
|
|
|
2514
2553
|
theme = _ref$theme === void 0 ? webLightTheme : _ref$theme;
|
|
2515
2554
|
var _useChartUtils = useChartUtils(theme),
|
|
2516
2555
|
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
2517
|
-
lightenColor = _useChartUtils.lightenColor
|
|
2556
|
+
lightenColor = _useChartUtils.lightenColor,
|
|
2557
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
2518
2558
|
var _useState = useState([]),
|
|
2519
2559
|
hiddenLabels = _useState[0],
|
|
2520
2560
|
setHiddenLabels = _useState[1];
|
|
@@ -2577,9 +2617,10 @@ function PolarChart(_ref) {
|
|
|
2577
2617
|
};
|
|
2578
2618
|
}, [filteredLabels, values, visibleColors]);
|
|
2579
2619
|
var options = useMemo(function () {
|
|
2580
|
-
return {
|
|
2620
|
+
return _extends({
|
|
2581
2621
|
responsive: true,
|
|
2582
|
-
maintainAspectRatio: false
|
|
2622
|
+
maintainAspectRatio: false
|
|
2623
|
+
}, getInstantInteractionAnimations(), {
|
|
2583
2624
|
plugins: {
|
|
2584
2625
|
title: {
|
|
2585
2626
|
display: !!title,
|
|
@@ -2626,7 +2667,7 @@ function PolarChart(_ref) {
|
|
|
2626
2667
|
}
|
|
2627
2668
|
}
|
|
2628
2669
|
}
|
|
2629
|
-
};
|
|
2670
|
+
});
|
|
2630
2671
|
}, [theme, title, showDataLabels, createFluentTooltip]);
|
|
2631
2672
|
return React__default.createElement("div", {
|
|
2632
2673
|
className: styles.chartWithLegend
|
|
@@ -2666,7 +2707,8 @@ function RadarChart(_ref) {
|
|
|
2666
2707
|
var styles = useGraphGlobalStyles();
|
|
2667
2708
|
var _useChartUtils = useChartUtils(theme),
|
|
2668
2709
|
lightenColor = _useChartUtils.lightenColor,
|
|
2669
|
-
getFluentPalette = _useChartUtils.getFluentPalette
|
|
2710
|
+
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
2711
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
2670
2712
|
var seriesColors = useMemo(function () {
|
|
2671
2713
|
return data.reduce(function (acc, series, idx) {
|
|
2672
2714
|
var base = getFluentPalette(theme)[idx % getFluentPalette(theme).length];
|
|
@@ -2725,9 +2767,10 @@ function RadarChart(_ref) {
|
|
|
2725
2767
|
labelColor = _useMemo.labelColor,
|
|
2726
2768
|
gridColor = _useMemo.gridColor;
|
|
2727
2769
|
var options = useMemo(function () {
|
|
2728
|
-
return {
|
|
2770
|
+
return _extends({
|
|
2729
2771
|
responsive: true,
|
|
2730
|
-
maintainAspectRatio: false
|
|
2772
|
+
maintainAspectRatio: false
|
|
2773
|
+
}, getInstantInteractionAnimations(), {
|
|
2731
2774
|
plugins: {
|
|
2732
2775
|
title: {
|
|
2733
2776
|
display: !!title,
|
|
@@ -2780,7 +2823,7 @@ function RadarChart(_ref) {
|
|
|
2780
2823
|
}
|
|
2781
2824
|
}
|
|
2782
2825
|
}
|
|
2783
|
-
};
|
|
2826
|
+
});
|
|
2784
2827
|
}, [theme, title, showDataLabels, createFluentTooltip, gridColor, labelColor, fontFamily, fontSize]);
|
|
2785
2828
|
return React__default.createElement("div", {
|
|
2786
2829
|
className: styles.chartWithLegend
|
|
@@ -2819,7 +2862,8 @@ function ScatterChart(_ref) {
|
|
|
2819
2862
|
var _useChartUtils = useChartUtils(theme),
|
|
2820
2863
|
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
2821
2864
|
lightenColor = _useChartUtils.lightenColor,
|
|
2822
|
-
createFluentTooltip = _useChartUtils.createFluentTooltip
|
|
2865
|
+
createFluentTooltip = _useChartUtils.createFluentTooltip,
|
|
2866
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
2823
2867
|
var seriesColors = useMemo(function () {
|
|
2824
2868
|
return data.reduce(function (acc, series, idx) {
|
|
2825
2869
|
var base = getFluentPalette(theme)[idx % getFluentPalette(theme).length];
|
|
@@ -2867,9 +2911,10 @@ function ScatterChart(_ref) {
|
|
|
2867
2911
|
labelColor = _useMemo.labelColor,
|
|
2868
2912
|
gridColor = _useMemo.gridColor;
|
|
2869
2913
|
var options = useMemo(function () {
|
|
2870
|
-
return {
|
|
2914
|
+
return _extends({
|
|
2871
2915
|
responsive: true,
|
|
2872
|
-
maintainAspectRatio: false
|
|
2916
|
+
maintainAspectRatio: false
|
|
2917
|
+
}, getInstantInteractionAnimations(), {
|
|
2873
2918
|
plugins: {
|
|
2874
2919
|
title: {
|
|
2875
2920
|
display: !!title,
|
|
@@ -2927,7 +2972,7 @@ function ScatterChart(_ref) {
|
|
|
2927
2972
|
}
|
|
2928
2973
|
}
|
|
2929
2974
|
}
|
|
2930
|
-
};
|
|
2975
|
+
});
|
|
2931
2976
|
}, [theme, title, showDataLabels, createFluentTooltip, labelColor, fontFamily, fontSize, gridColor]);
|
|
2932
2977
|
return React__default.createElement("div", {
|
|
2933
2978
|
className: styles.chartWithLegend
|
|
@@ -2967,7 +3012,8 @@ function StackedLineChart(_ref) {
|
|
|
2967
3012
|
var _useChartUtils = useChartUtils(theme),
|
|
2968
3013
|
lightenColor = _useChartUtils.lightenColor,
|
|
2969
3014
|
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
2970
|
-
createFluentTooltip = _useChartUtils.createFluentTooltip
|
|
3015
|
+
createFluentTooltip = _useChartUtils.createFluentTooltip,
|
|
3016
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
2971
3017
|
var seriesColors = useMemo(function () {
|
|
2972
3018
|
return data.reduce(function (acc, series, idx) {
|
|
2973
3019
|
var base = getFluentPalette(theme)[idx % getFluentPalette(theme).length];
|
|
@@ -3030,9 +3076,10 @@ function StackedLineChart(_ref) {
|
|
|
3030
3076
|
labelColor = _useMemo.labelColor,
|
|
3031
3077
|
gridColor = _useMemo.gridColor;
|
|
3032
3078
|
var options = useMemo(function () {
|
|
3033
|
-
return {
|
|
3079
|
+
return _extends({
|
|
3034
3080
|
responsive: true,
|
|
3035
|
-
maintainAspectRatio: false
|
|
3081
|
+
maintainAspectRatio: false
|
|
3082
|
+
}, getInstantInteractionAnimations(), {
|
|
3036
3083
|
plugins: {
|
|
3037
3084
|
title: {
|
|
3038
3085
|
display: !!title,
|
|
@@ -3089,7 +3136,7 @@ function StackedLineChart(_ref) {
|
|
|
3089
3136
|
}
|
|
3090
3137
|
}
|
|
3091
3138
|
}
|
|
3092
|
-
};
|
|
3139
|
+
});
|
|
3093
3140
|
}, [theme, title, showDataLabels, createFluentTooltip, labelColor, fontFamily, fontSize, gridColor]);
|
|
3094
3141
|
return React__default.createElement("div", {
|
|
3095
3142
|
className: styles.chartWithLegend
|
|
@@ -3131,7 +3178,8 @@ function SteamChart(_ref) {
|
|
|
3131
3178
|
var styles = useGraphGlobalStyles();
|
|
3132
3179
|
var _useChartUtils = useChartUtils(theme),
|
|
3133
3180
|
lightenColor = _useChartUtils.lightenColor,
|
|
3134
|
-
getFluentPalette = _useChartUtils.getFluentPalette
|
|
3181
|
+
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
3182
|
+
getInstantInteractionAnimations = _useChartUtils.getInstantInteractionAnimations;
|
|
3135
3183
|
var seriesColors = useMemo(function () {
|
|
3136
3184
|
return data.reduce(function (acc, series, idx) {
|
|
3137
3185
|
var base = getFluentPalette(theme)[idx % getFluentPalette(theme).length];
|
|
@@ -3205,13 +3253,10 @@ function SteamChart(_ref) {
|
|
|
3205
3253
|
labelColor = _useMemo.labelColor,
|
|
3206
3254
|
gridColor = _useMemo.gridColor;
|
|
3207
3255
|
var options = useMemo(function () {
|
|
3208
|
-
return {
|
|
3256
|
+
return _extends({
|
|
3209
3257
|
responsive: true,
|
|
3210
|
-
maintainAspectRatio: false
|
|
3211
|
-
|
|
3212
|
-
duration: 800,
|
|
3213
|
-
easing: 'easeOutQuart'
|
|
3214
|
-
},
|
|
3258
|
+
maintainAspectRatio: false
|
|
3259
|
+
}, getInstantInteractionAnimations(), {
|
|
3215
3260
|
plugins: {
|
|
3216
3261
|
title: {
|
|
3217
3262
|
display: !!title,
|
|
@@ -3277,7 +3322,7 @@ function SteamChart(_ref) {
|
|
|
3277
3322
|
max: showPercent ? 100 : undefined
|
|
3278
3323
|
}
|
|
3279
3324
|
}
|
|
3280
|
-
};
|
|
3325
|
+
});
|
|
3281
3326
|
}, [theme, title, showDataLabels, createFluentTooltip, labelColor, fontFamily, fontSize, gridColor, showPercent]);
|
|
3282
3327
|
return React__default.createElement("div", {
|
|
3283
3328
|
className: styles.chartWithLegend
|
|
@@ -4083,5 +4128,5 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
4083
4128
|
}, renderCards));
|
|
4084
4129
|
};
|
|
4085
4130
|
|
|
4086
|
-
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 };
|
|
4087
4132
|
//# sourceMappingURL=fluentui-react-charts.esm.js.map
|