@fluentui/react-charting 5.23.28 → 5.23.29

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 (179) hide show
  1. package/CHANGELOG.json +34 -1
  2. package/CHANGELOG.md +14 -2
  3. package/dist/react-charting.d.ts +54 -0
  4. package/dist/react-charting.js +1 -1
  5. package/dist/react-charting.min.js +1 -1
  6. package/etc/react-charting.api.md +31 -0
  7. package/lib/DeclarativeChart.d.ts +1 -1
  8. package/lib/DeclarativeChart.js +1 -1
  9. package/lib/DeclarativeChart.js.map +1 -1
  10. package/lib/components/AreaChart/AreaChart.base.d.ts +4 -1
  11. package/lib/components/AreaChart/AreaChart.base.js +12 -2
  12. package/lib/components/AreaChart/AreaChart.base.js.map +1 -1
  13. package/lib/components/CommonComponents/CartesianChart.base.d.ts +3 -2
  14. package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
  15. package/lib/components/CommonComponents/CartesianChart.types.d.ts +11 -2
  16. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  17. package/lib/components/DeclarativeChart/DeclarativeChart.d.ts +13 -1
  18. package/lib/components/DeclarativeChart/DeclarativeChart.js +27 -22
  19. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  20. package/lib/components/DeclarativeChart/imageExporter.d.ts +10 -0
  21. package/lib/components/DeclarativeChart/imageExporter.js +222 -0
  22. package/lib/components/DeclarativeChart/imageExporter.js.map +1 -0
  23. package/lib/components/DeclarativeChart/index.d.ts +2 -0
  24. package/lib/components/DeclarativeChart/index.js +2 -0
  25. package/lib/components/DeclarativeChart/index.js.map +1 -0
  26. package/lib/components/DonutChart/DonutChart.base.d.ts +3 -1
  27. package/lib/components/DonutChart/DonutChart.base.js +9 -1
  28. package/lib/components/DonutChart/DonutChart.base.js.map +1 -1
  29. package/lib/components/DonutChart/DonutChart.types.d.ts +7 -2
  30. package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
  31. package/lib/components/GaugeChart/GaugeChart.base.d.ts +3 -1
  32. package/lib/components/GaugeChart/GaugeChart.base.js +9 -1
  33. package/lib/components/GaugeChart/GaugeChart.base.js.map +1 -1
  34. package/lib/components/GaugeChart/GaugeChart.types.d.ts +7 -2
  35. package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
  36. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +4 -1
  37. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +12 -2
  38. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  39. package/lib/components/HeatMapChart/HeatMapChart.base.d.ts +4 -2
  40. package/lib/components/HeatMapChart/HeatMapChart.base.js +12 -2
  41. package/lib/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  42. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +4 -2
  43. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +12 -2
  44. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  45. package/lib/components/LineChart/LineChart.base.d.ts +4 -1
  46. package/lib/components/LineChart/LineChart.base.js +12 -2
  47. package/lib/components/LineChart/LineChart.base.js.map +1 -1
  48. package/lib/components/SankeyChart/SankeyChart.base.d.ts +3 -3
  49. package/lib/components/SankeyChart/SankeyChart.base.js +2 -1
  50. package/lib/components/SankeyChart/SankeyChart.base.js.map +1 -1
  51. package/lib/components/SankeyChart/SankeyChart.types.d.ts +7 -2
  52. package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -1
  53. package/lib/components/VerticalBarChart/VerticalBarChart.base.d.ts +4 -1
  54. package/lib/components/VerticalBarChart/VerticalBarChart.base.js +12 -2
  55. package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  56. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +4 -1
  57. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +12 -2
  58. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  59. package/lib/index.d.ts +2 -2
  60. package/lib/index.js.map +1 -1
  61. package/lib/types/IDataPoint.d.ts +6 -0
  62. package/lib/types/IDataPoint.js.map +1 -1
  63. package/lib-amd/DeclarativeChart.d.ts +1 -1
  64. package/lib-amd/DeclarativeChart.js +2 -2
  65. package/lib-amd/DeclarativeChart.js.map +1 -1
  66. package/lib-amd/components/AreaChart/AreaChart.base.d.ts +4 -1
  67. package/lib-amd/components/AreaChart/AreaChart.base.js +11 -1
  68. package/lib-amd/components/AreaChart/AreaChart.base.js.map +1 -1
  69. package/lib-amd/components/CommonComponents/CartesianChart.base.d.ts +3 -2
  70. package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
  71. package/lib-amd/components/CommonComponents/CartesianChart.types.d.ts +11 -2
  72. package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +1 -1
  73. package/lib-amd/components/DeclarativeChart/DeclarativeChart.d.ts +13 -1
  74. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js +27 -24
  75. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  76. package/lib-amd/components/DeclarativeChart/imageExporter.d.ts +10 -0
  77. package/lib-amd/components/DeclarativeChart/imageExporter.js +227 -0
  78. package/lib-amd/components/DeclarativeChart/imageExporter.js.map +1 -0
  79. package/lib-amd/components/DeclarativeChart/index.d.ts +2 -0
  80. package/lib-amd/components/DeclarativeChart/index.js +6 -0
  81. package/lib-amd/components/DeclarativeChart/index.js.map +1 -0
  82. package/lib-amd/components/DonutChart/DonutChart.base.d.ts +3 -1
  83. package/lib-amd/components/DonutChart/DonutChart.base.js +8 -0
  84. package/lib-amd/components/DonutChart/DonutChart.base.js.map +1 -1
  85. package/lib-amd/components/DonutChart/DonutChart.types.d.ts +7 -2
  86. package/lib-amd/components/DonutChart/DonutChart.types.js.map +1 -1
  87. package/lib-amd/components/GaugeChart/GaugeChart.base.d.ts +3 -1
  88. package/lib-amd/components/GaugeChart/GaugeChart.base.js +8 -0
  89. package/lib-amd/components/GaugeChart/GaugeChart.base.js.map +1 -1
  90. package/lib-amd/components/GaugeChart/GaugeChart.types.d.ts +7 -2
  91. package/lib-amd/components/GaugeChart/GaugeChart.types.js.map +1 -1
  92. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +4 -1
  93. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +11 -1
  94. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  95. package/lib-amd/components/HeatMapChart/HeatMapChart.base.d.ts +4 -2
  96. package/lib-amd/components/HeatMapChart/HeatMapChart.base.js +11 -1
  97. package/lib-amd/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  98. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +4 -2
  99. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +11 -1
  100. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  101. package/lib-amd/components/LineChart/LineChart.base.d.ts +4 -1
  102. package/lib-amd/components/LineChart/LineChart.base.js +11 -1
  103. package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
  104. package/lib-amd/components/SankeyChart/SankeyChart.base.d.ts +3 -3
  105. package/lib-amd/components/SankeyChart/SankeyChart.base.js +1 -0
  106. package/lib-amd/components/SankeyChart/SankeyChart.base.js.map +1 -1
  107. package/lib-amd/components/SankeyChart/SankeyChart.types.d.ts +7 -2
  108. package/lib-amd/components/SankeyChart/SankeyChart.types.js.map +1 -1
  109. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.d.ts +4 -1
  110. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +11 -1
  111. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  112. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +4 -1
  113. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +11 -1
  114. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  115. package/lib-amd/index.d.ts +2 -2
  116. package/lib-amd/index.js.map +1 -1
  117. package/lib-amd/types/IDataPoint.d.ts +6 -0
  118. package/lib-amd/types/IDataPoint.js.map +1 -1
  119. package/lib-commonjs/DeclarativeChart.d.ts +1 -1
  120. package/lib-commonjs/DeclarativeChart.js +1 -1
  121. package/lib-commonjs/DeclarativeChart.js.map +1 -1
  122. package/lib-commonjs/components/AreaChart/AreaChart.base.d.ts +4 -1
  123. package/lib-commonjs/components/AreaChart/AreaChart.base.js +11 -1
  124. package/lib-commonjs/components/AreaChart/AreaChart.base.js.map +1 -1
  125. package/lib-commonjs/components/CommonComponents/CartesianChart.base.d.ts +3 -2
  126. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
  127. package/lib-commonjs/components/CommonComponents/CartesianChart.types.d.ts +11 -2
  128. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  129. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.d.ts +13 -1
  130. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +28 -24
  131. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  132. package/lib-commonjs/components/DeclarativeChart/imageExporter.d.ts +10 -0
  133. package/lib-commonjs/components/DeclarativeChart/imageExporter.js +226 -0
  134. package/lib-commonjs/components/DeclarativeChart/imageExporter.js.map +1 -0
  135. package/lib-commonjs/components/DeclarativeChart/index.d.ts +2 -0
  136. package/lib-commonjs/components/DeclarativeChart/index.js +5 -0
  137. package/lib-commonjs/components/DeclarativeChart/index.js.map +1 -0
  138. package/lib-commonjs/components/DonutChart/DonutChart.base.d.ts +3 -1
  139. package/lib-commonjs/components/DonutChart/DonutChart.base.js +8 -0
  140. package/lib-commonjs/components/DonutChart/DonutChart.base.js.map +1 -1
  141. package/lib-commonjs/components/DonutChart/DonutChart.types.d.ts +7 -2
  142. package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
  143. package/lib-commonjs/components/GaugeChart/GaugeChart.base.d.ts +3 -1
  144. package/lib-commonjs/components/GaugeChart/GaugeChart.base.js +8 -0
  145. package/lib-commonjs/components/GaugeChart/GaugeChart.base.js.map +1 -1
  146. package/lib-commonjs/components/GaugeChart/GaugeChart.types.d.ts +7 -2
  147. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
  148. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +4 -1
  149. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +11 -1
  150. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  151. package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.d.ts +4 -2
  152. package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js +11 -1
  153. package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  154. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +4 -2
  155. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +11 -1
  156. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  157. package/lib-commonjs/components/LineChart/LineChart.base.d.ts +4 -1
  158. package/lib-commonjs/components/LineChart/LineChart.base.js +11 -1
  159. package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
  160. package/lib-commonjs/components/SankeyChart/SankeyChart.base.d.ts +3 -3
  161. package/lib-commonjs/components/SankeyChart/SankeyChart.base.js +1 -0
  162. package/lib-commonjs/components/SankeyChart/SankeyChart.base.js.map +1 -1
  163. package/lib-commonjs/components/SankeyChart/SankeyChart.types.d.ts +7 -2
  164. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -1
  165. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.d.ts +4 -1
  166. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js +11 -1
  167. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  168. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +4 -1
  169. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +11 -1
  170. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  171. package/lib-commonjs/index.d.ts +2 -2
  172. package/lib-commonjs/index.js.map +1 -1
  173. package/lib-commonjs/types/IDataPoint.d.ts +6 -0
  174. package/lib-commonjs/types/IDataPoint.js.map +1 -1
  175. package/package.json +4 -4
  176. package/src/components/CommonComponents/CartesianChart.types.ts +13 -1
  177. package/src/components/DonutChart/DonutChart.types.ts +8 -2
  178. package/src/components/GaugeChart/GaugeChart.types.ts +8 -2
  179. package/src/components/SankeyChart/SankeyChart.types.ts +8 -2
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';
2
+ import { IRefObject, IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';
3
3
  import { ITheme, IStyle } from '@fluentui/react/lib/Styling';
4
4
  import { IOverflowSetProps } from '@fluentui/react/lib/OverflowSet';
5
5
  import { IFocusZoneProps, FocusZoneDirection } from '@fluentui/react-focus';
@@ -7,6 +7,7 @@ import { ICalloutProps } from '@fluentui/react/lib/Callout';
7
7
  import { ILegendsProps } from '../Legends/index';
8
8
  import {
9
9
  IAccessibilityProps,
10
+ IChart,
10
11
  IDataPoint,
11
12
  IGroupedVerticalBarChartData,
12
13
  IHeatMapChartDataPoint,
@@ -445,6 +446,12 @@ export interface ICartesianChartProps {
445
446
  * Used for enabling negative values in Y axis.
446
447
  */
447
448
  supportNegativeData?: boolean;
449
+
450
+ /**
451
+ * Optional callback to access the IChart interface. Use this instead of ref for accessing
452
+ * the public methods and properties of the component.
453
+ */
454
+ componentRef?: IRefObject<IChart>;
448
455
  }
449
456
 
450
457
  export interface IYValueHover {
@@ -690,4 +697,9 @@ export interface IModifiedCartesianChartProps extends ICartesianChartProps {
690
697
  isRtl: boolean,
691
698
  barWidth: number | undefined,
692
699
  ) => ScaleBand<string>;
700
+
701
+ /**
702
+ * Callback to access the public methods and properties of the component.
703
+ */
704
+ ref?: IRefObject<IChart>;
693
705
  }
@@ -1,8 +1,8 @@
1
1
  import { IStyle } from '@fluentui/react/lib/Styling';
2
- import { IRenderFunction, IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';
2
+ import { IRefObject, IRenderFunction, IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';
3
3
  import { ICartesianChartProps, ICartesianChartStyleProps } from '../CommonComponents/index';
4
4
  import { ICalloutProps } from '@fluentui/react/lib/Callout';
5
- import { IChartProps, IChartDataPoint } from './index';
5
+ import { IChartProps, IChartDataPoint, IChart } from './index';
6
6
 
7
7
  export interface IDonutChart {}
8
8
 
@@ -69,6 +69,12 @@ export interface IDonutChartProps extends ICartesianChartProps {
69
69
  * @default false
70
70
  */
71
71
  roundCorners?: boolean;
72
+
73
+ /**
74
+ * Optional callback to access the IChart interface. Use this instead of ref for accessing
75
+ * the public methods and properties of the component.
76
+ */
77
+ componentRef?: IRefObject<IChart>;
72
78
  }
73
79
 
74
80
  /**
@@ -1,7 +1,7 @@
1
1
  import { IStyle, ITheme } from '@fluentui/react/lib/Styling';
2
- import { IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';
2
+ import { IRefObject, IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';
3
3
  import { ILegendsProps } from '../Legends/index';
4
- import { IAccessibilityProps } from '../../types/index';
4
+ import { IAccessibilityProps, IChart } from '../../types/index';
5
5
  import { ICalloutProps } from '@fluentui/react/lib/Callout';
6
6
 
7
7
  /**
@@ -168,6 +168,12 @@ export interface IGaugeChartProps {
168
168
  * @default false
169
169
  */
170
170
  roundCorners?: boolean;
171
+
172
+ /**
173
+ * Optional callback to access the IChart interface. Use this instead of ref for accessing
174
+ * the public methods and properties of the component.
175
+ */
176
+ componentRef?: IRefObject<IChart>;
171
177
  }
172
178
 
173
179
  /**
@@ -1,6 +1,6 @@
1
1
  import { IStyle, ITheme } from '@fluentui/react/lib/Styling';
2
- import { IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';
3
- import { IChartProps } from '../../types/IDataPoint';
2
+ import { IRefObject, IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';
3
+ import { IChart, IChartProps } from '../../types/IDataPoint';
4
4
 
5
5
  export type { IChartProps, IDataPoint, ISankeyChartData } from '../../types/IDataPoint';
6
6
 
@@ -84,6 +84,12 @@ export interface ISankeyChartProps {
84
84
  * @default true
85
85
  */
86
86
  enableReflow?: boolean;
87
+
88
+ /**
89
+ * Optional callback to access the IChart interface. Use this instead of ref for accessing
90
+ * the public methods and properties of the component.
91
+ */
92
+ componentRef?: IRefObject<IChart>;
87
93
  }
88
94
 
89
95
  /**