@@ -73,7 +73,7 @@ type CollectedCoordInfo = ReturnType<typeof modelHelper['collect']>;
7373type CollectedAxisInfo = CollectedCoordInfo [ 'axesInfo' ] [ string ] ;
7474
7575interface AxisTriggerPayload extends Payload {
76- currTrigger ?: 'click' | 'mousemove' | 'leave'
76+ currTrigger ?: 'click' | 'mousemove' | 'leave' | 'mousewheel'
7777 /**
7878 * x and y, which are mandatory, specify a point to trigger axisPointer and tooltip.
7979 */
@@ -453,7 +453,7 @@ function dispatchHighDownActually(
453453) {
454454 // FIXME
455455 // highlight status modification should be a stage of main process?
456- // (Consider confilct (e.g., legend and axisPointer) and setOption)
456+ // (Consider conflict (e.g., legend and axisPointer) and setOption)
457457
458458 const zr = api . getZr ( ) ;
459459 const highDownKey = 'axisPointerLastHighlights' as const ;
@@ -465,19 +465,26 @@ function dispatchHighDownActually(
465465 each ( axesInfo , function ( axisInfo , key ) {
466466 const option = axisInfo . axisPointerModel . option ;
467467 option . status === 'show' && axisInfo . triggerEmphasis && each ( option . seriesDataIndices , function ( batchItem ) {
468- const key = batchItem . seriesIndex + ' | ' + batchItem . dataIndex ;
469- newHighlights [ key ] = batchItem ;
468+ newHighlights [ batchItem . seriesIndex + '|' + batchItem . dataIndex ] = batchItem ;
470469 } ) ;
471470 } ) ;
472471
473472 // Diff.
474- const toHighlight : BatchItem [ ] = [ ] ;
475- const toDownplay : BatchItem [ ] = [ ] ;
473+ const toHighlight : Pick < BatchItem , 'seriesIndex' | 'dataIndex' > [ ] = [ ] ;
474+ const toDownplay : Pick < BatchItem , 'seriesIndex' | 'dataIndex' > [ ] = [ ] ;
475+ function makeHighDownItem ( batchItem : BatchItem ) {
476+ // `dataIndexInside` should be removed, since the last recorded `dataIndexInside` may have
477+ // been changed if `dataZoomInside` changed the view. Only `dataIndex` will suffice.
478+ return {
479+ seriesIndex : batchItem . seriesIndex ,
480+ dataIndex : batchItem . dataIndex ,
481+ } ;
482+ }
476483 each ( lastHighlights , function ( batchItem , key ) {
477- ! newHighlights [ key ] && toDownplay . push ( batchItem ) ;
484+ ! newHighlights [ key ] && toDownplay . push ( makeHighDownItem ( batchItem ) ) ;
478485 } ) ;
479486 each ( newHighlights , function ( batchItem , key ) {
480- ! lastHighlights [ key ] && toHighlight . push ( batchItem ) ;
487+ ! lastHighlights [ key ] && toHighlight . push ( makeHighDownItem ( batchItem ) ) ;
481488 } ) ;
482489
483490 toDownplay . length && api . dispatchAction ( {
0 commit comments