@fluentui/react-charting 5.24.1 → 5.24.3

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 (154) hide show
  1. package/CHANGELOG.json +61 -1
  2. package/CHANGELOG.md +25 -2
  3. package/dist/react-charting.d.ts +171 -33
  4. package/dist/react-charting.js +1 -1
  5. package/dist/react-charting.min.js +1 -1
  6. package/etc/react-charting.api.md +60 -10
  7. package/lib/ScatterChart.d.ts +1 -0
  8. package/lib/ScatterChart.js +2 -0
  9. package/lib/ScatterChart.js.map +1 -0
  10. package/lib/components/CommonComponents/CartesianChart.base.js +45 -9
  11. package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
  12. package/lib/components/CommonComponents/CartesianChart.styles.js +48 -26
  13. package/lib/components/CommonComponents/CartesianChart.styles.js.map +1 -1
  14. package/lib/components/CommonComponents/CartesianChart.types.d.ts +21 -1
  15. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  16. package/lib/components/DeclarativeChart/DeclarativeChart.js +157 -78
  17. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  18. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +29 -13
  19. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +351 -95
  20. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  21. package/lib/components/LineChart/LineChart.base.js +23 -17
  22. package/lib/components/LineChart/LineChart.base.js.map +1 -1
  23. package/lib/components/LineChart/LineChart.styles.js +9 -0
  24. package/lib/components/LineChart/LineChart.styles.js.map +1 -1
  25. package/lib/components/LineChart/LineChart.types.d.ts +2 -0
  26. package/lib/components/LineChart/LineChart.types.js.map +1 -1
  27. package/lib/components/ScatterChart/ScatterChart.base.d.ts +7 -0
  28. package/lib/components/ScatterChart/ScatterChart.base.js +453 -0
  29. package/lib/components/ScatterChart/ScatterChart.base.js.map +1 -0
  30. package/lib/components/ScatterChart/ScatterChart.d.ts +7 -0
  31. package/lib/components/ScatterChart/ScatterChart.js +10 -0
  32. package/lib/components/ScatterChart/ScatterChart.js.map +1 -0
  33. package/lib/components/ScatterChart/ScatterChart.styles.d.ts +2 -0
  34. package/lib/components/ScatterChart/ScatterChart.styles.js +7 -0
  35. package/lib/components/ScatterChart/ScatterChart.styles.js.map +1 -0
  36. package/lib/components/ScatterChart/ScatterChart.types.d.ts +42 -0
  37. package/lib/components/ScatterChart/ScatterChart.types.js +2 -0
  38. package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -0
  39. package/lib/components/ScatterChart/index.d.ts +2 -0
  40. package/lib/components/ScatterChart/index.js +3 -0
  41. package/lib/components/ScatterChart/index.js.map +1 -0
  42. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +8 -2
  43. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  44. package/lib/index.d.ts +3 -1
  45. package/lib/index.js +1 -0
  46. package/lib/index.js.map +1 -1
  47. package/lib/types/IDataPoint.d.ts +77 -11
  48. package/lib/types/IDataPoint.js.map +1 -1
  49. package/lib/utilities/SVGTooltipText.d.ts +4 -0
  50. package/lib/utilities/SVGTooltipText.js +1 -2
  51. package/lib/utilities/SVGTooltipText.js.map +1 -1
  52. package/lib/utilities/utilities.d.ts +27 -3
  53. package/lib/utilities/utilities.js +102 -1
  54. package/lib/utilities/utilities.js.map +1 -1
  55. package/lib-amd/ScatterChart.d.ts +1 -0
  56. package/lib-amd/ScatterChart.js +6 -0
  57. package/lib-amd/ScatterChart.js.map +1 -0
  58. package/lib-amd/components/CommonComponents/CartesianChart.base.js +45 -9
  59. package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
  60. package/lib-amd/components/CommonComponents/CartesianChart.styles.js +48 -26
  61. package/lib-amd/components/CommonComponents/CartesianChart.styles.js.map +1 -1
  62. package/lib-amd/components/CommonComponents/CartesianChart.types.d.ts +21 -1
  63. package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +1 -1
  64. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js +155 -78
  65. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  66. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +29 -13
  67. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +362 -102
  68. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  69. package/lib-amd/components/LineChart/LineChart.base.js +23 -17
  70. package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
  71. package/lib-amd/components/LineChart/LineChart.styles.js +9 -1
  72. package/lib-amd/components/LineChart/LineChart.styles.js.map +1 -1
  73. package/lib-amd/components/LineChart/LineChart.types.d.ts +2 -0
  74. package/lib-amd/components/LineChart/LineChart.types.js.map +1 -1
  75. package/lib-amd/components/ScatterChart/ScatterChart.base.d.ts +7 -0
  76. package/lib-amd/components/ScatterChart/ScatterChart.base.js +447 -0
  77. package/lib-amd/components/ScatterChart/ScatterChart.base.js.map +1 -0
  78. package/lib-amd/components/ScatterChart/ScatterChart.d.ts +7 -0
  79. package/lib-amd/components/ScatterChart/ScatterChart.js +12 -0
  80. package/lib-amd/components/ScatterChart/ScatterChart.js.map +1 -0
  81. package/lib-amd/components/ScatterChart/ScatterChart.styles.d.ts +2 -0
  82. package/lib-amd/components/ScatterChart/ScatterChart.styles.js +12 -0
  83. package/lib-amd/components/ScatterChart/ScatterChart.styles.js.map +1 -0
  84. package/lib-amd/components/ScatterChart/ScatterChart.types.d.ts +42 -0
  85. package/lib-amd/components/ScatterChart/ScatterChart.types.js +5 -0
  86. package/lib-amd/components/ScatterChart/ScatterChart.types.js.map +1 -0
  87. package/lib-amd/components/ScatterChart/index.d.ts +2 -0
  88. package/lib-amd/components/ScatterChart/index.js +7 -0
  89. package/lib-amd/components/ScatterChart/index.js.map +1 -0
  90. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +8 -2
  91. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  92. package/lib-amd/index.d.ts +3 -1
  93. package/lib-amd/index.js +3 -2
  94. package/lib-amd/index.js.map +1 -1
  95. package/lib-amd/types/IDataPoint.d.ts +77 -11
  96. package/lib-amd/types/IDataPoint.js.map +1 -1
  97. package/lib-amd/utilities/SVGTooltipText.d.ts +4 -0
  98. package/lib-amd/utilities/SVGTooltipText.js +1 -2
  99. package/lib-amd/utilities/SVGTooltipText.js.map +1 -1
  100. package/lib-amd/utilities/utilities.d.ts +27 -3
  101. package/lib-amd/utilities/utilities.js +106 -2
  102. package/lib-amd/utilities/utilities.js.map +1 -1
  103. package/lib-commonjs/ScatterChart.d.ts +1 -0
  104. package/lib-commonjs/ScatterChart.js +5 -0
  105. package/lib-commonjs/ScatterChart.js.map +1 -0
  106. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +45 -9
  107. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
  108. package/lib-commonjs/components/CommonComponents/CartesianChart.styles.js +48 -26
  109. package/lib-commonjs/components/CommonComponents/CartesianChart.styles.js.map +1 -1
  110. package/lib-commonjs/components/CommonComponents/CartesianChart.types.d.ts +21 -1
  111. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  112. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +157 -78
  113. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  114. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +29 -13
  115. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +361 -102
  116. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  117. package/lib-commonjs/components/LineChart/LineChart.base.js +23 -17
  118. package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
  119. package/lib-commonjs/components/LineChart/LineChart.styles.js +9 -0
  120. package/lib-commonjs/components/LineChart/LineChart.styles.js.map +1 -1
  121. package/lib-commonjs/components/LineChart/LineChart.types.d.ts +2 -0
  122. package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -1
  123. package/lib-commonjs/components/ScatterChart/ScatterChart.base.d.ts +7 -0
  124. package/lib-commonjs/components/ScatterChart/ScatterChart.base.js +456 -0
  125. package/lib-commonjs/components/ScatterChart/ScatterChart.base.js.map +1 -0
  126. package/lib-commonjs/components/ScatterChart/ScatterChart.d.ts +7 -0
  127. package/lib-commonjs/components/ScatterChart/ScatterChart.js +13 -0
  128. package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -0
  129. package/lib-commonjs/components/ScatterChart/ScatterChart.styles.d.ts +2 -0
  130. package/lib-commonjs/components/ScatterChart/ScatterChart.styles.js +11 -0
  131. package/lib-commonjs/components/ScatterChart/ScatterChart.styles.js.map +1 -0
  132. package/lib-commonjs/components/ScatterChart/ScatterChart.types.d.ts +42 -0
  133. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js +3 -0
  134. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -0
  135. package/lib-commonjs/components/ScatterChart/index.d.ts +2 -0
  136. package/lib-commonjs/components/ScatterChart/index.js +6 -0
  137. package/lib-commonjs/components/ScatterChart/index.js.map +1 -0
  138. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +8 -2
  139. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  140. package/lib-commonjs/index.d.ts +3 -1
  141. package/lib-commonjs/index.js +3 -1
  142. package/lib-commonjs/index.js.map +1 -1
  143. package/lib-commonjs/types/IDataPoint.d.ts +77 -11
  144. package/lib-commonjs/types/IDataPoint.js.map +1 -1
  145. package/lib-commonjs/utilities/SVGTooltipText.d.ts +4 -0
  146. package/lib-commonjs/utilities/SVGTooltipText.js +1 -2
  147. package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
  148. package/lib-commonjs/utilities/utilities.d.ts +27 -3
  149. package/lib-commonjs/utilities/utilities.js +106 -2
  150. package/lib-commonjs/utilities/utilities.js.map +1 -1
  151. package/package.json +2 -2
  152. package/src/components/CommonComponents/CartesianChart.types.ts +25 -1
  153. package/src/components/LineChart/LineChart.types.ts +4 -1
  154. package/src/components/ScatterChart/ScatterChart.types.ts +61 -0
