onZooming called when controlling trackball and vice versa.

When I control the trackball, onTrackballPositionChanging gets called (which is correct behavior) but in addition, onZooming also gets called, which is not desired behavior as I am working with synchronized charts and as such performance suffers when onZooming gets called each time without it needing to be called. The opposite happens as well, when I pan (using the onZooming method) the onTrackballPositionChanging method gets called as well. I have pasted a small part of the code below:

Some extra information, both pinch to zoom (x-axis only) and panning are enabled. and trackball has 'shouldAlwaysShow' set to true,

Thank you in advance,

Luca

onTrackballPositionChanging: (TrackballArgs args) {
if (!simulationManager.chartLock) {
simulationManager.chartLock = true;
simulationManager.simulations.forEach((simulation) {
if (simulation.id != widget.id) {
simulation.key.currentState.trackball.showByIndex(args.chartPointInfo.dataPointIndex);
}
});
simulationManager.chartLock = false;
}
},
onZooming: (ZoomPanArgs args) {
if (args.axis.name == 'primaryXAxis') {
simulationManager.setZoom(
widget.id,
args.currentZoomFactor,
args.currentZoomPosition
); // Storing the zoomPosition and the zoomFactor
}
},

2 Replies 1 reply marked as answer

SK Sriram Kiran Senthilkumar Syncfusion Team July 28, 2020 04:58 PM UTC

Hi Luca, 
 
Greetings from Syncfusion. We have analyzed your scenario with the provided code snippet and we are able to replicate the reported issue regarding the onZooming callback is called along with onTrackballPositionChanging callback on controlling the trackball and vice versa. We have considered this as a bug, and we will include the fix for the reported issues in our upcoming weekly patch release which is expected to be rolled out by the middle of next week. We will update you once the release is rolled out and we appreciate your patience until then. 
 
Regards, 
Sriram Kiran 



SK Sriram Kiran Senthilkumar Syncfusion Team August 5, 2020 03:29 PM UTC

Hi Luca, 

Thanks for your patience. The reported issue regarding the onZooming callback is called along with onTrackballPositionChanging callback on controlling the trackball and vice versa is fixed now and rolled out in our weekly patch release. To overcome the reported issue, kindly upgrade the chart widget package to the latest version below. 
 
Regards, 
Sriram Kiran 


Marked as answer
Loader.
Up arrow icon