score:6
Accepted answer
There is no such feature in Highcharts nor in Highstock. You could add a mouse wheel event and bind it with a setExtremes
function for yAxis.
http://jsfiddle.net/3q79ey8h/1/
(function(H) {
//internal functions
function stopEvent(e) {
if (e) {
if (e.preventDefault) {
e.preventDefault();
}
if (e.stopPropagation) {
e.stopPropagation();
}
e.cancelBubble = true;
}
}
//the wrap
H.wrap(H.Chart.prototype, 'render', function(proceed) {
var chart = this,
mapNavigation = chart.options.mapNavigation;
proceed.call(chart);
// Add the mousewheel event
H.addEvent(chart.container, document.onmousewheel === undefined ? 'DOMMouseScroll' : 'mousewheel', function(event) {
var delta, extr, step, newMin, newMax, axis = chart.yAxis[0];
e = chart.pointer.normalize(event);
// Firefox uses e.detail, WebKit and IE uses wheelDelta
delta = e.detail || -(e.wheelDelta / 120);
delta = delta < 0 ? 1 : -1;
if (chart.isInsidePlot(e.chartX - chart.plotLeft, e.chartY - chart.plotTop)) {
extr = axis.getExtremes();
step = (extr.max - extr.min) / 5 * delta;
axis.setExtremes(extr.min + step, extr.max + step, true, false);
}
stopEvent(event); // Issue #5011, returning false from non-jQuery event does not prevent default
return false;
});
});
}(Highcharts));
Source: stackoverflow.com
Related Query
- Want to move y-axis scrollbar with mouse wheel in highcharts/highstock
- How do i add mouse wheel code in Angular2 highcharts in typescript
- move one vertical line with mouse over and find intersection point with two highcharts
- HighCharts / HighStock newly added series have problem with shared tooltips and mouse hover effect
- Mouse wheel event, not working as expected in Firefox, when using Highcharts with PerfectScrollbar
- Highcharts highstock x axis max/min not working with 3+ data elements
- In the following code i want to show the WHOLE names on x axis nd dont want them to overlap with the legend
- Highcharts - best way to handle and display zero (or negative) values in a line chart series with logarithmic Y axis
- Highcharts - with datetime axis labels overlap
- highcharts - removing decimal places on Y axis with only one point
- How to change axis label size when exporting in Highcharts / Highstock
- Highcharts blank chart with x and y axis
- Highcharts label format with tickPositioner in a datetime x Axis
- Highcharts - Global configuration with common code and unique data & Headings
- How to populate a Highcharts axis with string formatted data from a PHP array
- Difference between highcharts and highstock during real time trace and xAxis with max value
- Highcharts - Highstock: fixed width intervals with scrollbar
- HighCharts scatter plot with Datetime on X Axis not plotting values correctly
- How can I force ticks/grid lines on a Highcharts datetime X axis to arbitrarily line up with data points?
- Highcharts / Highstock step line with gaps?
- Replace axis labels with custom in highcharts r
- Highcharts stacked columns with Y Axis grouping
- How to handle mouse events on axis labels in highcharts
- Highcharts - creating chart with same scale axis
- Highcharts datetime axis overlap with a long time series
- passing formatting JavaScript code to HighCharts with JSON
- HighCharts Draggable Plotline with Logarithmic axis scale
- Is it possible to have two Y Axis in a highstock chart from highcharts one on the left and another on the right?
- Highcharts line chart all points disappear when have more than one points with same X Axis
- Limit ticks on X axis in highcharts with R
More Query from same tag
- Having Several Units on Highcharts Spiderweb
- Dynamically adding series, how to get rid of default y-axis?
- Highcharts-How to align shared tooltip on the top of column in multiple series column chart?
- when is a highchart completely loaded?
- highcharts check if a piechart section is selected
- Highcharts - Stockchart Zoom position without Navigator
- JS HighCharts.js Pie data undefined error in code
- How can i hide all the Series in highcharts at a time
- highchart not displaying bars chart while printing
- Can't show the array to charts
- Highcharts repeating same label value on Y Axis
- json data into highcharts
- Highcarts won't redraw after fetching data from axios request in VueJS
- Highcharts swipe smooth move feature
- Highstock compare How to compare current data point with the previous data point
- How to change the axis of Dual axes Graph
- Set Additional Data to highcharts series
- export multiple highcharts with text area for their highcharts to multiple PDF file
- Removing and re-adding series while keeping the same markers
- Is it possible in Vue JS to make several vue components reuse existing data structure with different data?
- Highcharts charts don't resize properly on window resize
- Remove the Z Axis Column Line in Highcharts 3D
- AngularJs choose charts framework d3.js vs highcharts
- FusionCharts vs GoogleCharts vs HighCharts suggestions required for commercial use
- Draw deadlock graph(using functions) and added ability for scaling
- Vue.js Render Highchart
- Use a symfony route with parameters in a click event for highchart series
- how to Extend highchart plot band outside graph using android wrapper
- Highcharts v3.0.1 problems with rotating data labels in IE8 and jQuery v1.7.1
- Error bars (confidence intervals) in Highcharts