@fluentui/react-charts 9.3.6 → 9.3.7
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 +21 -2
- package/dist/index.d.ts +17 -12
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js +2 -16
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -1
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +1 -1
- package/lib/components/AreaChart/AreaChart.js +3 -16
- package/lib/components/AreaChart/AreaChart.js.map +1 -1
- package/lib/components/ChartTable/ChartTable.js +2 -10
- package/lib/components/ChartTable/ChartTable.js.map +1 -1
- package/lib/components/ChartTable/ChartTable.types.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.js +2 -0
- package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib/components/CommonComponents/ChartPopover.js +1 -2
- package/lib/components/CommonComponents/ChartPopover.js.map +1 -1
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +4 -2
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +4 -2
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js +0 -2
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js +48 -25
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +48 -22
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.js +3 -12
- package/lib/components/DonutChart/DonutChart.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
- package/lib/components/DonutChart/Pie/Pie.js +4 -2
- package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib/components/FunnelChart/FunnelChart.js +2 -10
- package/lib/components/FunnelChart/FunnelChart.js.map +1 -1
- package/lib/components/FunnelChart/FunnelChart.types.js.map +1 -1
- package/lib/components/GanttChart/GanttChart.js +3 -16
- package/lib/components/GanttChart/GanttChart.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.js +2 -10
- package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +7 -19
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.js +3 -16
- package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +3 -21
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
- package/lib/components/Legends/Legends.types.js.map +1 -1
- package/lib/components/Legends/OverflowMenu.js.map +1 -1
- package/lib/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
- package/lib/components/LineChart/LineChart.js +10 -19
- package/lib/components/LineChart/LineChart.js.map +1 -1
- package/lib/components/LineChart/LineChart.types.js +1 -1
- package/lib/components/LineChart/LineChart.types.js.map +1 -1
- package/lib/components/LineChart/eventAnnotation/EventAnnotation.js +3 -4
- package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
- package/lib/components/SankeyChart/SankeyChart.js +3 -9
- package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
- package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.js +23 -23
- package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
- package/lib/components/Sparkline/Sparkline.js +11 -7
- package/lib/components/Sparkline/Sparkline.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.js +2 -14
- package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +7 -17
- 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/getWindow.js +0 -1
- package/lib/utilities/getWindow.js.map +1 -1
- package/lib/utilities/hooks.js +34 -0
- package/lib/utilities/hooks.js.map +1 -0
- package/lib/utilities/image-export-utils.js +115 -75
- package/lib/utilities/image-export-utils.js.map +1 -1
- package/lib/utilities/utilities.js +23 -24
- package/lib/utilities/utilities.js.map +1 -1
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js +2 -16
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -1
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +1 -1
- package/lib-commonjs/components/AreaChart/AreaChart.js +2 -15
- package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -1
- package/lib-commonjs/components/ChartTable/ChartTable.js +3 -10
- package/lib-commonjs/components/ChartTable/ChartTable.js.map +1 -1
- package/lib-commonjs/components/ChartTable/ChartTable.types.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.js +2 -0
- 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/ChartPopover.js +1 -2
- package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +4 -2
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js +4 -2
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js +0 -2
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +48 -25
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +48 -22
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.js +2 -11
- package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Pie/Pie.js +4 -2
- package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/FunnelChart.js +2 -10
- package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/FunnelChart.types.js.map +1 -1
- package/lib-commonjs/components/GanttChart/GanttChart.js +2 -15
- package/lib-commonjs/components/GanttChart/GanttChart.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.js +2 -10
- package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +7 -19
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +2 -15
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +2 -19
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
- package/lib-commonjs/components/Legends/Legends.types.js.map +1 -1
- package/lib-commonjs/components/Legends/OverflowMenu.js.map +1 -1
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.js +10 -19
- package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.types.js +1 -1
- package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -1
- package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js +2 -2
- package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.js +3 -9
- package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.js +21 -21
- package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
- package/lib-commonjs/components/Sparkline/Sparkline.js +11 -7
- package/lib-commonjs/components/Sparkline/Sparkline.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +2 -14
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +6 -16
- 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.map +1 -1
- package/lib-commonjs/utilities/getWindow.js +0 -1
- package/lib-commonjs/utilities/getWindow.js.map +1 -1
- package/lib-commonjs/utilities/hooks.js +45 -0
- package/lib-commonjs/utilities/hooks.js.map +1 -0
- package/lib-commonjs/utilities/image-export-utils.js +116 -76
- package/lib-commonjs/utilities/image-export-utils.js.map +1 -1
- package/lib-commonjs/utilities/utilities.js +21 -20
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/package.json +3 -3
|
@@ -88,6 +88,18 @@ const getYMinMaxValues = (series, layout)=>{
|
|
|
88
88
|
}
|
|
89
89
|
return {};
|
|
90
90
|
};
|
|
91
|
+
const getXMinMaxValues = (series, layout)=>{
|
|
92
|
+
var _getXAxisProperties;
|
|
93
|
+
const range = (_getXAxisProperties = getXAxisProperties(series, layout)) === null || _getXAxisProperties === void 0 ? void 0 : _getXAxisProperties.range;
|
|
94
|
+
if (range && range.length === 2) {
|
|
95
|
+
return {
|
|
96
|
+
xMinValue: range[0],
|
|
97
|
+
xMaxValue: range[1],
|
|
98
|
+
showRoundOffXTickValues: false
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
return {};
|
|
102
|
+
};
|
|
91
103
|
const getYAxisProperties = (series, layout)=>{
|
|
92
104
|
return layout === null || layout === void 0 ? void 0 : layout.yaxis;
|
|
93
105
|
};
|
|
@@ -1135,6 +1147,8 @@ export const transformPlotlyJsonToVSBCProps = (input, isMultiPlot, colorMap, col
|
|
|
1135
1147
|
showYAxisLables: true,
|
|
1136
1148
|
noOfCharsToTruncate: 20,
|
|
1137
1149
|
showYAxisLablesTooltip: true,
|
|
1150
|
+
roundedTicks: true,
|
|
1151
|
+
...getXMinMaxValues(input.data[0], input.layout),
|
|
1138
1152
|
...getTitles(input.layout),
|
|
1139
1153
|
...getXAxisTickFormat(input.data[0], input.layout),
|
|
1140
1154
|
...yAxisTickFormat,
|
|
@@ -1265,6 +1279,8 @@ export const transformPlotlyJsonToGVBCProps = (input, isMultiPlot, colorMap, col
|
|
|
1265
1279
|
hideLegend,
|
|
1266
1280
|
roundCorners: true,
|
|
1267
1281
|
showYAxisLables: true,
|
|
1282
|
+
roundedTicks: true,
|
|
1283
|
+
...getXMinMaxValues(processedInput.data[0], processedInput.layout),
|
|
1268
1284
|
...getTitles(processedInput.layout),
|
|
1269
1285
|
...getAxisCategoryOrderProps(processedInput.data, processedInput.layout),
|
|
1270
1286
|
...getYMinMaxValues(processedInput.data[0], processedInput.layout),
|
|
@@ -1352,6 +1368,8 @@ export const transformPlotlyJsonToVBCProps = (input, isMultiPlot, colorMap, colo
|
|
|
1352
1368
|
hideLegend,
|
|
1353
1369
|
roundCorners: true,
|
|
1354
1370
|
showYAxisLables: true,
|
|
1371
|
+
roundedTicks: true,
|
|
1372
|
+
...getXMinMaxValues(input.data[0], input.layout),
|
|
1355
1373
|
...getTitles(input.layout),
|
|
1356
1374
|
...getYMinMaxValues(input.data[0], input.layout),
|
|
1357
1375
|
...getAxisCategoryOrderProps(input.data, input.layout),
|
|
@@ -1572,6 +1590,8 @@ const transformPlotlyJsonToScatterTraceProps = (input, isMultiPlot, chartType, c
|
|
|
1572
1590
|
wrapXAxisLabels: shouldWrapLabels,
|
|
1573
1591
|
optimizeLargeData: numDataPoints > 1000,
|
|
1574
1592
|
showYAxisLables: true,
|
|
1593
|
+
roundedTicks: true,
|
|
1594
|
+
...getXMinMaxValues(input.data[0], input.layout),
|
|
1575
1595
|
...getTitles(input.layout),
|
|
1576
1596
|
...getXAxisTickFormat(input.data[0], input.layout),
|
|
1577
1597
|
...yAxisTickFormat,
|
|
@@ -1590,7 +1610,6 @@ const transformPlotlyJsonToScatterTraceProps = (input, isMultiPlot, chartType, c
|
|
|
1590
1610
|
} else {
|
|
1591
1611
|
return {
|
|
1592
1612
|
data: isScatterChart ? scatterChartProps : chartProps,
|
|
1593
|
-
roundedTicks: true,
|
|
1594
1613
|
...commonProps,
|
|
1595
1614
|
...yMinMax,
|
|
1596
1615
|
...isScatterChart ? {
|
|
@@ -1658,6 +1677,8 @@ export const transformPlotlyJsonToHorizontalBarWithAxisProps = (input, isMultiPl
|
|
|
1658
1677
|
showYAxisLablesTooltip: true,
|
|
1659
1678
|
hideLegend,
|
|
1660
1679
|
roundCorners: true,
|
|
1680
|
+
roundedTicks: true,
|
|
1681
|
+
...getXMinMaxValues(input.data[0], input.layout),
|
|
1661
1682
|
...getTitles(input.layout),
|
|
1662
1683
|
...getAxisCategoryOrderProps(input.data, input.layout),
|
|
1663
1684
|
...getBarProps(input.data, input.layout, true),
|
|
@@ -1882,7 +1903,7 @@ export const transformPlotlyJsonToHeatmapProps = (input, isMultiPlot, colorMap,
|
|
|
1882
1903
|
};
|
|
1883
1904
|
};
|
|
1884
1905
|
export const transformPlotlyJsonToSankeyProps = (input, isMultiPlot, colorMap, colorwayType, isDarkTheme)=>{
|
|
1885
|
-
var _input_layout_template_layout, _input_layout_template, _input_layout,
|
|
1906
|
+
var _input_layout_template_layout, _input_layout_template, _input_layout, _input_layout_template_layout1, _input_layout_template1, _input_layout1, _node_label, _input_layout2, _input_layout3;
|
|
1886
1907
|
const { link, node } = input.data[0];
|
|
1887
1908
|
var _link_value;
|
|
1888
1909
|
const validLinks = ((_link_value = link === null || link === void 0 ? void 0 : link.value) !== null && _link_value !== void 0 ? _link_value : []).map((val, index)=>{
|
|
@@ -1898,6 +1919,7 @@ export const transformPlotlyJsonToSankeyProps = (input, isMultiPlot, colorMap, c
|
|
|
1898
1919
|
})// Filter out negative nodes, unequal nodes and self-references (circular links)
|
|
1899
1920
|
.filter((x)=>x !== null && x.source >= 0 && x.target >= 0 && x.source !== x.target);
|
|
1900
1921
|
const extractedNodeColors = 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, node === null || node === void 0 ? void 0 : node.color, colorMap, isDarkTheme);
|
|
1922
|
+
const extractedLinkColors = 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, link === null || link === void 0 ? void 0 : link.color, colorMap, isDarkTheme);
|
|
1901
1923
|
const sankeyChartData = {
|
|
1902
1924
|
nodes: (_node_label = node.label) === null || _node_label === void 0 ? void 0 : _node_label.map((label, index)=>{
|
|
1903
1925
|
var _input_layout_template_layout, _input_layout_template, _input_layout;
|
|
@@ -1910,8 +1932,11 @@ export const transformPlotlyJsonToSankeyProps = (input, isMultiPlot, colorMap, c
|
|
|
1910
1932
|
}),
|
|
1911
1933
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1912
1934
|
links: validLinks.map((validLink, index)=>{
|
|
1935
|
+
var _input_layout_template_layout, _input_layout_template, _input_layout;
|
|
1936
|
+
const color = resolveColor(extractedLinkColors, index, validLink.target, 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);
|
|
1913
1937
|
return {
|
|
1914
|
-
...validLink
|
|
1938
|
+
...validLink,
|
|
1939
|
+
color
|
|
1915
1940
|
};
|
|
1916
1941
|
})
|
|
1917
1942
|
};
|
|
@@ -1927,8 +1952,8 @@ export const transformPlotlyJsonToSankeyProps = (input, isMultiPlot, colorMap, c
|
|
|
1927
1952
|
chartTitle,
|
|
1928
1953
|
SankeyChartData: sankeyChartData
|
|
1929
1954
|
},
|
|
1930
|
-
width: (
|
|
1931
|
-
height: (_input_layout_height = (
|
|
1955
|
+
width: (_input_layout2 = input.layout) === null || _input_layout2 === void 0 ? void 0 : _input_layout2.width,
|
|
1956
|
+
height: (_input_layout_height = (_input_layout3 = input.layout) === null || _input_layout3 === void 0 ? void 0 : _input_layout3.height) !== null && _input_layout_height !== void 0 ? _input_layout_height : 468
|
|
1932
1957
|
};
|
|
1933
1958
|
};
|
|
1934
1959
|
export const transformPlotlyJsonToGaugeProps = (input, isMultiPlot, colorMap, colorwayType, isDarkTheme)=>{
|
|
@@ -2616,23 +2641,25 @@ export const getAllupLegendsProps = (input, colorMap, colorwayType, traceInfo, i
|
|
|
2616
2641
|
if (toShowLegend) {
|
|
2617
2642
|
input.data.forEach((series, index)=>{
|
|
2618
2643
|
if (traceInfo[index].type === 'donut') {
|
|
2619
|
-
var _input_layout, _input_layout_template_layout, _input_layout_template, _input_layout1, _input_layout2, _pieSeries_marker
|
|
2644
|
+
var _input_layout, _input_layout_template_layout, _input_layout_template, _input_layout1, _input_layout2, _pieSeries_marker;
|
|
2620
2645
|
const pieSeries = series;
|
|
2621
2646
|
var _input_layout_piecolorway, _input_layout_piecolorway1;
|
|
2622
2647
|
const colors = extractColor((_input_layout_piecolorway = (_input_layout = input.layout) === null || _input_layout === void 0 ? void 0 : _input_layout.piecolorway) !== null && _input_layout_piecolorway !== void 0 ? _input_layout_piecolorway : (_input_layout1 = input.layout) === null || _input_layout1 === void 0 ? void 0 : (_input_layout_template = _input_layout1.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, (_input_layout_piecolorway1 = (_input_layout2 = input.layout) === null || _input_layout2 === void 0 ? void 0 : _input_layout2.piecolorway) !== null && _input_layout_piecolorway1 !== void 0 ? _input_layout_piecolorway1 : pieSeries === null || pieSeries === void 0 ? void 0 : (_pieSeries_marker = pieSeries.marker) === null || _pieSeries_marker === void 0 ? void 0 : _pieSeries_marker.colors, colorMap, isDarkTheme, true);
|
|
2623
|
-
(
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
allupLegends.
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2648
|
+
if (isArrayOrTypedArray(pieSeries.labels)) {
|
|
2649
|
+
pieSeries.labels.forEach((label, labelIndex)=>{
|
|
2650
|
+
var _input_layout, _input_layout_template_layout, _input_layout_template, _input_layout1;
|
|
2651
|
+
const legend = `${label}`;
|
|
2652
|
+
var _input_layout_piecolorway;
|
|
2653
|
+
// resolve color for each legend from the extracted colors
|
|
2654
|
+
const color = resolveColor(colors, labelIndex, legend, colorMap, (_input_layout_piecolorway = (_input_layout = input.layout) === null || _input_layout === void 0 ? void 0 : _input_layout.piecolorway) !== null && _input_layout_piecolorway !== void 0 ? _input_layout_piecolorway : (_input_layout1 = input.layout) === null || _input_layout1 === void 0 ? void 0 : (_input_layout_template = _input_layout1.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, true);
|
|
2655
|
+
if (legend !== '' && allupLegends.some((group)=>group.title === legend) === false) {
|
|
2656
|
+
allupLegends.push({
|
|
2657
|
+
title: legend,
|
|
2658
|
+
color
|
|
2659
|
+
});
|
|
2660
|
+
}
|
|
2661
|
+
});
|
|
2662
|
+
}
|
|
2636
2663
|
} else if (isNonPlotType(traceInfo[index].type) === false) {
|
|
2637
2664
|
var _plotSeries_line, _plotSeries_marker, _input_layout_template_layout1, _input_layout_template1, _input_layout3;
|
|
2638
2665
|
const plotSeries = series;
|
|
@@ -3117,9 +3144,8 @@ const getAxisType = (data, ax)=>{
|
|
|
3117
3144
|
const values = [];
|
|
3118
3145
|
data.forEach((series)=>{
|
|
3119
3146
|
const axId = series[`${axLetter}axis`];
|
|
3120
|
-
if (axId === ax._id || !axId && ax._id === axLetter) {
|
|
3121
|
-
|
|
3122
|
-
(_series_axLetter = series[axLetter]) === null || _series_axLetter === void 0 ? void 0 : _series_axLetter.forEach((val)=>{
|
|
3147
|
+
if ((axId === ax._id || !axId && ax._id === axLetter) && isArrayOrTypedArray(series[axLetter])) {
|
|
3148
|
+
series[axLetter].forEach((val)=>{
|
|
3123
3149
|
if (!isInvalidValue(val)) {
|
|
3124
3150
|
values.push(val);
|
|
3125
3151
|
}
|