@fluentui/react-charts 9.3.25 → 9.3.27

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 (80) hide show
  1. package/CHANGELOG.md +33 -2
  2. package/dist/index.d.cts +45 -5
  3. package/dist/index.d.ts +45 -5
  4. package/lib/components/AreaChart/AreaChart.js +3 -3
  5. package/lib/components/AreaChart/AreaChart.js.map +1 -1
  6. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  7. package/lib/components/DeclarativeChart/DeclarativeChart.js +1 -1
  8. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  9. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +5 -4
  10. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  11. package/lib/components/FunnelChart/FunnelChart.js +1 -1
  12. package/lib/components/FunnelChart/FunnelChart.js.map +1 -1
  13. package/lib/components/GanttChart/GanttChart.js +2 -2
  14. package/lib/components/GanttChart/GanttChart.js.map +1 -1
  15. package/lib/components/GaugeChart/GaugeChart.js +22 -10
  16. package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
  17. package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
  18. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +3 -3
  19. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  20. package/lib/components/HeatMapChart/HeatMapChart.js +5 -5
  21. package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
  22. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +1 -1
  23. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  24. package/lib/components/LineChart/LineChart.js +1 -1
  25. package/lib/components/LineChart/LineChart.js.map +1 -1
  26. package/lib/components/PolarChart/PolarChart.js +1 -1
  27. package/lib/components/PolarChart/PolarChart.js.map +1 -1
  28. package/lib/components/SankeyChart/SankeyChart.js +7 -7
  29. package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
  30. package/lib/components/ScatterChart/ScatterChart.js +1 -1
  31. package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
  32. package/lib/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.js +2 -1
  33. package/lib/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.js.map +1 -1
  34. package/lib/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js +8 -5
  35. package/lib/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js.map +1 -1
  36. package/lib/components/VerticalBarChart/VerticalBarChart.js +1 -1
  37. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  38. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +2 -2
  39. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  40. package/lib/utilities/utilities.js +7 -3
  41. package/lib/utilities/utilities.js.map +1 -1
  42. package/lib-commonjs/components/AreaChart/AreaChart.cjs +3 -3
  43. package/lib-commonjs/components/AreaChart/AreaChart.cjs.map +1 -1
  44. package/lib-commonjs/components/CommonComponents/CartesianChart.types.cjs.map +1 -1
  45. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.cjs +1 -1
  46. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.cjs.map +1 -1
  47. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.cjs +5 -4
  48. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.cjs.map +1 -1
  49. package/lib-commonjs/components/FunnelChart/FunnelChart.cjs +1 -1
  50. package/lib-commonjs/components/FunnelChart/FunnelChart.cjs.map +1 -1
  51. package/lib-commonjs/components/GanttChart/GanttChart.cjs +2 -2
  52. package/lib-commonjs/components/GanttChart/GanttChart.cjs.map +1 -1
  53. package/lib-commonjs/components/GaugeChart/GaugeChart.cjs +22 -10
  54. package/lib-commonjs/components/GaugeChart/GaugeChart.cjs.map +1 -1
  55. package/lib-commonjs/components/GaugeChart/GaugeChart.types.cjs.map +1 -1
  56. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.cjs +3 -3
  57. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.cjs.map +1 -1
  58. package/lib-commonjs/components/HeatMapChart/HeatMapChart.cjs +5 -5
  59. package/lib-commonjs/components/HeatMapChart/HeatMapChart.cjs.map +1 -1
  60. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.cjs +1 -1
  61. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.cjs.map +1 -1
  62. package/lib-commonjs/components/LineChart/LineChart.cjs +1 -1
  63. package/lib-commonjs/components/LineChart/LineChart.cjs.map +1 -1
  64. package/lib-commonjs/components/PolarChart/PolarChart.cjs +1 -1
  65. package/lib-commonjs/components/PolarChart/PolarChart.cjs.map +1 -1
  66. package/lib-commonjs/components/SankeyChart/SankeyChart.cjs +7 -7
  67. package/lib-commonjs/components/SankeyChart/SankeyChart.cjs.map +1 -1
  68. package/lib-commonjs/components/ScatterChart/ScatterChart.cjs +1 -1
  69. package/lib-commonjs/components/ScatterChart/ScatterChart.cjs.map +1 -1
  70. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.cjs +2 -1
  71. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.cjs.map +1 -1
  72. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.cjs +8 -5
  73. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.cjs.map +1 -1
  74. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.cjs +1 -1
  75. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.cjs.map +1 -1
  76. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.cjs +2 -2
  77. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.cjs.map +1 -1
  78. package/lib-commonjs/utilities/utilities.cjs +7 -3
  79. package/lib-commonjs/utilities/utilities.cjs.map +1 -1
  80. package/package.json +9 -9
