@@ -27,7 +27,7 @@ import { ColorString, BlurScope, AnimationOption, ZRColor, AnimationOptionMixin
27
27
import SeriesModel from '../../model/Series' ;
28
28
import { PathProps } from 'zrender/src/graphic/Path' ;
29
29
import { SymbolDrawSeriesScope , SymbolDrawItemModelOption } from './SymbolDraw' ;
30
- import { extend } from 'zrender/src/core/util' ;
30
+ import { extend , retrieve2 } from 'zrender/src/core/util' ;
31
31
import { setLabelStyle , getLabelStatesModels } from '../../label/labelStyle' ;
32
32
import ZRImage from 'zrender/src/graphic/Image' ;
33
33
import { saveOldStyle } from '../../animation/basicTransition' ;
@@ -64,6 +64,7 @@ class Symbol extends graphic.Group {
64
64
data : SeriesData ,
65
65
idx : number ,
66
66
symbolSize : number [ ] ,
67
+ z2 : number ,
67
68
keepAspect : boolean
68
69
) {
69
70
// Remove paths created before
@@ -80,7 +81,7 @@ class Symbol extends graphic.Group {
80
81
) ;
81
82
82
83
symbolPath . attr ( {
83
- z2 : 100 ,
84
+ z2 : retrieve2 ( z2 , 100 ) ,
84
85
culling : true ,
85
86
scaleX : symbolSize [ 0 ] / 2 ,
86
87
scaleY : symbolSize [ 1 ] / 2
@@ -156,12 +157,13 @@ class Symbol extends graphic.Group {
156
157
const symbolType = data . getItemVisual ( idx , 'symbol' ) || 'circle' ;
157
158
const seriesModel = data . hostModel as SeriesModel ;
158
159
const symbolSize = Symbol . getSymbolSize ( data , idx ) ;
160
+ const z2 = Symbol . getSymbolZ2 ( data , idx ) ;
159
161
const isInit = symbolType !== this . _symbolType ;
160
162
const disableAnimation = opts && opts . disableAnimation ;
161
163
162
164
if ( isInit ) {
163
165
const keepAspect = data . getItemVisual ( idx , 'symbolKeepAspect' ) ;
164
- this . _createSymbol ( symbolType as string , data , idx , symbolSize , keepAspect ) ;
166
+ this . _createSymbol ( symbolType as string , data , idx , symbolSize , z2 , keepAspect ) ;
165
167
}
166
168
else {
167
169
const symbolPath = this . childAt ( 0 ) as ECSymbol ;
@@ -405,6 +407,9 @@ class Symbol extends graphic.Group {
405
407
static getSymbolSize ( data : SeriesData , idx : number ) {
406
408
return normalizeSymbolSize ( data . getItemVisual ( idx , 'symbolSize' ) ) ;
407
409
}
410
+ static getSymbolZ2 ( data : SeriesData , idx : number ) {
411
+ return data . getItemVisual ( idx , 'z2' ) ;
412
+ }
408
413
}
409
414
410
415
0 commit comments