@fluentui/react-charting 5.18.8 → 5.18.10

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 (263) hide show
  1. package/CHANGELOG.json +55 -1
  2. package/CHANGELOG.md +24 -2
  3. package/README.md +48 -80
  4. package/dist/react-charting.d.ts +277 -36
  5. package/dist/react-charting.js +1 -1
  6. package/dist/react-charting.min.js +1 -1
  7. package/docs/TechnicalDetails.md +88 -0
  8. package/etc/react-charting.api.md +41 -41
  9. package/lib/components/AreaChart/AreaChart.types.d.ts +9 -1
  10. package/lib/components/AreaChart/AreaChart.types.js.map +1 -1
  11. package/lib/components/CommonComponents/CartesianChart.base.js +2 -1
  12. package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
  13. package/lib/components/CommonComponents/CartesianChart.d.ts +4 -0
  14. package/lib/components/CommonComponents/CartesianChart.js +4 -0
  15. package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
  16. package/lib/components/CommonComponents/CartesianChart.types.d.ts +12 -0
  17. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  18. package/lib/components/DonutChart/DonutChart.types.d.ts +9 -1
  19. package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
  20. package/lib/components/GaugeChart/GaugeChart.types.d.ts +13 -2
  21. package/lib/components/GaugeChart/GaugeChart.types.js +3 -0
  22. package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
  23. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.d.ts +9 -1
  24. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  25. package/lib/components/HeatMapChart/HeatMapChart.types.d.ts +9 -1
  26. package/lib/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  27. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.d.ts +13 -1
  28. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js +3 -0
  29. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
  30. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.d.ts +9 -1
  31. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  32. package/lib/components/Legends/Legends.d.ts +1 -1
  33. package/lib/components/Legends/Legends.js +1 -1
  34. package/lib/components/Legends/Legends.js.map +1 -1
  35. package/lib/components/Legends/Legends.types.d.ts +14 -8
  36. package/lib/components/Legends/Legends.types.js.map +1 -1
  37. package/lib/components/LineChart/LineChart.d.ts +1 -1
  38. package/lib/components/LineChart/LineChart.js +1 -1
  39. package/lib/components/LineChart/LineChart.js.map +1 -1
  40. package/lib/components/LineChart/LineChart.types.d.ts +18 -1
  41. package/lib/components/LineChart/LineChart.types.js.map +1 -1
  42. package/lib/components/PieChart/PieChart.d.ts +1 -1
  43. package/lib/components/PieChart/PieChart.js +1 -1
  44. package/lib/components/PieChart/PieChart.js.map +1 -1
  45. package/lib/components/PieChart/PieChart.types.d.ts +9 -1
  46. package/lib/components/PieChart/PieChart.types.js.map +1 -1
  47. package/lib/components/SankeyChart/SankeyChart.d.ts +1 -1
  48. package/lib/components/SankeyChart/SankeyChart.js +1 -1
  49. package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
  50. package/lib/components/SankeyChart/SankeyChart.types.d.ts +9 -1
  51. package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -1
  52. package/lib/components/Sparkline/Sparkline.d.ts +1 -1
  53. package/lib/components/Sparkline/Sparkline.js +1 -1
  54. package/lib/components/Sparkline/Sparkline.js.map +1 -1
  55. package/lib/components/Sparkline/Sparkline.types.d.ts +6 -2
  56. package/lib/components/Sparkline/Sparkline.types.js.map +1 -1
  57. package/lib/components/StackedBarChart/MultiStackedBarChart.d.ts +1 -1
  58. package/lib/components/StackedBarChart/MultiStackedBarChart.js +1 -1
  59. package/lib/components/StackedBarChart/MultiStackedBarChart.js.map +1 -1
  60. package/lib/components/StackedBarChart/MultiStackedBarChart.types.d.ts +12 -1
  61. package/lib/components/StackedBarChart/MultiStackedBarChart.types.js +3 -0
  62. package/lib/components/StackedBarChart/MultiStackedBarChart.types.js.map +1 -1
  63. package/lib/components/StackedBarChart/StackedBarChart.d.ts +1 -1
  64. package/lib/components/StackedBarChart/StackedBarChart.js +1 -1
  65. package/lib/components/StackedBarChart/StackedBarChart.js.map +1 -1
  66. package/lib/components/StackedBarChart/StackedBarChart.types.d.ts +9 -1
  67. package/lib/components/StackedBarChart/StackedBarChart.types.js.map +1 -1
  68. package/lib/components/TreeChart/TreeChart.d.ts +1 -1
  69. package/lib/components/TreeChart/TreeChart.js +1 -1
  70. package/lib/components/TreeChart/TreeChart.js.map +1 -1
  71. package/lib/components/TreeChart/TreeChart.types.d.ts +18 -1
  72. package/lib/components/TreeChart/TreeChart.types.js +6 -0
  73. package/lib/components/TreeChart/TreeChart.types.js.map +1 -1
  74. package/lib/components/VerticalBarChart/VerticalBarChart.d.ts +1 -1
  75. package/lib/components/VerticalBarChart/VerticalBarChart.js +1 -1
  76. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  77. package/lib/components/VerticalBarChart/VerticalBarChart.types.d.ts +9 -1
  78. package/lib/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  79. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.d.ts +1 -1
  80. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +1 -1
  81. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  82. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.d.ts +9 -1
  83. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  84. package/lib/types/IDataPoint.d.ts +67 -0
  85. package/lib/types/IDataPoint.js.map +1 -1
  86. package/lib/version.js +1 -1
  87. package/lib/version.js.map +1 -1
  88. package/lib-amd/components/AreaChart/AreaChart.types.d.ts +9 -1
  89. package/lib-amd/components/AreaChart/AreaChart.types.js.map +1 -1
  90. package/lib-amd/components/CommonComponents/CartesianChart.base.js +2 -1
  91. package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
  92. package/lib-amd/components/CommonComponents/CartesianChart.d.ts +4 -0
  93. package/lib-amd/components/CommonComponents/CartesianChart.js +4 -0
  94. package/lib-amd/components/CommonComponents/CartesianChart.js.map +1 -1
  95. package/lib-amd/components/CommonComponents/CartesianChart.types.d.ts +12 -0
  96. package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +1 -1
  97. package/lib-amd/components/DonutChart/DonutChart.types.d.ts +9 -1
  98. package/lib-amd/components/DonutChart/DonutChart.types.js.map +1 -1
  99. package/lib-amd/components/GaugeChart/GaugeChart.types.d.ts +13 -2
  100. package/lib-amd/components/GaugeChart/GaugeChart.types.js +3 -0
  101. package/lib-amd/components/GaugeChart/GaugeChart.types.js.map +1 -1
  102. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.d.ts +9 -1
  103. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  104. package/lib-amd/components/HeatMapChart/HeatMapChart.types.d.ts +9 -1
  105. package/lib-amd/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  106. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.types.d.ts +13 -1
  107. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.types.js +3 -0
  108. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
  109. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.d.ts +9 -1
  110. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  111. package/lib-amd/components/Legends/Legends.d.ts +1 -1
  112. package/lib-amd/components/Legends/Legends.js +1 -1
  113. package/lib-amd/components/Legends/Legends.js.map +1 -1
  114. package/lib-amd/components/Legends/Legends.types.d.ts +14 -8
  115. package/lib-amd/components/Legends/Legends.types.js.map +1 -1
  116. package/lib-amd/components/LineChart/LineChart.d.ts +1 -1
  117. package/lib-amd/components/LineChart/LineChart.js +1 -1
  118. package/lib-amd/components/LineChart/LineChart.js.map +1 -1
  119. package/lib-amd/components/LineChart/LineChart.types.d.ts +18 -1
  120. package/lib-amd/components/LineChart/LineChart.types.js.map +1 -1
  121. package/lib-amd/components/PieChart/PieChart.d.ts +1 -1
  122. package/lib-amd/components/PieChart/PieChart.js +1 -1
  123. package/lib-amd/components/PieChart/PieChart.js.map +1 -1
  124. package/lib-amd/components/PieChart/PieChart.types.d.ts +9 -1
  125. package/lib-amd/components/PieChart/PieChart.types.js.map +1 -1
  126. package/lib-amd/components/SankeyChart/SankeyChart.d.ts +1 -1
  127. package/lib-amd/components/SankeyChart/SankeyChart.js +1 -1
  128. package/lib-amd/components/SankeyChart/SankeyChart.js.map +1 -1
  129. package/lib-amd/components/SankeyChart/SankeyChart.types.d.ts +9 -1
  130. package/lib-amd/components/SankeyChart/SankeyChart.types.js.map +1 -1
  131. package/lib-amd/components/Sparkline/Sparkline.d.ts +1 -1
  132. package/lib-amd/components/Sparkline/Sparkline.js +1 -1
  133. package/lib-amd/components/Sparkline/Sparkline.js.map +1 -1
  134. package/lib-amd/components/Sparkline/Sparkline.types.d.ts +6 -2
  135. package/lib-amd/components/Sparkline/Sparkline.types.js.map +1 -1
  136. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.d.ts +1 -1
  137. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.js +1 -1
  138. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.js.map +1 -1
  139. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.types.d.ts +12 -1
  140. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.types.js +3 -0
  141. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.types.js.map +1 -1
  142. package/lib-amd/components/StackedBarChart/StackedBarChart.d.ts +1 -1
  143. package/lib-amd/components/StackedBarChart/StackedBarChart.js +1 -1
  144. package/lib-amd/components/StackedBarChart/StackedBarChart.js.map +1 -1
  145. package/lib-amd/components/StackedBarChart/StackedBarChart.types.d.ts +9 -1
  146. package/lib-amd/components/StackedBarChart/StackedBarChart.types.js.map +1 -1
  147. package/lib-amd/components/TreeChart/TreeChart.d.ts +1 -1
  148. package/lib-amd/components/TreeChart/TreeChart.js +1 -1
  149. package/lib-amd/components/TreeChart/TreeChart.js.map +1 -1
  150. package/lib-amd/components/TreeChart/TreeChart.types.d.ts +18 -1
  151. package/lib-amd/components/TreeChart/TreeChart.types.js +6 -0
  152. package/lib-amd/components/TreeChart/TreeChart.types.js.map +1 -1
  153. package/lib-amd/components/VerticalBarChart/VerticalBarChart.d.ts +1 -1
  154. package/lib-amd/components/VerticalBarChart/VerticalBarChart.js +1 -1
  155. package/lib-amd/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  156. package/lib-amd/components/VerticalBarChart/VerticalBarChart.types.d.ts +9 -1
  157. package/lib-amd/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  158. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.d.ts +1 -1
  159. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.js +1 -1
  160. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  161. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.types.d.ts +9 -1
  162. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  163. package/lib-amd/types/IDataPoint.d.ts +67 -0
  164. package/lib-amd/types/IDataPoint.js.map +1 -1
  165. package/lib-amd/version.js +1 -1
  166. package/lib-amd/version.js.map +1 -1
  167. package/lib-commonjs/components/AreaChart/AreaChart.types.d.ts +9 -1
  168. package/lib-commonjs/components/AreaChart/AreaChart.types.js.map +1 -1
  169. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +2 -1
  170. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
  171. package/lib-commonjs/components/CommonComponents/CartesianChart.d.ts +4 -0
  172. package/lib-commonjs/components/CommonComponents/CartesianChart.js +4 -0
  173. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
  174. package/lib-commonjs/components/CommonComponents/CartesianChart.types.d.ts +12 -0
  175. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  176. package/lib-commonjs/components/DonutChart/DonutChart.types.d.ts +9 -1
  177. package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
  178. package/lib-commonjs/components/GaugeChart/GaugeChart.types.d.ts +13 -2
  179. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js +3 -0
  180. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
  181. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.d.ts +9 -1
  182. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  183. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.d.ts +9 -1
  184. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  185. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.d.ts +13 -1
  186. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js +3 -0
  187. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
  188. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.d.ts +9 -1
  189. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  190. package/lib-commonjs/components/Legends/Legends.d.ts +1 -1
  191. package/lib-commonjs/components/Legends/Legends.js +1 -1
  192. package/lib-commonjs/components/Legends/Legends.js.map +1 -1
  193. package/lib-commonjs/components/Legends/Legends.types.d.ts +14 -8
  194. package/lib-commonjs/components/Legends/Legends.types.js.map +1 -1
  195. package/lib-commonjs/components/LineChart/LineChart.d.ts +1 -1
  196. package/lib-commonjs/components/LineChart/LineChart.js +1 -1
  197. package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
  198. package/lib-commonjs/components/LineChart/LineChart.types.d.ts +18 -1
  199. package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -1
  200. package/lib-commonjs/components/PieChart/PieChart.d.ts +1 -1
  201. package/lib-commonjs/components/PieChart/PieChart.js +1 -1
  202. package/lib-commonjs/components/PieChart/PieChart.js.map +1 -1
  203. package/lib-commonjs/components/PieChart/PieChart.types.d.ts +9 -1
  204. package/lib-commonjs/components/PieChart/PieChart.types.js.map +1 -1
  205. package/lib-commonjs/components/SankeyChart/SankeyChart.d.ts +1 -1
  206. package/lib-commonjs/components/SankeyChart/SankeyChart.js +1 -1
  207. package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
  208. package/lib-commonjs/components/SankeyChart/SankeyChart.types.d.ts +9 -1
  209. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -1
  210. package/lib-commonjs/components/Sparkline/Sparkline.d.ts +1 -1
  211. package/lib-commonjs/components/Sparkline/Sparkline.js +1 -1
  212. package/lib-commonjs/components/Sparkline/Sparkline.js.map +1 -1
  213. package/lib-commonjs/components/Sparkline/Sparkline.types.d.ts +6 -2
  214. package/lib-commonjs/components/Sparkline/Sparkline.types.js.map +1 -1
  215. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.d.ts +1 -1
  216. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.js +1 -1
  217. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.js.map +1 -1
  218. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.types.d.ts +12 -1
  219. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.types.js +3 -0
  220. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.types.js.map +1 -1
  221. package/lib-commonjs/components/StackedBarChart/StackedBarChart.d.ts +1 -1
  222. package/lib-commonjs/components/StackedBarChart/StackedBarChart.js +1 -1
  223. package/lib-commonjs/components/StackedBarChart/StackedBarChart.js.map +1 -1
  224. package/lib-commonjs/components/StackedBarChart/StackedBarChart.types.d.ts +9 -1
  225. package/lib-commonjs/components/StackedBarChart/StackedBarChart.types.js.map +1 -1
  226. package/lib-commonjs/components/TreeChart/TreeChart.d.ts +1 -1
  227. package/lib-commonjs/components/TreeChart/TreeChart.js +1 -1
  228. package/lib-commonjs/components/TreeChart/TreeChart.js.map +1 -1
  229. package/lib-commonjs/components/TreeChart/TreeChart.types.d.ts +18 -1
  230. package/lib-commonjs/components/TreeChart/TreeChart.types.js +6 -0
  231. package/lib-commonjs/components/TreeChart/TreeChart.types.js.map +1 -1
  232. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.d.ts +1 -1
  233. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +1 -1
  234. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  235. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.d.ts +9 -1
  236. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  237. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.d.ts +1 -1
  238. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +1 -1
  239. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  240. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.d.ts +9 -1
  241. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  242. package/lib-commonjs/types/IDataPoint.d.ts +67 -0
  243. package/lib-commonjs/types/IDataPoint.js.map +1 -1
  244. package/lib-commonjs/version.js +1 -1
  245. package/lib-commonjs/version.js.map +1 -1
  246. package/package.json +5 -5
  247. package/src/components/AreaChart/AreaChart.types.ts +9 -1
  248. package/src/components/CommonComponents/CartesianChart.types.ts +12 -0
  249. package/src/components/DonutChart/DonutChart.types.ts +9 -1
  250. package/src/components/GaugeChart/GaugeChart.types.ts +13 -2
  251. package/src/components/HeatMapChart/HeatMapChart.types.ts +11 -1
  252. package/src/components/HorizontalBarChart/HorizontalBarChart.types.ts +13 -1
  253. package/src/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.ts +9 -1
  254. package/src/components/Legends/Legends.types.ts +14 -8
  255. package/src/components/LineChart/LineChart.types.ts +19 -1
  256. package/src/components/PieChart/PieChart.types.ts +10 -1
  257. package/src/components/SankeyChart/SankeyChart.types.ts +9 -1
  258. package/src/components/Sparkline/Sparkline.types.ts +6 -2
  259. package/src/components/StackedBarChart/MultiStackedBarChart.types.ts +12 -1
  260. package/src/components/StackedBarChart/StackedBarChart.types.ts +9 -1
  261. package/src/components/TreeChart/TreeChart.types.ts +20 -1
  262. package/src/components/VerticalBarChart/VerticalBarChart.types.ts +9 -1
  263. package/src/components/VerticalStackedBarChart/VerticalStackedBarChart.types.ts +9 -1
