We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e53ee6e commit b85f6c7Copy full SHA for b85f6c7
src/chart.zoom.js
@@ -413,8 +413,8 @@ var zoomPlugin = {
413
414
if (dragDistanceX > 0 || dragDistanceY > 0) {
415
doZoom(chartInstance, zoomX, zoomY, {
416
- x: dragDistanceX / 2 + startX,
417
- y: dragDistanceY / 2 + startY,
+ x: (startX - chartArea.left) / (1 - dragDistanceX / chartDistanceX) + chartArea.left,
+ y: (startY - chartArea.top) / (1 - dragDistanceY / chartDistanceY) + chartArea.top
418
});
419
}
420
0 commit comments