@fluentui/react-charting 5.11.0 → 5.12.2
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 +72 -1
- package/CHANGELOG.md +32 -2
- package/dist/react-charting.js +1 -1
- package/dist/react-charting.min.js +1 -1
- package/lib/TreeChart.d.ts +1 -0
- package/lib/TreeChart.js +2 -0
- package/lib/TreeChart.js.map +1 -0
- package/lib/Utilities.d.ts +1 -1
- package/lib/Utilities.js +4 -2
- package/lib/Utilities.js.map +1 -1
- package/lib/components/Legends/Legends.base.js +2 -1
- package/lib/components/Legends/Legends.base.js.map +1 -1
- package/lib/components/TreeChart/TreeChart.base.d.ts +18 -0
- package/lib/components/TreeChart/TreeChart.base.js +297 -0
- package/lib/components/TreeChart/TreeChart.base.js.map +1 -0
- package/lib/components/TreeChart/TreeChart.d.ts +3 -0
- package/lib/components/TreeChart/TreeChart.js +5 -0
- package/lib/components/TreeChart/TreeChart.js.map +1 -0
- package/lib/components/TreeChart/TreeChart.styles.d.ts +2 -0
- package/lib/components/TreeChart/TreeChart.styles.js +28 -0
- package/lib/components/TreeChart/TreeChart.styles.js.map +1 -0
- package/lib/components/TreeChart/TreeChart.types.d.ts +185 -0
- package/lib/components/TreeChart/TreeChart.types.js +23 -0
- package/lib/components/TreeChart/TreeChart.types.js.map +1 -0
- package/lib/components/TreeChart/index.d.ts +2 -0
- package/lib/components/TreeChart/index.js +3 -0
- package/lib/components/TreeChart/index.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/lib-amd/TreeChart.d.ts +1 -0
- package/lib-amd/TreeChart.js +6 -0
- package/lib-amd/TreeChart.js.map +1 -0
- package/lib-amd/Utilities.d.ts +1 -1
- package/lib-amd/Utilities.js +3 -1
- package/lib-amd/Utilities.js.map +1 -1
- package/lib-amd/components/Legends/Legends.base.js +2 -1
- package/lib-amd/components/Legends/Legends.base.js.map +1 -1
- package/lib-amd/components/TreeChart/TreeChart.base.d.ts +18 -0
- package/lib-amd/components/TreeChart/TreeChart.base.js +296 -0
- package/lib-amd/components/TreeChart/TreeChart.base.js.map +1 -0
- package/lib-amd/components/TreeChart/TreeChart.d.ts +3 -0
- package/lib-amd/components/TreeChart/TreeChart.js +7 -0
- package/lib-amd/components/TreeChart/TreeChart.js.map +1 -0
- package/lib-amd/components/TreeChart/TreeChart.styles.d.ts +2 -0
- package/lib-amd/components/TreeChart/TreeChart.styles.js +33 -0
- package/lib-amd/components/TreeChart/TreeChart.styles.js.map +1 -0
- package/lib-amd/components/TreeChart/TreeChart.types.d.ts +185 -0
- package/lib-amd/components/TreeChart/TreeChart.types.js +28 -0
- package/lib-amd/components/TreeChart/TreeChart.types.js.map +1 -0
- package/lib-amd/components/TreeChart/index.d.ts +2 -0
- package/lib-amd/components/TreeChart/index.js +7 -0
- package/lib-amd/components/TreeChart/index.js.map +1 -0
- package/lib-amd/index.d.ts +1 -0
- package/lib-amd/index.js +2 -1
- package/lib-amd/index.js.map +1 -1
- package/lib-amd/version.js +1 -1
- package/lib-amd/version.js.map +1 -1
- package/lib-commonjs/TreeChart.d.ts +1 -0
- package/lib-commonjs/TreeChart.js +5 -0
- package/lib-commonjs/TreeChart.js.map +1 -0
- package/lib-commonjs/Utilities.d.ts +1 -1
- package/lib-commonjs/Utilities.js +6 -4
- package/lib-commonjs/Utilities.js.map +1 -1
- package/lib-commonjs/components/Legends/Legends.base.js +2 -1
- package/lib-commonjs/components/Legends/Legends.base.js.map +1 -1
- package/lib-commonjs/components/TreeChart/TreeChart.base.d.ts +18 -0
- package/lib-commonjs/components/TreeChart/TreeChart.base.js +300 -0
- package/lib-commonjs/components/TreeChart/TreeChart.base.js.map +1 -0
- package/lib-commonjs/components/TreeChart/TreeChart.d.ts +3 -0
- package/lib-commonjs/components/TreeChart/TreeChart.js +8 -0
- package/lib-commonjs/components/TreeChart/TreeChart.js.map +1 -0
- package/lib-commonjs/components/TreeChart/TreeChart.styles.d.ts +2 -0
- package/lib-commonjs/components/TreeChart/TreeChart.styles.js +32 -0
- package/lib-commonjs/components/TreeChart/TreeChart.styles.js.map +1 -0
- package/lib-commonjs/components/TreeChart/TreeChart.types.d.ts +185 -0
- package/lib-commonjs/components/TreeChart/TreeChart.types.js +26 -0
- package/lib-commonjs/components/TreeChart/TreeChart.types.js.map +1 -0
- package/lib-commonjs/components/TreeChart/index.d.ts +2 -0
- package/lib-commonjs/components/TreeChart/index.js +6 -0
- package/lib-commonjs/components/TreeChart/index.js.map +1 -0
- package/lib-commonjs/index.d.ts +1 -0
- package/lib-commonjs/index.js +1 -0
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/version.js +1 -1
- package/lib-commonjs/version.js.map +1 -1
- package/package.json +6 -4
- package/src/components/TreeChart/TreeChart.types.ts +186 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/TreeChart/index.ts"],"names":[],"mappings":";;;AAAA,sDAA4B;AAC5B,4DAAkC","sourcesContent":["export * from './TreeChart';\nexport * from './TreeChart.types';\n"]}
|
package/lib-commonjs/index.d.ts
CHANGED
package/lib-commonjs/index.js
CHANGED
|
@@ -16,6 +16,7 @@ tslib_1.__exportStar(require("./types/index"), exports);
|
|
|
16
16
|
tslib_1.__exportStar(require("./utilities/ChartHoverCard/index"), exports);
|
|
17
17
|
tslib_1.__exportStar(require("./HeatMapChart"), exports);
|
|
18
18
|
tslib_1.__exportStar(require("./SankeyChart"), exports);
|
|
19
|
+
tslib_1.__exportStar(require("./TreeChart"), exports);
|
|
19
20
|
tslib_1.__exportStar(require("./Sparkline"), exports);
|
|
20
21
|
require("./version");
|
|
21
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["index.ts"],"names":[],"mappings":";;;AAAA,+DAAqC;AACrC,uDAA6B;AAC7B,oDAA0B;AAC1B,sDAA4B;AAC5B,sDAA4B;AAC5B,qDAA2B;AAC3B,4DAAkC;AAClC,6DAAmC;AACnC,oEAA0C;AAC1C,oEAA0C;AAC1C,2DAAiC;AACjC,wDAA8B;AAC9B,2EAAiD;AACjD,yDAA+B;AAC/B,wDAA8B;AAC9B,sDAA4B;AAE5B,qBAAmB","sourcesContent":["export * from './HorizontalBarChart';\nexport * from './DonutChart';\nexport * from './Legends';\nexport * from './LineChart';\nexport * from './AreaChart';\nexport * from './PieChart';\nexport * from './StackedBarChart';\nexport * from './VerticalBarChart';\nexport * from './VerticalStackedBarChart';\nexport * from './GroupedVerticalBarChart';\nexport * from './CartesianChart';\nexport * from './types/index';\nexport * from './utilities/ChartHoverCard/index';\nexport * from './HeatMapChart';\nexport * from './SankeyChart';\nexport * from './Sparkline';\n\nimport './version';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["index.ts"],"names":[],"mappings":";;;AAAA,+DAAqC;AACrC,uDAA6B;AAC7B,oDAA0B;AAC1B,sDAA4B;AAC5B,sDAA4B;AAC5B,qDAA2B;AAC3B,4DAAkC;AAClC,6DAAmC;AACnC,oEAA0C;AAC1C,oEAA0C;AAC1C,2DAAiC;AACjC,wDAA8B;AAC9B,2EAAiD;AACjD,yDAA+B;AAC/B,wDAA8B;AAC9B,sDAA4B;AAC5B,sDAA4B;AAE5B,qBAAmB","sourcesContent":["export * from './HorizontalBarChart';\nexport * from './DonutChart';\nexport * from './Legends';\nexport * from './LineChart';\nexport * from './AreaChart';\nexport * from './PieChart';\nexport * from './StackedBarChart';\nexport * from './VerticalBarChart';\nexport * from './VerticalStackedBarChart';\nexport * from './GroupedVerticalBarChart';\nexport * from './CartesianChart';\nexport * from './types/index';\nexport * from './utilities/ChartHoverCard/index';\nexport * from './HeatMapChart';\nexport * from './SankeyChart';\nexport * from './TreeChart';\nexport * from './Sparkline';\n\nimport './version';\n"]}
|
package/lib-commonjs/version.js
CHANGED
|
@@ -3,5 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
// Do not modify this file; it is generated as part of publish.
|
|
4
4
|
// The checked in version is a placeholder only and will not be updated.
|
|
5
5
|
var set_version_1 = require("@fluentui/set-version");
|
|
6
|
-
set_version_1.setVersion('@fluentui/react-charting', '5.
|
|
6
|
+
set_version_1.setVersion('@fluentui/react-charting', '5.12.2');
|
|
7
7
|
//# sourceMappingURL=version.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"../src/","sources":["version.ts"],"names":[],"mappings":";;AAAA,+DAA+D;AAC/D,wEAAwE;AACxE,qDAAmD;AACnD,wBAAU,CAAC,0BAA0B,EAAE,QAAQ,CAAC,CAAC","sourcesContent":["// Do not modify this file; it is generated as part of publish.\n// The checked in version is a placeholder only and will not be updated.\nimport { setVersion } from '@fluentui/set-version';\nsetVersion('@fluentui/react-charting', '5.
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"../src/","sources":["version.ts"],"names":[],"mappings":";;AAAA,+DAA+D;AAC/D,wEAAwE;AACxE,qDAAmD;AACnD,wBAAU,CAAC,0BAA0B,EAAE,QAAQ,CAAC,CAAC","sourcesContent":["// Do not modify this file; it is generated as part of publish.\n// The checked in version is a placeholder only and will not be updated.\nimport { setVersion } from '@fluentui/set-version';\nsetVersion('@fluentui/react-charting', '5.12.2');"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-charting",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.12.2",
|
|
4
4
|
"description": "Experimental React charting components for building experiences for Microsoft 365.",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -28,17 +28,18 @@
|
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@fluentui/eslint-plugin": "*",
|
|
31
|
-
"@fluentui/react": "^8.
|
|
31
|
+
"@fluentui/react": "^8.81.0",
|
|
32
32
|
"@types/react-addons-test-utils": "0.14.18",
|
|
33
33
|
"@fluentui/scripts": "^1.0.0",
|
|
34
34
|
"@fluentui/jest-serializer-merge-styles": "^8.0.19"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@fluentui/react-focus": "^8.7.
|
|
37
|
+
"@fluentui/react-focus": "^8.7.3",
|
|
38
38
|
"@microsoft/load-themed-styles": "^1.10.26",
|
|
39
39
|
"@types/d3-array": "1.2.1",
|
|
40
40
|
"@types/d3-axis": "1.0.10",
|
|
41
41
|
"@types/d3-format": "^1.3.1",
|
|
42
|
+
"@types/d3-hierarchy": "2.0.0",
|
|
42
43
|
"@types/d3-sankey": "^0.11.0",
|
|
43
44
|
"@types/d3-scale": "2.0.0",
|
|
44
45
|
"@types/d3-selection": "1.4.1",
|
|
@@ -48,6 +49,7 @@
|
|
|
48
49
|
"d3-array": "1.2.1",
|
|
49
50
|
"d3-axis": "1.0.8",
|
|
50
51
|
"d3-format": "^1.4.4",
|
|
52
|
+
"d3-hierarchy": "2.0.0",
|
|
51
53
|
"d3-sankey": "^0.12.3",
|
|
52
54
|
"d3-scale": "2.0.0",
|
|
53
55
|
"d3-selection": "1.3.0",
|
|
@@ -56,7 +58,7 @@
|
|
|
56
58
|
"tslib": "^2.1.0"
|
|
57
59
|
},
|
|
58
60
|
"peerDependencies": {
|
|
59
|
-
"@fluentui/react": "^8.
|
|
61
|
+
"@fluentui/react": "^8.81.0",
|
|
60
62
|
"@types/react": ">=16.8.0 <18.0.0",
|
|
61
63
|
"@types/react-dom": ">=16.8.0 <18.0.0",
|
|
62
64
|
"react": ">=16.8.0 <18.0.0",
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { IStyle, ITheme } from '@fluentui/react/lib/Styling';
|
|
2
|
+
import { IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';
|
|
3
|
+
|
|
4
|
+
export interface ITreeChartDataPoint {
|
|
5
|
+
/**
|
|
6
|
+
* Node main text
|
|
7
|
+
*/
|
|
8
|
+
name: string;
|
|
9
|
+
/**
|
|
10
|
+
* Subtext value (optional)
|
|
11
|
+
*/
|
|
12
|
+
subname?: string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Metric text value (optional)
|
|
15
|
+
*/
|
|
16
|
+
metric?: string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Color of the rectangular box
|
|
19
|
+
*/
|
|
20
|
+
fill: string;
|
|
21
|
+
/**
|
|
22
|
+
* Recursive datastructure for child node object
|
|
23
|
+
*/
|
|
24
|
+
children?: Array<ITreeChartDataPoint>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export enum NodesComposition {
|
|
28
|
+
/**
|
|
29
|
+
* NodeComposition enum val for long: number = 1
|
|
30
|
+
*/
|
|
31
|
+
long = 1,
|
|
32
|
+
/**
|
|
33
|
+
* NodeComposition enum val for compact: number = 0
|
|
34
|
+
*/
|
|
35
|
+
compact = 0,
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export enum TreeTraverse {
|
|
39
|
+
/**
|
|
40
|
+
* TreeTraverse enum val for preOrder: number = 1
|
|
41
|
+
*/
|
|
42
|
+
preOrder = 1,
|
|
43
|
+
/**
|
|
44
|
+
* TreeTraverse enum val for levelOrder: number = 0
|
|
45
|
+
*/
|
|
46
|
+
levelOrder = 0,
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface ITreeProps {
|
|
50
|
+
/**
|
|
51
|
+
* An object of chart data points for the Tree chart
|
|
52
|
+
*/
|
|
53
|
+
treeData: ITreeChartDataPoint;
|
|
54
|
+
/**
|
|
55
|
+
* compostion for three layer chart, long: composition = 1; compact: composition = 0
|
|
56
|
+
*/
|
|
57
|
+
composition?: NodesComposition.long | NodesComposition.compact | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* Node Width Size for the Tree Layout
|
|
60
|
+
* * @default 75
|
|
61
|
+
*/
|
|
62
|
+
layoutWidth?: number | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* traversal order for tree chart, preOrder = 1, levelOrder = 0
|
|
65
|
+
*/
|
|
66
|
+
treeTraversal?: TreeTraverse.preOrder | TreeTraverse.levelOrder;
|
|
67
|
+
/**
|
|
68
|
+
* Width of SVG tree chart
|
|
69
|
+
* * @default 1500
|
|
70
|
+
*/
|
|
71
|
+
width?: number;
|
|
72
|
+
/**
|
|
73
|
+
* Height of SVG tree chart
|
|
74
|
+
* * @default 700
|
|
75
|
+
*/
|
|
76
|
+
height?: number;
|
|
77
|
+
/**
|
|
78
|
+
* Margin for the SVG tree chart
|
|
79
|
+
*/
|
|
80
|
+
marign?: { left: number; right: number; top: number; bottom: number };
|
|
81
|
+
/**
|
|
82
|
+
* Call to provide customized styling that will layer on top of the variant rules.
|
|
83
|
+
*/
|
|
84
|
+
styles?: IStyleFunctionOrObject<ITreeStyleProps, ITreeStyles>;
|
|
85
|
+
/**
|
|
86
|
+
* Additional CSS class(es) to apply to the TreeChart.
|
|
87
|
+
*/
|
|
88
|
+
className?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Theme (provided through customization.)
|
|
91
|
+
*/
|
|
92
|
+
theme?: ITheme;
|
|
93
|
+
}
|
|
94
|
+
export interface ITreeState {
|
|
95
|
+
/**
|
|
96
|
+
* Width of SVG tree chart
|
|
97
|
+
* * @default 1500
|
|
98
|
+
*/
|
|
99
|
+
_width: number;
|
|
100
|
+
/**
|
|
101
|
+
* Height of SVG tree chart
|
|
102
|
+
* * @default 700
|
|
103
|
+
*/
|
|
104
|
+
_height: number;
|
|
105
|
+
/**
|
|
106
|
+
* Layout Width of SVG tree chart
|
|
107
|
+
* * @default 75
|
|
108
|
+
*/
|
|
109
|
+
_layoutWidth?: number;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export interface ITreeDataStructure {
|
|
113
|
+
/**
|
|
114
|
+
* Node id of each node
|
|
115
|
+
*/
|
|
116
|
+
id: number;
|
|
117
|
+
/**
|
|
118
|
+
* Children node object
|
|
119
|
+
*/
|
|
120
|
+
children: unknown;
|
|
121
|
+
/**
|
|
122
|
+
* Node main text
|
|
123
|
+
*/
|
|
124
|
+
dataName: string;
|
|
125
|
+
/**
|
|
126
|
+
* Subtext value (optional)
|
|
127
|
+
*/
|
|
128
|
+
subName?: string | undefined;
|
|
129
|
+
/**
|
|
130
|
+
* Metric text value (optional)
|
|
131
|
+
*/
|
|
132
|
+
metricName?: string | undefined;
|
|
133
|
+
/**
|
|
134
|
+
* Color of the rectangular box
|
|
135
|
+
*/
|
|
136
|
+
fill: string;
|
|
137
|
+
/**
|
|
138
|
+
* X-coordindate of node
|
|
139
|
+
*/
|
|
140
|
+
x: number;
|
|
141
|
+
/**
|
|
142
|
+
* Y-coordindate of node
|
|
143
|
+
*/
|
|
144
|
+
y: number;
|
|
145
|
+
/**
|
|
146
|
+
* Node id of each node's parent
|
|
147
|
+
*/
|
|
148
|
+
parentID: number;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export interface ITreeStyleProps {
|
|
152
|
+
/**
|
|
153
|
+
* Theme (provided through customization.)
|
|
154
|
+
*/
|
|
155
|
+
theme: ITheme;
|
|
156
|
+
/**
|
|
157
|
+
* Additional CSS class(es) to apply to the TreeChart.
|
|
158
|
+
*/
|
|
159
|
+
className?: string;
|
|
160
|
+
}
|
|
161
|
+
export interface ITreeStyles {
|
|
162
|
+
/**
|
|
163
|
+
* Style for the root element.
|
|
164
|
+
*/
|
|
165
|
+
root: IStyle;
|
|
166
|
+
/**
|
|
167
|
+
* Style for the Link/Path element.
|
|
168
|
+
*/
|
|
169
|
+
link: IStyle;
|
|
170
|
+
/**
|
|
171
|
+
* Style for rectangular Node
|
|
172
|
+
*/
|
|
173
|
+
rectNode: IStyle;
|
|
174
|
+
/**
|
|
175
|
+
* Style for the node main Text
|
|
176
|
+
*/
|
|
177
|
+
rectText: IStyle;
|
|
178
|
+
/**
|
|
179
|
+
* Style for the node sub Text
|
|
180
|
+
*/
|
|
181
|
+
rectSubText: IStyle;
|
|
182
|
+
/**
|
|
183
|
+
* Style for the node metric value Text
|
|
184
|
+
*/
|
|
185
|
+
rectMetricText: IStyle;
|
|
186
|
+
}
|