@fluentui/react-charts 0.0.0-nightly-20251113-0407.1 → 0.0.0-nightly-20251117-0407.1

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 (109) hide show
  1. package/CHANGELOG.md +13 -13
  2. package/dist/index.d.ts +12 -11
  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.types.js.map +1 -1
  12. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +4 -2
  13. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  14. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +4 -2
  15. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
  16. package/lib/components/DeclarativeChart/DeclarativeChart.js +48 -25
  17. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  18. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +9 -4
  19. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  20. package/lib/components/DonutChart/DonutChart.js +3 -12
  21. package/lib/components/DonutChart/DonutChart.js.map +1 -1
  22. package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
  23. package/lib/components/DonutChart/Pie/Pie.js +4 -2
  24. package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
  25. package/lib/components/FunnelChart/FunnelChart.js +2 -9
  26. package/lib/components/FunnelChart/FunnelChart.js.map +1 -1
  27. package/lib/components/FunnelChart/FunnelChart.types.js.map +1 -1
  28. package/lib/components/GanttChart/GanttChart.js +3 -16
  29. package/lib/components/GanttChart/GanttChart.js.map +1 -1
  30. package/lib/components/GaugeChart/GaugeChart.js +2 -10
  31. package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
  32. package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
  33. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +2 -14
  34. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  35. package/lib/components/HeatMapChart/HeatMapChart.js +3 -16
  36. package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
  37. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +2 -14
  38. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  39. package/lib/components/Legends/Legends.types.js.map +1 -1
  40. package/lib/components/LineChart/LineChart.js +2 -14
  41. package/lib/components/LineChart/LineChart.js.map +1 -1
  42. package/lib/components/SankeyChart/SankeyChart.js +3 -9
  43. package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
  44. package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -1
  45. package/lib/components/ScatterChart/ScatterChart.js +3 -16
  46. package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
  47. package/lib/components/VerticalBarChart/VerticalBarChart.js +2 -14
  48. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  49. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +3 -15
  50. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  51. package/lib/types/DataPoint.js.map +1 -1
  52. package/lib/utilities/hooks.js +34 -0
  53. package/lib/utilities/hooks.js.map +1 -0
  54. package/lib/utilities/image-export-utils.js +115 -75
  55. package/lib/utilities/image-export-utils.js.map +1 -1
  56. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js +2 -16
  57. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -1
  58. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +1 -1
  59. package/lib-commonjs/components/AreaChart/AreaChart.js +2 -15
  60. package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -1
  61. package/lib-commonjs/components/ChartTable/ChartTable.js +3 -10
  62. package/lib-commonjs/components/ChartTable/ChartTable.js.map +1 -1
  63. package/lib-commonjs/components/ChartTable/ChartTable.types.js.map +1 -1
  64. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  65. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +4 -2
  66. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  67. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js +4 -2
  68. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
  69. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +48 -25
  70. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  71. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +9 -4
  72. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  73. package/lib-commonjs/components/DonutChart/DonutChart.js +2 -11
  74. package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
  75. package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
  76. package/lib-commonjs/components/DonutChart/Pie/Pie.js +4 -2
  77. package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
  78. package/lib-commonjs/components/FunnelChart/FunnelChart.js +2 -9
  79. package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -1
  80. package/lib-commonjs/components/FunnelChart/FunnelChart.types.js.map +1 -1
  81. package/lib-commonjs/components/GanttChart/GanttChart.js +2 -15
  82. package/lib-commonjs/components/GanttChart/GanttChart.js.map +1 -1
  83. package/lib-commonjs/components/GaugeChart/GaugeChart.js +2 -10
  84. package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
  85. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
  86. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +2 -14
  87. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  88. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +2 -15
  89. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
  90. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +2 -14
  91. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  92. package/lib-commonjs/components/Legends/Legends.types.js.map +1 -1
  93. package/lib-commonjs/components/LineChart/LineChart.js +2 -14
  94. package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
  95. package/lib-commonjs/components/SankeyChart/SankeyChart.js +3 -9
  96. package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
  97. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -1
  98. package/lib-commonjs/components/ScatterChart/ScatterChart.js +2 -15
  99. package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
  100. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +2 -14
  101. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  102. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +3 -15
  103. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  104. package/lib-commonjs/types/DataPoint.js.map +1 -1
  105. package/lib-commonjs/utilities/hooks.js +45 -0
  106. package/lib-commonjs/utilities/hooks.js.map +1 -0
  107. package/lib-commonjs/utilities/image-export-utils.js +116 -76
  108. package/lib-commonjs/utilities/image-export-utils.js.map +1 -1
  109. package/package.json +12 -12
@@ -1135,6 +1135,7 @@ export const transformPlotlyJsonToVSBCProps = (input, isMultiPlot, colorMap, col
1135
1135
  showYAxisLables: true,
1136
1136
  noOfCharsToTruncate: 20,
1137
1137
  showYAxisLablesTooltip: true,
1138
+ roundedTicks: true,
1138
1139
  ...getTitles(input.layout),
1139
1140
  ...getXAxisTickFormat(input.data[0], input.layout),
1140
1141
  ...yAxisTickFormat,
@@ -1882,7 +1883,7 @@ export const transformPlotlyJsonToHeatmapProps = (input, isMultiPlot, colorMap,
1882
1883
  };
1883
1884
  };
1884
1885
  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;
1886
+ 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
1887
  const { link, node } = input.data[0];
1887
1888
  var _link_value;
1888
1889
  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 +1899,7 @@ export const transformPlotlyJsonToSankeyProps = (input, isMultiPlot, colorMap, c
1898
1899
  })// Filter out negative nodes, unequal nodes and self-references (circular links)
1899
1900
  .filter((x)=>x !== null && x.source >= 0 && x.target >= 0 && x.source !== x.target);
1900
1901
  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);
1902
+ 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
1903
  const sankeyChartData = {
1902
1904
  nodes: (_node_label = node.label) === null || _node_label === void 0 ? void 0 : _node_label.map((label, index)=>{
1903
1905
  var _input_layout_template_layout, _input_layout_template, _input_layout;
@@ -1910,8 +1912,11 @@ export const transformPlotlyJsonToSankeyProps = (input, isMultiPlot, colorMap, c
1910
1912
  }),
1911
1913
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1912
1914
  links: validLinks.map((validLink, index)=>{
1915
+ var _input_layout_template_layout, _input_layout_template, _input_layout;
1916
+ 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
1917
  return {
1914
- ...validLink
1918
+ ...validLink,
1919
+ color
1915
1920
  };
1916
1921
  })
1917
1922
  };
@@ -1927,8 +1932,8 @@ export const transformPlotlyJsonToSankeyProps = (input, isMultiPlot, colorMap, c
1927
1932
  chartTitle,
1928
1933
  SankeyChartData: sankeyChartData
1929
1934
  },
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
1935
+ width: (_input_layout2 = input.layout) === null || _input_layout2 === void 0 ? void 0 : _input_layout2.width,
1936
+ 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
1937
  };
1933
1938
  };
1934
1939
  export const transformPlotlyJsonToGaugeProps = (input, isMultiPlot, colorMap, colorwayType, isDarkTheme)=>{