@fluentui/react-charting 5.24.8 → 5.24.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 (135) hide show
  1. package/CHANGELOG.json +49 -1
  2. package/CHANGELOG.md +23 -2
  3. package/dist/react-charting.d.ts +150 -1
  4. package/dist/react-charting.js +1 -1
  5. package/dist/react-charting.min.js +1 -1
  6. package/etc/react-charting.api.md +41 -1
  7. package/lib/FunnelChart.d.ts +1 -0
  8. package/lib/FunnelChart.js +2 -0
  9. package/lib/FunnelChart.js.map +1 -0
  10. package/lib/components/DeclarativeChart/DeclarativeChart.js +7 -1
  11. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  12. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +2 -0
  13. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +123 -2
  14. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  15. package/lib/components/FunnelChart/FunnelChart.base.d.ts +3 -0
  16. package/lib/components/FunnelChart/FunnelChart.base.js +264 -0
  17. package/lib/components/FunnelChart/FunnelChart.base.js.map +1 -0
  18. package/lib/components/FunnelChart/FunnelChart.d.ts +7 -0
  19. package/lib/components/FunnelChart/FunnelChart.js +9 -0
  20. package/lib/components/FunnelChart/FunnelChart.js.map +1 -0
  21. package/lib/components/FunnelChart/FunnelChart.styles.d.ts +2 -0
  22. package/lib/components/FunnelChart/FunnelChart.styles.js +38 -0
  23. package/lib/components/FunnelChart/FunnelChart.styles.js.map +1 -0
  24. package/lib/components/FunnelChart/FunnelChart.types.d.ts +139 -0
  25. package/lib/components/FunnelChart/FunnelChart.types.js +2 -0
  26. package/lib/components/FunnelChart/FunnelChart.types.js.map +1 -0
  27. package/lib/components/FunnelChart/funnelGeometry.d.ts +77 -0
  28. package/lib/components/FunnelChart/funnelGeometry.js +194 -0
  29. package/lib/components/FunnelChart/funnelGeometry.js.map +1 -0
  30. package/lib/components/FunnelChart/index.d.ts +2 -0
  31. package/lib/components/FunnelChart/index.js +3 -0
  32. package/lib/components/FunnelChart/index.js.map +1 -0
  33. package/lib/components/HeatMapChart/HeatMapChart.base.d.ts +0 -1
  34. package/lib/components/HeatMapChart/HeatMapChart.base.js +2 -16
  35. package/lib/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  36. package/lib/components/LineChart/LineChart.base.d.ts +4 -0
  37. package/lib/components/LineChart/LineChart.base.js +77 -56
  38. package/lib/components/LineChart/LineChart.base.js.map +1 -1
  39. package/lib/components/LineChart/LineChart.types.d.ts +6 -0
  40. package/lib/components/LineChart/LineChart.types.js.map +1 -1
  41. package/lib/index.d.ts +2 -0
  42. package/lib/index.js +1 -0
  43. package/lib/index.js.map +1 -1
  44. package/lib/types/IDataPoint.d.ts +1 -1
  45. package/lib/types/IDataPoint.js.map +1 -1
  46. package/lib/utilities/utilities.d.ts +3 -0
  47. package/lib/utilities/utilities.js +14 -0
  48. package/lib/utilities/utilities.js.map +1 -1
  49. package/lib-amd/FunnelChart.d.ts +1 -0
  50. package/lib-amd/FunnelChart.js +6 -0
  51. package/lib-amd/FunnelChart.js.map +1 -0
  52. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js +6 -1
  53. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  54. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +2 -0
  55. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +125 -3
  56. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  57. package/lib-amd/components/FunnelChart/FunnelChart.base.d.ts +3 -0
  58. package/lib-amd/components/FunnelChart/FunnelChart.base.js +258 -0
  59. package/lib-amd/components/FunnelChart/FunnelChart.base.js.map +1 -0
  60. package/lib-amd/components/FunnelChart/FunnelChart.d.ts +7 -0
  61. package/lib-amd/components/FunnelChart/FunnelChart.js +11 -0
  62. package/lib-amd/components/FunnelChart/FunnelChart.js.map +1 -0
  63. package/lib-amd/components/FunnelChart/FunnelChart.styles.d.ts +2 -0
  64. package/lib-amd/components/FunnelChart/FunnelChart.styles.js +43 -0
  65. package/lib-amd/components/FunnelChart/FunnelChart.styles.js.map +1 -0
  66. package/lib-amd/components/FunnelChart/FunnelChart.types.d.ts +139 -0
  67. package/lib-amd/components/FunnelChart/FunnelChart.types.js +5 -0
  68. package/lib-amd/components/FunnelChart/FunnelChart.types.js.map +1 -0
  69. package/lib-amd/components/FunnelChart/funnelGeometry.d.ts +77 -0
  70. package/lib-amd/components/FunnelChart/funnelGeometry.js +204 -0
  71. package/lib-amd/components/FunnelChart/funnelGeometry.js.map +1 -0
  72. package/lib-amd/components/FunnelChart/index.d.ts +2 -0
  73. package/lib-amd/components/FunnelChart/index.js +7 -0
  74. package/lib-amd/components/FunnelChart/index.js.map +1 -0
  75. package/lib-amd/components/HeatMapChart/HeatMapChart.base.d.ts +0 -1
  76. package/lib-amd/components/HeatMapChart/HeatMapChart.base.js +2 -15
  77. package/lib-amd/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  78. package/lib-amd/components/LineChart/LineChart.base.d.ts +4 -0
  79. package/lib-amd/components/LineChart/LineChart.base.js +77 -56
  80. package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
  81. package/lib-amd/components/LineChart/LineChart.types.d.ts +6 -0
  82. package/lib-amd/components/LineChart/LineChart.types.js.map +1 -1
  83. package/lib-amd/index.d.ts +2 -0
  84. package/lib-amd/index.js +3 -2
  85. package/lib-amd/index.js.map +1 -1
  86. package/lib-amd/types/IDataPoint.d.ts +1 -1
  87. package/lib-amd/types/IDataPoint.js.map +1 -1
  88. package/lib-amd/utilities/utilities.d.ts +3 -0
  89. package/lib-amd/utilities/utilities.js +17 -2
  90. package/lib-amd/utilities/utilities.js.map +1 -1
  91. package/lib-commonjs/FunnelChart.d.ts +1 -0
  92. package/lib-commonjs/FunnelChart.js +5 -0
  93. package/lib-commonjs/FunnelChart.js.map +1 -0
  94. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +6 -0
  95. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  96. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +2 -0
  97. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +125 -3
  98. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  99. package/lib-commonjs/components/FunnelChart/FunnelChart.base.d.ts +3 -0
  100. package/lib-commonjs/components/FunnelChart/FunnelChart.base.js +267 -0
  101. package/lib-commonjs/components/FunnelChart/FunnelChart.base.js.map +1 -0
  102. package/lib-commonjs/components/FunnelChart/FunnelChart.d.ts +7 -0
  103. package/lib-commonjs/components/FunnelChart/FunnelChart.js +12 -0
  104. package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -0
  105. package/lib-commonjs/components/FunnelChart/FunnelChart.styles.d.ts +2 -0
  106. package/lib-commonjs/components/FunnelChart/FunnelChart.styles.js +42 -0
  107. package/lib-commonjs/components/FunnelChart/FunnelChart.styles.js.map +1 -0
  108. package/lib-commonjs/components/FunnelChart/FunnelChart.types.d.ts +139 -0
  109. package/lib-commonjs/components/FunnelChart/FunnelChart.types.js +3 -0
  110. package/lib-commonjs/components/FunnelChart/FunnelChart.types.js.map +1 -0
  111. package/lib-commonjs/components/FunnelChart/funnelGeometry.d.ts +77 -0
  112. package/lib-commonjs/components/FunnelChart/funnelGeometry.js +202 -0
  113. package/lib-commonjs/components/FunnelChart/funnelGeometry.js.map +1 -0
  114. package/lib-commonjs/components/FunnelChart/index.d.ts +2 -0
  115. package/lib-commonjs/components/FunnelChart/index.js +6 -0
  116. package/lib-commonjs/components/FunnelChart/index.js.map +1 -0
  117. package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.d.ts +0 -1
  118. package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js +1 -15
  119. package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  120. package/lib-commonjs/components/LineChart/LineChart.base.d.ts +4 -0
  121. package/lib-commonjs/components/LineChart/LineChart.base.js +77 -56
  122. package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
  123. package/lib-commonjs/components/LineChart/LineChart.types.d.ts +6 -0
  124. package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -1
  125. package/lib-commonjs/index.d.ts +2 -0
  126. package/lib-commonjs/index.js +3 -1
  127. package/lib-commonjs/index.js.map +1 -1
  128. package/lib-commonjs/types/IDataPoint.d.ts +1 -1
  129. package/lib-commonjs/types/IDataPoint.js.map +1 -1
  130. package/lib-commonjs/utilities/utilities.d.ts +3 -0
  131. package/lib-commonjs/utilities/utilities.js +17 -1
  132. package/lib-commonjs/utilities/utilities.js.map +1 -1
  133. package/package.json +2 -2
  134. package/src/components/FunnelChart/FunnelChart.types.ts +153 -0
  135. package/src/components/LineChart/LineChart.types.ts +7 -0
