@fluentui/react-charting 5.24.11 → 5.24.13

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 (157) hide show
  1. package/CHANGELOG.json +61 -1
  2. package/CHANGELOG.md +25 -2
  3. package/bundle-size/GanttChart.fixture.js +7 -0
  4. package/dist/react-charting.d.ts +128 -3
  5. package/dist/react-charting.js +1 -1
  6. package/dist/react-charting.min.js +1 -1
  7. package/etc/react-charting.api.md +44 -2
  8. package/lib/GanttChart.d.ts +1 -0
  9. package/lib/GanttChart.js +2 -0
  10. package/lib/GanttChart.js.map +1 -0
  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.types.d.ts +3 -3
  14. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  15. package/lib/components/DeclarativeChart/DeclarativeChart.js +22 -4
  16. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  17. package/lib/components/DeclarativeChart/PlotlyColorAdapter.d.ts +2 -1
  18. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js +23 -0
  19. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  20. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +2 -0
  21. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +173 -63
  22. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  23. package/lib/components/GanttChart/GanttChart.base.d.ts +3 -0
  24. package/lib/components/GanttChart/GanttChart.base.js +329 -0
  25. package/lib/components/GanttChart/GanttChart.base.js.map +1 -0
  26. package/lib/components/GanttChart/GanttChart.d.ts +7 -0
  27. package/lib/components/GanttChart/GanttChart.js +10 -0
  28. package/lib/components/GanttChart/GanttChart.js.map +1 -0
  29. package/lib/components/GanttChart/GanttChart.styles.d.ts +2 -0
  30. package/lib/components/GanttChart/GanttChart.styles.js +4 -0
  31. package/lib/components/GanttChart/GanttChart.styles.js.map +1 -0
  32. package/lib/components/GanttChart/GanttChart.types.d.ts +67 -0
  33. package/lib/components/GanttChart/GanttChart.types.js +2 -0
  34. package/lib/components/GanttChart/GanttChart.types.js.map +1 -0
  35. package/lib/components/GanttChart/index.d.ts +2 -0
  36. package/lib/components/GanttChart/index.js +3 -0
  37. package/lib/components/GanttChart/index.js.map +1 -0
  38. package/lib/components/LineChart/LineChart.base.d.ts +1 -0
  39. package/lib/components/LineChart/LineChart.base.js +34 -11
  40. package/lib/components/LineChart/LineChart.base.js.map +1 -1
  41. package/lib/components/ScatterChart/ScatterChart.base.js +37 -23
  42. package/lib/components/ScatterChart/ScatterChart.base.js.map +1 -1
  43. package/lib/index.d.ts +3 -1
  44. package/lib/index.js +1 -0
  45. package/lib/index.js.map +1 -1
  46. package/lib/types/IDataPoint.d.ts +49 -0
  47. package/lib/types/IDataPoint.js.map +1 -1
  48. package/lib/utilities/scatterpolar-utils.d.ts +22 -0
  49. package/lib/utilities/scatterpolar-utils.js +38 -0
  50. package/lib/utilities/scatterpolar-utils.js.map +1 -0
  51. package/lib/utilities/test-data.d.ts +4 -1
  52. package/lib/utilities/test-data.js +213 -0
  53. package/lib/utilities/test-data.js.map +1 -1
  54. package/lib/utilities/utilities.d.ts +14 -6
  55. package/lib/utilities/utilities.js +25 -9
  56. package/lib/utilities/utilities.js.map +1 -1
  57. package/lib-amd/GanttChart.d.ts +1 -0
  58. package/lib-amd/GanttChart.js +6 -0
  59. package/lib-amd/GanttChart.js.map +1 -0
  60. package/lib-amd/components/CommonComponents/CartesianChart.base.js +2 -1
  61. package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
  62. package/lib-amd/components/CommonComponents/CartesianChart.types.d.ts +3 -3
  63. package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +1 -1
  64. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js +22 -5
  65. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  66. package/lib-amd/components/DeclarativeChart/PlotlyColorAdapter.d.ts +2 -1
  67. package/lib-amd/components/DeclarativeChart/PlotlyColorAdapter.js +25 -2
  68. package/lib-amd/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  69. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +2 -0
  70. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +173 -62
  71. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  72. package/lib-amd/components/GanttChart/GanttChart.base.d.ts +3 -0
  73. package/lib-amd/components/GanttChart/GanttChart.base.js +325 -0
  74. package/lib-amd/components/GanttChart/GanttChart.base.js.map +1 -0
  75. package/lib-amd/components/GanttChart/GanttChart.d.ts +7 -0
  76. package/lib-amd/components/GanttChart/GanttChart.js +12 -0
  77. package/lib-amd/components/GanttChart/GanttChart.js.map +1 -0
  78. package/lib-amd/components/GanttChart/GanttChart.styles.d.ts +2 -0
  79. package/lib-amd/components/GanttChart/GanttChart.styles.js +10 -0
  80. package/lib-amd/components/GanttChart/GanttChart.styles.js.map +1 -0
  81. package/lib-amd/components/GanttChart/GanttChart.types.d.ts +67 -0
  82. package/lib-amd/components/GanttChart/GanttChart.types.js +5 -0
  83. package/lib-amd/components/GanttChart/GanttChart.types.js.map +1 -0
  84. package/lib-amd/components/GanttChart/index.d.ts +2 -0
  85. package/lib-amd/components/GanttChart/index.js +7 -0
  86. package/lib-amd/components/GanttChart/index.js.map +1 -0
  87. package/lib-amd/components/LineChart/LineChart.base.d.ts +1 -0
  88. package/lib-amd/components/LineChart/LineChart.base.js +33 -11
  89. package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
  90. package/lib-amd/components/ScatterChart/ScatterChart.base.js +36 -23
  91. package/lib-amd/components/ScatterChart/ScatterChart.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 +49 -0
  96. package/lib-amd/types/IDataPoint.js.map +1 -1
  97. package/lib-amd/utilities/scatterpolar-utils.d.ts +22 -0
  98. package/lib-amd/utilities/scatterpolar-utils.js +43 -0
  99. package/lib-amd/utilities/scatterpolar-utils.js.map +1 -0
  100. package/lib-amd/utilities/test-data.d.ts +4 -1
  101. package/lib-amd/utilities/test-data.js +214 -2
  102. package/lib-amd/utilities/test-data.js.map +1 -1
  103. package/lib-amd/utilities/utilities.d.ts +14 -6
  104. package/lib-amd/utilities/utilities.js +27 -9
  105. package/lib-amd/utilities/utilities.js.map +1 -1
  106. package/lib-commonjs/GanttChart.d.ts +1 -0
  107. package/lib-commonjs/GanttChart.js +5 -0
  108. package/lib-commonjs/GanttChart.js.map +1 -0
  109. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +2 -1
  110. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
  111. package/lib-commonjs/components/CommonComponents/CartesianChart.types.d.ts +3 -3
  112. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  113. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +23 -5
  114. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  115. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.d.ts +2 -1
  116. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js +25 -1
  117. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  118. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +2 -0
  119. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +173 -62
  120. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  121. package/lib-commonjs/components/GanttChart/GanttChart.base.d.ts +3 -0
  122. package/lib-commonjs/components/GanttChart/GanttChart.base.js +332 -0
  123. package/lib-commonjs/components/GanttChart/GanttChart.base.js.map +1 -0
  124. package/lib-commonjs/components/GanttChart/GanttChart.d.ts +7 -0
  125. package/lib-commonjs/components/GanttChart/GanttChart.js +13 -0
  126. package/lib-commonjs/components/GanttChart/GanttChart.js.map +1 -0
  127. package/lib-commonjs/components/GanttChart/GanttChart.styles.d.ts +2 -0
  128. package/lib-commonjs/components/GanttChart/GanttChart.styles.js +8 -0
  129. package/lib-commonjs/components/GanttChart/GanttChart.styles.js.map +1 -0
  130. package/lib-commonjs/components/GanttChart/GanttChart.types.d.ts +67 -0
  131. package/lib-commonjs/components/GanttChart/GanttChart.types.js +3 -0
  132. package/lib-commonjs/components/GanttChart/GanttChart.types.js.map +1 -0
  133. package/lib-commonjs/components/GanttChart/index.d.ts +2 -0
  134. package/lib-commonjs/components/GanttChart/index.js +6 -0
  135. package/lib-commonjs/components/GanttChart/index.js.map +1 -0
  136. package/lib-commonjs/components/LineChart/LineChart.base.d.ts +1 -0
  137. package/lib-commonjs/components/LineChart/LineChart.base.js +33 -10
  138. package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
  139. package/lib-commonjs/components/ScatterChart/ScatterChart.base.js +36 -22
  140. package/lib-commonjs/components/ScatterChart/ScatterChart.base.js.map +1 -1
  141. package/lib-commonjs/index.d.ts +3 -1
  142. package/lib-commonjs/index.js +3 -1
  143. package/lib-commonjs/index.js.map +1 -1
  144. package/lib-commonjs/types/IDataPoint.d.ts +49 -0
  145. package/lib-commonjs/types/IDataPoint.js.map +1 -1
  146. package/lib-commonjs/utilities/scatterpolar-utils.d.ts +22 -0
  147. package/lib-commonjs/utilities/scatterpolar-utils.js +42 -0
  148. package/lib-commonjs/utilities/scatterpolar-utils.js.map +1 -0
  149. package/lib-commonjs/utilities/test-data.d.ts +4 -1
  150. package/lib-commonjs/utilities/test-data.js +214 -1
  151. package/lib-commonjs/utilities/test-data.js.map +1 -1
  152. package/lib-commonjs/utilities/utilities.d.ts +14 -6
  153. package/lib-commonjs/utilities/utilities.js +28 -10
  154. package/lib-commonjs/utilities/utilities.js.map +1 -1
  155. package/package.json +2 -2
  156. package/src/components/CommonComponents/CartesianChart.types.ts +5 -2
  157. package/src/components/GanttChart/GanttChart.types.ts +83 -0
