@@ -529,6 +529,7 @@ class GaugeView extends ChartView {
529529 const focus = emphasisModel . get ( 'focus' ) ;
530530 const blurScope = emphasisModel . get ( 'blurScope' ) ;
531531 const emphasisDisabled = emphasisModel . get ( 'disabled' ) ;
532+ const autoColor = getColor ( linearMap ( data . get ( valueDim , idx ) as number , valueExtent , [ 0 , 1 ] , true ) ) ;
532533 if ( showPointer ) {
533534 const pointer = data . getItemGraphicEl ( idx ) as ECSymbol ;
534535 const symbolStyle = data . getItemVisual ( idx , 'style' ) ;
@@ -550,9 +551,7 @@ class GaugeView extends ChartView {
550551
551552
552553 if ( pointer . style . fill === 'auto' ) {
553- pointer . setStyle ( 'fill' , getColor (
554- linearMap ( data . get ( valueDim , idx ) as number , valueExtent , [ 0 , 1 ] , true )
555- ) ) ;
554+ pointer . setStyle ( 'fill' , autoColor ) ;
556555 }
557556
558557 ( pointer as ECElement ) . z2EmphasisLift = 0 ;
@@ -564,6 +563,9 @@ class GaugeView extends ChartView {
564563 const progress = progressList [ idx ] ;
565564 progress . useStyle ( data . getItemVisual ( idx , 'style' ) ) ;
566565 progress . setStyle ( itemModel . getModel ( [ 'progress' , 'itemStyle' ] ) . getItemStyle ( ) ) ;
566+ if ( progress . style . fill === 'auto' ) {
567+ progress . setStyle ( 'fill' , autoColor ) ;
568+ }
567569 ( progress as ECElement ) . z2EmphasisLift = 0 ;
568570 setStatesStylesFromModel ( progress , itemModel ) ;
569571 toggleHoverEmphasis ( progress , focus , blurScope , emphasisDisabled ) ;
0 commit comments