@@ -159,10 +159,15 @@ export interface ICartesianChartStyles {
159
159
  tooltip?: IStyle;
160
160
 
161
161
  /**
162
- * styles for tooltip
162
+ * styles for axis title
163
163
  */
164
164
  axisTitle?: IStyle;
165
165
 
166
+ /**
167
+ * styles for axis annotation
168
+ */
169
+ axisAnnotation?: IStyle;
170
+
166
171
  /**
167
172
  * Style for the chart Title.
168
173
  */
@@ -182,6 +187,11 @@ export interface ICartesianChartStyles {
182
187
  * Styles for the chart wrapper div
183
188
  */
184
189
  chartWrapper?: IStyle;
190
+
191
+ /**
192
+ * Styles for the svg tooltip
193
+ */
194
+ svgTooltip?: IStyle;
185
195
  }
186
196
 
187
197
  /**
@@ -469,6 +479,20 @@ export interface ICartesianChartProps {
469
479
  * @default false
470
480
  */
471
481
  hideTickOverlap?: boolean;
482
+
483
+ /**
484
+ * Prop to set the x axis annotation. Used to display additional information on the x-axis.
485
+ * This is shown on the top of the chart.
486
+ * @default undefined
487
+ */
488
+ xAxisAnnotation?: string;
489
+
490
+ /**
491
+ * Prop to set the y axis annotation. Used to display additional information on the y-axis.
492
+ * This is shown on the right side of the chart. Not shown if secondary y-axis is enabled.
493
+ * @default undefined
494
+ */
495
+ yAxisAnnotation?: string;
472
496
  }
