@@ -8,6 +8,7 @@ const COMPONENTS_MAP = {
8
8
singleAxis : "SingleAxisComponent" ,
9
9
parallel : "ParallelComponent" ,
10
10
calendar : "CalendarComponent" ,
11
+ matrix : "MatrixComponent" ,
11
12
graphic : "GraphicComponent" ,
12
13
toolbox : "ToolboxComponent" ,
13
14
tooltip : "TooltipComponent" ,
@@ -21,6 +22,7 @@ const COMPONENTS_MAP = {
21
22
legend : "LegendComponent" ,
22
23
dataZoom : "DataZoomComponent" ,
23
24
visualMap : "VisualMapComponent" ,
25
+ thumbnail : "ThumbnailComponent" ,
24
26
aria : "AriaComponent" ,
25
27
dataset : "DatasetComponent" ,
26
28
@@ -41,6 +43,7 @@ const CHARTS_MAP = {
41
43
tree : "TreeChart" ,
42
44
treemap : "TreemapChart" ,
43
45
graph : "GraphChart" ,
46
+ chord : "ChordChart" ,
44
47
gauge : "GaugeChart" ,
45
48
funnel : "FunnelChart" ,
46
49
parallel : "ParallelChart" ,
@@ -84,7 +87,13 @@ const CHARTS_GL_MAP = {
84
87
linesGL : "LinesGLChart" ,
85
88
} ;
86
89
87
- const FEATURES = [ "UniversalTransition" , "LabelLayout" ] ;
90
+ const FEATURES = [
91
+ "UniversalTransition" ,
92
+ "LabelLayout" ,
93
+ "AxisBreak" ,
94
+ // "LegacyGridContainLabel",
95
+ "ScatterJitter" ,
96
+ ] ;
88
97
const RENDERERS_MAP = {
89
98
canvas : "CanvasRenderer" ,
90
99
svg : "SVGRenderer" ,
@@ -155,7 +164,7 @@ function collectDeps(option) {
155
164
if ( INJECTED_COMPONENTS . includes ( key ) ) {
156
165
return ;
157
166
}
158
- const val = option [ key ] ;
167
+ let val = option [ key ] ;
159
168
160
169
if ( Array . isArray ( val ) && ! val . length ) {
161
170
return ;
@@ -172,12 +181,12 @@ function collectDeps(option) {
172
181
}
173
182
} ) ;
174
183
175
- let series = option . series ;
176
- if ( ! Array . isArray ( series ) ) {
177
- series = [ series ] ;
178
- }
179
-
184
+ const series = Array . isArray ( option . series ) ? option . series : [ option . series ] ;
185
+ let hasScatterSeries = false ;
180
186
series . forEach ( ( seriesOpt ) => {
187
+ if ( seriesOpt . type === "scatter" ) {
188
+ hasScatterSeries = true ;
189
+ }
181
190
if ( CHARTS_MAP [ seriesOpt . type ] ) {
182
191
deps . push ( CHARTS_MAP [ seriesOpt . type ] ) ;
183
192
}
@@ -204,6 +213,21 @@ function collectDeps(option) {
204
213
deps . push ( "UniversalTransition" ) ;
205
214
}
206
215
} ) ;
216
+
217
+ Object . keys ( option ) . forEach ( ( key ) => {
218
+ if ( key . endsWith ( "Axis" ) ) {
219
+ const val = option [ key ] ;
220
+ for ( const axisOption of Array . isArray ( val ) ? val : [ val ] ) {
221
+ if ( hasScatterSeries && + axisOption . jitter > 0 ) {
222
+ deps . push ( "ScatterJitter" ) ;
223
+ }
224
+ if ( axisOption . breaks && axisOption . breaks . length > 0 ) {
225
+ deps . push ( "AxisBreak" ) ;
226
+ }
227
+ }
228
+ }
229
+ } ) ;
230
+
207
231
// Dataset transform
208
232
if ( option . dataset && Array . isArray ( option . dataset ) ) {
209
233
option . dataset . forEach ( ( dataset ) => {
0 commit comments