@@ -0,0 +1,88 @@
1
+ # Technical details
2
+
3
+ **Overview**
4
+
5
+ This document describes different chart components in detail.
6
+
7
+ This can be used as a guide to use the charts and contribute new functionalities or improvements to the library.
8
+
9
+ **Components**
10
+
11
+ The charting components are built using following building blocks.
12
+
13
+ - Cartesian Charts.
14
+
15
+ - Charts built using cartesian coordinate system (two axes - x axis perpendicular to y axis) are called cartesian charts. Majority of the chart in the library are cartesian charts. Some charts like horizontal chart, donut chart, sankey and tree charts are non cartesian charts.
16
+
17
+ - Legends.
18
+
19
+ - A legend contains a list of the variables appearing in the chart and an example of their appearance. This information allows the data from each variable to be identified in the chart.
20
+
21
+ - Hover Callouts.
22
+
23
+ - Whenever the mouse is hovered over a datapoint, a callout is shown representing the details of data for that point. For a stacked chart, the hover callout can represent the data for all the points for the same X coordinate.
24
+
25
+ - Axes.
26
+
27
+ - Our charts currently support cartesian axes. Different charts support different type of axes - numerical axis, date or time series axis, string or categorical axis. Detals about supported axes can be found in readme for each chart.
28
+
29
+ - Axes support for different charts
30
+
31
+ | Chart | Numeric Axis | Date Axis | String Axis |
32
+ | -------------------------- | ------------ | --------- | ----------- |
33
+ | Line Chart | Yes | Yes | No |
34
+ | Area Chart | Yes | Yes | No |
35
+ | Vertical Bar Chart | Yes | No | Yes |
36
+ | Vertical Stacked Bar Chart | Yes | No | Yes |
37
+ | Grouped Vertical Bar Chart | No | No | Yes |
38
+ | Heatmap Chart | Yes | Yes | Yes |
39
+ | Horizontal Bar Chart | -- | -- | -- |
40
+ | Donut Chart | -- | -- | -- |
41
+ | Sankey Chart | -- | -- | -- |
42
+ | Tree Chart | -- | -- | -- |
43
+ | Sparkline Chart | -- | -- | -- |
44
+
45
+ - Axis localization
46
+ The axes support 2 ways of localization.
47
+
48
+ 1. Javascript provided inbuilt localization for numeric and date axis. Specify the culture and dateLocalizeOptions for date axis to define target localization. Refer the [javascript localization guide](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString) for usage.
49
+ 2. Custom locale definition: The consumer of the library can specify a custom locale definition as supported by d3 (like [this](https://github.com/d3/d3-time-format/blob/main/locale/en-US.json)). The date axis will use the date range and the multiformat specified in the definition to determine the correct format to show in the ticks. For example - If the date range is in days then the axis will show hourly ticks. If the date range spans across months then the axis will show months in tick labels and so on.
50
+ Specify the custom locale definition in the timeFormatLocale prop.
51
+ Refer to the Custom Locale Date Axis example in line chart for sample usage.
52
+
53
+ - Date axis formatting
54
+ The date axis can be custom formatted using the customDateTimeFormatter prop.
55
+
56
+ - Event annotations (Available in line charts).
57
+
58
+ - Data can be annotated using vertical lines representing the events of interest. See [line chart with events](https://fluentuipr.z22.web.core.windows.net/heads/master/react-charting/demo/index.html#/examples/linechart#Variants) for example.
59
+
60
+ - Typography.
61
+
62
+ - Our font classes represent the type ramp for the fluent design language. Each base class sets a default size, weight, and color.
63
+
64
+ - Colors
65
+
66
+ - The charts are designed using the accessible color palette defined for the fluent design system.
67
+ Refer [this](https://github.com/microsoft/fluentui/blob/master/packages/react-charting/docs/colors.md) guide for details about charting color palette and its usage.
68
+
69
+ - Themes
70
+
71
+ - The library supports light and dark mode out of box. In addition, consumers can define their own themese as detailed [here](https://github.com/microsoft/fluentui/wiki/Theming)
72
+
73
+ - Accessibility.
74
+
75
+ - Our charts have elaborate accessibility support. The charts are WCAG 2.1 MAS C compliant for accessibility.
76
+ Consumers can define their own aria labels for each point by setting the `xAxisCalloutAccessibilityData` and `callOutAccessibilityData` properties.
77
+
78
+ - RTL Support
79
+
80
+ - The charts support RTL languages wherever applicable.
81
+
82
+ - Component Styling
83
+
84
+ - [This article](https://github.com/microsoft/fluentui/wiki/Component-Styling) talks about the styling approach followed within charting library.
85
+
86
+ - Details about ticks.
87
+ - Tick values are applicable only for date axis. Doesn't work for string or numeric axis.
88
+ Tickcount works for numeric and date axis. Doesn't work for string (scaleBand) axis.
@@ -27,7 +27,7 @@ import { SVGProps } from 'react';
27
27
  // @public
28
28
  export const AreaChart: React_2.FunctionComponent<IAreaChartProps>;
29
29
 
30
- // @public (undocumented)
30
+ // @public
31
31
  export const CartesianChart: React_2.FunctionComponent<IModifiedCartesianChartProps>;
32
32
 
33
33
  // @public
@@ -151,11 +151,11 @@ export interface IAreaChartProps extends ICartesianChartProps {
151
151
  styles?: IStyleFunctionOrObject<ICartesianChartStyleProps, ICartesianChartStyles>;
152
152
  }
153
153
 
154
- // @public (undocumented)
154
+ // @public
155
155
  export interface IAreaChartStyleProps extends ICartesianChartStyleProps {
156
156
  }
157
157
 
158
- // @public (undocumented)
158
+ // @public
159
159
  export interface IAreaChartStyles extends ICartesianChartStyles {
160
160
  }
161
161
 
@@ -205,7 +205,7 @@ export interface IBasestate {
205
205
  }[];
206
206
  }
207
207
 
208
- // @public (undocumented)
208
+ // @public
209
209
  export interface ICartesianChartProps {
210
210
  calloutProps?: Partial<ICalloutProps>;
211
211
  // @deprecated
@@ -257,7 +257,7 @@ export interface ICartesianChartProps {
257
257
  yMinValue?: number;
258
258
  }
259
259
 
260
- // @public (undocumented)
260
+ // @public
261
261
  export interface ICartesianChartStyleProps {
262
262
  className?: string;
263
263
  color?: string;
@@ -271,7 +271,7 @@ export interface ICartesianChartStyleProps {
271
271
  width?: number;
272
272
  }
273
273
 
274
- // @public (undocumented)
274
+ // @public
275
275
  export interface ICartesianChartStyles {
276
276
  axisTitle?: IStyle;
277
277
  calloutBlockContainer?: IStyle;
@@ -439,11 +439,11 @@ export interface IDonutChartProps extends ICartesianChartProps {
439
439
  valueInsideDonut?: string | number;
440
440
  }
441
441
 
442
- // @public (undocumented)
442
+ // @public
443
443
  export interface IDonutChartStyleProps extends ICartesianChartStyleProps {
444
444
  }
445
445
 
446
- // @public (undocumented)
446
+ // @public
447
447
  export interface IDonutChartStyles {
448
448
  chart?: IStyle;
449
449
  legendContainer: IStyle;
@@ -499,7 +499,7 @@ export interface IGaugeChartSegment {
499
499
  size: number;
500
500
  }
501
501
 
502
- // @public (undocumented)
502
+ // @public
503
503
  export interface IGaugeChartStyleProps {
504
504
  chartHeight?: number;
505
505
  chartValueSize?: number;
@@ -510,7 +510,7 @@ export interface IGaugeChartStyleProps {
510
510
  toDrawShape?: boolean;
511
511
  }
512
512
 
513
- // @public (undocumented)
513
+ // @public
514
514
  export interface IGaugeChartStyles {
515
515
  calloutBlockContainer?: IStyle;
516
516
  calloutContentRoot?: IStyle;
@@ -561,11 +561,11 @@ export interface IGroupedVerticalBarChartProps extends ICartesianChartProps {
561
561
  styles?: IStyleFunctionOrObject<IGroupedVerticalBarChartStyleProps, IGroupedVerticalBarChartStyles>;
562
562
  }
563
563
 
564
- // @public (undocumented)
564
+ // @public
565
565
  export interface IGroupedVerticalBarChartStyleProps extends ICartesianChartStyleProps {
566
566
  }
567
567
 
568
- // @public (undocumented)
568
+ // @public
569
569
  export interface IGroupedVerticalBarChartStyles extends ICartesianChartStyles {
570
570
  barLabel: IStyle;
571
571
  opacityChangeOnHover: IStyle;
@@ -638,11 +638,11 @@ export interface IHeatMapChartProps extends Pick<ICartesianChartProps, Exclude<k
638
638
  yAxisStringFormatter?: (point: string) => string;
639
639
  }
640
640
 
641
- // @public (undocumented)
641
+ // @public
642
642
  export interface IHeatMapChartStyleProps extends ICartesianChartStyleProps {
643
643
  }
644
644
 
645
- // @public (undocumented)
645
+ // @public
646
646
  export interface IHeatMapChartStyles {
647
647
  // (undocumented)
648
648
  root?: IStyle;
@@ -674,7 +674,7 @@ export interface IHorizontalBarChartProps {
674
674
  width?: number;
675
675
  }
676
676
 
677
- // @public (undocumented)
677
+ // @public
678
678
  export interface IHorizontalBarChartStyleProps {
679
679
  barHeight?: number;
680
680
  className?: string;
@@ -686,7 +686,7 @@ export interface IHorizontalBarChartStyleProps {
686
686
  width: number | undefined;
687
687
  }
688
688
 
689
- // @public (undocumented)
689
+ // @public
690
690
  export interface IHorizontalBarChartStyles {
691
691
  barLabel: IStyle;
692
692
  barWrapper: IStyle;
@@ -729,12 +729,12 @@ export interface IHorizontalBarChartWithAxisProps extends ICartesianChartProps {
729
729
  yAxisPadding?: number;
730
730
  }
731
731
 
732
- // @public (undocumented)
732
+ // @public
733
733
  export interface IHorizontalBarChartWithAxisStyleProps extends ICartesianChartStyleProps {
734
734
  legendColor?: string;
735
735
  }
736
736
 
737
- // @public (undocumented)
737
+ // @public
738
738
  export interface IHorizontalBarChartWithAxisStyles extends ICartesianChartStyles {
739
739
  chartLabel?: IStyle;
740
740
  opacityChangeOnHover: IStyle;
@@ -773,7 +773,7 @@ export interface ILegendDataItem {
773
773
  legendText: string | number;
774
774
  }
775
775
 
776
- // @public
776
+ // @public (undocumented)
777
777
  export interface ILegendOverflowData {
778
778
  // (undocumented)
779
779
  overflow?: ILegend[];
@@ -781,7 +781,7 @@ export interface ILegendOverflowData {
781
781
  primary: ILegend[];
782
782
  }
783
783
 
784
- // @public (undocumented)
784
+ // @public
785
785
  export interface ILegendsProps {
786
786
  allowFocusOnLegends?: boolean;
787
787
  canSelectMultipleLegends?: boolean;
@@ -812,7 +812,7 @@ export interface ILegendsStyles {
812
812
  triangle: IStyle;
813
813
  }
814
814
 
815
- // @public (undocumented)
815
+ // @public
816
816
  export interface ILegendStyleProps {
817
817
  // (undocumented)
818
818
  borderColor?: string;
@@ -832,7 +832,7 @@ export interface ILegendStyleProps {
832
832
  theme?: ITheme;
833
833
  }
834
834
 
835
- // @public
835
+ // @public (undocumented)
836
836
  export interface ILegendSubComponentStyles {
837
837
  // (undocumented)
838
838
  hoverCardStyles: IStyleFunctionOrObject<IHoverCardStyleProps, IHoverCardStyles>;
@@ -899,11 +899,11 @@ export interface ILineChartProps extends ICartesianChartProps {
899
899
  styles?: IStyleFunctionOrObject<ILineChartStyleProps, ILineChartStyles>;
900
900
  }
901
901
 
902
- // @public (undocumented)
902
+ // @public
903
903
  export interface ILineChartStyleProps extends ICartesianChartStyleProps {
904
904
  }
905
905
 
906
- // @public (undocumented)
906
+ // @public
907
907
  export interface ILineChartStyles extends ICartesianChartStyles {
908
908
  }
909
909
 
@@ -1015,7 +1015,7 @@ export interface IMultiStackedBarChartProps {
1015
1015
  width?: number;
1016
1016
  }
1017
1017
 
1018
- // @public (undocumented)
1018
+ // @public
1019
1019
  export interface IMultiStackedBarChartStyleProps {
1020
1020
  barHeight?: number;
1021
1021
  className?: string;
@@ -1028,7 +1028,7 @@ export interface IMultiStackedBarChartStyleProps {
1028
1028
  width?: number;
1029
1029
  }
1030
1030
 
1031
- // @public (undocumented)
1031
+ // @public
1032
1032
  export interface IMultiStackedBarChartStyles {
1033
1033
  barLabel: IStyle;
1034
1034
  chart: IStyle;
@@ -1064,10 +1064,10 @@ export interface IPieChartProps {
1064
1064
  width?: number;
1065
1065
  }
1066
1066
 
1067
- // @public (undocumented)
1067
+ // @public
1068
1068
  export type IPieChartStyleProps = Required<Pick<IPieChartProps, 'theme' | 'width' | 'height'>> & Pick<IPieChartProps, 'className'>;
1069
1069
 
1070
- // @public (undocumented)
1070
+ // @public
1071
1071
  export interface IPieChartStyles {
1072
1072
  chart?: IStyle;
1073
1073
  chartTitle?: IStyle;
@@ -1105,7 +1105,7 @@ export interface ISankeyChartProps {
1105
1105
  width?: number;
1106
1106
  }
1107
1107
 
1108
- // @public (undocumented)
1108
+ // @public
1109
1109
  export interface ISankeyChartStyleProps {
1110
1110
  // (undocumented)
1111
1111
  className?: string;
@@ -1119,7 +1119,7 @@ export interface ISankeyChartStyleProps {
1119
1119
  width: number;
1120
1120
  }
1121
1121
 
1122
- // @public (undocumented)
1122
+ // @public
1123
1123
  export interface ISankeyChartStyles {
1124
1124
  calloutContentRoot?: IStyle;
1125
1125
  links?: IStyle;
@@ -1158,7 +1158,7 @@ export interface ISparklineProps {
1158
1158
  export interface ISparklineStyleProps extends ICartesianChartStyleProps {
1159
1159
  }
1160
1160
 
1161
- // @public (undocumented)
1161
+ // @public
1162
1162
  export interface ISparklineStyles {
1163
1163
  // (undocumented)
1164
1164
  inlineBlock?: IStyle;
@@ -1197,7 +1197,7 @@ export interface IStackedBarChartProps {
1197
1197
  width?: number;
1198
1198
  }
1199
1199
 
1200
- // @public (undocumented)
1200
+ // @public
1201
1201
  export interface IStackedBarChartStyleProps {
1202
1202
  barHeight?: number;
1203
1203
  benchmarkColor?: string;
@@ -1214,7 +1214,7 @@ export interface IStackedBarChartStyleProps {
1214
1214
  width?: number;
1215
1215
  }
1216
1216
 
1217
- // @public (undocumented)
1217
+ // @public
1218
1218
  export interface IStackedBarChartStyles {
1219
1219
  benchmark: IStyle;
1220
1220
  benchmarkContainer: IStyle;
@@ -1229,7 +1229,7 @@ export interface IStackedBarChartStyles {
1229
1229
  target: IStyle;
1230
1230
  }
1231
1231
 
1232
- // @public
1232
+ // @public (undocumented)
1233
1233
  export interface ITreeChartDataPoint {
1234
1234
  bodytext?: string;
1235
1235
  children?: Array<ITreeChartDataPoint>;
@@ -1253,7 +1253,7 @@ export interface ITreeDataStructure {
1253
1253
  y: number;
1254
1254
  }
1255
1255
 
1256
- // @public (undocumented)
1256
+ // @public
1257
1257
  export interface ITreeProps {
1258
1258
  className?: string;
1259
1259
  composition?: NodesComposition.long | NodesComposition.compact;
@@ -1274,13 +1274,13 @@ export interface ITreeState {
1274
1274
  _width: number;
1275
1275
  }
1276
1276
 
1277
- // @public (undocumented)
1277
+ // @public
1278
1278
  export interface ITreeStyleProps {
1279
1279
  className?: string;
1280
1280
  theme: ITheme;
1281
1281
  }
1282
1282
 
1283
- // @public (undocumented)
1283
+ // @public
1284
1284
  export interface ITreeStyles {
1285
1285
  link: IStyle;
1286
1286
  rectBodyText: IStyle;
@@ -1321,12 +1321,12 @@ export interface IVerticalBarChartProps extends ICartesianChartProps {
1321
1321
  xAxisPadding?: number;
1322
1322
  }
1323
1323
 
1324
- // @public (undocumented)
1324
+ // @public
1325
1325
  export interface IVerticalBarChartStyleProps extends ICartesianChartStyleProps {
1326
1326
  legendColor?: string;
1327
1327
  }
1328
1328
 
1329
- // @public (undocumented)
1329
+ // @public
1330
1330
  export interface IVerticalBarChartStyles extends ICartesianChartStyles {
1331
1331
  barLabel: IStyle;
1332
1332
  // @deprecated
@@ -1370,11 +1370,11 @@ export interface IVerticalStackedBarChartProps extends ICartesianChartProps {
1370
1370
  yMinValue?: undefined;
1371
1371
  }
1372
1372
 
1373
- // @public (undocumented)
1373
+ // @public
1374
1374
  export interface IVerticalStackedBarChartStyleProps extends ICartesianChartStyleProps {
1375
1375
  }
1376
1376
 
1377
- // @public (undocumented)
1377
+ // @public
1378
1378
  export interface IVerticalStackedBarChartStyles extends ICartesianChartStyles {
1379
1379
  barLabel: IStyle;
1380
1380
  // @deprecated
@@ -3,7 +3,7 @@ import { IChartProps, IRefArrayData, IBasestate, ILineChartDataPoint, ILineChart
3
3
  import { ICartesianChartStyles, ICartesianChartStyleProps, ICartesianChartProps, IChildProps } from '../CommonComponents/CartesianChart.types';
4
4
  export type { IChildProps, IRefArrayData, IBasestate, ILineChartDataPoint, ILineChartPoints, IMargins };
5
5
  /**
6
- * IAreaChartProps properties for area chart.
6
+ * Area Chart properties.
7
7
  * {@docCategory AreaChart}
8
8
  */
9
9
  export interface IAreaChartProps extends ICartesianChartProps {
@@ -40,7 +40,15 @@ export interface IAreaChartProps extends ICartesianChartProps {
40
40
  enablePerfOptimization?: boolean;
41
41
  optimizeLargeData?: boolean;
42
42
  }
43
+ /**
44
+ * Area Chart styles
45
+ * {@docCategory AreaChart}
46
+ */
43
47
  export interface IAreaChartStyles extends ICartesianChartStyles {
44
48
  }
49
+ /**
50
+ * Area Chart style properties
51
+ * {@docCategory AreaChart}
52
+ */
45
53
  export interface IAreaChartStyleProps extends ICartesianChartStyleProps {
46
54
  }
@@ -1 +1 @@
1
- {"version":3,"file":"AreaChart.types.js","sourceRoot":"../src/","sources":["components/AreaChart/AreaChart.types.ts"],"names":[],"mappings":"","sourcesContent":["import { IRenderFunction, IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';\nimport {\n IChartProps,\n IRefArrayData,\n IBasestate,\n ILineChartDataPoint,\n ILineChartPoints,\n ICustomizedCalloutData,\n IMargins,\n} from '../../types/index';\nimport {\n ICartesianChartStyles,\n ICartesianChartStyleProps,\n ICartesianChartProps,\n IChildProps,\n} from '../CommonComponents/CartesianChart.types';\n\nexport type { IChildProps, IRefArrayData, IBasestate, ILineChartDataPoint, ILineChartPoints, IMargins };\n\n/**\n * IAreaChartProps properties for area chart.\n * {@docCategory AreaChart}\n */\nexport interface IAreaChartProps extends ICartesianChartProps {\n /**\n * Data to render in the chart.\n */\n data: IChartProps;\n\n /**\n * This prop is used to draw Y axis grid lines on the chart. Default value will be false\n * @deprecated now lines are shown by default\n * no need to use this prop\n */\n showYAxisGridLines?: boolean;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: IStyleFunctionOrObject<ICartesianChartStyleProps, ICartesianChartStyles>;\n\n /**\n * Define a custom callout renderer for a data point\n */\n onRenderCalloutPerDataPoint?: IRenderFunction<ICustomizedCalloutData>;\n\n /**\n * Define a custom callout renderer for a stack; default is to render per data point\n */\n onRenderCalloutPerStack?: IRenderFunction<ICustomizedCalloutData>;\n\n /**\n * The prop used to define the culture to localized the numbers\n */\n culture?: string;\n\n /**\n * @default false\n * The prop used to enable the perf optimization\n */\n enablePerfOptimization?: boolean;\n\n /*\n * Optimize area chart rendering for large data set.\n */\n optimizeLargeData?: boolean;\n}\n\nexport interface IAreaChartStyles extends ICartesianChartStyles {}\n\nexport interface IAreaChartStyleProps extends ICartesianChartStyleProps {}\n"]}
1
+ {"version":3,"file":"AreaChart.types.js","sourceRoot":"../src/","sources":["components/AreaChart/AreaChart.types.ts"],"names":[],"mappings":"","sourcesContent":["import { IRenderFunction, IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';\nimport {\n IChartProps,\n IRefArrayData,\n IBasestate,\n ILineChartDataPoint,\n ILineChartPoints,\n ICustomizedCalloutData,\n IMargins,\n} from '../../types/index';\nimport {\n ICartesianChartStyles,\n ICartesianChartStyleProps,\n ICartesianChartProps,\n IChildProps,\n} from '../CommonComponents/CartesianChart.types';\n\nexport type { IChildProps, IRefArrayData, IBasestate, ILineChartDataPoint, ILineChartPoints, IMargins };\n\n/**\n * Area Chart properties.\n * {@docCategory AreaChart}\n */\nexport interface IAreaChartProps extends ICartesianChartProps {\n /**\n * Data to render in the chart.\n */\n data: IChartProps;\n\n /**\n * This prop is used to draw Y axis grid lines on the chart. Default value will be false\n * @deprecated now lines are shown by default\n * no need to use this prop\n */\n showYAxisGridLines?: boolean;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: IStyleFunctionOrObject<ICartesianChartStyleProps, ICartesianChartStyles>;\n\n /**\n * Define a custom callout renderer for a data point\n */\n onRenderCalloutPerDataPoint?: IRenderFunction<ICustomizedCalloutData>;\n\n /**\n * Define a custom callout renderer for a stack; default is to render per data point\n */\n onRenderCalloutPerStack?: IRenderFunction<ICustomizedCalloutData>;\n\n /**\n * The prop used to define the culture to localized the numbers\n */\n culture?: string;\n\n /**\n * @default false\n * The prop used to enable the perf optimization\n */\n enablePerfOptimization?: boolean;\n\n /*\n * Optimize area chart rendering for large data set.\n */\n optimizeLargeData?: boolean;\n}\n\n/**\n * Area Chart styles\n * {@docCategory AreaChart}\n */\nexport interface IAreaChartStyles extends ICartesianChartStyles {}\n\n/**\n * Area Chart style properties\n * {@docCategory AreaChart}\n */\nexport interface IAreaChartStyleProps extends ICartesianChartStyleProps {}\n"]}
@@ -473,6 +473,7 @@ var CartesianChartBase = /** @class */ (function (_super) {
473
473
  return false;
474
474
  };
475
475
  CartesianChartBase.prototype._getCalloutContent = function (xValue, index, yValueHoverSubCountsExists, isLast) {
476
+ var _a;
476
477
  var marginStyle = isLast ? {} : { marginRight: '16px' };
477
478
  var toDrawShape = xValue.index !== undefined && xValue.index !== -1;
478
479
  var _classNames = getClassNames(this.props.styles, {
@@ -501,7 +502,7 @@ var CartesianChartBase = /** @class */ (function (_super) {
501
502
  React.createElement("div", { className: _classNames.calloutlegendText },
502
503
  " ",
503
504
  xValue.legend),
504
- React.createElement("div", { className: _classNames.calloutContentY }, convertToLocaleString(xValue.yAxisCalloutData ? xValue.yAxisCalloutData : xValue.y || xValue.data, culture))))));
505
+ React.createElement("div", { className: _classNames.calloutContentY }, convertToLocaleString(xValue.yAxisCalloutData ? xValue.yAxisCalloutData : (_a = xValue.y) !== null && _a !== void 0 ? _a : xValue.data, culture))))));
505
506
  }
506
507
  else {
507
508
  var subcounts_1 = xValue.yAxisCalloutData;