@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.
- package/CHANGELOG.json +49 -1
- package/CHANGELOG.md +23 -2
- package/dist/react-charting.d.ts +150 -1
- package/dist/react-charting.js +1 -1
- package/dist/react-charting.min.js +1 -1
- package/etc/react-charting.api.md +41 -1
- package/lib/FunnelChart.d.ts +1 -0
- package/lib/FunnelChart.js +2 -0
- package/lib/FunnelChart.js.map +1 -0
- package/lib/components/DeclarativeChart/DeclarativeChart.js +7 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +2 -0
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +123 -2
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/FunnelChart/FunnelChart.base.d.ts +3 -0
- package/lib/components/FunnelChart/FunnelChart.base.js +264 -0
- package/lib/components/FunnelChart/FunnelChart.base.js.map +1 -0
- package/lib/components/FunnelChart/FunnelChart.d.ts +7 -0
- package/lib/components/FunnelChart/FunnelChart.js +9 -0
- package/lib/components/FunnelChart/FunnelChart.js.map +1 -0
- package/lib/components/FunnelChart/FunnelChart.styles.d.ts +2 -0
- package/lib/components/FunnelChart/FunnelChart.styles.js +38 -0
- package/lib/components/FunnelChart/FunnelChart.styles.js.map +1 -0
- package/lib/components/FunnelChart/FunnelChart.types.d.ts +139 -0
- package/lib/components/FunnelChart/FunnelChart.types.js +2 -0
- package/lib/components/FunnelChart/FunnelChart.types.js.map +1 -0
- package/lib/components/FunnelChart/funnelGeometry.d.ts +77 -0
- package/lib/components/FunnelChart/funnelGeometry.js +194 -0
- package/lib/components/FunnelChart/funnelGeometry.js.map +1 -0
- package/lib/components/FunnelChart/index.d.ts +2 -0
- package/lib/components/FunnelChart/index.js +3 -0
- package/lib/components/FunnelChart/index.js.map +1 -0
- package/lib/components/HeatMapChart/HeatMapChart.base.d.ts +0 -1
- package/lib/components/HeatMapChart/HeatMapChart.base.js +2 -16
- package/lib/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib/components/LineChart/LineChart.base.d.ts +4 -0
- package/lib/components/LineChart/LineChart.base.js +77 -56
- package/lib/components/LineChart/LineChart.base.js.map +1 -1
- package/lib/components/LineChart/LineChart.types.d.ts +6 -0
- package/lib/components/LineChart/LineChart.types.js.map +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/types/IDataPoint.d.ts +1 -1
- package/lib/types/IDataPoint.js.map +1 -1
- package/lib/utilities/utilities.d.ts +3 -0
- package/lib/utilities/utilities.js +14 -0
- package/lib/utilities/utilities.js.map +1 -1
- package/lib-amd/FunnelChart.d.ts +1 -0
- package/lib-amd/FunnelChart.js +6 -0
- package/lib-amd/FunnelChart.js.map +1 -0
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.js +6 -1
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +2 -0
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +125 -3
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-amd/components/FunnelChart/FunnelChart.base.d.ts +3 -0
- package/lib-amd/components/FunnelChart/FunnelChart.base.js +258 -0
- package/lib-amd/components/FunnelChart/FunnelChart.base.js.map +1 -0
- package/lib-amd/components/FunnelChart/FunnelChart.d.ts +7 -0
- package/lib-amd/components/FunnelChart/FunnelChart.js +11 -0
- package/lib-amd/components/FunnelChart/FunnelChart.js.map +1 -0
- package/lib-amd/components/FunnelChart/FunnelChart.styles.d.ts +2 -0
- package/lib-amd/components/FunnelChart/FunnelChart.styles.js +43 -0
- package/lib-amd/components/FunnelChart/FunnelChart.styles.js.map +1 -0
- package/lib-amd/components/FunnelChart/FunnelChart.types.d.ts +139 -0
- package/lib-amd/components/FunnelChart/FunnelChart.types.js +5 -0
- package/lib-amd/components/FunnelChart/FunnelChart.types.js.map +1 -0
- package/lib-amd/components/FunnelChart/funnelGeometry.d.ts +77 -0
- package/lib-amd/components/FunnelChart/funnelGeometry.js +204 -0
- package/lib-amd/components/FunnelChart/funnelGeometry.js.map +1 -0
- package/lib-amd/components/FunnelChart/index.d.ts +2 -0
- package/lib-amd/components/FunnelChart/index.js +7 -0
- package/lib-amd/components/FunnelChart/index.js.map +1 -0
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.d.ts +0 -1
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.js +2 -15
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib-amd/components/LineChart/LineChart.base.d.ts +4 -0
- package/lib-amd/components/LineChart/LineChart.base.js +77 -56
- package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
- package/lib-amd/components/LineChart/LineChart.types.d.ts +6 -0
- package/lib-amd/components/LineChart/LineChart.types.js.map +1 -1
- package/lib-amd/index.d.ts +2 -0
- package/lib-amd/index.js +3 -2
- package/lib-amd/index.js.map +1 -1
- package/lib-amd/types/IDataPoint.d.ts +1 -1
- package/lib-amd/types/IDataPoint.js.map +1 -1
- package/lib-amd/utilities/utilities.d.ts +3 -0
- package/lib-amd/utilities/utilities.js +17 -2
- package/lib-amd/utilities/utilities.js.map +1 -1
- package/lib-commonjs/FunnelChart.d.ts +1 -0
- package/lib-commonjs/FunnelChart.js +5 -0
- package/lib-commonjs/FunnelChart.js.map +1 -0
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +6 -0
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +2 -0
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +125 -3
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/FunnelChart.base.d.ts +3 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.base.js +267 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.base.js.map +1 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.d.ts +7 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.js +12 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.styles.d.ts +2 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.styles.js +42 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.styles.js.map +1 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.types.d.ts +139 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.types.js +3 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.types.js.map +1 -0
- package/lib-commonjs/components/FunnelChart/funnelGeometry.d.ts +77 -0
- package/lib-commonjs/components/FunnelChart/funnelGeometry.js +202 -0
- package/lib-commonjs/components/FunnelChart/funnelGeometry.js.map +1 -0
- package/lib-commonjs/components/FunnelChart/index.d.ts +2 -0
- package/lib-commonjs/components/FunnelChart/index.js +6 -0
- package/lib-commonjs/components/FunnelChart/index.js.map +1 -0
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.d.ts +0 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js +1 -15
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.base.d.ts +4 -0
- package/lib-commonjs/components/LineChart/LineChart.base.js +77 -56
- package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.types.d.ts +6 -0
- package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -1
- package/lib-commonjs/index.d.ts +2 -0
- package/lib-commonjs/index.js +3 -1
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/types/IDataPoint.d.ts +1 -1
- package/lib-commonjs/types/IDataPoint.js.map +1 -1
- package/lib-commonjs/utilities/utilities.d.ts +3 -0
- package/lib-commonjs/utilities/utilities.js +17 -1
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/package.json +2 -2
- package/src/components/FunnelChart/FunnelChart.types.ts +153 -0
- 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
|
/**
|