@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.
Files changed (150) hide show
  1. package/CHANGELOG.md +21 -2
  2. package/dist/index.d.ts +17 -12
  3. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js +2 -16
  4. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -1
  5. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +1 -1
  6. package/lib/components/AreaChart/AreaChart.js +3 -16
  7. package/lib/components/AreaChart/AreaChart.js.map +1 -1
  8. package/lib/components/ChartTable/ChartTable.js +2 -10
  9. package/lib/components/ChartTable/ChartTable.js.map +1 -1
  10. package/lib/components/ChartTable/ChartTable.types.js.map +1 -1
  11. package/lib/components/CommonComponents/CartesianChart.js +2 -0
  12. package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
  13. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  14. package/lib/components/CommonComponents/ChartPopover.js +1 -2
  15. package/lib/components/CommonComponents/ChartPopover.js.map +1 -1
  16. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +4 -2
  17. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  18. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +4 -2
  19. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
  20. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
  21. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js +0 -2
  22. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
  23. package/lib/components/DeclarativeChart/DeclarativeChart.js +48 -25
  24. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  25. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +48 -22
  26. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  27. package/lib/components/DonutChart/DonutChart.js +3 -12
  28. package/lib/components/DonutChart/DonutChart.js.map +1 -1
  29. package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
  30. package/lib/components/DonutChart/Pie/Pie.js +4 -2
  31. package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
  32. package/lib/components/FunnelChart/FunnelChart.js +2 -10
  33. package/lib/components/FunnelChart/FunnelChart.js.map +1 -1
  34. package/lib/components/FunnelChart/FunnelChart.types.js.map +1 -1
  35. package/lib/components/GanttChart/GanttChart.js +3 -16
  36. package/lib/components/GanttChart/GanttChart.js.map +1 -1
  37. package/lib/components/GaugeChart/GaugeChart.js +2 -10
  38. package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
  39. package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
  40. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +7 -19
  41. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  42. package/lib/components/HeatMapChart/HeatMapChart.js +3 -16
  43. package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
  44. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +3 -21
  45. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  46. package/lib/components/Legends/Legends.types.js.map +1 -1
  47. package/lib/components/Legends/OverflowMenu.js.map +1 -1
  48. package/lib/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
  49. package/lib/components/LineChart/LineChart.js +10 -19
  50. package/lib/components/LineChart/LineChart.js.map +1 -1
  51. package/lib/components/LineChart/LineChart.types.js +1 -1
  52. package/lib/components/LineChart/LineChart.types.js.map +1 -1
  53. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js +3 -4
  54. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
  55. package/lib/components/SankeyChart/SankeyChart.js +3 -9
  56. package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
  57. package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -1
  58. package/lib/components/ScatterChart/ScatterChart.js +23 -23
  59. package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
  60. package/lib/components/Sparkline/Sparkline.js +11 -7
  61. package/lib/components/Sparkline/Sparkline.js.map +1 -1
  62. package/lib/components/VerticalBarChart/VerticalBarChart.js +2 -14
  63. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  64. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +7 -17
  65. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  66. package/lib/types/DataPoint.js.map +1 -1
  67. package/lib/utilities/FocusableTooltipText.js +1 -1
  68. package/lib/utilities/FocusableTooltipText.js.map +1 -1
  69. package/lib/utilities/getWindow.js +0 -1
  70. package/lib/utilities/getWindow.js.map +1 -1
  71. package/lib/utilities/hooks.js +34 -0
  72. package/lib/utilities/hooks.js.map +1 -0
  73. package/lib/utilities/image-export-utils.js +115 -75
  74. package/lib/utilities/image-export-utils.js.map +1 -1
  75. package/lib/utilities/utilities.js +23 -24
  76. package/lib/utilities/utilities.js.map +1 -1
  77. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js +2 -16
  78. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -1
  79. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +1 -1
  80. package/lib-commonjs/components/AreaChart/AreaChart.js +2 -15
  81. package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -1
  82. package/lib-commonjs/components/ChartTable/ChartTable.js +3 -10
  83. package/lib-commonjs/components/ChartTable/ChartTable.js.map +1 -1
  84. package/lib-commonjs/components/ChartTable/ChartTable.types.js.map +1 -1
  85. package/lib-commonjs/components/CommonComponents/CartesianChart.js +2 -0
  86. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
  87. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  88. package/lib-commonjs/components/CommonComponents/ChartPopover.js +1 -2
  89. package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +1 -1
  90. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +4 -2
  91. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  92. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js +4 -2
  93. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
  94. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
  95. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js +0 -2
  96. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
  97. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +48 -25
  98. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  99. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +48 -22
  100. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  101. package/lib-commonjs/components/DonutChart/DonutChart.js +2 -11
  102. package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
  103. package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
  104. package/lib-commonjs/components/DonutChart/Pie/Pie.js +4 -2
  105. package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
  106. package/lib-commonjs/components/FunnelChart/FunnelChart.js +2 -10
  107. package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -1
  108. package/lib-commonjs/components/FunnelChart/FunnelChart.types.js.map +1 -1
  109. package/lib-commonjs/components/GanttChart/GanttChart.js +2 -15
  110. package/lib-commonjs/components/GanttChart/GanttChart.js.map +1 -1
  111. package/lib-commonjs/components/GaugeChart/GaugeChart.js +2 -10
  112. package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
  113. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
  114. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +7 -19
  115. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  116. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +2 -15
  117. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
  118. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +2 -19
  119. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  120. package/lib-commonjs/components/Legends/Legends.types.js.map +1 -1
  121. package/lib-commonjs/components/Legends/OverflowMenu.js.map +1 -1
  122. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
  123. package/lib-commonjs/components/LineChart/LineChart.js +10 -19
  124. package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
  125. package/lib-commonjs/components/LineChart/LineChart.types.js +1 -1
  126. package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -1
  127. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js +2 -2
  128. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
  129. package/lib-commonjs/components/SankeyChart/SankeyChart.js +3 -9
  130. package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
  131. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -1
  132. package/lib-commonjs/components/ScatterChart/ScatterChart.js +21 -21
  133. package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
  134. package/lib-commonjs/components/Sparkline/Sparkline.js +11 -7
  135. package/lib-commonjs/components/Sparkline/Sparkline.js.map +1 -1
  136. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +2 -14
  137. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  138. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +6 -16
  139. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  140. package/lib-commonjs/types/DataPoint.js.map +1 -1
  141. package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -1
  142. package/lib-commonjs/utilities/getWindow.js +0 -1
  143. package/lib-commonjs/utilities/getWindow.js.map +1 -1
  144. package/lib-commonjs/utilities/hooks.js +45 -0
  145. package/lib-commonjs/utilities/hooks.js.map +1 -0
  146. package/lib-commonjs/utilities/image-export-utils.js +116 -76
  147. package/lib-commonjs/utilities/image-export-utils.js.map +1 -1
  148. package/lib-commonjs/utilities/utilities.js +21 -20
  149. package/lib-commonjs/utilities/utilities.js.map +1 -1
  150. 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, _node_label, _input_layout1, _input_layout2;
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: (_input_layout1 = input.layout) === null || _input_layout1 === void 0 ? void 0 : _input_layout1.width,
1931
- 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
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, _pieSeries_labels;
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
- (_pieSeries_labels = pieSeries.labels) === null || _pieSeries_labels === void 0 ? void 0 : _pieSeries_labels.forEach((label, labelIndex)=>{
2624
- var _input_layout, _input_layout_template_layout, _input_layout_template, _input_layout1;
2625
- const legend = `${label}`;
2626
- var _input_layout_piecolorway;
2627
- // resolve color for each legend from the extracted colors
2628
- 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);
2629
- if (legend !== '' && allupLegends.some((group)=>group.title === legend) === false) {
2630
- allupLegends.push({
2631
- title: legend,
2632
- color
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
- var _series_axLetter;
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
  }