@fluentui/react-charts 9.3.3 → 9.3.5
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/CHANGELOG.md +45 -7
- package/dist/index.d.ts +6 -2
- package/lib/components/AreaChart/AreaChart.js +188 -36
- package/lib/components/AreaChart/AreaChart.js.map +1 -1
- package/lib/components/ChartTable/ChartTable.js +17 -13
- package/lib/components/ChartTable/ChartTable.js.map +1 -1
- package/lib/components/ChartTable/useChartTableStyles.styles.js +3 -3
- package/lib/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
- package/lib/components/ChartTable/useChartTableStyles.styles.raw.js +2 -2
- package/lib/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.js +30 -27
- package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +3 -2
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +2 -1
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +3 -2
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js +2 -1
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js +3 -6
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlyColorAdapter.js +8 -4
- package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +148 -80
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.js +12 -7
- package/lib/components/DonutChart/DonutChart.js.map +1 -1
- package/lib/components/DonutChart/useDonutChartStyles.styles.js +3 -2
- package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
- package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js +2 -1
- package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -1
- package/lib/components/FunnelChart/FunnelChart.js +5 -5
- package/lib/components/FunnelChart/FunnelChart.js.map +1 -1
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.js +3 -2
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -1
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js +2 -1
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.js +3 -1
- package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.js +3 -2
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js +2 -1
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.js +5 -5
- package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
- package/lib/components/HorizontalBarChart/HorizontalBarChart.js +3 -1
- package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +3 -2
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +2 -1
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
- package/lib/components/Legends/Legends.js +3 -1
- package/lib/components/Legends/Legends.js.map +1 -1
- package/lib/components/Legends/Legends.types.js.map +1 -1
- package/lib/components/LineChart/LineChart.js +5 -4
- package/lib/components/LineChart/LineChart.js.map +1 -1
- package/lib/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
- package/lib/components/ResponsiveContainer/ResponsiveContainer.js +1 -1
- package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
- package/lib/components/SankeyChart/SankeyChart.js +1 -1
- package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +3 -2
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js +2 -1
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.js +3 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +12 -4
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/lib/types/DataPoint.js.map +1 -1
- package/lib/utilities/FocusableTooltipText.js +1 -1
- package/lib/utilities/FocusableTooltipText.js.map +1 -1
- package/lib/utilities/SVGTooltipText.js +8 -8
- package/lib/utilities/SVGTooltipText.js.map +1 -1
- package/lib/utilities/utilities.js +63 -18
- package/lib/utilities/utilities.js.map +1 -1
- package/lib-commonjs/components/AreaChart/AreaChart.js +188 -36
- package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -1
- package/lib-commonjs/components/ChartTable/ChartTable.js +16 -13
- package/lib-commonjs/components/ChartTable/ChartTable.js.map +1 -1
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js +3 -3
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js +2 -2
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.js +30 -27
- package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +7 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js +2 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +7 -1
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js +2 -1
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +3 -6
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +114 -63
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.js +12 -7
- package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +7 -1
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js +2 -1
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/FunnelChart.js +5 -5
- package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js +7 -1
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js +2 -1
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.js +3 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js +7 -1
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js +2 -1
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +5 -5
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js +3 -1
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +7 -1
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +2 -1
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/Legends/Legends.js +3 -1
- package/lib-commonjs/components/Legends/Legends.js.map +1 -1
- package/lib-commonjs/components/Legends/Legends.types.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.js +5 -4
- package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
- package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js +1 -1
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.js +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +7 -1
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js +2 -1
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +3 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +12 -4
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/lib-commonjs/types/DataPoint.js.map +1 -1
- package/lib-commonjs/utilities/FocusableTooltipText.js +1 -1
- package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -1
- package/lib-commonjs/utilities/SVGTooltipText.js +8 -8
- package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
- package/lib-commonjs/utilities/utilities.js +63 -18
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/package.json +13 -13
|
@@ -182,7 +182,8 @@ const getSecondaryYAxisValues = (data, layout)=>{
|
|
|
182
182
|
}
|
|
183
183
|
};
|
|
184
184
|
};
|
|
185
|
-
export const _getGaugeAxisColor = (colorway, colorwayType, color,
|
|
185
|
+
export const _getGaugeAxisColor = (colorway, colorwayType, color, // eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
186
|
+
colorMap, isDarkTheme)=>{
|
|
186
187
|
const extractedColors = extractColor(colorway, colorwayType, color, colorMap, isDarkTheme);
|
|
187
188
|
return resolveColor(extractedColors, 0, '', colorMap, colorway, isDarkTheme);
|
|
188
189
|
};
|
|
@@ -319,7 +320,8 @@ export const resolveXAxisPoint = (x, isXYearCategory, isXString, isXDate, isXNum
|
|
|
319
320
|
x
|
|
320
321
|
};
|
|
321
322
|
};
|
|
322
|
-
export const transformPlotlyJsonToDonutProps = (input, isMultiPlot,
|
|
323
|
+
export const transformPlotlyJsonToDonutProps = (input, isMultiPlot, // eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
324
|
+
colorMap, colorwayType, isDarkTheme)=>{
|
|
323
325
|
var _input_layout, _input_layout_template_layout, _input_layout_template, _input_layout1, _input_layout2, _firstData_marker, _input_layout3, _input_layout4, _input_layout5, _input_layout6;
|
|
324
326
|
const firstData = input.data[0];
|
|
325
327
|
var _input_layout_piecolorway, _input_layout_piecolorway1;
|
|
@@ -408,8 +410,9 @@ export const transformPlotlyJsonToDonutProps = (input, isMultiPlot, colorMap, co
|
|
|
408
410
|
order: 'sorted'
|
|
409
411
|
};
|
|
410
412
|
};
|
|
411
|
-
export const transformPlotlyJsonToVSBCProps = (input, isMultiPlot,
|
|
412
|
-
|
|
413
|
+
export const transformPlotlyJsonToVSBCProps = (input, isMultiPlot, // eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
414
|
+
colorMap, colorwayType, isDarkTheme, fallbackVSBC)=>{
|
|
415
|
+
var _input_layout, _input_layout1, _input_layout2, _vsbcData_;
|
|
413
416
|
const mapXToDataPoints = {};
|
|
414
417
|
let yMaxValue = 0;
|
|
415
418
|
let yMinValue = 0;
|
|
@@ -417,7 +420,7 @@ export const transformPlotlyJsonToVSBCProps = (input, isMultiPlot, colorMap, col
|
|
|
417
420
|
const { legends, hideLegend } = getLegendProps(input.data, input.layout, isMultiPlot);
|
|
418
421
|
let colorScale = undefined;
|
|
419
422
|
const yAxisTickFormat = getYAxisTickFormat(input.data[0], input.layout);
|
|
420
|
-
const
|
|
423
|
+
const resolveXValue = getAxisValueResolver(getAxisType(input.data, getAxisObjects(input.data, input.layout).x));
|
|
421
424
|
input.data.forEach((series, index1)=>{
|
|
422
425
|
var _input_layout_template_layout, _input_layout_template, _input_layout, _series_marker, _input_layout_template_layout1, _input_layout_template1, _input_layout1, _series_line;
|
|
423
426
|
colorScale = createColorScale(input.layout, series, colorScale);
|
|
@@ -425,7 +428,7 @@ export const transformPlotlyJsonToVSBCProps = (input, isMultiPlot, colorMap, col
|
|
|
425
428
|
const extractedBarColors = extractColor((_input_layout = input.layout) === null || _input_layout === void 0 ? void 0 : (_input_layout_template = _input_layout.template) === null || _input_layout_template === void 0 ? void 0 : (_input_layout_template_layout = _input_layout_template.layout) === null || _input_layout_template_layout === void 0 ? void 0 : _input_layout_template_layout.colorway, colorwayType, (_series_marker = series.marker) === null || _series_marker === void 0 ? void 0 : _series_marker.color, colorMap, isDarkTheme);
|
|
426
429
|
// extract line colors for each series only once
|
|
427
430
|
const extractedLineColors = extractColor((_input_layout1 = input.layout) === null || _input_layout1 === void 0 ? void 0 : (_input_layout_template1 = _input_layout1.template) === null || _input_layout_template1 === void 0 ? void 0 : (_input_layout_template_layout1 = _input_layout_template1.layout) === null || _input_layout_template_layout1 === void 0 ? void 0 : _input_layout_template_layout1.colorway, colorwayType, (_series_line = series.line) === null || _series_line === void 0 ? void 0 : _series_line.color, colorMap, isDarkTheme);
|
|
428
|
-
const validXYRanges = getValidXYRanges(series,
|
|
431
|
+
const validXYRanges = getValidXYRanges(series, resolveXValue);
|
|
429
432
|
validXYRanges.forEach(([rangeStart, rangeEnd], rangeIdx)=>{
|
|
430
433
|
const rangeXValues = series.x.slice(rangeStart, rangeEnd);
|
|
431
434
|
const rangeYValues = series.y.slice(rangeStart, rangeEnd);
|
|
@@ -433,7 +436,7 @@ export const transformPlotlyJsonToVSBCProps = (input, isMultiPlot, colorMap, col
|
|
|
433
436
|
var _series_marker, _series_marker1, _series_marker_color, _series_marker2, _input_layout_template_layout, _input_layout_template, _input_layout;
|
|
434
437
|
if (!mapXToDataPoints[x]) {
|
|
435
438
|
mapXToDataPoints[x] = {
|
|
436
|
-
xAxisPoint:
|
|
439
|
+
xAxisPoint: resolveXValue(x),
|
|
437
440
|
chartData: [],
|
|
438
441
|
lineData: []
|
|
439
442
|
};
|
|
@@ -486,15 +489,38 @@ export const transformPlotlyJsonToVSBCProps = (input, isMultiPlot, colorMap, col
|
|
|
486
489
|
});
|
|
487
490
|
});
|
|
488
491
|
});
|
|
489
|
-
var
|
|
490
|
-
const xCategories = (
|
|
492
|
+
var _input_data;
|
|
493
|
+
const xCategories = Array.from(new Set(((_input_data = input.data) !== null && _input_data !== void 0 ? _input_data : []).flatMap((trace)=>{
|
|
494
|
+
const xData = trace.x;
|
|
495
|
+
if (!xData) {
|
|
496
|
+
return [];
|
|
497
|
+
}
|
|
498
|
+
if (Array.isArray(xData)) {
|
|
499
|
+
return xData.flat().map((x)=>{
|
|
500
|
+
return x;
|
|
501
|
+
});
|
|
502
|
+
}
|
|
503
|
+
return [];
|
|
504
|
+
}).filter((x)=>x !== undefined && x !== null)));
|
|
491
505
|
var _input_layout_shapes;
|
|
492
506
|
((_input_layout_shapes = (_input_layout = input.layout) === null || _input_layout === void 0 ? void 0 : _input_layout.shapes) !== null && _input_layout_shapes !== void 0 ? _input_layout_shapes : []).filter((shape)=>shape.type === 'line').forEach((shape, shapeIdx)=>{
|
|
493
507
|
var _shape_line;
|
|
494
508
|
const lineColor = (_shape_line = shape.line) === null || _shape_line === void 0 ? void 0 : _shape_line.color;
|
|
495
509
|
const resolveX = (val)=>{
|
|
496
|
-
if (
|
|
497
|
-
|
|
510
|
+
if (shape.xref === 'x domain') {
|
|
511
|
+
if (val === 0) {
|
|
512
|
+
return xCategories[0];
|
|
513
|
+
}
|
|
514
|
+
if (val === 1) {
|
|
515
|
+
return xCategories[xCategories.length - 1];
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
if (typeof val === 'number' && Array.isArray(xCategories)) {
|
|
519
|
+
if (xCategories[val] !== undefined) {
|
|
520
|
+
return xCategories[val];
|
|
521
|
+
} else {
|
|
522
|
+
return xCategories[shapeIdx];
|
|
523
|
+
}
|
|
498
524
|
}
|
|
499
525
|
return val;
|
|
500
526
|
};
|
|
@@ -562,7 +588,8 @@ export const transformPlotlyJsonToVSBCProps = (input, isMultiPlot, colorMap, col
|
|
|
562
588
|
...getAxisTickProps(input.data, input.layout)
|
|
563
589
|
};
|
|
564
590
|
};
|
|
565
|
-
export const transformPlotlyJsonToGVBCProps = (input, isMultiPlot,
|
|
591
|
+
export const transformPlotlyJsonToGVBCProps = (input, isMultiPlot, // eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
592
|
+
colorMap, colorwayType, isDarkTheme)=>{
|
|
566
593
|
var _processedInput_layout, _processedInput_layout1;
|
|
567
594
|
// Handle object arrays in y values by normalizing the data first
|
|
568
595
|
let processedInput = {
|
|
@@ -687,7 +714,8 @@ export const transformPlotlyJsonToGVBCProps = (input, isMultiPlot, colorMap, col
|
|
|
687
714
|
...getAxisTickProps(processedInput.data, processedInput.layout)
|
|
688
715
|
};
|
|
689
716
|
};
|
|
690
|
-
export const transformPlotlyJsonToVBCProps = (input, isMultiPlot,
|
|
717
|
+
export const transformPlotlyJsonToVBCProps = (input, isMultiPlot, // eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
718
|
+
colorMap, colorwayType, isDarkTheme)=>{
|
|
691
719
|
var _input_layout, _input_layout1, _vbcData_;
|
|
692
720
|
const vbcData = [];
|
|
693
721
|
const { legends, hideLegend } = getLegendProps(input.data, input.layout, isMultiPlot);
|
|
@@ -765,13 +793,16 @@ export const transformPlotlyJsonToVBCProps = (input, isMultiPlot, colorMap, colo
|
|
|
765
793
|
...getAxisCategoryOrderProps(input.data, input.layout)
|
|
766
794
|
};
|
|
767
795
|
};
|
|
768
|
-
export const transformPlotlyJsonToAreaChartProps = (input, isMultiPlot,
|
|
796
|
+
export const transformPlotlyJsonToAreaChartProps = (input, isMultiPlot, // eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
797
|
+
colorMap, colorwayType, isDarkTheme)=>{
|
|
769
798
|
return transformPlotlyJsonToScatterTraceProps(input, isMultiPlot, 'area', colorMap, colorwayType, isDarkTheme);
|
|
770
799
|
};
|
|
771
|
-
export const transformPlotlyJsonToLineChartProps = (input, isMultiPlot,
|
|
800
|
+
export const transformPlotlyJsonToLineChartProps = (input, isMultiPlot, // eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
801
|
+
colorMap, colorwayType, isDarkTheme)=>{
|
|
772
802
|
return transformPlotlyJsonToScatterTraceProps(input, isMultiPlot, 'line', colorMap, colorwayType, isDarkTheme);
|
|
773
803
|
};
|
|
774
|
-
export const transformPlotlyJsonToScatterChartProps = (input, isMultiPlot,
|
|
804
|
+
export const transformPlotlyJsonToScatterChartProps = (input, isMultiPlot, // eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
805
|
+
colorMap, colorwayType, isDarkTheme)=>{
|
|
775
806
|
return transformPlotlyJsonToScatterTraceProps(input, isMultiPlot, 'scatter', colorMap, colorwayType, isDarkTheme);
|
|
776
807
|
};
|
|
777
808
|
const mapColorFillBars = (layout)=>{
|
|
@@ -795,7 +826,8 @@ const mapColorFillBars = (layout)=>{
|
|
|
795
826
|
};
|
|
796
827
|
});
|
|
797
828
|
};
|
|
798
|
-
const transformPlotlyJsonToScatterTraceProps = (input, isMultiPlot, chartType,
|
|
829
|
+
const transformPlotlyJsonToScatterTraceProps = (input, isMultiPlot, chartType, // eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
830
|
+
colorMap, colorwayType, isDarkTheme)=>{
|
|
799
831
|
var _input_data_, _chartData__data_, _chartData_, _chartData__data_1, _chartData_1, _chartData__data_2, _chartData_2, _chartData__data_3, _chartData_3, _input_layout, _input_layout1, _input_layout2;
|
|
800
832
|
const isScatterMarkers = [
|
|
801
833
|
'text',
|
|
@@ -813,8 +845,9 @@ const transformPlotlyJsonToScatterTraceProps = (input, isMultiPlot, chartType, c
|
|
|
813
845
|
let mode = 'tonexty';
|
|
814
846
|
const { legends, hideLegend } = getLegendProps(input.data, input.layout, isMultiPlot);
|
|
815
847
|
const yAxisTickFormat = getYAxisTickFormat(input.data[0], input.layout);
|
|
816
|
-
const
|
|
817
|
-
const
|
|
848
|
+
const xAxisType = getAxisType(input.data, getAxisObjects(input.data, input.layout).x);
|
|
849
|
+
const resolveXValue = getAxisValueResolver(xAxisType);
|
|
850
|
+
const shouldWrapLabels = xAxisType === 'category';
|
|
818
851
|
const chartData = input.data.map((series, index)=>{
|
|
819
852
|
var _series_mode, _series_line, _series_marker, _series_line1, _input_layout_template_layout, _input_layout_template, _input_layout, _input_layout_template_layout1, _input_layout_template1, _input_layout1, _series_mode1;
|
|
820
853
|
const colors = isScatterMarkers ? (series === null || series === void 0 ? void 0 : (_series_mode = series.mode) === null || _series_mode === void 0 ? void 0 : _series_mode.includes('line')) ? (_series_line = series.line) === null || _series_line === void 0 ? void 0 : _series_line.color : (_series_marker = series.marker) === null || _series_marker === void 0 ? void 0 : _series_marker.color : (_series_line1 = series.line) === null || _series_line1 === void 0 ? void 0 : _series_line1.color;
|
|
@@ -829,7 +862,7 @@ const transformPlotlyJsonToScatterTraceProps = (input, isMultiPlot, chartType, c
|
|
|
829
862
|
// if mode contains 'text', we prioritize showing the text over curving the line
|
|
830
863
|
const lineOptions = !((_series_mode1 = series.mode) === null || _series_mode1 === void 0 ? void 0 : _series_mode1.includes('text')) && series.type !== 'scatterpolar' ? getLineOptions(series.line) : undefined;
|
|
831
864
|
const legendShape = getLegendShape(series);
|
|
832
|
-
const validXYRanges = getValidXYRanges(series,
|
|
865
|
+
const validXYRanges = getValidXYRanges(series, resolveXValue);
|
|
833
866
|
return validXYRanges.map(([rangeStart, rangeEnd], rangeIdx)=>{
|
|
834
867
|
var _series_marker, _series_marker1, _series_marker2, _input_layout, _input_layout_polar_angularaxis, _input_layout_polar, _input_layout1, _input_layout_polar_angularaxis1, _input_layout_polar1, _input_layout2;
|
|
835
868
|
const rangeXValues = xValues.slice(rangeStart, rangeEnd);
|
|
@@ -844,7 +877,7 @@ const transformPlotlyJsonToScatterTraceProps = (input, isMultiPlot, chartType, c
|
|
|
844
877
|
data: rangeXValues.map((x, i)=>{
|
|
845
878
|
var _series_marker, _series_marker1;
|
|
846
879
|
return {
|
|
847
|
-
x:
|
|
880
|
+
x: resolveXValue(x),
|
|
848
881
|
y: rangeYValues[i],
|
|
849
882
|
...Array.isArray((_series_marker = series.marker) === null || _series_marker === void 0 ? void 0 : _series_marker.size) ? {
|
|
850
883
|
markerSize: markerSizes[i]
|
|
@@ -994,7 +1027,8 @@ const transformPlotlyJsonToScatterTraceProps = (input, isMultiPlot, chartType, c
|
|
|
994
1027
|
};
|
|
995
1028
|
}
|
|
996
1029
|
};
|
|
997
|
-
export const transformPlotlyJsonToHorizontalBarWithAxisProps = (input, isMultiPlot,
|
|
1030
|
+
export const transformPlotlyJsonToHorizontalBarWithAxisProps = (input, isMultiPlot, // eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
1031
|
+
colorMap, colorwayType, isDarkTheme)=>{
|
|
998
1032
|
var _input_layout, _input_layout_margin, _input_layout1, _input_layout_margin1, _input_layout2, _input_layout_yaxis2, _input_layout3, _input_layout_yaxis21, _input_layout4, _input_layout_yaxis2_title, _input_layout_yaxis22, _input_layout5, _input_layout6;
|
|
999
1033
|
const { legends, hideLegend } = getLegendProps(input.data, input.layout, isMultiPlot);
|
|
1000
1034
|
let colorScale = undefined;
|
|
@@ -1052,48 +1086,74 @@ export const transformPlotlyJsonToHorizontalBarWithAxisProps = (input, isMultiPl
|
|
|
1052
1086
|
...getAxisTickProps(input.data, input.layout)
|
|
1053
1087
|
};
|
|
1054
1088
|
};
|
|
1055
|
-
export const transformPlotlyJsonToGanttChartProps = (input, isMultiPlot,
|
|
1089
|
+
export const transformPlotlyJsonToGanttChartProps = (input, isMultiPlot, // eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
1090
|
+
colorMap, colorwayType, isDarkTheme)=>{
|
|
1056
1091
|
var _input_layout, _input_layout1;
|
|
1057
|
-
const
|
|
1092
|
+
const data = input.data.filter((series)=>series.type !== 'scatter' || series.mode !== 'markers');
|
|
1093
|
+
const { legends, hideLegend } = getLegendProps(data, input.layout, isMultiPlot);
|
|
1058
1094
|
let colorScale = undefined;
|
|
1059
|
-
const
|
|
1060
|
-
const
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1095
|
+
const xAxisType = getAxisType(data, getAxisObjects(data, input.layout).x);
|
|
1096
|
+
const resolveXValue = getAxisValueResolver(xAxisType, parseLocalDate);
|
|
1097
|
+
const resolveGanttXValue = (value)=>{
|
|
1098
|
+
const resolvedValue = resolveXValue(value);
|
|
1099
|
+
return typeof resolvedValue === 'string' ? 0 : resolvedValue !== null && resolvedValue !== void 0 ? resolvedValue : 0;
|
|
1100
|
+
};
|
|
1101
|
+
const isXDate = xAxisType === 'date';
|
|
1102
|
+
const ganttData = [];
|
|
1103
|
+
data.forEach((series, index)=>{
|
|
1065
1104
|
const legend = legends[index];
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1105
|
+
if (series.type === 'bar') {
|
|
1106
|
+
var _input_layout_template_layout, _input_layout_template, _input_layout, _series_marker;
|
|
1107
|
+
colorScale = createColorScale(input.layout, series, colorScale);
|
|
1108
|
+
// extract colors for each series only once
|
|
1109
|
+
const extractedColors = extractColor((_input_layout = input.layout) === null || _input_layout === void 0 ? void 0 : (_input_layout_template = _input_layout.template) === null || _input_layout_template === void 0 ? void 0 : (_input_layout_template_layout = _input_layout_template.layout) === null || _input_layout_template_layout === void 0 ? void 0 : _input_layout_template_layout.colorway, colorwayType, (_series_marker = series.marker) === null || _series_marker === void 0 ? void 0 : _series_marker.color, colorMap, isDarkTheme);
|
|
1110
|
+
series.y.forEach((yVal, i)=>{
|
|
1111
|
+
var _series_marker, _series_marker1, _series_marker_color, _series_marker2, _input_layout_template_layout, _input_layout_template, _input_layout, _series_base, _series_x;
|
|
1112
|
+
if (isInvalidValue(yVal)) {
|
|
1113
|
+
return;
|
|
1114
|
+
}
|
|
1115
|
+
// resolve color for each legend's bars from the colorscale or extracted colors
|
|
1116
|
+
const color = colorScale ? colorScale(isArrayOrTypedArray((_series_marker = series.marker) === null || _series_marker === void 0 ? void 0 : _series_marker.color) ? (_series_marker2 = series.marker) === null || _series_marker2 === void 0 ? void 0 : (_series_marker_color = _series_marker2.color) === null || _series_marker_color === void 0 ? void 0 : _series_marker_color[i % ((_series_marker1 = series.marker) === null || _series_marker1 === void 0 ? void 0 : _series_marker1.color).length] : 0) : resolveColor(extractedColors, i, legend, colorMap, (_input_layout = input.layout) === null || _input_layout === void 0 ? void 0 : (_input_layout_template = _input_layout.template) === null || _input_layout_template === void 0 ? void 0 : (_input_layout_template_layout = _input_layout_template.layout) === null || _input_layout_template_layout === void 0 ? void 0 : _input_layout_template_layout.colorway, isDarkTheme);
|
|
1117
|
+
const opacity = getOpacity(series, i);
|
|
1118
|
+
const base = +resolveGanttXValue((_series_base = series.base) === null || _series_base === void 0 ? void 0 : _series_base[i]);
|
|
1119
|
+
const xVal = +resolveGanttXValue((_series_x = series.x) === null || _series_x === void 0 ? void 0 : _series_x[i]);
|
|
1120
|
+
var _rgb_copy_formatHex8;
|
|
1121
|
+
ganttData.push({
|
|
1122
|
+
x: {
|
|
1123
|
+
start: isXDate ? new Date(base) : base,
|
|
1124
|
+
end: isXDate ? new Date(base + xVal) : base + xVal
|
|
1125
|
+
},
|
|
1126
|
+
y: yVal,
|
|
1127
|
+
legend,
|
|
1128
|
+
color: (_rgb_copy_formatHex8 = rgb(color).copy({
|
|
1129
|
+
opacity
|
|
1130
|
+
}).formatHex8()) !== null && _rgb_copy_formatHex8 !== void 0 ? _rgb_copy_formatHex8 : color
|
|
1131
|
+
});
|
|
1132
|
+
});
|
|
1133
|
+
} else if (series.type === 'scatter' && series.mode === 'none' && series.fill === 'toself') {
|
|
1134
|
+
for(let i = 0; i < series.y.length; i += 5){
|
|
1135
|
+
if (isInvalidValue(series.y[i]) || isInvalidValue(series.y[i + 3])) {
|
|
1136
|
+
continue;
|
|
1137
|
+
}
|
|
1138
|
+
const x0 = resolveGanttXValue(series.x[i]);
|
|
1139
|
+
const x1 = resolveGanttXValue(series.x[i + 1]);
|
|
1140
|
+
const y0 = series.y[i];
|
|
1141
|
+
const y1 = series.y[i + 3];
|
|
1142
|
+
ganttData.push({
|
|
1143
|
+
x: {
|
|
1144
|
+
start: x0,
|
|
1145
|
+
end: x1
|
|
1146
|
+
},
|
|
1147
|
+
y: Math.round((y0 + y1) / 2),
|
|
1148
|
+
legend,
|
|
1149
|
+
color: series.fillcolor
|
|
1150
|
+
});
|
|
1074
1151
|
}
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
const opacity = getOpacity(series, i);
|
|
1078
|
-
const base = convertXValueToNumber((_series_base = series.base) === null || _series_base === void 0 ? void 0 : _series_base[i]);
|
|
1079
|
-
const xVal = convertXValueToNumber((_series_x = series.x) === null || _series_x === void 0 ? void 0 : _series_x[i]);
|
|
1080
|
-
var _rgb_copy_formatHex8;
|
|
1081
|
-
return {
|
|
1082
|
-
x: {
|
|
1083
|
-
start: isXDate ? new Date(base) : base,
|
|
1084
|
-
end: isXDate ? new Date(base + xVal) : base + xVal
|
|
1085
|
-
},
|
|
1086
|
-
y: yVal,
|
|
1087
|
-
legend,
|
|
1088
|
-
color: (_rgb_copy_formatHex8 = rgb(color).copy({
|
|
1089
|
-
opacity
|
|
1090
|
-
}).formatHex8()) !== null && _rgb_copy_formatHex8 !== void 0 ? _rgb_copy_formatHex8 : color
|
|
1091
|
-
};
|
|
1092
|
-
}).filter((point)=>point !== null);
|
|
1093
|
-
}).flat();
|
|
1152
|
+
}
|
|
1153
|
+
});
|
|
1094
1154
|
var _input_layout_height;
|
|
1095
1155
|
return {
|
|
1096
|
-
data:
|
|
1156
|
+
data: ganttData,
|
|
1097
1157
|
showYAxisLables: true,
|
|
1098
1158
|
height: (_input_layout_height = (_input_layout = input.layout) === null || _input_layout === void 0 ? void 0 : _input_layout.height) !== null && _input_layout_height !== void 0 ? _input_layout_height : 350,
|
|
1099
1159
|
width: (_input_layout1 = input.layout) === null || _input_layout1 === void 0 ? void 0 : _input_layout1.width,
|
|
@@ -1104,12 +1164,13 @@ export const transformPlotlyJsonToGanttChartProps = (input, isMultiPlot, colorMa
|
|
|
1104
1164
|
roundCorners: true,
|
|
1105
1165
|
useUTC: false,
|
|
1106
1166
|
...getTitles(input.layout),
|
|
1107
|
-
...getAxisCategoryOrderProps(
|
|
1108
|
-
...getBarProps(
|
|
1109
|
-
...getAxisTickProps(
|
|
1167
|
+
...getAxisCategoryOrderProps(data, input.layout),
|
|
1168
|
+
...getBarProps(data, input.layout, true),
|
|
1169
|
+
...getAxisTickProps(data, input.layout)
|
|
1110
1170
|
};
|
|
1111
1171
|
};
|
|
1112
|
-
export const transformPlotlyJsonToHeatmapProps = (input, isMultiPlot,
|
|
1172
|
+
export const transformPlotlyJsonToHeatmapProps = (input, isMultiPlot, // eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
1173
|
+
colorMap, colorwayType, isDarkTheme)=>{
|
|
1113
1174
|
var _input_layout, _input_layout_coloraxis, _input_layout1, _input_layout_template_layout, _input_layout_template, _input_layout2, _input_layout_template_data_histogram2d_, _input_layout_template_data_histogram2d, _input_layout_template_data, _input_layout_template1, _input_layout3, _input_layout_template_data_heatmap_, _input_layout_template_data_heatmap, _input_layout_template_data1, _input_layout_template2, _input_layout4, _input_layout5, _input_layout6;
|
|
1114
1175
|
const firstData = input.data[0];
|
|
1115
1176
|
const heatmapDataPoints = [];
|
|
@@ -1244,7 +1305,8 @@ export const transformPlotlyJsonToHeatmapProps = (input, isMultiPlot, colorMap,
|
|
|
1244
1305
|
...getAxisTickProps(input.data, input.layout)
|
|
1245
1306
|
};
|
|
1246
1307
|
};
|
|
1247
|
-
export const transformPlotlyJsonToSankeyProps = (input, isMultiPlot,
|
|
1308
|
+
export const transformPlotlyJsonToSankeyProps = (input, isMultiPlot, // eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
1309
|
+
colorMap, colorwayType, isDarkTheme)=>{
|
|
1248
1310
|
var _input_layout_template_layout, _input_layout_template, _input_layout, _node_label, _input_layout1, _input_layout2;
|
|
1249
1311
|
const { link, node } = input.data[0];
|
|
1250
1312
|
var _link_value;
|
|
@@ -1294,7 +1356,8 @@ export const transformPlotlyJsonToSankeyProps = (input, isMultiPlot, colorMap, c
|
|
|
1294
1356
|
height: (_input_layout_height = (_input_layout2 = input.layout) === null || _input_layout2 === void 0 ? void 0 : _input_layout2.height) !== null && _input_layout_height !== void 0 ? _input_layout_height : 468
|
|
1295
1357
|
};
|
|
1296
1358
|
};
|
|
1297
|
-
export const transformPlotlyJsonToGaugeProps = (input, isMultiPlot,
|
|
1359
|
+
export const transformPlotlyJsonToGaugeProps = (input, isMultiPlot, // eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
1360
|
+
colorMap, colorwayType, isDarkTheme)=>{
|
|
1298
1361
|
var _firstData_gauge, _input_layout_template_layout, _input_layout_template, _input_layout, _firstData_gauge_steps, _firstData_gauge1, _firstData_gauge_axis_range, _firstData_gauge_axis, _firstData_gauge2, _input_layout_template_layout1, _input_layout_template1, _input_layout1, _firstData_gauge_axis1, _firstData_gauge3, _firstData_gauge_axis_range1, _firstData_gauge_axis2, _firstData_gauge4, _firstData_delta, _firstData_gauge_axis_range2, _firstData_gauge_axis3, _firstData_gauge5, _firstData_gauge_axis_range3, _firstData_gauge_axis4, _firstData_gauge6, _firstData_gauge_axis_range4, _firstData_gauge_axis5, _firstData_gauge7, _firstData_gauge_axis_range5, _firstData_gauge_axis6, _firstData_gauge8, _input_layout2, _input_layout3, _firstData_gauge_steps1, _firstData_gauge9;
|
|
1299
1362
|
const firstData = input.data[0];
|
|
1300
1363
|
const stepsColors = ((_firstData_gauge = firstData.gauge) === null || _firstData_gauge === void 0 ? void 0 : _firstData_gauge.steps) ? firstData.gauge.steps.map((step)=>step.color) : undefined;
|
|
@@ -1420,7 +1483,8 @@ function mergeCells(tableCells, templateCells) {
|
|
|
1420
1483
|
suffix: (_tableCells_suffix = tableCells === null || tableCells === void 0 ? void 0 : tableCells.suffix) !== null && _tableCells_suffix !== void 0 ? _tableCells_suffix : templateCells === null || templateCells === void 0 ? void 0 : templateCells.suffix
|
|
1421
1484
|
};
|
|
1422
1485
|
}
|
|
1423
|
-
export const transformPlotlyJsonToChartTableProps = (input, isMultiPlot,
|
|
1486
|
+
export const transformPlotlyJsonToChartTableProps = (input, isMultiPlot, // eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
1487
|
+
colorMap, colorwayType, isDarkTheme)=>{
|
|
1424
1488
|
var _tableData_cells, _input_layout_template_data_table_, _input_layout_template_data_table, _input_layout_template_data, _input_layout_template, _input_layout, _input_layout_font, _input_layout1, _input_layout_template_data_table_1, _input_layout_template_data_table1, _input_layout_template_data1, _input_layout_template1, _input_layout2, _tableData_header, _input_layout3, _input_layout4;
|
|
1425
1489
|
const tableData = input.data[0];
|
|
1426
1490
|
const normalizeHeaders = (values, header)=>{
|
|
@@ -1573,7 +1637,8 @@ function getCategoriesAndValues(series) {
|
|
|
1573
1637
|
}
|
|
1574
1638
|
}
|
|
1575
1639
|
}
|
|
1576
|
-
export const transformPlotlyJsonToFunnelChartProps = (input, isMultiPlot,
|
|
1640
|
+
export const transformPlotlyJsonToFunnelChartProps = (input, isMultiPlot, // eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
1641
|
+
colorMap, colorwayType, isDarkTheme)=>{
|
|
1577
1642
|
var _input_layout, _input_layout1, _input_data_, _input_layout2;
|
|
1578
1643
|
const funnelData = [];
|
|
1579
1644
|
// Determine if data is stacked based on multiple series with multiple values per series
|
|
@@ -1970,7 +2035,8 @@ const getLegendShape = (series)=>{
|
|
|
1970
2035
|
}
|
|
1971
2036
|
return 'default';
|
|
1972
2037
|
};
|
|
1973
|
-
export const getAllupLegendsProps = (input,
|
|
2038
|
+
export const getAllupLegendsProps = (input, // eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
2039
|
+
colorMap, colorwayType, traceInfo, isDarkTheme)=>{
|
|
1974
2040
|
const allupLegends = [];
|
|
1975
2041
|
// reduce on showlegend boolean propperty. reduce should return true if at least one series has showlegend true
|
|
1976
2042
|
const toShowLegend = input.data.reduce((acc, series)=>{
|
|
@@ -2346,8 +2412,14 @@ const getAxisScaleTypeProps = (data, layout)=>{
|
|
|
2346
2412
|
const tickValues = axType === 'date' ? ax.tickvals.map((v)=>new Date(v)) : ax.tickvals;
|
|
2347
2413
|
if (axId === 'x') {
|
|
2348
2414
|
props.tickValues = tickValues;
|
|
2415
|
+
props.xAxis = {
|
|
2416
|
+
tickText: ax.ticktext
|
|
2417
|
+
};
|
|
2349
2418
|
} else if (axId === 'y') {
|
|
2350
2419
|
props.yAxisTickValues = tickValues;
|
|
2420
|
+
props.yAxis = {
|
|
2421
|
+
tickText: ax.ticktext
|
|
2422
|
+
};
|
|
2351
2423
|
}
|
|
2352
2424
|
return;
|
|
2353
2425
|
}
|
|
@@ -2456,14 +2528,7 @@ const getAxisObjects = (data, layout)=>{
|
|
|
2456
2528
|
}
|
|
2457
2529
|
return axisObjects;
|
|
2458
2530
|
};
|
|
2459
|
-
|
|
2460
|
-
let ax;
|
|
2461
|
-
if (arg2 && typeof arg2 === 'object' && '_id' in arg2) {
|
|
2462
|
-
ax = arg2;
|
|
2463
|
-
} else if (typeof arg3 === 'string') {
|
|
2464
|
-
const layout = arg2;
|
|
2465
|
-
ax = getAxisObjects(data, layout)[arg3];
|
|
2466
|
-
}
|
|
2531
|
+
const getAxisType = (data, ax)=>{
|
|
2467
2532
|
if (!ax) {
|
|
2468
2533
|
return 'category';
|
|
2469
2534
|
}
|
|
@@ -2496,9 +2561,12 @@ function getAxisType(data, arg2, arg3) {
|
|
|
2496
2561
|
return 'date';
|
|
2497
2562
|
}
|
|
2498
2563
|
return 'category';
|
|
2499
|
-
}
|
|
2500
|
-
const getAxisValueResolver = (
|
|
2501
|
-
const
|
|
2564
|
+
};
|
|
2565
|
+
const getAxisValueResolver = (axType, dateParser)=>{
|
|
2566
|
+
const toDate = (value)=>{
|
|
2567
|
+
const date = dateParser ? dateParser(value) : new Date(value);
|
|
2568
|
+
return isNaN(date.getTime()) ? null : date;
|
|
2569
|
+
};
|
|
2502
2570
|
return (value)=>{
|
|
2503
2571
|
if (isInvalidValue(value)) {
|
|
2504
2572
|
return null;
|
|
@@ -2509,10 +2577,10 @@ const getAxisValueResolver = (data, layout, axisId)=>{
|
|
|
2509
2577
|
return isNumber(value) ? +value : null;
|
|
2510
2578
|
case 'date':
|
|
2511
2579
|
if (isNumber(value)) {
|
|
2512
|
-
return
|
|
2580
|
+
return toDate(+value);
|
|
2513
2581
|
}
|
|
2514
2582
|
if (typeof value === 'string') {
|
|
2515
|
-
return
|
|
2583
|
+
return toDate(value);
|
|
2516
2584
|
}
|
|
2517
2585
|
return null;
|
|
2518
2586
|
case 'category':
|