@@ -0,0 +1,153 @@
1
+ import * as React from 'react';
2
+ import { IStyle, ITheme } from '@fluentui/react/lib/Styling';
3
+ import { IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';
4
+ import { ICalloutContentStyleProps, ICalloutContentStyles } from '@fluentui/react/lib/Callout';
5
+ import { ILegendsProps } from '../Legends/index';
6
+ import { ICalloutProps } from '@fluentui/react/lib/Callout';
7
+
8
+ /**
9
+ * Data point for funnel chart
10
+ * {@docCategory FunnelChart}
11
+ */
12
+ export interface IFunnelChartDataPoint {
13
+ /**
14
+ * Stage name or identifier
15
+ */
16
+ stage: string | number;
17
+ /**
18
+ * Sub-values for stacked funnel charts
19
+ * Each sub-value represents a category within the stage
20
+ */
21
+ subValues?: Array<{ category: string; value: number; color: string }>;
22
+ /**
23
+ * Value for the stage (used for non-stacked funnel charts)
24
+ */
25
+ value?: number;
26
+ /**
27
+ * Color for the stage (used for non-stacked funnel charts)
28
+ */
29
+ color?: string;
30
+ }
31
+
32
+ /**
33
+ * Funnel Chart component props
34
+ * {@docCategory FunnelChart}
35
+ */
36
+ export interface IFunnelChartProps {
37
+ /**
38
+ * Data points for the funnel chart
39
+ */
40
+ data: IFunnelChartDataPoint[];
41
+ /**
42
+ * Title for the chart
43
+ */
44
+ chartTitle?: string;
45
+ /**
46
+ * Width of the chart
47
+ */
48
+ width?: number;
49
+
50
+ /**
51
+ * Height of the chart
52
+ */
53
+ height?: number;
54
+
55
+ /**
56
+ * Decides whether to show/hide legends
57
+ * @defaultvalue false
58
+ */
59
+ hideLegend?: boolean;
60
+
61
+ /**
62
+ * Props for the legends in the chart
63
+ */
64
+ legendProps?: Partial<ILegendsProps>;
65
+
66
+ /**
67
+ * Props for the callout in the chart
68
+ */
69
+ calloutProps?: Partial<ICalloutProps>;
70
+
71
+ /**
72
+ * Theme (provided through customization)
73
+ */
74
+ theme?: ITheme;
75
+
76
+ /**
77
+ * Call to provide customized styling that will layer on top of the variant rules
78
+ */
79
+ styles?: IStyleFunctionOrObject<IFunnelChartStyleProps, IFunnelChartStyles>;
80
+
81
+ /**
82
+ * Defines the culture to localize the numbers and dates
83
+ */
84
+ culture?: string;
85
+
86
+ /**
87
+ * Reference to the chart component
88
+ */
89
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
90
+ componentRef?: React.RefObject<any>;
91
+
92
+ /**
93
+ * Additional CSS class(es) to apply to the chart
94
+ */
95
+ className?: string;
96
+
97
+ /**
98
+ * Orientation of the funnel chart
99
+ * @defaultvalue 'horizontal'
100
+ */
101
+ orientation?: 'horizontal' | 'vertical';
102
+ }
103
+
104
+ /**
105
+ * Funnel Chart style properties
106
+ * {@docCategory FunnelChart}
107
+ */
108
+ export interface IFunnelChartStyleProps {
109
+ /**
110
+ * Theme (provided through customization)
111
+ */
112
+ theme: ITheme;
113
+ /**
114
+ * Additional CSS class(es) to apply to the chart
115
+ */
116
+ className?: string;
117
+ /**
118
+ * Width of the chart
119
+ */
120
+ chartWidth: number;
121
+ /**
122
+ * Height of the chart
123
+ */
124
+ chartHeight: number;
125
+ }
126
+
127
+ /**
128
+ * Funnel Chart styles
129
+ * {@docCategory FunnelChart}
130
+ */
131
+ export interface IFunnelChartStyles {
132
+ /**
133
+ * Styles for the root element
134
+ */
135
+ root?: IStyle;
136
+
137
+ /**
138
+ * Styles for the chart
139
+ */
140
+ chart?: IStyle;
141
+
142
+ /**
143
+ * Styles for text elements
144
+ */
145
+ text?: IStyle;
146
+
147
+ /**
148
+ * Styles for sub-components
149
+ */
150
+ subComponentStyles: {
151
+ calloutStyles: IStyleFunctionOrObject<ICalloutContentStyleProps, ICalloutContentStyles>;
152
+ };
153
+ }
@@ -94,6 +94,13 @@ export interface ILineChartProps extends ICartesianChartProps {
94
94
  * @deprecated this prop no longer used to identify scatter mode
95
95
  */
96
96
  lineMode?: 'default' | 'scatter';
97
+
98
+ /**
99
+ * To enable callout for individual line or complete stack.
100
+ * @default false
101
+ * @type \{boolean \}
102
+ */
103
+ isCalloutForStack?: boolean;
97
104
  }
98
105
 
99
106
  /**