@@ -10,6 +10,7 @@ import {
10
10
  IAccessibilityProps,
11
11
  IChart,
12
12
  IDataPoint,
13
+ IGanttChartDataPoint,
13
14
  IGroupedVerticalBarChartData,
14
15
  IHeatMapChartDataPoint,
15
16
  IHorizontalBarChartWithAxisDataPoint,
@@ -720,7 +721,8 @@ export interface IModifiedCartesianChartProps extends ICartesianChartProps {
720
721
  | IHorizontalBarChartWithAxisDataPoint[]
721
722
  | IVerticalBarChartDataPoint[]
722
723
  | IDataPoint[]
723
- | IScatterChartDataPoint[],
724
+ | IScatterChartDataPoint[]
725
+ | IGanttChartDataPoint[],
724
726
  yAxisType: YAxisType | undefined,
725
727
  useSecondaryYScale?: boolean,
726
728
  ) => { startValue: number; endValue: number };
@@ -748,7 +750,8 @@ export interface IModifiedCartesianChartProps extends ICartesianChartProps {
748
750
  | IVerticalStackedBarDataPoint[]
749
751
  | IHorizontalBarChartWithAxisDataPoint[]
750
752
  | IGroupedVerticalBarChartData[]
751
- | IHeatMapChartDataPoint[],
753
+ | IHeatMapChartDataPoint[]
754
+ | IGanttChartDataPoint[],
752
755
  margins: IMargins,
753
756
  width: number,
754
757
  chartType: ChartTypes,
@@ -0,0 +1,83 @@
1
+ import { IRenderFunction, IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';
2
+ import {
3
+ ICartesianChartProps,
4
+ ICartesianChartStyleProps,
5
+ ICartesianChartStyles,
6
+ IGanttChartDataPoint,
7
+ } from '../../index';
8
+
9
+ /**
10
+ * Gantt Chart properties
11
+ * {@docCategory GanttChart}
12
+ */
13
+ export interface IGanttChartProps extends ICartesianChartProps {
14
+ /**
15
+ * Data to render in the chart.
16
+ */
17
+ data?: IGanttChartDataPoint[];
18
+
19
+ /**
20
+ * Define a custom callout renderer for a data point.
21
+ */
22
+ onRenderCalloutPerDataPoint?: IRenderFunction<IGanttChartDataPoint>;
23
+
24
+ /**
25
+ * Width of each bar in the chart.
26
+ */
27
+ barHeight?: number;
28
+
29
+ /**
30
+ * chart title for the chart
31
+ */
32
+ chartTitle?: string;
33
+
34
+ /**
35
+ * Call to provide customized styling that will layer on top of the variant rules.
36
+ */
37
+ styles?: IStyleFunctionOrObject<IGanttChartStyleProps, IGanttChartStyles>;
38
+
39
+ /**
40
+ * The prop used to define the culture to localized the numbers
41
+ */
42
+ culture?: string;
43
+
44
+ /**
45
+ * it's padding between bar's or lines in the graph
46
+ */
47
+ yAxisPadding?: number;
48
+
49
+ /**
50
+ *@default false
51
+ *Used for to elipse y axis labes and show tooltip on x axis labels
52
+ */
53
+ showYAxisLablesTooltip?: boolean;
54
+
55
+ /**
56
+ *@default false
57
+ *Used for showing complete y axis lables */
58
+ showYAxisLables?: boolean;
59
+
60
+ /**
61
+ * @default false
62
+ * The prop used to enable gradient fill color for the chart.
63
+ */
64
+ enableGradient?: boolean;
65
+
66
+ /**
67
+ * @default false
68
+ * The prop used to enable rounded corners for the bars.
69
+ */
70
+ roundCorners?: boolean;
71
+ }
72
+
73
+ /**
74
+ * Gantt Chart style properties
75
+ * {@docCategory GanttChart}
76
+ */
77
+ export interface IGanttChartStyleProps extends ICartesianChartStyleProps {}
78
+
79
+ /**
80
+ * Gantt Chart styles
81
+ * {@docCategory GanttChart}
82
+ */
83
+ export interface IGanttChartStyles extends ICartesianChartStyles {}