@spteck/fluentui-react-charts 1.0.7 → 1.0.9
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 +2 -1
- package/dist/charts/ComboChart/ComboChart.d.ts +2 -1
- package/dist/charts/Doughnut/DoughnutChart.d.ts +2 -1
- package/dist/charts/PieChart/PieChart.d.ts +2 -1
- package/dist/charts/areaChart/AreaChart.d.ts +2 -1
- package/dist/charts/barHorizontalChart/BarHotizontalChart.d.ts +2 -1
- package/dist/charts/bubbleChart/BubbleChart.d.ts +2 -1
- package/dist/charts/floatBarChart/FloatBarChart.d.ts +2 -1
- package/dist/charts/index.d.ts +14 -0
- package/dist/charts/lineChart/LineChart.d.ts +2 -1
- package/dist/charts/polarChart/PolarChart.d.ts +2 -1
- package/dist/charts/radarChart/RadarChart.d.ts +2 -1
- package/dist/charts/scatterChart/ScatterChart.d.ts +2 -1
- package/dist/charts/stackedLineChart/StackedLineChart.d.ts +2 -1
- package/dist/charts/steamChart/SteamChart.d.ts +2 -1
- package/dist/components/index.d.ts +0 -14
- package/dist/fluentui-react-charts.cjs.development.js +1086 -1072
- 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 +1074 -1074
- package/dist/fluentui-react-charts.esm.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/package.json +5 -5
- package/src/assets/sample1.png +0 -0
- package/src/assets/sample2.png +0 -0
- package/src/assets/sample3.png +0 -0
- package/src/charts/BarChart/BarChart.tsx +0 -227
- package/src/charts/BarChart/README.MD +0 -335
- package/src/charts/BarChart/index.ts +0 -1
- package/src/charts/ComboChart/ComboChart.tsx +0 -209
- package/src/charts/ComboChart/README.MD +0 -347
- package/src/charts/ComboChart/index.ts +0 -1
- package/src/charts/Doughnut/DoughnutChart.tsx +0 -152
- package/src/charts/Doughnut/README.MD +0 -296
- package/src/charts/Doughnut/index.ts +0 -1
- package/src/charts/PieChart/PieChart.tsx +0 -148
- package/src/charts/PieChart/README.MD +0 -315
- package/src/charts/PieChart/index.ts +0 -1
- package/src/charts/areaChart/AreaChart.tsx +0 -195
- package/src/charts/areaChart/README.MD +0 -236
- package/src/charts/areaChart/index.ts +0 -1
- package/src/charts/barHorizontalChart/BarHotizontalChart.tsx +0 -200
- package/src/charts/barHorizontalChart/README.MD +0 -278
- package/src/charts/barHorizontalChart/index.ts +0 -2
- package/src/charts/bubbleChart/BubbleChart.tsx +0 -184
- package/src/charts/bubbleChart/README.MD +0 -275
- package/src/charts/bubbleChart/index.ts +0 -1
- package/src/charts/floatBarChart/FloatBarChart.tsx +0 -178
- package/src/charts/floatBarChart/README.MD +0 -354
- package/src/charts/floatBarChart/index.ts +0 -1
- package/src/charts/lineChart/LineChart.tsx +0 -200
- package/src/charts/lineChart/README.MD +0 -354
- package/src/charts/lineChart/index.ts +0 -1
- package/src/charts/polarChart/PolarChart.tsx +0 -161
- package/src/charts/polarChart/README.MD +0 -336
- package/src/charts/polarChart/index.ts +0 -1
- package/src/charts/radarChart/README.MD +0 -388
- package/src/charts/radarChart/RadarChart.tsx +0 -173
- package/src/charts/radarChart/index.ts +0 -1
- package/src/charts/scatterChart/README.MD +0 -335
- package/src/charts/scatterChart/ScatterChart.tsx +0 -155
- package/src/charts/scatterChart/index.ts +0 -1
- package/src/charts/stackedLineChart/README.MD +0 -396
- package/src/charts/stackedLineChart/StackedLineChart.tsx +0 -188
- package/src/charts/stackedLineChart/index.ts +0 -1
- package/src/charts/steamChart/README.MD +0 -414
- package/src/charts/steamChart/SteamChart.tsx +0 -236
- package/src/charts/steamChart/index.ts +0 -1
- package/src/components/RenderLabel/RenderLabel.tsx +0 -39
- package/src/components/RenderLabel/index.ts +0 -2
- package/src/components/RenderLabel/useRenderLabelStylesStyles.ts +0 -25
- package/src/components/RenderLegend/RenderLegend.tsx +0 -40
- package/src/components/RenderTooltip/RenderTooltip.tsx +0 -111
- package/src/components/buttonMenu/ButtonMenu.tsx +0 -186
- package/src/components/buttonMenu/IButtonMenuOption.ts +0 -9
- package/src/components/buttonMenu/IButtonMenuProps.tsx +0 -40
- package/src/components/dashboard/DashBoard.tsx +0 -314
- package/src/components/dashboard/ExampleDashboardUsage.tsx +0 -114
- package/src/components/dashboard/IDashboardProps.tsx +0 -11
- package/src/components/dashboard/NoDashboards.tsx +0 -26
- package/src/components/dashboard/index.ts +0 -3
- package/src/components/dashboard/selectZoom/SelectZoom.tsx +0 -184
- package/src/components/dashboard/useDashboardStyles.ts +0 -76
- package/src/components/index.ts +0 -17
- package/src/components/legendContainer/LegendContainer.tsx +0 -118
- package/src/components/legendeButton/LegendButton.tsx +0 -57
- package/src/components/renderSliceLegend/RenderSliceLegend.tsx +0 -46
- package/src/components/renderValueLegend/RenderValueLegend.tsx +0 -43
- package/src/components/stack/IStackProps.tsx +0 -94
- package/src/components/stack/Stack.tsx +0 -103
- package/src/components/svgImages/BusinessReportIcon.tsx +0 -218
- package/src/components/themeProvider/ThemeProvider.tsx +0 -48
- package/src/constants/Constants.tsx +0 -23
- package/src/graphGlobalStyles/useGraphGlobalStyles.ts +0 -28
- package/src/hooks/index.ts +0 -1
- package/src/hooks/useChartFactory.tsx +0 -136
- package/src/hooks/useChartUtils.tsx +0 -187
- package/src/hooks/useIndexedDBCache.ts +0 -119
- package/src/hooks/useResponsiveLegend.ts +0 -35
- package/src/index.tsx +0 -5
- package/src/models/ChartDatum.ts +0 -4
- package/src/models/ICardChartContainer.tsx +0 -11
- package/src/models/IChart.ts +0 -50
- package/src/models/index.ts +0 -3
|
@@ -4,16 +4,16 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var reactComponents = require('@fluentui/react-components');
|
|
8
8
|
var React = require('react');
|
|
9
9
|
var React__default = _interopDefault(React);
|
|
10
|
-
var reactChartjs2 = require('react-chartjs-2');
|
|
11
|
-
var ChartDataLabels = _interopDefault(require('chartjs-plugin-datalabels'));
|
|
12
|
-
var reactComponents = require('@fluentui/react-components');
|
|
13
10
|
var css = require('@emotion/css');
|
|
14
|
-
var resizeObserver = require('@juggle/resize-observer');
|
|
15
11
|
var reactIcons = require('@fluentui/react-icons');
|
|
16
12
|
var react = require('@iconify/react');
|
|
13
|
+
var chart_js = require('chart.js');
|
|
14
|
+
var ChartDataLabels = _interopDefault(require('chartjs-plugin-datalabels'));
|
|
15
|
+
var reactChartjs2 = require('react-chartjs-2');
|
|
16
|
+
var resizeObserver = require('@juggle/resize-observer');
|
|
17
17
|
var idb = require('idb');
|
|
18
18
|
|
|
19
19
|
function _arrayLikeToArray(r, a) {
|
|
@@ -193,211 +193,212 @@ function _unsupportedIterableToArray(r, a) {
|
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
* Smart Fluent tooltip generator with chart-type awareness.
|
|
218
|
-
*/
|
|
219
|
-
function createFluentTooltip(theme) {
|
|
220
|
-
var fontFamily = theme.fontFamilyBase;
|
|
221
|
-
var fontSize = parseInt(theme.fontSizeBase200.replace('px', '')) || 14;
|
|
222
|
-
var tooltipBg = theme.colorNeutralBackground1;
|
|
223
|
-
var tooltipTitleColor = theme.colorNeutralForeground1;
|
|
224
|
-
var tooltipBodyColor = theme.colorNeutralForeground2;
|
|
225
|
-
var borderColor = theme.colorNeutralStroke2;
|
|
226
|
-
var callbacks = {
|
|
227
|
-
title: function title(context) {
|
|
228
|
-
var _context$0$label, _context$;
|
|
229
|
-
return (_context$0$label = (_context$ = context[0]) == null ? void 0 : _context$.label) != null ? _context$0$label : '';
|
|
196
|
+
var BusinessReportIcon = function BusinessReportIcon(_ref) {
|
|
197
|
+
var _ref$width = _ref.width,
|
|
198
|
+
width = _ref$width === void 0 ? 200 : _ref$width,
|
|
199
|
+
_ref$height = _ref.height,
|
|
200
|
+
height = _ref$height === void 0 ? 200 : _ref$height,
|
|
201
|
+
className = _ref.className,
|
|
202
|
+
style = _ref.style;
|
|
203
|
+
return React__default.createElement("svg", {
|
|
204
|
+
width: width,
|
|
205
|
+
height: height,
|
|
206
|
+
viewBox: "200 400 1400 1000",
|
|
207
|
+
className: className,
|
|
208
|
+
style: _extends({
|
|
209
|
+
fill: reactComponents.tokens.colorNeutralForeground2
|
|
210
|
+
}, style),
|
|
211
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
212
|
+
}, React__default.createElement("g", {
|
|
213
|
+
id: "BACKGROUND"
|
|
214
|
+
}, React__default.createElement("rect", {
|
|
215
|
+
style: {
|
|
216
|
+
fill: reactComponents.tokens.colorNeutralBackground1
|
|
230
217
|
},
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
}
|
|
241
|
-
// Scatter format { x, y }
|
|
242
|
-
if (typeof raw === 'object' && raw !== null && 'x' in raw && 'y' in raw) {
|
|
243
|
-
var _x = raw.x,
|
|
244
|
-
_y = raw.y;
|
|
245
|
-
return datasetLabel + " \u2014 x: " + _x + ", y: " + _y;
|
|
246
|
-
}
|
|
247
|
-
// Floating bar [min, max]
|
|
248
|
-
if (Array.isArray(raw) && raw.length === 2) {
|
|
249
|
-
var min = raw[0],
|
|
250
|
-
max = raw[1];
|
|
251
|
-
return datasetLabel + ": " + min + " \u2013 " + max;
|
|
252
|
-
}
|
|
253
|
-
// Default: single number or string
|
|
254
|
-
return datasetLabel + ": " + raw;
|
|
218
|
+
x: "200",
|
|
219
|
+
y: "400",
|
|
220
|
+
width: "1400",
|
|
221
|
+
height: "1000"
|
|
222
|
+
})), React__default.createElement("g", null, React__default.createElement("g", null, React__default.createElement("rect", {
|
|
223
|
+
x: "486.006",
|
|
224
|
+
y: "568.026",
|
|
225
|
+
style: {
|
|
226
|
+
fill: reactComponents.tokens.colorNeutralBackground1
|
|
255
227
|
},
|
|
256
|
-
|
|
257
|
-
|
|
228
|
+
width: "1038.994",
|
|
229
|
+
height: "768.164"
|
|
230
|
+
}), React__default.createElement("path", {
|
|
231
|
+
style: {
|
|
232
|
+
fill: reactComponents.tokens.colorNeutralStroke1
|
|
258
233
|
},
|
|
259
|
-
|
|
260
|
-
|
|
234
|
+
d: "M1527.5,1338.69H483.506V565.526H1527.5V1338.69z M488.506,1333.69H1522.5V570.526H488.506V1333.69z"
|
|
235
|
+
})), React__default.createElement("g", null, React__default.createElement("rect", {
|
|
236
|
+
x: "558.003",
|
|
237
|
+
y: "1086.698",
|
|
238
|
+
style: {
|
|
239
|
+
fill: reactComponents.tokens.colorNeutralForeground3,
|
|
240
|
+
opacity: 0.3
|
|
261
241
|
},
|
|
262
|
-
|
|
263
|
-
|
|
242
|
+
width: "85",
|
|
243
|
+
height: "164.492"
|
|
244
|
+
}), React__default.createElement("rect", {
|
|
245
|
+
x: "693.003",
|
|
246
|
+
y: "1004.672",
|
|
247
|
+
style: {
|
|
248
|
+
fill: reactComponents.tokens.colorNeutralForeground3,
|
|
249
|
+
opacity: 0.3
|
|
264
250
|
},
|
|
265
|
-
|
|
266
|
-
|
|
251
|
+
width: "85",
|
|
252
|
+
height: "246.519"
|
|
253
|
+
}), React__default.createElement("rect", {
|
|
254
|
+
x: "828.003",
|
|
255
|
+
y: "835.487",
|
|
256
|
+
style: {
|
|
257
|
+
fill: reactComponents.tokens.colorNeutralForeground3,
|
|
258
|
+
opacity: 0.3
|
|
267
259
|
},
|
|
268
|
-
|
|
269
|
-
|
|
260
|
+
width: "85",
|
|
261
|
+
height: "415.703"
|
|
262
|
+
}), React__default.createElement("rect", {
|
|
263
|
+
x: "963.003",
|
|
264
|
+
y: "955.6",
|
|
265
|
+
style: {
|
|
266
|
+
fill: reactComponents.tokens.colorNeutralForeground3,
|
|
267
|
+
opacity: 0.3
|
|
270
268
|
},
|
|
271
|
-
|
|
272
|
-
|
|
269
|
+
width: "85",
|
|
270
|
+
height: "295.591"
|
|
271
|
+
}), React__default.createElement("rect", {
|
|
272
|
+
x: "1098.003",
|
|
273
|
+
y: "825.238",
|
|
274
|
+
style: {
|
|
275
|
+
fill: reactComponents.tokens.colorNeutralForeground3,
|
|
276
|
+
opacity: 0.3
|
|
273
277
|
},
|
|
274
|
-
|
|
275
|
-
|
|
278
|
+
width: "85",
|
|
279
|
+
height: "425.952"
|
|
280
|
+
}), React__default.createElement("rect", {
|
|
281
|
+
x: "1233.003",
|
|
282
|
+
y: "847.489",
|
|
283
|
+
style: {
|
|
284
|
+
fill: reactComponents.tokens.colorNeutralForeground3,
|
|
285
|
+
opacity: 0.3
|
|
276
286
|
},
|
|
277
|
-
|
|
278
|
-
|
|
287
|
+
width: "85",
|
|
288
|
+
height: "403.701"
|
|
289
|
+
}), React__default.createElement("rect", {
|
|
290
|
+
x: "1368.003",
|
|
291
|
+
y: "699.989",
|
|
292
|
+
style: {
|
|
293
|
+
fill: reactComponents.tokens.colorNeutralForeground3,
|
|
294
|
+
opacity: 0.3
|
|
279
295
|
},
|
|
280
|
-
|
|
281
|
-
|
|
296
|
+
width: "85",
|
|
297
|
+
height: "551.201"
|
|
298
|
+
}), React__default.createElement("polygon", {
|
|
299
|
+
style: {
|
|
300
|
+
fill: reactComponents.tokens.colorBrandBackground
|
|
282
301
|
},
|
|
283
|
-
|
|
284
|
-
|
|
302
|
+
points: "583.634,1185.919 581.366,1181.462 723.336,1109.231 869.748,909.808 1003.791,1050.114 1141.593,912.312 1275.235,928.549 1409.365,774.548 1413.135,777.833 1277.265,933.832 1143.407,917.569 1003.709,1057.267 870.251,917.573 726.664,1113.149"
|
|
303
|
+
})), React__default.createElement("rect", {
|
|
304
|
+
x: "796.336",
|
|
305
|
+
y: "662.857",
|
|
306
|
+
style: {
|
|
307
|
+
fill: reactComponents.tokens.colorBrandBackground
|
|
285
308
|
},
|
|
286
|
-
|
|
287
|
-
|
|
309
|
+
width: "418.333",
|
|
310
|
+
height: "5"
|
|
311
|
+
}), React__default.createElement("rect", {
|
|
312
|
+
x: "937.543",
|
|
313
|
+
y: "717.857",
|
|
314
|
+
style: {
|
|
315
|
+
fill: reactComponents.tokens.colorBrandBackground
|
|
288
316
|
},
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
};
|
|
297
|
-
return {
|
|
298
|
-
enabled: true,
|
|
299
|
-
displayColors: true,
|
|
300
|
-
boxWidth: 10,
|
|
301
|
-
boxHeight: 10,
|
|
302
|
-
boxPadding: 5,
|
|
303
|
-
backgroundColor: tooltipBg,
|
|
304
|
-
borderColor: borderColor,
|
|
305
|
-
borderWidth: 1,
|
|
306
|
-
cornerRadius: 4,
|
|
307
|
-
padding: 10,
|
|
308
|
-
titleColor: tooltipTitleColor,
|
|
309
|
-
bodyColor: tooltipBodyColor,
|
|
310
|
-
titleFont: {
|
|
311
|
-
family: fontFamily,
|
|
312
|
-
size: fontSize
|
|
317
|
+
width: "135.92",
|
|
318
|
+
height: "5"
|
|
319
|
+
})), React__default.createElement("g", null, React__default.createElement("g", null, React__default.createElement("rect", {
|
|
320
|
+
x: "264.978",
|
|
321
|
+
y: "441.049",
|
|
322
|
+
style: {
|
|
323
|
+
fill: reactComponents.tokens.colorNeutralBackground1
|
|
313
324
|
},
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
325
|
+
width: "482.581",
|
|
326
|
+
height: "379.067"
|
|
327
|
+
}), React__default.createElement("path", {
|
|
328
|
+
style: {
|
|
329
|
+
fill: reactComponents.tokens.colorNeutralStroke1
|
|
317
330
|
},
|
|
318
|
-
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
* Returns a Chart.js ticks callback to truncate long labels and add optional prefix/suffix.
|
|
323
|
-
*/
|
|
324
|
-
var createAxisLabelFormatter = function createAxisLabelFormatter(_ref) {
|
|
325
|
-
var _ref$maxLength = _ref.maxLength,
|
|
326
|
-
maxLength = _ref$maxLength === void 0 ? 12 : _ref$maxLength,
|
|
327
|
-
_ref$suffix = _ref.suffix,
|
|
328
|
-
suffix = _ref$suffix === void 0 ? '' : _ref$suffix,
|
|
329
|
-
_ref$prefix = _ref.prefix,
|
|
330
|
-
prefix = _ref$prefix === void 0 ? '' : _ref$prefix;
|
|
331
|
-
return function (value) {
|
|
332
|
-
var label = typeof value === 'number' ? this.getLabelForValue(value) : String(value);
|
|
333
|
-
var trimmed = label.length > maxLength ? label.slice(0, maxLength) + '…' : label;
|
|
334
|
-
return "" + prefix + trimmed + suffix;
|
|
335
|
-
};
|
|
336
|
-
};
|
|
337
|
-
function debounce(fn, delay) {
|
|
338
|
-
var timer = null;
|
|
339
|
-
return function () {
|
|
340
|
-
var _this = this;
|
|
341
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
342
|
-
args[_key] = arguments[_key];
|
|
343
|
-
}
|
|
344
|
-
if (timer) clearTimeout(timer);
|
|
345
|
-
timer = setTimeout(function () {
|
|
346
|
-
return fn.apply(_this, args);
|
|
347
|
-
}, delay);
|
|
348
|
-
};
|
|
349
|
-
}
|
|
350
|
-
/**
|
|
351
|
-
* useChartUtils — shared theming and chart helpers.
|
|
352
|
-
*/
|
|
353
|
-
function useChartUtils(theme) {
|
|
354
|
-
return React.useMemo(function () {
|
|
355
|
-
return {
|
|
356
|
-
lightenColor: lightenColor,
|
|
357
|
-
getFluentPalette: getFluentPalette,
|
|
358
|
-
createFluentTooltip: createFluentTooltip,
|
|
359
|
-
createAxisLabelFormatter: createAxisLabelFormatter,
|
|
360
|
-
debounce: debounce
|
|
361
|
-
};
|
|
362
|
-
}, [theme]);
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
var LegendButton = function LegendButton(_ref) {
|
|
366
|
-
var label = _ref.label,
|
|
367
|
-
isVisible = _ref.isVisible,
|
|
368
|
-
color = _ref.color,
|
|
369
|
-
onClick = _ref.onClick,
|
|
370
|
-
_ref$style = _ref.style,
|
|
371
|
-
style = _ref$style === void 0 ? {} : _ref$style,
|
|
372
|
-
buttonRef = _ref.buttonRef;
|
|
373
|
-
return React__default.createElement(reactComponents.Tooltip, {
|
|
374
|
-
content: label,
|
|
375
|
-
relationship: "label"
|
|
376
|
-
}, React__default.createElement(reactComponents.Button, {
|
|
377
|
-
ref: buttonRef,
|
|
378
|
-
shape: "circular",
|
|
379
|
-
size: "small",
|
|
380
|
-
appearance: isVisible ? 'primary' : 'outline',
|
|
381
|
-
onClick: onClick,
|
|
382
|
-
style: _extends({
|
|
383
|
-
backgroundColor: isVisible ? color : 'transparent',
|
|
384
|
-
color: isVisible ? '#fff' : reactComponents.tokens.colorNeutralForeground1,
|
|
385
|
-
borderColor: color,
|
|
386
|
-
borderWidth: 1,
|
|
387
|
-
width: '100px',
|
|
388
|
-
padding: '4px 8px',
|
|
389
|
-
textAlign: 'center'
|
|
390
|
-
}, style)
|
|
391
|
-
}, React__default.createElement(reactComponents.Caption1, {
|
|
392
|
-
as: "span",
|
|
331
|
+
d: "M750.06,822.616H262.478V438.549H750.06V822.616z M267.478,817.616H745.06V443.549H267.478V817.616z"
|
|
332
|
+
})), React__default.createElement("g", null, React__default.createElement("g", null, React__default.createElement("rect", {
|
|
333
|
+
x: "330.537",
|
|
334
|
+
y: "503.15",
|
|
393
335
|
style: {
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
336
|
+
fill: reactComponents.tokens.colorNeutralForeground3,
|
|
337
|
+
opacity: 0.3
|
|
338
|
+
},
|
|
339
|
+
width: "108.842",
|
|
340
|
+
height: "61.633"
|
|
341
|
+
}), React__default.createElement("g", null, React__default.createElement("rect", {
|
|
342
|
+
x: "485.277",
|
|
343
|
+
y: "509.093",
|
|
344
|
+
style: {
|
|
345
|
+
fill: reactComponents.tokens.colorBrandBackground
|
|
346
|
+
},
|
|
347
|
+
width: "198.014",
|
|
348
|
+
height: "2.623"
|
|
349
|
+
}), React__default.createElement("rect", {
|
|
350
|
+
x: "485.277",
|
|
351
|
+
y: "532.656",
|
|
352
|
+
style: {
|
|
353
|
+
fill: reactComponents.tokens.colorNeutralForeground3,
|
|
354
|
+
opacity: 0.3
|
|
355
|
+
},
|
|
356
|
+
width: "198.014",
|
|
357
|
+
height: "2.623"
|
|
358
|
+
}), React__default.createElement("rect", {
|
|
359
|
+
x: "485.277",
|
|
360
|
+
y: "556.218",
|
|
361
|
+
style: {
|
|
362
|
+
fill: reactComponents.tokens.colorNeutralForeground3,
|
|
363
|
+
opacity: 0.3
|
|
364
|
+
},
|
|
365
|
+
width: "198.014",
|
|
366
|
+
height: "2.623"
|
|
367
|
+
}))), React__default.createElement("g", null, React__default.createElement("g", null, React__default.createElement("rect", {
|
|
368
|
+
x: "381.691",
|
|
369
|
+
y: "687.747",
|
|
370
|
+
style: {
|
|
371
|
+
fill: reactComponents.tokens.colorNeutralForeground3,
|
|
372
|
+
opacity: 0.3
|
|
373
|
+
},
|
|
374
|
+
width: "22.73",
|
|
375
|
+
height: "70.417"
|
|
376
|
+
}), React__default.createElement("rect", {
|
|
377
|
+
x: "404.421",
|
|
378
|
+
y: "653.482",
|
|
379
|
+
style: {
|
|
380
|
+
fill: reactComponents.tokens.colorBrandBackground
|
|
381
|
+
},
|
|
382
|
+
width: "22.73",
|
|
383
|
+
height: "104.682"
|
|
384
|
+
})), React__default.createElement("g", null, React__default.createElement("rect", {
|
|
385
|
+
x: "466.491",
|
|
386
|
+
y: "641.634",
|
|
387
|
+
style: {
|
|
388
|
+
fill: reactComponents.tokens.colorNeutralForeground3,
|
|
389
|
+
opacity: 0.3
|
|
390
|
+
},
|
|
391
|
+
width: "22.73",
|
|
392
|
+
height: "116.089"
|
|
393
|
+
}), React__default.createElement("rect", {
|
|
394
|
+
x: "489.221",
|
|
395
|
+
y: "714.758",
|
|
396
|
+
style: {
|
|
397
|
+
fill: reactComponents.tokens.colorBrandBackground
|
|
398
|
+
},
|
|
399
|
+
width: "22.73",
|
|
400
|
+
height: "42.965"
|
|
401
|
+
}))))));
|
|
401
402
|
};
|
|
402
403
|
|
|
403
404
|
/**
|
|
@@ -474,920 +475,717 @@ var Stack = /*#__PURE__*/React__default.memo(function (_ref) {
|
|
|
474
475
|
});
|
|
475
476
|
Stack.displayName = "Stack";
|
|
476
477
|
|
|
477
|
-
var
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
478
|
+
var NoDashboards = function NoDashboards(props) {
|
|
479
|
+
var height = props.height;
|
|
480
|
+
return React.createElement(React.Fragment, null, React.createElement(Stack, {
|
|
481
|
+
style: {
|
|
482
|
+
height: height || "100%"
|
|
483
|
+
},
|
|
484
|
+
justifyContent: "Center",
|
|
485
|
+
alignItems: "Center"
|
|
486
|
+
}, React.createElement(BusinessReportIcon, {
|
|
487
|
+
width: 200,
|
|
488
|
+
height: 200
|
|
489
|
+
}), React.createElement(reactComponents.Text, {
|
|
490
|
+
size: 500,
|
|
491
|
+
weight: 'semibold'
|
|
492
|
+
}, "No Dashboards Available")));
|
|
488
493
|
};
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
}), overflowItems.length > 0 && React__default.createElement(reactComponents.Menu, null, React__default.createElement(reactComponents.MenuTrigger, {
|
|
520
|
-
disableButtonEnhancement: true
|
|
521
|
-
}, React__default.createElement(reactComponents.MenuButton, {
|
|
522
|
-
size: "small",
|
|
523
|
-
appearance: "transparent"
|
|
524
|
-
}, "+", overflowItems.length)), React__default.createElement(reactComponents.MenuPopover, {
|
|
494
|
+
|
|
495
|
+
var useRenderLabelStyles = /*#__PURE__*/reactComponents.makeStyles({
|
|
496
|
+
labelContainer: /*#__PURE__*/_extends({
|
|
497
|
+
display: "flex",
|
|
498
|
+
flexDirection: "row",
|
|
499
|
+
justifyContent: "flex-start",
|
|
500
|
+
alignItems: "center"
|
|
501
|
+
}, /*#__PURE__*/reactComponents.shorthands.gap("6px")),
|
|
502
|
+
iconStyles: {
|
|
503
|
+
width: "26px"
|
|
504
|
+
},
|
|
505
|
+
item: {
|
|
506
|
+
paddingLeft: "15px"
|
|
507
|
+
}
|
|
508
|
+
});
|
|
509
|
+
|
|
510
|
+
var RenderLabel = function RenderLabel(props) {
|
|
511
|
+
var label = props.label,
|
|
512
|
+
icon = props.icon,
|
|
513
|
+
isRequired = props.isRequired;
|
|
514
|
+
var styles = useRenderLabelStyles();
|
|
515
|
+
return React.createElement(React.Fragment, null, React.createElement("div", {
|
|
516
|
+
className: styles.labelContainer
|
|
517
|
+
}, icon && React.isValidElement(icon) ? icon : React.createElement(react.Icon, {
|
|
518
|
+
icon: icon,
|
|
519
|
+
className: styles.iconStyles,
|
|
520
|
+
width: "20px",
|
|
521
|
+
height: "20px",
|
|
522
|
+
color: reactComponents.tokens.colorBrandForeground1
|
|
523
|
+
}), React.createElement(reactComponents.Caption1, {
|
|
525
524
|
style: {
|
|
526
|
-
|
|
527
|
-
maxWidth: '200px'
|
|
525
|
+
color: reactComponents.tokens.colorBrandForeground1
|
|
528
526
|
}
|
|
529
|
-
},
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
padding: 0
|
|
536
|
-
}
|
|
537
|
-
}, React__default.createElement(LegendButton, {
|
|
538
|
-
label: renderLabel(item),
|
|
539
|
-
color: getColor(item),
|
|
540
|
-
isVisible: isVisible,
|
|
541
|
-
onClick: function onClick() {
|
|
542
|
-
return toggleLabel(label);
|
|
543
|
-
},
|
|
544
|
-
style: {
|
|
545
|
-
width: '100px',
|
|
546
|
-
textAlign: 'left'
|
|
547
|
-
}
|
|
548
|
-
}));
|
|
549
|
-
}))))));
|
|
550
|
-
}
|
|
527
|
+
}, label), React.createElement(reactComponents.Caption1, {
|
|
528
|
+
style: {
|
|
529
|
+
color: reactComponents.tokens.colorPaletteRedForeground1
|
|
530
|
+
}
|
|
531
|
+
}, isRequired ? " *" : "")));
|
|
532
|
+
};
|
|
551
533
|
|
|
552
|
-
var
|
|
553
|
-
var
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
534
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
535
|
+
var useStyles = function useStyles() {
|
|
536
|
+
return {
|
|
537
|
+
gridContainer: css.css(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n display: grid;\n gap: 4px;\n padding: 8px;\n justify-content: center;\n "]))),
|
|
538
|
+
cell: css.css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n width: 30px;\n height: 30px;\n border: 1px solid ", ";\n background-color: ", ";\n cursor: pointer;\n transition: background-color 150ms ease, transform 150ms ease;\n will-change: background-color, transform;\n "])), reactComponents.tokens.colorNeutralStroke1, reactComponents.tokens.colorNeutralBackground1),
|
|
539
|
+
hoveredCell: css.css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n transform: scale(1.05);\n "])), reactComponents.tokens.colorNeutralBackground1Hover),
|
|
540
|
+
selectedCell: css.css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n "])), reactComponents.tokens.colorNeutralBackground1Selected),
|
|
541
|
+
menuPopover: css.css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["\n min-width: fit-content;\n "]))),
|
|
542
|
+
bottomText: css.css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["\n padding-left: 8px;\n padding-right: 8px;\n "]))),
|
|
543
|
+
zoomContainer: css.css({
|
|
544
|
+
display: 'flex',
|
|
545
|
+
flexDirection: 'row',
|
|
546
|
+
alignItems: 'center',
|
|
547
|
+
gap: '6px',
|
|
548
|
+
width: '100%',
|
|
549
|
+
boxSizing: 'border-box',
|
|
550
|
+
padding: '8px 0px'
|
|
551
|
+
})
|
|
552
|
+
};
|
|
553
|
+
};
|
|
554
|
+
var SelectZoom = function SelectZoom(props) {
|
|
555
|
+
var onChange = props.onChange,
|
|
556
|
+
defaultValues = props.values,
|
|
557
|
+
maxCols = props.maxCols,
|
|
558
|
+
maxRows = props.maxRows;
|
|
559
|
+
var Settings = reactIcons.bundleIcon(reactIcons.Settings20Filled, reactIcons.Settings20Regular);
|
|
560
|
+
var styles = useStyles();
|
|
561
|
+
var _React$useState = React.useState(defaultValues),
|
|
562
|
+
values = _React$useState[0],
|
|
563
|
+
setValues = _React$useState[1];
|
|
564
|
+
var _React$useState2 = React.useState(null),
|
|
565
|
+
hovered = _React$useState2[0],
|
|
566
|
+
setHovered = _React$useState2[1];
|
|
567
|
+
var _React$useState3 = React.useState(false),
|
|
568
|
+
open = _React$useState3[0],
|
|
569
|
+
setOpen = _React$useState3[1];
|
|
561
570
|
React.useEffect(function () {
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
571
|
+
setValues(defaultValues);
|
|
572
|
+
}, [defaultValues]);
|
|
573
|
+
var onOpenChange = function onOpenChange(_, data) {
|
|
574
|
+
setOpen(data.open);
|
|
575
|
+
setHovered(null);
|
|
576
|
+
};
|
|
577
|
+
var handleCellClick = function handleCellClick(row, col) {
|
|
578
|
+
var newValues = {
|
|
579
|
+
spanCols: col + 1,
|
|
580
|
+
spanRows: row + 1
|
|
568
581
|
};
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
582
|
+
setValues(newValues);
|
|
583
|
+
onChange == null || onChange(newValues);
|
|
584
|
+
setOpen(false);
|
|
585
|
+
};
|
|
586
|
+
var handleCellHover = function handleCellHover(row, col) {
|
|
587
|
+
setHovered({
|
|
588
|
+
spanCols: col + 1,
|
|
589
|
+
spanRows: row + 1
|
|
590
|
+
});
|
|
591
|
+
};
|
|
592
|
+
var handleMouseLeave = function handleMouseLeave() {
|
|
593
|
+
setHovered(null);
|
|
594
|
+
};
|
|
595
|
+
var renderGridCells = function renderGridCells() {
|
|
596
|
+
var cells = [];
|
|
597
|
+
var _loop = function _loop(row) {
|
|
598
|
+
var _loop2 = function _loop2(col) {
|
|
599
|
+
var isSelected = row < values.spanRows && col < values.spanCols;
|
|
600
|
+
var isHovered = hovered && row < hovered.spanRows && col < hovered.spanCols;
|
|
601
|
+
cells.push(React.createElement("div", {
|
|
602
|
+
key: row + "-" + col,
|
|
603
|
+
className: styles.cell + " " + (isHovered ? styles.hoveredCell : "") + " " + (isSelected ? styles.selectedCell : ""),
|
|
604
|
+
onMouseEnter: function onMouseEnter() {
|
|
605
|
+
return handleCellHover(row, col);
|
|
606
|
+
},
|
|
607
|
+
onClick: function onClick() {
|
|
608
|
+
return handleCellClick(row, col);
|
|
609
|
+
}
|
|
610
|
+
}));
|
|
611
|
+
};
|
|
612
|
+
for (var col = 0; col < maxCols; col++) {
|
|
613
|
+
_loop2(col);
|
|
614
|
+
}
|
|
575
615
|
};
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
overflowItems: items.slice(maxVisible)
|
|
616
|
+
for (var row = 0; row < maxRows; row++) {
|
|
617
|
+
_loop(row);
|
|
618
|
+
}
|
|
619
|
+
return cells;
|
|
581
620
|
};
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
getColor: function getColor(d) {
|
|
604
|
-
return seriesColors[d.label];
|
|
621
|
+
// Compute popover width dynamically
|
|
622
|
+
var popoverWidth = React.useMemo(function () {
|
|
623
|
+
return 30 * maxCols + 4 * (maxCols - 1) + 32;
|
|
624
|
+
}, [maxCols]); // 30px for each cell, 4px gap, and 32px padding (16 left and right)
|
|
625
|
+
return React.createElement(reactComponents.Menu, {
|
|
626
|
+
open: open,
|
|
627
|
+
onOpenChange: onOpenChange
|
|
628
|
+
}, React.createElement(reactComponents.MenuTrigger, {
|
|
629
|
+
disableButtonEnhancement: true
|
|
630
|
+
}, React.createElement(reactComponents.Tooltip, {
|
|
631
|
+
content: "Configure",
|
|
632
|
+
relationship: "label"
|
|
633
|
+
}, React.createElement(reactComponents.MenuButton, {
|
|
634
|
+
icon: React.createElement(Settings, null),
|
|
635
|
+
size: "small",
|
|
636
|
+
appearance: "transparent"
|
|
637
|
+
}))), React.createElement(reactComponents.MenuPopover, {
|
|
638
|
+
style: {
|
|
639
|
+
width: popoverWidth + "px",
|
|
640
|
+
minWidth: "120px",
|
|
641
|
+
padding: 8
|
|
605
642
|
}
|
|
606
|
-
}
|
|
643
|
+
}, React.createElement("div", {
|
|
644
|
+
className: styles.zoomContainer
|
|
645
|
+
}, React.createElement(RenderLabel, {
|
|
646
|
+
label: "Span (" + values.spanCols + " \xD7 " + values.spanRows + ")"
|
|
647
|
+
})), React.createElement("div", {
|
|
648
|
+
className: styles.gridContainer,
|
|
649
|
+
style: {
|
|
650
|
+
gridTemplateColumns: "repeat(" + maxCols + ", 30px)",
|
|
651
|
+
gridTemplateRows: "repeat(" + maxRows + ", 30px)"
|
|
652
|
+
},
|
|
653
|
+
onMouseLeave: handleMouseLeave
|
|
654
|
+
}, renderGridCells()), React.createElement(reactComponents.Caption1, {
|
|
655
|
+
className: styles.bottomText
|
|
656
|
+
}, "Click to set span")));
|
|
607
657
|
};
|
|
608
658
|
|
|
609
|
-
var
|
|
610
|
-
var
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
659
|
+
var LegendButton = function LegendButton(_ref) {
|
|
660
|
+
var label = _ref.label,
|
|
661
|
+
isVisible = _ref.isVisible,
|
|
662
|
+
color = _ref.color,
|
|
663
|
+
onClick = _ref.onClick,
|
|
664
|
+
_ref$style = _ref.style,
|
|
665
|
+
style = _ref$style === void 0 ? {} : _ref$style,
|
|
666
|
+
buttonRef = _ref.buttonRef;
|
|
667
|
+
return React__default.createElement(reactComponents.Tooltip, {
|
|
668
|
+
content: label,
|
|
669
|
+
relationship: "label"
|
|
670
|
+
}, React__default.createElement(reactComponents.Button, {
|
|
671
|
+
ref: buttonRef,
|
|
672
|
+
shape: "circular",
|
|
673
|
+
size: "small",
|
|
674
|
+
appearance: isVisible ? 'primary' : 'outline',
|
|
675
|
+
onClick: onClick,
|
|
676
|
+
style: _extends({
|
|
677
|
+
backgroundColor: isVisible ? color : 'transparent',
|
|
678
|
+
color: isVisible ? '#fff' : reactComponents.tokens.colorNeutralForeground1,
|
|
679
|
+
borderColor: color,
|
|
680
|
+
borderWidth: 1,
|
|
681
|
+
width: '100px',
|
|
682
|
+
padding: '4px 8px',
|
|
683
|
+
textAlign: 'center'
|
|
684
|
+
}, style)
|
|
685
|
+
}, React__default.createElement(reactComponents.Caption1, {
|
|
686
|
+
as: "span",
|
|
687
|
+
style: {
|
|
688
|
+
display: 'block',
|
|
689
|
+
overflow: 'hidden',
|
|
690
|
+
textOverflow: 'ellipsis',
|
|
691
|
+
whiteSpace: 'nowrap',
|
|
692
|
+
lineHeight: '1.25'
|
|
693
|
+
}
|
|
694
|
+
}, label)));
|
|
624
695
|
};
|
|
625
696
|
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
var color = lightenColor(base, 0.3);
|
|
654
|
-
acc[series.label] = color;
|
|
655
|
-
return acc;
|
|
656
|
-
}, {});
|
|
657
|
-
}, [data]);
|
|
658
|
-
var toggleSeries = function toggleSeries(label) {
|
|
659
|
-
setVisibleSeries(function (prev) {
|
|
660
|
-
var isVisible = prev.includes(label);
|
|
661
|
-
var next = isVisible ? prev.filter(function (l) {
|
|
662
|
-
return l !== label;
|
|
663
|
-
}) : [].concat(prev, [label]);
|
|
664
|
-
return next.length === 0 && data.length > 0 ? [data[0].label] : next;
|
|
665
|
-
});
|
|
666
|
-
};
|
|
667
|
-
// Extract all unique x-axis categories (from all series)
|
|
668
|
-
var allCategories = React.useMemo(function () {
|
|
669
|
-
var categorySet = new Set();
|
|
670
|
-
data.forEach(function (series) {
|
|
671
|
-
series.data.forEach(function (datum) {
|
|
672
|
-
categorySet.add(getPrimary(datum));
|
|
673
|
-
});
|
|
674
|
-
});
|
|
675
|
-
return Array.from(categorySet);
|
|
676
|
-
}, [data, getPrimary]);
|
|
677
|
-
// Construct Chart.js datasets
|
|
678
|
-
var chartData = React.useMemo(function () {
|
|
679
|
-
return {
|
|
680
|
-
labels: allCategories,
|
|
681
|
-
datasets: data.filter(function (series) {
|
|
682
|
-
return visibleSeries.includes(series.label);
|
|
683
|
-
}).map(function (series) {
|
|
684
|
-
return {
|
|
685
|
-
label: series.label,
|
|
686
|
-
backgroundColor: seriesColors[series.label],
|
|
687
|
-
data: allCategories.map(function (cat) {
|
|
688
|
-
var found = series.data.find(function (d) {
|
|
689
|
-
return getPrimary(d) === cat;
|
|
690
|
-
});
|
|
691
|
-
return found ? getSecondary(found) : 0;
|
|
692
|
-
}),
|
|
693
|
-
// Assign y-axis based on series type when stacked
|
|
694
|
-
yAxisID: stacked ? series.type === 'line' ? 'y1' : 'y' : 'y'
|
|
695
|
-
};
|
|
696
|
-
})
|
|
697
|
-
};
|
|
698
|
-
}, [data, visibleSeries, allCategories, seriesColors, stacked]);
|
|
699
|
-
var _useMemo = React.useMemo(function () {
|
|
700
|
-
return {
|
|
701
|
-
fontFamily: theme.fontFamilyBase,
|
|
702
|
-
fontSize: parseInt(theme.fontSizeBase200.replace('px', '')) || 14,
|
|
703
|
-
labelColor: theme.colorNeutralForeground1,
|
|
704
|
-
gridColor: theme.colorNeutralStroke2
|
|
705
|
-
};
|
|
706
|
-
}, [theme]),
|
|
707
|
-
fontFamily = _useMemo.fontFamily,
|
|
708
|
-
fontSize = _useMemo.fontSize,
|
|
709
|
-
labelColor = _useMemo.labelColor,
|
|
710
|
-
gridColor = _useMemo.gridColor;
|
|
711
|
-
var options = React.useMemo(function () {
|
|
712
|
-
return {
|
|
713
|
-
responsive: true,
|
|
714
|
-
maintainAspectRatio: false,
|
|
715
|
-
plugins: {
|
|
716
|
-
title: {
|
|
717
|
-
display: !!title,
|
|
718
|
-
text: title,
|
|
719
|
-
font: {
|
|
720
|
-
size: 14,
|
|
721
|
-
family: theme.fontFamilyBase,
|
|
722
|
-
weight: theme.fontWeightSemibold
|
|
723
|
-
},
|
|
724
|
-
color: theme.colorNeutralForeground1,
|
|
725
|
-
padding: {
|
|
726
|
-
top: 20,
|
|
727
|
-
bottom: 20
|
|
728
|
-
}
|
|
729
|
-
},
|
|
730
|
-
datalabels: {
|
|
731
|
-
display: showDatalabels,
|
|
732
|
-
color: theme.colorNeutralForeground1,
|
|
733
|
-
font: {
|
|
734
|
-
family: theme.fontFamilyBase,
|
|
735
|
-
size: parseInt(theme.fontSizeBase200.replace('px', '')) || 14
|
|
736
|
-
}
|
|
737
|
-
},
|
|
738
|
-
legend: {
|
|
739
|
-
display: false
|
|
740
|
-
},
|
|
741
|
-
tooltip: createFluentTooltip(theme)
|
|
742
|
-
},
|
|
743
|
-
scales: _extends({
|
|
744
|
-
x: {
|
|
745
|
-
stacked: stacked,
|
|
746
|
-
ticks: {
|
|
747
|
-
callback: createAxisLabelFormatter({
|
|
748
|
-
maxLength: 10
|
|
749
|
-
}),
|
|
750
|
-
color: labelColor,
|
|
751
|
-
font: {
|
|
752
|
-
family: fontFamily,
|
|
753
|
-
size: fontSize
|
|
754
|
-
}
|
|
755
|
-
},
|
|
756
|
-
grid: {
|
|
757
|
-
color: gridColor
|
|
758
|
-
}
|
|
759
|
-
},
|
|
760
|
-
y: {
|
|
761
|
-
type: 'linear',
|
|
762
|
-
position: 'left',
|
|
763
|
-
stacked: stacked,
|
|
764
|
-
ticks: {
|
|
765
|
-
callback: createAxisLabelFormatter({
|
|
766
|
-
maxLength: 10
|
|
767
|
-
}),
|
|
768
|
-
color: labelColor,
|
|
769
|
-
font: {
|
|
770
|
-
family: fontFamily,
|
|
771
|
-
size: fontSize
|
|
772
|
-
}
|
|
773
|
-
},
|
|
774
|
-
grid: {
|
|
775
|
-
color: gridColor
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
|
-
}, stacked && {
|
|
779
|
-
y1: {
|
|
780
|
-
type: 'linear',
|
|
781
|
-
position: 'right',
|
|
782
|
-
ticks: {
|
|
783
|
-
callback: createAxisLabelFormatter({
|
|
784
|
-
maxLength: 10
|
|
785
|
-
}),
|
|
786
|
-
color: labelColor,
|
|
787
|
-
font: {
|
|
788
|
-
family: fontFamily,
|
|
789
|
-
size: fontSize
|
|
790
|
-
}
|
|
791
|
-
},
|
|
792
|
-
grid: {
|
|
793
|
-
drawOnChartArea: false
|
|
794
|
-
}
|
|
795
|
-
}
|
|
796
|
-
})
|
|
797
|
-
};
|
|
798
|
-
}, [title, showDatalabels, theme, fontFamily, fontSize, labelColor, gridColor, stacked, createFluentTooltip]);
|
|
799
|
-
return React__default.createElement("div", {
|
|
800
|
-
className: styles.chartWithLegend
|
|
697
|
+
var styles = {
|
|
698
|
+
wrapper: /*#__PURE__*/css.css({
|
|
699
|
+
display: 'flex',
|
|
700
|
+
flexWrap: 'nowrap',
|
|
701
|
+
overflow: 'hidden',
|
|
702
|
+
justifyContent: 'center',
|
|
703
|
+
gap: 10,
|
|
704
|
+
padding: 2,
|
|
705
|
+
width: '100%',
|
|
706
|
+
boxSizing: 'border-box'
|
|
707
|
+
})
|
|
708
|
+
};
|
|
709
|
+
function LegendContainer(props) {
|
|
710
|
+
var containerRef = props.containerRef,
|
|
711
|
+
visibleItems = props.visibleItems,
|
|
712
|
+
overflowItems = props.overflowItems,
|
|
713
|
+
visibleLabels = props.visibleLabels,
|
|
714
|
+
toggleLabel = props.toggleLabel,
|
|
715
|
+
renderLabel = props.renderLabel,
|
|
716
|
+
getColor = props.getColor;
|
|
717
|
+
return React__default.createElement(Stack, {
|
|
718
|
+
justifyContent: "center",
|
|
719
|
+
alignItems: "center",
|
|
720
|
+
marginLeft: "10px",
|
|
721
|
+
marginRight: "10px",
|
|
722
|
+
marginTop: "25px",
|
|
723
|
+
marginBottom: "20px"
|
|
801
724
|
}, React__default.createElement("div", {
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
chart_js.Chart.register(ChartDataLabels);
|
|
817
|
-
chart_js.Chart.register(chart_js.CategoryScale, chart_js.LinearScale, chart_js.BarElement, chart_js.LineElement, chart_js.PointElement, chart_js.Tooltip, chart_js.Legend, chart_js.Title);
|
|
818
|
-
function ComboChart(_ref) {
|
|
819
|
-
var data = _ref.data,
|
|
820
|
-
getPrimary = _ref.getPrimary,
|
|
821
|
-
getSecondary = _ref.getSecondary,
|
|
822
|
-
title = _ref.title,
|
|
823
|
-
_ref$showDataLabels = _ref.showDataLabels,
|
|
824
|
-
showDataLabels = _ref$showDataLabels === void 0 ? false : _ref$showDataLabels,
|
|
825
|
-
_ref$theme = _ref.theme,
|
|
826
|
-
theme = _ref$theme === void 0 ? reactComponents.webLightTheme : _ref$theme;
|
|
827
|
-
var _useState = React.useState(function () {
|
|
828
|
-
return data.map(function (s) {
|
|
829
|
-
return s.label;
|
|
830
|
-
});
|
|
831
|
-
}),
|
|
832
|
-
visibleSeries = _useState[0],
|
|
833
|
-
setVisibleSeries = _useState[1];
|
|
834
|
-
var styles = useGraphGlobalStyles();
|
|
835
|
-
var _useChartUtils = useChartUtils(theme),
|
|
836
|
-
lightenColor = _useChartUtils.lightenColor,
|
|
837
|
-
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
838
|
-
createFluentTooltip = _useChartUtils.createFluentTooltip;
|
|
839
|
-
var seriesColors = React.useMemo(function () {
|
|
840
|
-
return data.reduce(function (acc, series, idx) {
|
|
841
|
-
var base = getFluentPalette(theme)[idx % getFluentPalette(theme).length];
|
|
842
|
-
acc[series.label] = lightenColor(base, 0.3);
|
|
843
|
-
return acc;
|
|
844
|
-
}, {});
|
|
845
|
-
}, [data, theme]);
|
|
846
|
-
var toggleSeries = function toggleSeries(label) {
|
|
847
|
-
setVisibleSeries(function (prev) {
|
|
848
|
-
var isVisible = prev.includes(label);
|
|
849
|
-
var next = isVisible ? prev.filter(function (l) {
|
|
850
|
-
return l !== label;
|
|
851
|
-
}) : [].concat(prev, [label]);
|
|
852
|
-
return next.length === 0 ? [data[0].label] : next;
|
|
853
|
-
});
|
|
854
|
-
};
|
|
855
|
-
var allCategories = React.useMemo(function () {
|
|
856
|
-
var set = new Set();
|
|
857
|
-
data.forEach(function (series) {
|
|
858
|
-
return series.data.forEach(function (d) {
|
|
859
|
-
return set.add(getPrimary(d));
|
|
860
|
-
});
|
|
861
|
-
});
|
|
862
|
-
return Array.from(set);
|
|
863
|
-
}, [data, getPrimary]);
|
|
864
|
-
var chartData = React.useMemo(function () {
|
|
865
|
-
var sortedSeries = data.filter(function (series) {
|
|
866
|
-
return visibleSeries.includes(series.label);
|
|
867
|
-
}).sort(function (a, b) {
|
|
868
|
-
// Ensure bars come before lines
|
|
869
|
-
if (a.type === 'bar' && b.type === 'line') return -1;
|
|
870
|
-
if (a.type === 'line' && b.type === 'bar') return 1;
|
|
871
|
-
return 0;
|
|
725
|
+
ref: containerRef,
|
|
726
|
+
className: styles.wrapper
|
|
727
|
+
}, visibleItems.map(function (item) {
|
|
728
|
+
var label = item.label;
|
|
729
|
+
var isVisible = visibleLabels.length === 0 || visibleLabels.includes(label);
|
|
730
|
+
return React__default.createElement(LegendButton, {
|
|
731
|
+
key: label,
|
|
732
|
+
label: renderLabel(item),
|
|
733
|
+
color: getColor(item),
|
|
734
|
+
isVisible: isVisible,
|
|
735
|
+
onClick: function onClick() {
|
|
736
|
+
return toggleLabel(label);
|
|
737
|
+
}
|
|
872
738
|
});
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
tension: series.type === 'line' ? 0.4 : 0,
|
|
891
|
-
pointRadius: series.type === 'line' ? 3 : 0,
|
|
892
|
-
borderWidth: series.type === 'line' ? 2 : 1,
|
|
893
|
-
order: series.type === 'bar' ? 1 : 0
|
|
894
|
-
};
|
|
895
|
-
})
|
|
896
|
-
};
|
|
897
|
-
}, [data, visibleSeries, allCategories, getPrimary, getSecondary, seriesColors]);
|
|
898
|
-
var _useMemo = React.useMemo(function () {
|
|
899
|
-
return {
|
|
900
|
-
fontFamily: theme.fontFamilyBase,
|
|
901
|
-
fontSize: parseInt(theme.fontSizeBase200.replace('px', '')) || 14,
|
|
902
|
-
labelColor: theme.colorNeutralForeground1,
|
|
903
|
-
gridColor: theme.colorNeutralStroke2
|
|
904
|
-
};
|
|
905
|
-
}, [theme]),
|
|
906
|
-
fontFamily = _useMemo.fontFamily,
|
|
907
|
-
fontSize = _useMemo.fontSize,
|
|
908
|
-
labelColor = _useMemo.labelColor,
|
|
909
|
-
gridColor = _useMemo.gridColor;
|
|
910
|
-
var options = React.useMemo(function () {
|
|
911
|
-
return {
|
|
912
|
-
responsive: true,
|
|
913
|
-
maintainAspectRatio: false,
|
|
914
|
-
plugins: {
|
|
915
|
-
title: {
|
|
916
|
-
display: !!title,
|
|
917
|
-
text: title,
|
|
918
|
-
font: {
|
|
919
|
-
size: 14,
|
|
920
|
-
family: theme.fontFamilyBase,
|
|
921
|
-
weight: theme.fontWeightSemibold
|
|
922
|
-
},
|
|
923
|
-
color: theme.colorNeutralForeground1,
|
|
924
|
-
padding: {
|
|
925
|
-
top: 20,
|
|
926
|
-
bottom: 20
|
|
927
|
-
}
|
|
928
|
-
},
|
|
929
|
-
datalabels: {
|
|
930
|
-
display: showDataLabels,
|
|
931
|
-
color: theme.colorNeutralForeground1,
|
|
932
|
-
font: {
|
|
933
|
-
family: theme.fontFamilyBase,
|
|
934
|
-
size: parseInt(theme.fontSizeBase200.replace('px', '')) || 14
|
|
935
|
-
}
|
|
936
|
-
},
|
|
937
|
-
legend: {
|
|
938
|
-
display: false
|
|
939
|
-
},
|
|
940
|
-
tooltip: createFluentTooltip(theme)
|
|
941
|
-
},
|
|
942
|
-
scales: {
|
|
943
|
-
x: {
|
|
944
|
-
ticks: {
|
|
945
|
-
color: labelColor,
|
|
946
|
-
font: {
|
|
947
|
-
family: fontFamily,
|
|
948
|
-
size: fontSize
|
|
949
|
-
}
|
|
950
|
-
},
|
|
951
|
-
grid: {
|
|
952
|
-
color: gridColor
|
|
953
|
-
}
|
|
954
|
-
},
|
|
955
|
-
y: {
|
|
956
|
-
position: 'left',
|
|
957
|
-
ticks: {
|
|
958
|
-
color: labelColor,
|
|
959
|
-
font: {
|
|
960
|
-
family: fontFamily,
|
|
961
|
-
size: fontSize
|
|
962
|
-
}
|
|
963
|
-
},
|
|
964
|
-
grid: {
|
|
965
|
-
color: gridColor
|
|
966
|
-
},
|
|
967
|
-
stacked: false
|
|
968
|
-
}
|
|
739
|
+
}), overflowItems.length > 0 && React__default.createElement(reactComponents.Menu, null, React__default.createElement(reactComponents.MenuTrigger, {
|
|
740
|
+
disableButtonEnhancement: true
|
|
741
|
+
}, React__default.createElement(reactComponents.MenuButton, {
|
|
742
|
+
size: "small",
|
|
743
|
+
appearance: "transparent"
|
|
744
|
+
}, "+", overflowItems.length)), React__default.createElement(reactComponents.MenuPopover, {
|
|
745
|
+
style: {
|
|
746
|
+
minWidth: 'fit-content',
|
|
747
|
+
maxWidth: '200px'
|
|
748
|
+
}
|
|
749
|
+
}, React__default.createElement(reactComponents.MenuList, null, overflowItems.map(function (item) {
|
|
750
|
+
var label = item.label;
|
|
751
|
+
var isVisible = visibleLabels.length === 0 || visibleLabels.includes(label);
|
|
752
|
+
return React__default.createElement(reactComponents.MenuItem, {
|
|
753
|
+
key: label,
|
|
754
|
+
style: {
|
|
755
|
+
padding: 0
|
|
969
756
|
}
|
|
970
|
-
}
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
}
|
|
983
|
-
data: data,
|
|
984
|
-
visibleSeries: visibleSeries,
|
|
985
|
-
seriesColors: seriesColors,
|
|
986
|
-
toggleSeries: toggleSeries
|
|
987
|
-
}))));
|
|
757
|
+
}, React__default.createElement(LegendButton, {
|
|
758
|
+
label: renderLabel(item),
|
|
759
|
+
color: getColor(item),
|
|
760
|
+
isVisible: isVisible,
|
|
761
|
+
onClick: function onClick() {
|
|
762
|
+
return toggleLabel(label);
|
|
763
|
+
},
|
|
764
|
+
style: {
|
|
765
|
+
width: '100px',
|
|
766
|
+
textAlign: 'left'
|
|
767
|
+
}
|
|
768
|
+
}));
|
|
769
|
+
}))))));
|
|
988
770
|
}
|
|
989
771
|
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
}), React__default.createElement("path", {
|
|
1025
|
-
style: {
|
|
1026
|
-
fill: reactComponents.tokens.colorNeutralStroke1
|
|
1027
|
-
},
|
|
1028
|
-
d: "M1527.5,1338.69H483.506V565.526H1527.5V1338.69z M488.506,1333.69H1522.5V570.526H488.506V1333.69z"
|
|
1029
|
-
})), React__default.createElement("g", null, React__default.createElement("rect", {
|
|
1030
|
-
x: "558.003",
|
|
1031
|
-
y: "1086.698",
|
|
1032
|
-
style: {
|
|
1033
|
-
fill: reactComponents.tokens.colorNeutralForeground3,
|
|
1034
|
-
opacity: 0.3
|
|
1035
|
-
},
|
|
1036
|
-
width: "85",
|
|
1037
|
-
height: "164.492"
|
|
1038
|
-
}), React__default.createElement("rect", {
|
|
1039
|
-
x: "693.003",
|
|
1040
|
-
y: "1004.672",
|
|
1041
|
-
style: {
|
|
1042
|
-
fill: reactComponents.tokens.colorNeutralForeground3,
|
|
1043
|
-
opacity: 0.3
|
|
1044
|
-
},
|
|
1045
|
-
width: "85",
|
|
1046
|
-
height: "246.519"
|
|
1047
|
-
}), React__default.createElement("rect", {
|
|
1048
|
-
x: "828.003",
|
|
1049
|
-
y: "835.487",
|
|
1050
|
-
style: {
|
|
1051
|
-
fill: reactComponents.tokens.colorNeutralForeground3,
|
|
1052
|
-
opacity: 0.3
|
|
1053
|
-
},
|
|
1054
|
-
width: "85",
|
|
1055
|
-
height: "415.703"
|
|
1056
|
-
}), React__default.createElement("rect", {
|
|
1057
|
-
x: "963.003",
|
|
1058
|
-
y: "955.6",
|
|
1059
|
-
style: {
|
|
1060
|
-
fill: reactComponents.tokens.colorNeutralForeground3,
|
|
1061
|
-
opacity: 0.3
|
|
1062
|
-
},
|
|
1063
|
-
width: "85",
|
|
1064
|
-
height: "295.591"
|
|
1065
|
-
}), React__default.createElement("rect", {
|
|
1066
|
-
x: "1098.003",
|
|
1067
|
-
y: "825.238",
|
|
1068
|
-
style: {
|
|
1069
|
-
fill: reactComponents.tokens.colorNeutralForeground3,
|
|
1070
|
-
opacity: 0.3
|
|
1071
|
-
},
|
|
1072
|
-
width: "85",
|
|
1073
|
-
height: "425.952"
|
|
1074
|
-
}), React__default.createElement("rect", {
|
|
1075
|
-
x: "1233.003",
|
|
1076
|
-
y: "847.489",
|
|
1077
|
-
style: {
|
|
1078
|
-
fill: reactComponents.tokens.colorNeutralForeground3,
|
|
1079
|
-
opacity: 0.3
|
|
1080
|
-
},
|
|
1081
|
-
width: "85",
|
|
1082
|
-
height: "403.701"
|
|
1083
|
-
}), React__default.createElement("rect", {
|
|
1084
|
-
x: "1368.003",
|
|
1085
|
-
y: "699.989",
|
|
1086
|
-
style: {
|
|
1087
|
-
fill: reactComponents.tokens.colorNeutralForeground3,
|
|
1088
|
-
opacity: 0.3
|
|
1089
|
-
},
|
|
1090
|
-
width: "85",
|
|
1091
|
-
height: "551.201"
|
|
1092
|
-
}), React__default.createElement("polygon", {
|
|
1093
|
-
style: {
|
|
1094
|
-
fill: reactComponents.tokens.colorBrandBackground
|
|
772
|
+
/**
|
|
773
|
+
* Lightens a given hex color by a percentage amount (0 to 1).
|
|
774
|
+
*/
|
|
775
|
+
var lightenColor = function lightenColor(hex, amount) {
|
|
776
|
+
if (!/^#?[0-9A-Fa-f]{6}$/.test(hex)) return hex;
|
|
777
|
+
if (hex.startsWith('#')) hex = hex.slice(1);
|
|
778
|
+
var r = parseInt(hex.slice(0, 2), 16);
|
|
779
|
+
var g = parseInt(hex.slice(2, 4), 16);
|
|
780
|
+
var b = parseInt(hex.slice(4, 6), 16);
|
|
781
|
+
r = Math.min(255, Math.floor(r + (255 - r) * amount));
|
|
782
|
+
g = Math.min(255, Math.floor(g + (255 - g) * amount));
|
|
783
|
+
b = Math.min(255, Math.floor(b + (255 - b) * amount));
|
|
784
|
+
var toHex = function toHex(v) {
|
|
785
|
+
return v.toString(16).padStart(2, '0');
|
|
786
|
+
};
|
|
787
|
+
return "#" + toHex(r) + toHex(g) + toHex(b);
|
|
788
|
+
};
|
|
789
|
+
var getFluentPalette = function getFluentPalette(_theme) {
|
|
790
|
+
return ['#4e79a7', '#f28e2c', '#e15759', '#76b7b2', '#59a14f', '#edc949', '#af7aa1', '#ff9da7', '#9c755f', '#bab0ab', '#8cd17d', '#b6992d', '#d37295', '#fabfd2', '#79706e'];
|
|
791
|
+
};
|
|
792
|
+
/**
|
|
793
|
+
* Smart Fluent tooltip generator with chart-type awareness.
|
|
794
|
+
*/
|
|
795
|
+
function createFluentTooltip(theme) {
|
|
796
|
+
var fontFamily = theme.fontFamilyBase;
|
|
797
|
+
var fontSize = parseInt(theme.fontSizeBase200.replace('px', '')) || 14;
|
|
798
|
+
var tooltipBg = theme.colorNeutralBackground1;
|
|
799
|
+
var tooltipTitleColor = theme.colorNeutralForeground1;
|
|
800
|
+
var tooltipBodyColor = theme.colorNeutralForeground2;
|
|
801
|
+
var borderColor = theme.colorNeutralStroke2;
|
|
802
|
+
var callbacks = {
|
|
803
|
+
title: function title(context) {
|
|
804
|
+
var _context$0$label, _context$;
|
|
805
|
+
return (_context$0$label = (_context$ = context[0]) == null ? void 0 : _context$.label) != null ? _context$0$label : '';
|
|
1095
806
|
},
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
807
|
+
label: function label(item) {
|
|
808
|
+
var datasetLabel = 'label' in item.dataset && typeof item.dataset.label === 'string' ? item.dataset.label : 'Value';
|
|
809
|
+
var raw = item.raw;
|
|
810
|
+
// Bubble format { x, y, r }
|
|
811
|
+
if (typeof raw === 'object' && raw !== null && 'x' in raw && 'y' in raw && 'r' in raw) {
|
|
812
|
+
var x = raw.x,
|
|
813
|
+
y = raw.y,
|
|
814
|
+
r = raw.r;
|
|
815
|
+
return datasetLabel + " \u2014 x: " + x + ", y: " + y + ", r: " + r;
|
|
816
|
+
}
|
|
817
|
+
// Scatter format { x, y }
|
|
818
|
+
if (typeof raw === 'object' && raw !== null && 'x' in raw && 'y' in raw) {
|
|
819
|
+
var _x = raw.x,
|
|
820
|
+
_y = raw.y;
|
|
821
|
+
return datasetLabel + " \u2014 x: " + _x + ", y: " + _y;
|
|
822
|
+
}
|
|
823
|
+
// Floating bar [min, max]
|
|
824
|
+
if (Array.isArray(raw) && raw.length === 2) {
|
|
825
|
+
var min = raw[0],
|
|
826
|
+
max = raw[1];
|
|
827
|
+
return datasetLabel + ": " + min + " \u2013 " + max;
|
|
828
|
+
}
|
|
829
|
+
// Default: single number or string
|
|
830
|
+
return datasetLabel + ": " + raw;
|
|
1102
831
|
},
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
}), React__default.createElement("rect", {
|
|
1106
|
-
x: "937.543",
|
|
1107
|
-
y: "717.857",
|
|
1108
|
-
style: {
|
|
1109
|
-
fill: reactComponents.tokens.colorBrandBackground
|
|
832
|
+
beforeTitle: function beforeTitle() {
|
|
833
|
+
return '';
|
|
1110
834
|
},
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
})), React__default.createElement("g", null, React__default.createElement("g", null, React__default.createElement("rect", {
|
|
1114
|
-
x: "264.978",
|
|
1115
|
-
y: "441.049",
|
|
1116
|
-
style: {
|
|
1117
|
-
fill: reactComponents.tokens.colorNeutralBackground1
|
|
835
|
+
afterTitle: function afterTitle() {
|
|
836
|
+
return '';
|
|
1118
837
|
},
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
}), React__default.createElement("path", {
|
|
1122
|
-
style: {
|
|
1123
|
-
fill: reactComponents.tokens.colorNeutralStroke1
|
|
838
|
+
beforeBody: function beforeBody() {
|
|
839
|
+
return '';
|
|
1124
840
|
},
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
x: "330.537",
|
|
1128
|
-
y: "503.15",
|
|
1129
|
-
style: {
|
|
1130
|
-
fill: reactComponents.tokens.colorNeutralForeground3,
|
|
1131
|
-
opacity: 0.3
|
|
841
|
+
afterBody: function afterBody() {
|
|
842
|
+
return '';
|
|
1132
843
|
},
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
}), React__default.createElement("g", null, React__default.createElement("rect", {
|
|
1136
|
-
x: "485.277",
|
|
1137
|
-
y: "509.093",
|
|
1138
|
-
style: {
|
|
1139
|
-
fill: reactComponents.tokens.colorBrandBackground
|
|
844
|
+
beforeLabel: function beforeLabel() {
|
|
845
|
+
return '';
|
|
1140
846
|
},
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
}), React__default.createElement("rect", {
|
|
1144
|
-
x: "485.277",
|
|
1145
|
-
y: "532.656",
|
|
1146
|
-
style: {
|
|
1147
|
-
fill: reactComponents.tokens.colorNeutralForeground3,
|
|
1148
|
-
opacity: 0.3
|
|
847
|
+
afterLabel: function afterLabel() {
|
|
848
|
+
return '';
|
|
1149
849
|
},
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
}), React__default.createElement("rect", {
|
|
1153
|
-
x: "485.277",
|
|
1154
|
-
y: "556.218",
|
|
1155
|
-
style: {
|
|
1156
|
-
fill: reactComponents.tokens.colorNeutralForeground3,
|
|
1157
|
-
opacity: 0.3
|
|
850
|
+
labelColor: function labelColor() {
|
|
851
|
+
return undefined;
|
|
1158
852
|
},
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
}))), React__default.createElement("g", null, React__default.createElement("g", null, React__default.createElement("rect", {
|
|
1162
|
-
x: "381.691",
|
|
1163
|
-
y: "687.747",
|
|
1164
|
-
style: {
|
|
1165
|
-
fill: reactComponents.tokens.colorNeutralForeground3,
|
|
1166
|
-
opacity: 0.3
|
|
853
|
+
labelTextColor: function labelTextColor() {
|
|
854
|
+
return '';
|
|
1167
855
|
},
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
}), React__default.createElement("rect", {
|
|
1171
|
-
x: "404.421",
|
|
1172
|
-
y: "653.482",
|
|
1173
|
-
style: {
|
|
1174
|
-
fill: reactComponents.tokens.colorBrandBackground
|
|
856
|
+
footer: function footer() {
|
|
857
|
+
return '';
|
|
1175
858
|
},
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
})), React__default.createElement("g", null, React__default.createElement("rect", {
|
|
1179
|
-
x: "466.491",
|
|
1180
|
-
y: "641.634",
|
|
1181
|
-
style: {
|
|
1182
|
-
fill: reactComponents.tokens.colorNeutralForeground3,
|
|
1183
|
-
opacity: 0.3
|
|
859
|
+
beforeFooter: function beforeFooter() {
|
|
860
|
+
return '';
|
|
1184
861
|
},
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
}), React__default.createElement("rect", {
|
|
1188
|
-
x: "489.221",
|
|
1189
|
-
y: "714.758",
|
|
1190
|
-
style: {
|
|
1191
|
-
fill: reactComponents.tokens.colorBrandBackground
|
|
862
|
+
afterFooter: function afterFooter() {
|
|
863
|
+
return '';
|
|
1192
864
|
},
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
865
|
+
labelPointStyle: function labelPointStyle() {
|
|
866
|
+
return {
|
|
867
|
+
pointStyle: 'circle',
|
|
868
|
+
rotation: 0,
|
|
869
|
+
radius: 5
|
|
870
|
+
};
|
|
871
|
+
}
|
|
872
|
+
};
|
|
873
|
+
return {
|
|
874
|
+
enabled: true,
|
|
875
|
+
displayColors: true,
|
|
876
|
+
boxWidth: 10,
|
|
877
|
+
boxHeight: 10,
|
|
878
|
+
boxPadding: 5,
|
|
879
|
+
backgroundColor: tooltipBg,
|
|
880
|
+
borderColor: borderColor,
|
|
881
|
+
borderWidth: 1,
|
|
882
|
+
cornerRadius: 4,
|
|
883
|
+
padding: 10,
|
|
884
|
+
titleColor: tooltipTitleColor,
|
|
885
|
+
bodyColor: tooltipBodyColor,
|
|
886
|
+
titleFont: {
|
|
887
|
+
family: fontFamily,
|
|
888
|
+
size: fontSize
|
|
1203
889
|
},
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
}
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
890
|
+
bodyFont: {
|
|
891
|
+
family: fontFamily,
|
|
892
|
+
size: fontSize
|
|
893
|
+
},
|
|
894
|
+
callbacks: callbacks
|
|
895
|
+
};
|
|
896
|
+
}
|
|
897
|
+
/**
|
|
898
|
+
* Returns a Chart.js ticks callback to truncate long labels and add optional prefix/suffix.
|
|
899
|
+
*/
|
|
900
|
+
var createAxisLabelFormatter = function createAxisLabelFormatter(_ref) {
|
|
901
|
+
var _ref$maxLength = _ref.maxLength,
|
|
902
|
+
maxLength = _ref$maxLength === void 0 ? 12 : _ref$maxLength,
|
|
903
|
+
_ref$suffix = _ref.suffix,
|
|
904
|
+
suffix = _ref$suffix === void 0 ? '' : _ref$suffix,
|
|
905
|
+
_ref$prefix = _ref.prefix,
|
|
906
|
+
prefix = _ref$prefix === void 0 ? '' : _ref$prefix;
|
|
907
|
+
return function (value) {
|
|
908
|
+
var label = typeof value === 'number' ? this.getLabelForValue(value) : String(value);
|
|
909
|
+
var trimmed = label.length > maxLength ? label.slice(0, maxLength) + '…' : label;
|
|
910
|
+
return "" + prefix + trimmed + suffix;
|
|
911
|
+
};
|
|
1213
912
|
};
|
|
913
|
+
function debounce(fn, delay) {
|
|
914
|
+
var timer = null;
|
|
915
|
+
return function () {
|
|
916
|
+
var _this = this;
|
|
917
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
918
|
+
args[_key] = arguments[_key];
|
|
919
|
+
}
|
|
920
|
+
if (timer) clearTimeout(timer);
|
|
921
|
+
timer = setTimeout(function () {
|
|
922
|
+
return fn.apply(_this, args);
|
|
923
|
+
}, delay);
|
|
924
|
+
};
|
|
925
|
+
}
|
|
926
|
+
/**
|
|
927
|
+
* useChartUtils — shared theming and chart helpers.
|
|
928
|
+
*/
|
|
929
|
+
function useChartUtils(theme) {
|
|
930
|
+
return React.useMemo(function () {
|
|
931
|
+
return {
|
|
932
|
+
lightenColor: lightenColor,
|
|
933
|
+
getFluentPalette: getFluentPalette,
|
|
934
|
+
createFluentTooltip: createFluentTooltip,
|
|
935
|
+
createAxisLabelFormatter: createAxisLabelFormatter,
|
|
936
|
+
debounce: debounce
|
|
937
|
+
};
|
|
938
|
+
}, [theme]);
|
|
939
|
+
}
|
|
1214
940
|
|
|
1215
|
-
var
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
941
|
+
var BUTTON_WIDTH = 100;
|
|
942
|
+
var GAP = 10;
|
|
943
|
+
function useResponsiveLegend(items) {
|
|
944
|
+
var containerRef = React.useRef(null);
|
|
945
|
+
var _useState = React.useState(items.length),
|
|
946
|
+
maxVisible = _useState[0],
|
|
947
|
+
setMaxVisible = _useState[1];
|
|
948
|
+
var _useChartUtils = useChartUtils(),
|
|
949
|
+
debounce = _useChartUtils.debounce;
|
|
950
|
+
React.useEffect(function () {
|
|
951
|
+
var measure = function measure() {
|
|
952
|
+
var _containerRef$current, _containerRef$current2;
|
|
953
|
+
var containerWidth = (_containerRef$current = (_containerRef$current2 = containerRef.current) == null ? void 0 : _containerRef$current2.offsetWidth) != null ? _containerRef$current : 0;
|
|
954
|
+
var itemTotalWidth = BUTTON_WIDTH + GAP;
|
|
955
|
+
var count = Math.floor(containerWidth / itemTotalWidth);
|
|
956
|
+
setMaxVisible(count);
|
|
957
|
+
};
|
|
958
|
+
var debouncedMeasure = debounce(measure, 100); // debounce resize
|
|
959
|
+
var observer = new resizeObserver.ResizeObserver(debouncedMeasure);
|
|
960
|
+
if (containerRef.current) observer.observe(containerRef.current);
|
|
961
|
+
measure(); // initial
|
|
962
|
+
return function () {
|
|
963
|
+
return observer.disconnect();
|
|
964
|
+
};
|
|
965
|
+
}, [items]);
|
|
966
|
+
return {
|
|
967
|
+
containerRef: containerRef,
|
|
968
|
+
visibleItems: items.slice(0, maxVisible),
|
|
969
|
+
overflowItems: items.slice(maxVisible)
|
|
970
|
+
};
|
|
971
|
+
}
|
|
1229
972
|
|
|
1230
|
-
var
|
|
1231
|
-
var
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
973
|
+
var RenderLegend = function RenderLegend(_ref) {
|
|
974
|
+
var data = _ref.data,
|
|
975
|
+
visibleSeries = _ref.visibleSeries,
|
|
976
|
+
seriesColors = _ref.seriesColors,
|
|
977
|
+
toggleSeries = _ref.toggleSeries;
|
|
978
|
+
var _useResponsiveLegend = useResponsiveLegend(data),
|
|
979
|
+
containerRef = _useResponsiveLegend.containerRef,
|
|
980
|
+
visibleItems = _useResponsiveLegend.visibleItems,
|
|
981
|
+
overflowItems = _useResponsiveLegend.overflowItems;
|
|
982
|
+
return React__default.createElement(LegendContainer, {
|
|
983
|
+
containerRef: containerRef,
|
|
984
|
+
visibleItems: visibleItems,
|
|
985
|
+
overflowItems: overflowItems,
|
|
986
|
+
items: data,
|
|
987
|
+
visibleLabels: visibleSeries,
|
|
988
|
+
toggleLabel: toggleSeries,
|
|
989
|
+
renderLabel: function renderLabel(d) {
|
|
990
|
+
return d.label;
|
|
991
|
+
},
|
|
992
|
+
getColor: function getColor(d) {
|
|
993
|
+
return seriesColors[d.label];
|
|
1250
994
|
}
|
|
1251
|
-
}
|
|
995
|
+
});
|
|
1252
996
|
};
|
|
1253
997
|
|
|
1254
|
-
var _templateObject$1, _templateObject2$1
|
|
1255
|
-
var
|
|
998
|
+
var _templateObject$1, _templateObject2$1;
|
|
999
|
+
var useGraphGlobalStyles = function useGraphGlobalStyles() {
|
|
1256
1000
|
return {
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
width: '100%',
|
|
1269
|
-
boxSizing: 'border-box',
|
|
1270
|
-
padding: '8px 0px'
|
|
1271
|
-
})
|
|
1001
|
+
chartWithLegend: css.css({
|
|
1002
|
+
display: 'flex',
|
|
1003
|
+
flexDirection: 'column',
|
|
1004
|
+
height: '100%',
|
|
1005
|
+
chartArea: {
|
|
1006
|
+
flexGrow: 1,
|
|
1007
|
+
minHeight: 0
|
|
1008
|
+
}
|
|
1009
|
+
}),
|
|
1010
|
+
chartArea: css.css(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteralLoose(["\n flex-grow: 1;\n min-height: 0;\n "]))),
|
|
1011
|
+
legendArea: css.css(_templateObject2$1 || (_templateObject2$1 = _taggedTemplateLiteralLoose(["\n margin-top: 0px;\n padding-top: 0px;\n \n margin-Left: 10px;\n margin-Right: 10px;\n \n "])))
|
|
1272
1012
|
};
|
|
1273
1013
|
};
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
var
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1014
|
+
|
|
1015
|
+
chart_js.Chart.register(chart_js.CategoryScale, chart_js.LinearScale, chart_js.PointElement, chart_js.LineElement, chart_js.Tooltip, chart_js.Filler, chart_js.Legend, ChartDataLabels, chart_js.Title);
|
|
1016
|
+
function AreaChart(_ref) {
|
|
1017
|
+
var data = _ref.data,
|
|
1018
|
+
getPrimary = _ref.getPrimary,
|
|
1019
|
+
getSecondary = _ref.getSecondary,
|
|
1020
|
+
title = _ref.title,
|
|
1021
|
+
_ref$showDatalabels = _ref.showDatalabels,
|
|
1022
|
+
showDatalabels = _ref$showDatalabels === void 0 ? false : _ref$showDatalabels,
|
|
1023
|
+
_ref$theme = _ref.theme,
|
|
1024
|
+
theme = _ref$theme === void 0 ? reactComponents.webLightTheme : _ref$theme,
|
|
1025
|
+
_ref$stacked = _ref.stacked,
|
|
1026
|
+
stacked = _ref$stacked === void 0 ? false : _ref$stacked;
|
|
1027
|
+
var _useState = React.useState(function () {
|
|
1028
|
+
var _data$;
|
|
1029
|
+
return data.length > 1 ? data.map(function (s) {
|
|
1030
|
+
return s.label;
|
|
1031
|
+
}) : [(_data$ = data[0]) == null ? void 0 : _data$.label];
|
|
1032
|
+
}),
|
|
1033
|
+
visibleSeries = _useState[0],
|
|
1034
|
+
setVisibleSeries = _useState[1];
|
|
1035
|
+
var styles = useGraphGlobalStyles();
|
|
1036
|
+
var _useChartUtils = useChartUtils(theme),
|
|
1037
|
+
lightenColor = _useChartUtils.lightenColor,
|
|
1038
|
+
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
1039
|
+
createFluentTooltip = _useChartUtils.createFluentTooltip;
|
|
1040
|
+
var seriesColors = React.useMemo(function () {
|
|
1041
|
+
return data.reduce(function (acc, series, idx) {
|
|
1042
|
+
var base = getFluentPalette(theme)[idx % getFluentPalette(theme).length];
|
|
1043
|
+
var color = lightenColor(base, 0.3);
|
|
1044
|
+
acc[series.label] = color;
|
|
1045
|
+
return acc;
|
|
1046
|
+
}, {});
|
|
1047
|
+
}, [data, theme]);
|
|
1048
|
+
var toggleSeries = function toggleSeries(label) {
|
|
1049
|
+
setVisibleSeries(function (prev) {
|
|
1050
|
+
var isVisible = prev.includes(label);
|
|
1051
|
+
var next = isVisible ? prev.filter(function (l) {
|
|
1052
|
+
return l !== label;
|
|
1053
|
+
}) : [].concat(prev, [label]);
|
|
1054
|
+
return next.length === 0 && data.length > 0 ? [data[0].label] : next;
|
|
1310
1055
|
});
|
|
1311
1056
|
};
|
|
1312
|
-
var
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1057
|
+
var allCategories = React.useMemo(function () {
|
|
1058
|
+
var set = new Set();
|
|
1059
|
+
data.forEach(function (series) {
|
|
1060
|
+
series.data.forEach(function (d) {
|
|
1061
|
+
return set.add(getPrimary(d));
|
|
1062
|
+
});
|
|
1063
|
+
});
|
|
1064
|
+
return Array.from(set);
|
|
1065
|
+
}, [data, getPrimary]);
|
|
1066
|
+
var chartData = React.useMemo(function () {
|
|
1067
|
+
return {
|
|
1068
|
+
labels: allCategories,
|
|
1069
|
+
datasets: data.filter(function (series) {
|
|
1070
|
+
return visibleSeries.includes(series.label);
|
|
1071
|
+
}).map(function (series) {
|
|
1072
|
+
return {
|
|
1073
|
+
label: series.label,
|
|
1074
|
+
data: allCategories.map(function (cat) {
|
|
1075
|
+
var match = series.data.find(function (d) {
|
|
1076
|
+
return getPrimary(d) === cat;
|
|
1077
|
+
});
|
|
1078
|
+
return match ? getSecondary(match) : null;
|
|
1079
|
+
}),
|
|
1080
|
+
borderColor: seriesColors[series.label],
|
|
1081
|
+
backgroundColor: seriesColors[series.label],
|
|
1082
|
+
fill: true,
|
|
1083
|
+
tension: 0.4,
|
|
1084
|
+
pointRadius: 2
|
|
1085
|
+
};
|
|
1086
|
+
})
|
|
1087
|
+
};
|
|
1088
|
+
}, [data, visibleSeries, allCategories, getPrimary, getSecondary, seriesColors]);
|
|
1089
|
+
var _useMemo = React.useMemo(function () {
|
|
1090
|
+
return {
|
|
1091
|
+
fontFamily: theme.fontFamilyBase,
|
|
1092
|
+
fontSize: parseInt(theme.fontSizeBase200.replace('px', '')) || 14,
|
|
1093
|
+
labelColor: theme.colorNeutralForeground1,
|
|
1094
|
+
gridColor: theme.colorNeutralStroke2
|
|
1095
|
+
};
|
|
1096
|
+
}, [theme]),
|
|
1097
|
+
fontFamily = _useMemo.fontFamily,
|
|
1098
|
+
fontSize = _useMemo.fontSize,
|
|
1099
|
+
labelColor = _useMemo.labelColor,
|
|
1100
|
+
gridColor = _useMemo.gridColor;
|
|
1101
|
+
var options = React.useMemo(function () {
|
|
1102
|
+
return {
|
|
1103
|
+
responsive: true,
|
|
1104
|
+
maintainAspectRatio: false,
|
|
1105
|
+
plugins: {
|
|
1106
|
+
title: {
|
|
1107
|
+
display: !!title,
|
|
1108
|
+
text: title,
|
|
1109
|
+
font: {
|
|
1110
|
+
size: 14,
|
|
1111
|
+
family: theme.fontFamilyBase,
|
|
1112
|
+
weight: theme.fontWeightSemibold
|
|
1326
1113
|
},
|
|
1327
|
-
|
|
1328
|
-
|
|
1114
|
+
color: theme.colorNeutralForeground1,
|
|
1115
|
+
padding: {
|
|
1116
|
+
top: 20,
|
|
1117
|
+
bottom: 20
|
|
1329
1118
|
}
|
|
1330
|
-
}
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1119
|
+
},
|
|
1120
|
+
datalabels: {
|
|
1121
|
+
display: showDatalabels,
|
|
1122
|
+
color: theme.colorNeutralForeground1,
|
|
1123
|
+
font: {
|
|
1124
|
+
family: theme.fontFamilyBase,
|
|
1125
|
+
size: parseInt(theme.fontSizeBase200.replace('px', '')) || 14
|
|
1126
|
+
}
|
|
1127
|
+
},
|
|
1128
|
+
legend: {
|
|
1129
|
+
display: false
|
|
1130
|
+
},
|
|
1131
|
+
tooltip: createFluentTooltip(theme)
|
|
1132
|
+
},
|
|
1133
|
+
scales: {
|
|
1134
|
+
x: {
|
|
1135
|
+
stacked: stacked,
|
|
1136
|
+
ticks: {
|
|
1137
|
+
color: labelColor,
|
|
1138
|
+
font: {
|
|
1139
|
+
family: fontFamily,
|
|
1140
|
+
size: fontSize
|
|
1141
|
+
}
|
|
1142
|
+
},
|
|
1143
|
+
grid: {
|
|
1144
|
+
color: gridColor
|
|
1145
|
+
}
|
|
1146
|
+
},
|
|
1147
|
+
y: {
|
|
1148
|
+
stacked: stacked,
|
|
1149
|
+
ticks: {
|
|
1150
|
+
color: labelColor,
|
|
1151
|
+
font: {
|
|
1152
|
+
family: fontFamily,
|
|
1153
|
+
size: fontSize
|
|
1154
|
+
}
|
|
1155
|
+
},
|
|
1156
|
+
grid: {
|
|
1157
|
+
color: gridColor
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1334
1160
|
}
|
|
1335
1161
|
};
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
}
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
content: "Configure",
|
|
1352
|
-
relationship: "label"
|
|
1353
|
-
}, React.createElement(reactComponents.MenuButton, {
|
|
1354
|
-
icon: React.createElement(Settings, null),
|
|
1355
|
-
size: "small",
|
|
1356
|
-
appearance: "transparent"
|
|
1357
|
-
}))), React.createElement(reactComponents.MenuPopover, {
|
|
1358
|
-
style: {
|
|
1359
|
-
width: popoverWidth + "px",
|
|
1360
|
-
minWidth: "120px",
|
|
1361
|
-
padding: 8
|
|
1362
|
-
}
|
|
1363
|
-
}, React.createElement("div", {
|
|
1364
|
-
className: styles.zoomContainer
|
|
1365
|
-
}, React.createElement(RenderLabel, {
|
|
1366
|
-
label: "Span (" + values.spanCols + " \xD7 " + values.spanRows + ")"
|
|
1367
|
-
})), React.createElement("div", {
|
|
1368
|
-
className: styles.gridContainer,
|
|
1369
|
-
style: {
|
|
1370
|
-
gridTemplateColumns: "repeat(" + maxCols + ", 30px)",
|
|
1371
|
-
gridTemplateRows: "repeat(" + maxRows + ", 30px)"
|
|
1372
|
-
},
|
|
1373
|
-
onMouseLeave: handleMouseLeave
|
|
1374
|
-
}, renderGridCells()), React.createElement(reactComponents.Caption1, {
|
|
1375
|
-
className: styles.bottomText
|
|
1376
|
-
}, "Click to set span")));
|
|
1377
|
-
};
|
|
1162
|
+
}, [title, showDatalabels, theme, fontFamily, fontSize, labelColor, gridColor, stacked, createFluentTooltip]);
|
|
1163
|
+
return React__default.createElement("div", {
|
|
1164
|
+
className: styles.chartWithLegend
|
|
1165
|
+
}, React__default.createElement("div", {
|
|
1166
|
+
className: styles.chartArea
|
|
1167
|
+
}, React__default.createElement(reactChartjs2.Line, {
|
|
1168
|
+
data: chartData,
|
|
1169
|
+
options: options
|
|
1170
|
+
})), React__default.createElement(RenderLegend, {
|
|
1171
|
+
data: data,
|
|
1172
|
+
visibleSeries: visibleSeries,
|
|
1173
|
+
seriesColors: seriesColors,
|
|
1174
|
+
toggleSeries: toggleSeries
|
|
1175
|
+
}));
|
|
1176
|
+
}
|
|
1378
1177
|
|
|
1379
|
-
chart_js.Chart.register(chart_js.CategoryScale, chart_js.LinearScale, chart_js.
|
|
1380
|
-
function
|
|
1178
|
+
chart_js.Chart.register(chart_js.CategoryScale, chart_js.LinearScale, chart_js.BarElement, chart_js.Tooltip, chart_js.Legend, ChartDataLabels, chart_js.Title);
|
|
1179
|
+
function BarChart(_ref) {
|
|
1381
1180
|
var data = _ref.data,
|
|
1382
1181
|
getPrimary = _ref.getPrimary,
|
|
1383
1182
|
getSecondary = _ref.getSecondary,
|
|
1384
1183
|
title = _ref.title,
|
|
1385
1184
|
_ref$showDatalabels = _ref.showDatalabels,
|
|
1386
1185
|
showDatalabels = _ref$showDatalabels === void 0 ? false : _ref$showDatalabels,
|
|
1387
|
-
_ref$theme = _ref.theme,
|
|
1388
|
-
theme = _ref$theme === void 0 ? reactComponents.webLightTheme : _ref$theme,
|
|
1389
1186
|
_ref$stacked = _ref.stacked,
|
|
1390
|
-
stacked = _ref$stacked === void 0 ? false : _ref$stacked
|
|
1187
|
+
stacked = _ref$stacked === void 0 ? false : _ref$stacked,
|
|
1188
|
+
theme = _ref.theme;
|
|
1391
1189
|
var _useState = React.useState(function () {
|
|
1392
1190
|
var _data$;
|
|
1393
1191
|
return data.length > 1 ? data.map(function (s) {
|
|
@@ -1396,11 +1194,11 @@ function AreaChart(_ref) {
|
|
|
1396
1194
|
}),
|
|
1397
1195
|
visibleSeries = _useState[0],
|
|
1398
1196
|
setVisibleSeries = _useState[1];
|
|
1399
|
-
var styles = useGraphGlobalStyles();
|
|
1400
1197
|
var _useChartUtils = useChartUtils(theme),
|
|
1401
1198
|
lightenColor = _useChartUtils.lightenColor,
|
|
1402
1199
|
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
1403
1200
|
createFluentTooltip = _useChartUtils.createFluentTooltip;
|
|
1201
|
+
var styles = useGraphGlobalStyles();
|
|
1404
1202
|
var seriesColors = React.useMemo(function () {
|
|
1405
1203
|
return data.reduce(function (acc, series, idx) {
|
|
1406
1204
|
var base = getFluentPalette(theme)[idx % getFluentPalette(theme).length];
|
|
@@ -1408,7 +1206,7 @@ function AreaChart(_ref) {
|
|
|
1408
1206
|
acc[series.label] = color;
|
|
1409
1207
|
return acc;
|
|
1410
1208
|
}, {});
|
|
1411
|
-
}, [data
|
|
1209
|
+
}, [data]);
|
|
1412
1210
|
var toggleSeries = function toggleSeries(label) {
|
|
1413
1211
|
setVisibleSeries(function (prev) {
|
|
1414
1212
|
var isVisible = prev.includes(label);
|
|
@@ -1418,15 +1216,17 @@ function AreaChart(_ref) {
|
|
|
1418
1216
|
return next.length === 0 && data.length > 0 ? [data[0].label] : next;
|
|
1419
1217
|
});
|
|
1420
1218
|
};
|
|
1219
|
+
// Extract all unique x-axis categories (from all series)
|
|
1421
1220
|
var allCategories = React.useMemo(function () {
|
|
1422
|
-
var
|
|
1221
|
+
var categorySet = new Set();
|
|
1423
1222
|
data.forEach(function (series) {
|
|
1424
|
-
series.data.forEach(function (
|
|
1425
|
-
|
|
1223
|
+
series.data.forEach(function (datum) {
|
|
1224
|
+
categorySet.add(getPrimary(datum));
|
|
1426
1225
|
});
|
|
1427
1226
|
});
|
|
1428
|
-
return Array.from(
|
|
1227
|
+
return Array.from(categorySet);
|
|
1429
1228
|
}, [data, getPrimary]);
|
|
1229
|
+
// Construct Chart.js datasets
|
|
1430
1230
|
var chartData = React.useMemo(function () {
|
|
1431
1231
|
return {
|
|
1432
1232
|
labels: allCategories,
|
|
@@ -1435,21 +1235,19 @@ function AreaChart(_ref) {
|
|
|
1435
1235
|
}).map(function (series) {
|
|
1436
1236
|
return {
|
|
1437
1237
|
label: series.label,
|
|
1238
|
+
backgroundColor: seriesColors[series.label],
|
|
1438
1239
|
data: allCategories.map(function (cat) {
|
|
1439
|
-
var
|
|
1240
|
+
var found = series.data.find(function (d) {
|
|
1440
1241
|
return getPrimary(d) === cat;
|
|
1441
1242
|
});
|
|
1442
|
-
return
|
|
1243
|
+
return found ? getSecondary(found) : 0;
|
|
1443
1244
|
}),
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
fill: true,
|
|
1447
|
-
tension: 0.4,
|
|
1448
|
-
pointRadius: 2
|
|
1245
|
+
// Assign y-axis based on series type when stacked
|
|
1246
|
+
yAxisID: stacked ? series.type === 'line' ? 'y1' : 'y' : 'y'
|
|
1449
1247
|
};
|
|
1450
1248
|
})
|
|
1451
1249
|
};
|
|
1452
|
-
}, [data, visibleSeries, allCategories,
|
|
1250
|
+
}, [data, visibleSeries, allCategories, seriesColors, stacked]);
|
|
1453
1251
|
var _useMemo = React.useMemo(function () {
|
|
1454
1252
|
return {
|
|
1455
1253
|
fontFamily: theme.fontFamilyBase,
|
|
@@ -1494,10 +1292,13 @@ function AreaChart(_ref) {
|
|
|
1494
1292
|
},
|
|
1495
1293
|
tooltip: createFluentTooltip(theme)
|
|
1496
1294
|
},
|
|
1497
|
-
scales: {
|
|
1295
|
+
scales: _extends({
|
|
1498
1296
|
x: {
|
|
1499
1297
|
stacked: stacked,
|
|
1500
1298
|
ticks: {
|
|
1299
|
+
callback: createAxisLabelFormatter({
|
|
1300
|
+
maxLength: 10
|
|
1301
|
+
}),
|
|
1501
1302
|
color: labelColor,
|
|
1502
1303
|
font: {
|
|
1503
1304
|
family: fontFamily,
|
|
@@ -1509,8 +1310,13 @@ function AreaChart(_ref) {
|
|
|
1509
1310
|
}
|
|
1510
1311
|
},
|
|
1511
1312
|
y: {
|
|
1313
|
+
type: 'linear',
|
|
1314
|
+
position: 'left',
|
|
1512
1315
|
stacked: stacked,
|
|
1513
1316
|
ticks: {
|
|
1317
|
+
callback: createAxisLabelFormatter({
|
|
1318
|
+
maxLength: 10
|
|
1319
|
+
}),
|
|
1514
1320
|
color: labelColor,
|
|
1515
1321
|
font: {
|
|
1516
1322
|
family: fontFamily,
|
|
@@ -1521,22 +1327,42 @@ function AreaChart(_ref) {
|
|
|
1521
1327
|
color: gridColor
|
|
1522
1328
|
}
|
|
1523
1329
|
}
|
|
1524
|
-
}
|
|
1330
|
+
}, stacked && {
|
|
1331
|
+
y1: {
|
|
1332
|
+
type: 'linear',
|
|
1333
|
+
position: 'right',
|
|
1334
|
+
ticks: {
|
|
1335
|
+
callback: createAxisLabelFormatter({
|
|
1336
|
+
maxLength: 10
|
|
1337
|
+
}),
|
|
1338
|
+
color: labelColor,
|
|
1339
|
+
font: {
|
|
1340
|
+
family: fontFamily,
|
|
1341
|
+
size: fontSize
|
|
1342
|
+
}
|
|
1343
|
+
},
|
|
1344
|
+
grid: {
|
|
1345
|
+
drawOnChartArea: false
|
|
1346
|
+
}
|
|
1347
|
+
}
|
|
1348
|
+
})
|
|
1525
1349
|
};
|
|
1526
1350
|
}, [title, showDatalabels, theme, fontFamily, fontSize, labelColor, gridColor, stacked, createFluentTooltip]);
|
|
1527
1351
|
return React__default.createElement("div", {
|
|
1528
1352
|
className: styles.chartWithLegend
|
|
1529
1353
|
}, React__default.createElement("div", {
|
|
1530
1354
|
className: styles.chartArea
|
|
1531
|
-
}, React__default.createElement(reactChartjs2.
|
|
1355
|
+
}, React__default.createElement(reactChartjs2.Bar, {
|
|
1532
1356
|
data: chartData,
|
|
1533
1357
|
options: options
|
|
1534
|
-
})), React__default.createElement(
|
|
1358
|
+
})), React__default.createElement("div", {
|
|
1359
|
+
className: styles.legendArea
|
|
1360
|
+
}, React__default.createElement(RenderLegend, {
|
|
1535
1361
|
data: data,
|
|
1536
1362
|
visibleSeries: visibleSeries,
|
|
1537
1363
|
seriesColors: seriesColors,
|
|
1538
1364
|
toggleSeries: toggleSeries
|
|
1539
|
-
}));
|
|
1365
|
+
})));
|
|
1540
1366
|
}
|
|
1541
1367
|
|
|
1542
1368
|
chart_js.Chart.register(chart_js.CategoryScale, chart_js.LinearScale, chart_js.BarElement, chart_js.Tooltip, chart_js.Legend, chart_js.Title, ChartDataLabels);
|
|
@@ -1853,6 +1679,180 @@ function BubbleChart(_ref) {
|
|
|
1853
1679
|
}))));
|
|
1854
1680
|
}
|
|
1855
1681
|
|
|
1682
|
+
chart_js.Chart.register(ChartDataLabels);
|
|
1683
|
+
chart_js.Chart.register(chart_js.CategoryScale, chart_js.LinearScale, chart_js.BarElement, chart_js.LineElement, chart_js.PointElement, chart_js.Tooltip, chart_js.Legend, chart_js.Title);
|
|
1684
|
+
function ComboChart(_ref) {
|
|
1685
|
+
var data = _ref.data,
|
|
1686
|
+
getPrimary = _ref.getPrimary,
|
|
1687
|
+
getSecondary = _ref.getSecondary,
|
|
1688
|
+
title = _ref.title,
|
|
1689
|
+
_ref$showDataLabels = _ref.showDataLabels,
|
|
1690
|
+
showDataLabels = _ref$showDataLabels === void 0 ? false : _ref$showDataLabels,
|
|
1691
|
+
_ref$theme = _ref.theme,
|
|
1692
|
+
theme = _ref$theme === void 0 ? reactComponents.webLightTheme : _ref$theme;
|
|
1693
|
+
var _useState = React.useState(function () {
|
|
1694
|
+
return data.map(function (s) {
|
|
1695
|
+
return s.label;
|
|
1696
|
+
});
|
|
1697
|
+
}),
|
|
1698
|
+
visibleSeries = _useState[0],
|
|
1699
|
+
setVisibleSeries = _useState[1];
|
|
1700
|
+
var styles = useGraphGlobalStyles();
|
|
1701
|
+
var _useChartUtils = useChartUtils(theme),
|
|
1702
|
+
lightenColor = _useChartUtils.lightenColor,
|
|
1703
|
+
getFluentPalette = _useChartUtils.getFluentPalette,
|
|
1704
|
+
createFluentTooltip = _useChartUtils.createFluentTooltip;
|
|
1705
|
+
var seriesColors = React.useMemo(function () {
|
|
1706
|
+
return data.reduce(function (acc, series, idx) {
|
|
1707
|
+
var base = getFluentPalette(theme)[idx % getFluentPalette(theme).length];
|
|
1708
|
+
acc[series.label] = lightenColor(base, 0.3);
|
|
1709
|
+
return acc;
|
|
1710
|
+
}, {});
|
|
1711
|
+
}, [data, theme]);
|
|
1712
|
+
var toggleSeries = function toggleSeries(label) {
|
|
1713
|
+
setVisibleSeries(function (prev) {
|
|
1714
|
+
var isVisible = prev.includes(label);
|
|
1715
|
+
var next = isVisible ? prev.filter(function (l) {
|
|
1716
|
+
return l !== label;
|
|
1717
|
+
}) : [].concat(prev, [label]);
|
|
1718
|
+
return next.length === 0 ? [data[0].label] : next;
|
|
1719
|
+
});
|
|
1720
|
+
};
|
|
1721
|
+
var allCategories = React.useMemo(function () {
|
|
1722
|
+
var set = new Set();
|
|
1723
|
+
data.forEach(function (series) {
|
|
1724
|
+
return series.data.forEach(function (d) {
|
|
1725
|
+
return set.add(getPrimary(d));
|
|
1726
|
+
});
|
|
1727
|
+
});
|
|
1728
|
+
return Array.from(set);
|
|
1729
|
+
}, [data, getPrimary]);
|
|
1730
|
+
var chartData = React.useMemo(function () {
|
|
1731
|
+
var sortedSeries = data.filter(function (series) {
|
|
1732
|
+
return visibleSeries.includes(series.label);
|
|
1733
|
+
}).sort(function (a, b) {
|
|
1734
|
+
// Ensure bars come before lines
|
|
1735
|
+
if (a.type === 'bar' && b.type === 'line') return -1;
|
|
1736
|
+
if (a.type === 'line' && b.type === 'bar') return 1;
|
|
1737
|
+
return 0;
|
|
1738
|
+
});
|
|
1739
|
+
return {
|
|
1740
|
+
labels: allCategories,
|
|
1741
|
+
datasets: sortedSeries.map(function (series) {
|
|
1742
|
+
var _series$yAxisID;
|
|
1743
|
+
return {
|
|
1744
|
+
type: series.type,
|
|
1745
|
+
label: series.label,
|
|
1746
|
+
yAxisID: (_series$yAxisID = series.yAxisID) != null ? _series$yAxisID : 'y',
|
|
1747
|
+
data: allCategories.map(function (cat) {
|
|
1748
|
+
var found = series.data.find(function (d) {
|
|
1749
|
+
return getPrimary(d) === cat;
|
|
1750
|
+
});
|
|
1751
|
+
return found ? getSecondary(found) : 0;
|
|
1752
|
+
}),
|
|
1753
|
+
backgroundColor: seriesColors[series.label],
|
|
1754
|
+
borderColor: seriesColors[series.label],
|
|
1755
|
+
fill: series.type === 'bar',
|
|
1756
|
+
tension: series.type === 'line' ? 0.4 : 0,
|
|
1757
|
+
pointRadius: series.type === 'line' ? 3 : 0,
|
|
1758
|
+
borderWidth: series.type === 'line' ? 2 : 1,
|
|
1759
|
+
order: series.type === 'bar' ? 1 : 0
|
|
1760
|
+
};
|
|
1761
|
+
})
|
|
1762
|
+
};
|
|
1763
|
+
}, [data, visibleSeries, allCategories, getPrimary, getSecondary, seriesColors]);
|
|
1764
|
+
var _useMemo = React.useMemo(function () {
|
|
1765
|
+
return {
|
|
1766
|
+
fontFamily: theme.fontFamilyBase,
|
|
1767
|
+
fontSize: parseInt(theme.fontSizeBase200.replace('px', '')) || 14,
|
|
1768
|
+
labelColor: theme.colorNeutralForeground1,
|
|
1769
|
+
gridColor: theme.colorNeutralStroke2
|
|
1770
|
+
};
|
|
1771
|
+
}, [theme]),
|
|
1772
|
+
fontFamily = _useMemo.fontFamily,
|
|
1773
|
+
fontSize = _useMemo.fontSize,
|
|
1774
|
+
labelColor = _useMemo.labelColor,
|
|
1775
|
+
gridColor = _useMemo.gridColor;
|
|
1776
|
+
var options = React.useMemo(function () {
|
|
1777
|
+
return {
|
|
1778
|
+
responsive: true,
|
|
1779
|
+
maintainAspectRatio: false,
|
|
1780
|
+
plugins: {
|
|
1781
|
+
title: {
|
|
1782
|
+
display: !!title,
|
|
1783
|
+
text: title,
|
|
1784
|
+
font: {
|
|
1785
|
+
size: 14,
|
|
1786
|
+
family: theme.fontFamilyBase,
|
|
1787
|
+
weight: theme.fontWeightSemibold
|
|
1788
|
+
},
|
|
1789
|
+
color: theme.colorNeutralForeground1,
|
|
1790
|
+
padding: {
|
|
1791
|
+
top: 20,
|
|
1792
|
+
bottom: 20
|
|
1793
|
+
}
|
|
1794
|
+
},
|
|
1795
|
+
datalabels: {
|
|
1796
|
+
display: showDataLabels,
|
|
1797
|
+
color: theme.colorNeutralForeground1,
|
|
1798
|
+
font: {
|
|
1799
|
+
family: theme.fontFamilyBase,
|
|
1800
|
+
size: parseInt(theme.fontSizeBase200.replace('px', '')) || 14
|
|
1801
|
+
}
|
|
1802
|
+
},
|
|
1803
|
+
legend: {
|
|
1804
|
+
display: false
|
|
1805
|
+
},
|
|
1806
|
+
tooltip: createFluentTooltip(theme)
|
|
1807
|
+
},
|
|
1808
|
+
scales: {
|
|
1809
|
+
x: {
|
|
1810
|
+
ticks: {
|
|
1811
|
+
color: labelColor,
|
|
1812
|
+
font: {
|
|
1813
|
+
family: fontFamily,
|
|
1814
|
+
size: fontSize
|
|
1815
|
+
}
|
|
1816
|
+
},
|
|
1817
|
+
grid: {
|
|
1818
|
+
color: gridColor
|
|
1819
|
+
}
|
|
1820
|
+
},
|
|
1821
|
+
y: {
|
|
1822
|
+
position: 'left',
|
|
1823
|
+
ticks: {
|
|
1824
|
+
color: labelColor,
|
|
1825
|
+
font: {
|
|
1826
|
+
family: fontFamily,
|
|
1827
|
+
size: fontSize
|
|
1828
|
+
}
|
|
1829
|
+
},
|
|
1830
|
+
grid: {
|
|
1831
|
+
color: gridColor
|
|
1832
|
+
},
|
|
1833
|
+
stacked: false
|
|
1834
|
+
}
|
|
1835
|
+
}
|
|
1836
|
+
};
|
|
1837
|
+
}, [title, showDataLabels, theme, fontFamily, fontSize, labelColor, gridColor, createFluentTooltip]);
|
|
1838
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
1839
|
+
className: styles.chartWithLegend
|
|
1840
|
+
}, React__default.createElement("div", {
|
|
1841
|
+
className: styles.chartArea
|
|
1842
|
+
}, React__default.createElement(reactChartjs2.Chart, {
|
|
1843
|
+
type: "bar",
|
|
1844
|
+
data: chartData,
|
|
1845
|
+
options: options
|
|
1846
|
+
})), React__default.createElement("div", {
|
|
1847
|
+
className: styles.legendArea
|
|
1848
|
+
}, React__default.createElement(RenderLegend, {
|
|
1849
|
+
data: data,
|
|
1850
|
+
visibleSeries: visibleSeries,
|
|
1851
|
+
seriesColors: seriesColors,
|
|
1852
|
+
toggleSeries: toggleSeries
|
|
1853
|
+
}))));
|
|
1854
|
+
}
|
|
1855
|
+
|
|
1856
1856
|
var RenderValueLegend = function RenderValueLegend(_ref) {
|
|
1857
1857
|
var entries = _ref.entries,
|
|
1858
1858
|
visibleLabels = _ref.visibleLabels,
|
|
@@ -4090,7 +4090,21 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
4090
4090
|
}, renderCards));
|
|
4091
4091
|
};
|
|
4092
4092
|
|
|
4093
|
+
exports.AreaChart = AreaChart;
|
|
4094
|
+
exports.BarChart = BarChart;
|
|
4095
|
+
exports.BarHorizontalChart = BarHorizontalChart;
|
|
4096
|
+
exports.BubbleChart = BubbleChart;
|
|
4097
|
+
exports.ComboChart = ComboChart;
|
|
4093
4098
|
exports.Dashboard = Dashboard;
|
|
4099
|
+
exports.DoughnutChart = DoughnutChart;
|
|
4100
|
+
exports.FloatingBarChart = FloatingBarChart;
|
|
4101
|
+
exports.LineChart = LineChart;
|
|
4102
|
+
exports.PieChart = PieChart;
|
|
4103
|
+
exports.PolarChart = PolarChart;
|
|
4104
|
+
exports.RadarChart = RadarChart;
|
|
4105
|
+
exports.ScatterChart = ScatterChart;
|
|
4106
|
+
exports.StackedLineChart = StackedLineChart;
|
|
4107
|
+
exports.SteamChart = SteamChart;
|
|
4094
4108
|
exports.createAxisLabelFormatter = createAxisLabelFormatter;
|
|
4095
4109
|
exports.createFluentTooltip = createFluentTooltip;
|
|
4096
4110
|
exports.getFluentPalette = getFluentPalette;
|