@@ -388,6 +388,9 @@ export class BarLineChartTouchListener extends ChartTouchListener<BarLineChartBa
388
388
this . mMatrix . set ( this . mSavedMatrix ) ;
389
389
this . mMatrix . postScale ( scaleX , scaleY , t . x , t . y ) ;
390
390
}
391
+ if ( chart . hasListeners ( 'zoom' ) ) {
392
+ chart . notify ( { eventName : 'zoom' , scaleX, scaleY, ...t } ) ;
393
+ }
391
394
} else if ( this . mTouchMode === ChartTouchListener . X_ZOOM && chart . isScaleXEnabled ( ) ) {
392
395
this . mLastGesture = ChartGesture . X_ZOOM ;
393
396
const t = this . getTrans ( this . mTouchPointCenter . x , this . mTouchPointCenter . y ) ;
@@ -402,6 +405,9 @@ export class BarLineChartTouchListener extends ChartTouchListener<BarLineChartBa
402
405
this . mMatrix . set ( this . mSavedMatrix ) ;
403
406
this . mMatrix . postScale ( scaleX , 1 , t . x , t . y ) ;
404
407
}
408
+ if ( chart . hasListeners ( 'zoom' ) ) {
409
+ chart . notify ( { eventName : 'zoom' , scaleX, scaleY : 1 , ...t } ) ;
410
+ }
405
411
} else if ( this . mTouchMode === ChartTouchListener . Y_ZOOM && chart . isScaleYEnabled ( ) ) {
406
412
this . mLastGesture = ChartGesture . Y_ZOOM ;
407
413
const t = this . getTrans ( this . mTouchPointCenter . x , this . mTouchPointCenter . y ) ;
@@ -415,6 +421,9 @@ export class BarLineChartTouchListener extends ChartTouchListener<BarLineChartBa
415
421
this . mMatrix . set ( this . mSavedMatrix ) ;
416
422
this . mMatrix . postScale ( 1 , scaleY , t . x , t . y ) ;
417
423
}
424
+ if ( chart . hasListeners ( 'zoom' ) ) {
425
+ chart . notify ( { eventName : 'zoom' , scaleX : 1 , scaleY, ...t } ) ;
426
+ }
418
427
}
419
428
this . mMatrix = chart . getViewPortHandler ( ) . refresh ( this . mMatrix , chart , true ) ;
420
429
// }
0 commit comments