Skip to content

Commit 09d21f9

Browse files
authored
Disable mouse zooming on charts (#941)
1 parent f9411f3 commit 09d21f9

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

src/js/histogram.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,11 @@ function drawChart(series, containerId, options) {
281281
x: 0,
282282
y: -50
283283
}
284+
},
285+
zooming: {
286+
mouseWheel: {
287+
enabled: false
288+
}
284289
}
285290
},
286291
title: {

src/js/timeseries.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,12 @@ function drawChart(options, series) {
283283
metric: options.metric,
284284
type: 'timeseries',
285285
chart: {
286-
zoomType: 'x'
286+
zoomType: 'x',
287+
zooming: {
288+
mouseWheel: {
289+
enabled: false
290+
}
291+
}
287292
},
288293
title: {
289294
text: `${options.lens ? `${options.lens.name}: ` : '' }` + `Timeseries of ${options.name}`,
@@ -420,6 +425,7 @@ function drawChart(options, series) {
420425
}]
421426
});
422427
};
428+
chart.zooming.mousewheel.enabled = false;
423429
window.charts = window.charts || {};
424430
window.charts[options.metric] = chart;
425431
}

0 commit comments

Comments
 (0)