package/CHANGELOG.md CHANGED
@@ -1,12 +1,43 @@
1
1
  # Change Log - @fluentui/react-charts
2
2
 
3
- <!-- This log was last generated on Mon, 24 Aug 2026 08:15:11 GMT and should not be manually modified. -->
3
+ <!-- This log was last generated on Wed, 23 Sep 2026 09:03:16 GMT and should not be manually modified. -->
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.3.27](https://github.com/microsoft/fluentui/tree/@fluentui/react-charts_v9.3.27)
8
+
9
+ Wed, 23 Sep 2026 09:03:16 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-charts_v9.3.26..@fluentui/react-charts_v9.3.27)
11
+
12
+ ### Patches
13
+
14
+ - Bump @fluentui/react-popover to v9.14.9 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
15
+ - Bump @fluentui/react-tooltip to v9.10.7 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
16
+
17
+ ## [9.3.26](https://github.com/microsoft/fluentui/tree/@fluentui/react-charts_v9.3.26)
18
+
19
+ Tue, 22 Sep 2026 11:25:39 GMT
20
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-charts_v9.3.25..@fluentui/react-charts_v9.3.26)
21
+
22
+ ### Patches
23
+
24
+ - feat: add custom callout rendering to GaugeChart ([PR #36730](https://github.com/microsoft/fluentui/pull/36730) by atisjai@microsoft.com)
25
+ - fix(react-charts): prevent prototype pollution in chart data grouping ([PR #36715](https://github.com/microsoft/fluentui/pull/36715) by v-baambati@microsoft.com)
26
+ - fixed prototypr issue in vegalite adapter ([PR #36743](https://github.com/microsoft/fluentui/pull/36743) by v-baambati@microsoft.com)
27
+ - Added test cases prototype pollution fix ([PR #36737](https://github.com/microsoft/fluentui/pull/36737) by v-baambati@microsoft.com)
28
+ - feat: allow a function for the cartesian tickFormat so the numeric value axis can render a literal % or route through an app/i18n formatter (string behavior unchanged) ([PR #36369](https://github.com/microsoft/fluentui/pull/36369) by michael@xerilium.com)
29
+ - Bump @fluentui/react-button to v9.11.1 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
30
+ - Bump @fluentui/react-jsx-runtime to v9.4.6 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
31
+ - Bump @fluentui/react-overflow to v9.9.4 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
32
+ - Bump @fluentui/react-popover to v9.14.8 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
33
+ - Bump @fluentui/react-shared-contexts to v9.26.4 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
34
+ - Bump @fluentui/react-tabster to v9.26.18 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
35
+ - Bump @fluentui/react-tooltip to v9.10.6 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
36
+ - Bump @fluentui/react-utilities to v9.26.7 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
37
+
7
38
  ## [9.3.25](https://github.com/microsoft/fluentui/tree/@fluentui/react-charts_v9.3.25)
8
39
 
9
- Mon, 24 Aug 2026 08:15:11 GMT
40
+ Mon, 24 Aug 2026 16:40:04 GMT
10
41
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-charts_v9.3.24..@fluentui/react-charts_v9.3.25)
11
42
 
12
43
  ### Patches
package/dist/index.d.cts CHANGED
@@ -387,11 +387,16 @@ export declare interface CartesianChartProps {
387
387
  */
388
388
  tickValues?: number[] | Date[] | string[] | undefined;
389
389
  /**
390
- * the format for the data on x-axis. For date object this can be specified to your requirement. Eg: '%m/%d', '%d'
391
- * Please look at https://github.com/d3/d3-time-format for all the formats supported for date axis
392
- * Only applicable for date axis. For y-axis format use yAxisTickFormat prop.
390
+ * Format for x-axis tick labels. Accepts either a d3-format string or a `(value) => string` function.
391
+ *
392
+ * String: a d3-time-format specifier for date axes (e.g. `'%m/%d'`) or a d3-format specifier for
393
+ * numeric axes. See https://github.com/d3/d3-time-format and https://github.com/d3/d3-format.
394
+ *
395
+ * Function: formats the tick value directly — useful when a d3-format string is insufficient,
396
+ * e.g. appending a literal `%` to an already-0–100 axis (d3's `%` type multiplies by 100),
397
+ * or routing ticks through an app/i18n formatter. For y-axis format use `yAxisTickFormat`.
393
398
  */
394
- tickFormat?: string;
399
+ tickFormat?: string | ((value: number | Date) => string);
395
400
  /**
396
401
  * Width of line stroke
397
402
  */
@@ -1839,6 +1844,37 @@ export declare interface GanttChartStyles extends CartesianChartStyles {
1839
1844
 
1840
1845
  export declare const GaugeChart: React_2.FunctionComponent<GaugeChartProps>;
1841
1846
 
1847
+ /**
1848
+ * Data provided to a custom GaugeChart callout renderer.
1849
+ * {@docCategory GaugeChart}
1850
+ */
1851
+ export declare interface GaugeChartCalloutData {
1852
+ /**
1853
+ * Legend of the segment or gauge element that opened the callout.
1854
+ */
1855
+ legend: string;
1856
+ /**
1857
+ * Current value of the gauge.
1858
+ */
1859
+ chartValue: number;
1860
+ /**
1861
+ * Minimum value of the gauge.
1862
+ */
1863
+ minValue: number;
1864
+ /**
1865
+ * Maximum value of the gauge.
1866
+ */
1867
+ maxValue: number;
1868
+ /**
1869
+ * Formatted current value displayed in the default callout.
1870
+ */
1871
+ chartValueLabel: string;
1872
+ /**
1873
+ * Segment values displayed in the default callout.
1874
+ */
1875
+ segmentValues: YValueHover[];
1876
+ }
1877
+
1842
1878
  /**
1843
1879
  * Gauge Chart properties
1844
1880
  * {@docCategory GaugeChart}
@@ -1914,6 +1950,10 @@ export declare interface GaugeChartProps {
1914
1950
  * Props for the callout in the chart
1915
1951
  */
1916
1952
  calloutProps?: Partial<ChartPopoverProps>;
1953
+ /**
1954
+ * Defines a custom callout renderer. The second argument can be used to render the default callout content.
1955
+ */
1956
+ onRenderCallout?: RenderFunction<GaugeChartCalloutData>;
1917
1957
  /**
1918
1958
  * Specifies the variant of GaugeChart to be rendered
1919
1959
  * @defaultvalue GaugeChartVariant.MultipleSegments
@@ -3510,7 +3550,7 @@ export declare interface ModifiedCartesianChartProps extends CartesianChartProps
3510
3550
  */
3511
3551
  tickParams?: {
3512
3552
  tickValues?: number[] | Date[] | string[];
3513
- tickFormat?: string;
3553
+ tickFormat?: string | ((value: number | Date) => string);
3514
3554
  };
3515
3555
  /**
3516
3556
  * it's padding between bar's or lines in the graph
package/dist/index.d.ts CHANGED
@@ -387,11 +387,16 @@ export declare interface CartesianChartProps {
387
387
  */
388
388
  tickValues?: number[] | Date[] | string[] | undefined;
389
389
  /**
390
- * the format for the data on x-axis. For date object this can be specified to your requirement. Eg: '%m/%d', '%d'
391
- * Please look at https://github.com/d3/d3-time-format for all the formats supported for date axis
392
- * Only applicable for date axis. For y-axis format use yAxisTickFormat prop.
390
+ * Format for x-axis tick labels. Accepts either a d3-format string or a `(value) => string` function.
391
+ *
392
+ * String: a d3-time-format specifier for date axes (e.g. `'%m/%d'`) or a d3-format specifier for
393
+ * numeric axes. See https://github.com/d3/d3-time-format and https://github.com/d3/d3-format.
394
+ *
395
+ * Function: formats the tick value directly — useful when a d3-format string is insufficient,
396
+ * e.g. appending a literal `%` to an already-0–100 axis (d3's `%` type multiplies by 100),
397
+ * or routing ticks through an app/i18n formatter. For y-axis format use `yAxisTickFormat`.
393
398
  */
394
- tickFormat?: string;
399
+ tickFormat?: string | ((value: number | Date) => string);
395
400
  /**
396
401
  * Width of line stroke
397
402
  */
@@ -1839,6 +1844,37 @@ export declare interface GanttChartStyles extends CartesianChartStyles {
1839
1844
 
1840
1845
  export declare const GaugeChart: React_2.FunctionComponent<GaugeChartProps>;
1841
1846
 
1847
+ /**
1848
+ * Data provided to a custom GaugeChart callout renderer.
1849
+ * {@docCategory GaugeChart}
1850
+ */
1851
+ export declare interface GaugeChartCalloutData {
1852
+ /**
1853
+ * Legend of the segment or gauge element that opened the callout.
1854
+ */
1855
+ legend: string;
1856
+ /**
1857
+ * Current value of the gauge.
1858
+ */
1859
+ chartValue: number;
1860
+ /**
1861
+ * Minimum value of the gauge.
1862
+ */
1863
+ minValue: number;
1864
+ /**
1865
+ * Maximum value of the gauge.
1866
+ */
1867
+ maxValue: number;
1868
+ /**
1869
+ * Formatted current value displayed in the default callout.
1870
+ */
1871
+ chartValueLabel: string;
1872
+ /**
1873
+ * Segment values displayed in the default callout.
1874
+ */
1875
+ segmentValues: YValueHover[];
1876
+ }
1877
+
1842
1878
  /**
1843
1879
  * Gauge Chart properties
1844
1880
  * {@docCategory GaugeChart}
@@ -1914,6 +1950,10 @@ export declare interface GaugeChartProps {
1914
1950
  * Props for the callout in the chart
1915
1951
  */
1916
1952
  calloutProps?: Partial<ChartPopoverProps>;
1953
+ /**
1954
+ * Defines a custom callout renderer. The second argument can be used to render the default callout content.
1955
+ */
1956
+ onRenderCallout?: RenderFunction<GaugeChartCalloutData>;
1917
1957
  /**
1918
1958
  * Specifies the variant of GaugeChart to be rendered
1919
1959
  * @defaultvalue GaugeChartVariant.MultipleSegments
@@ -3510,7 +3550,7 @@ export declare interface ModifiedCartesianChartProps extends CartesianChartProps
3510
3550
  */
3511
3551
  tickParams?: {
3512
3552
  tickValues?: number[] | Date[] | string[];
3513
- tickFormat?: string;
3553
+ tickFormat?: string | ((value: number | Date) => string);
3514
3554
  };
3515
3555
  /**
3516
3556
  * it's padding between bar's or lines in the graph
@@ -262,7 +262,7 @@ export const AreaChart = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
262
262
  opacity.push(singleChartPoint.opacity || 1);
263
263
  allChartPoints.push(...singleChartPoint.data);
264
264
  });
265
- const mapOfXvalToListOfDataPoints = {};
265
+ const mapOfXvalToListOfDataPoints = Object.create(null);
266
266
  allChartPoints.forEach((dataPoint)=>{
267
267
  const xValue = dataPoint.x instanceof Date ? dataPoint.x.toLocaleString() : dataPoint.x;
268
268
  // map of x value to the list of data points which share the same x value .
@@ -362,7 +362,7 @@ export const AreaChart = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
362
362
  function _createDatasetForXCoordinateWithMultipleYValues(allChartPoints) {
363
363
  const dataSet = [];
364
364
  // Group data points by x-axis value
365
- const groupedData = {};
365
+ const groupedData = Object.create(null);
366
366
  allChartPoints.forEach((dataPoint)=>{
367
367
  const xValue = dataPoint.x instanceof Date ? dataPoint.x.toLocaleString() : dataPoint.x;
368
368
  if (!groupedData[xValue]) {
@@ -810,7 +810,7 @@ export const AreaChart = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
810
810
  return false;
811
811
  }
812
812
  for (const item of lineChartData){
813
- const xValueMap = {};
813
+ const xValueMap = Object.create(null);
814
814
  for (const point of item.data){
815
815
  const xValue = point.x instanceof Date ? point.x.toLocaleString() : point.x;
816
816
  if (!xValueMap[xValue]) {