473
497
 
474
498
  export interface IYValueHover {
@@ -14,6 +14,7 @@ import {
14
14
  ICartesianChartStyles,
15
15
  IChildProps,
16
16
  } from '../CommonComponents/index';
17
+ import { IStyle } from '@fluentui/react/lib/Styling';
17
18
 
18
19
  export type { IChildProps, ILineChartPoints, IMargins, IBasestate, IRefArrayData };
19
20
 
@@ -111,7 +112,9 @@ export interface IEventsAnnotationProps {
111
112
  * Line Chart styles
112
113
  * {@docCategory LineChart}
113
114
  */
114
- export interface ILineChartStyles extends ICartesianChartStyles {}
115
+ export interface ILineChartStyles extends ICartesianChartStyles {
116
+ markerLabel?: IStyle;
117
+ }
115
118
 
116
119
  /**
117
120
  * Line Chart style properties
@@ -0,0 +1,61 @@
1
+ /* eslint-disable @typescript-eslint/naming-convention */
2
+ import { IRenderFunction } from '@fluentui/react/lib/Utilities';
3
+ import {
4
+ IChartProps,
5
+ ILineChartPoints,
6
+ IMargins,
7
+ IBasestate,
8
+ IRefArrayData,
9
+ ICustomizedCalloutData,
10
+ } from '../../types/index';
11
+ import {
12
+ ICartesianChartProps,
13
+ ICartesianChartStyleProps,
14
+ ICartesianChartStyles,
15
+ IChildProps,
16
+ } from '../CommonComponents/index';
17
+
18
+ export type { IChildProps, ILineChartPoints, IMargins, IBasestate, IRefArrayData };
19
+
20
+ /**
21
+ * Line Chart properties
22
+ * {@docCategory LineChart}
23
+ */
24
+ export interface IScatterChartProps extends ICartesianChartProps {
25
+ /**
26
+ * Data to render in the chart.
27
+ */
28
+ data: IChartProps;
29
+
30
+ /**
31
+ * Call to provide customized styling that will layer on top of the variant rules.
32
+ */
33
+ styles?: IScatterChartStyles;
34
+
35
+ /**
36
+ * Define a custom callout renderer for a data point
37
+ */
38
+ onRenderCalloutPerDataPoint?: IRenderFunction<ICustomizedCalloutData>;
39
+
40
+ /**
41
+ * Callback for getting callout description message
42
+ */
43
+ getCalloutDescriptionMessage?: (calloutDataProps: ICustomizedCalloutData) => string | undefined;
44
+
45
+ /**
46
+ * The prop used to define the culture to localized the numbers
47
+ */
48
+ culture?: string;
49
+ }
50
+
51
+ /**
52
+ * Scatter Chart styles
53
+ * {@docCategory ScatterChart}
54
+ */
55
+ export interface IScatterChartStyles extends ICartesianChartStyles {}
56
+
57
+ /**
58
+ * Scatter Chart style properties
59
+ * {@docCategory ScatterChart}
60
+ */
61
+ export interface IScatterChartStyleProps extends ICartesianChartStyleProps {}