data visualization - Prevent y-zoom for specific series/y-axis on highcharts -


i've got spline chart 2 y-axis both use same x-axis cycles (seconds). zoom (xy) enabled , works fine want zoom xy on 1 series connected 1 of 2 y-axis. other series should static y-axis (y-zoom disabled), not zoom y-axis... possible?

chart: {         renderto: 'container',         type: 'spline',         zoomtype: 'xy',         alignticks: false,         resetzoombutton: {             theme: {                 display: 'none'             }         }     },     title: {         text: '',         x: -20 //center     },     legend: {         enabled: false  //hide legend     },     credits: {         enabled: false  //hide credits (highcarts.com link)     },     exporting: {         enabled: false  //hide export menu     },     xaxis: {         title: {             text: 'sec'         },         type:'second',         linecolor: '#666666',         linewidth: 2,          endontick: false,         showfirstlabel: false,         startontick: true,          gridlinewidth: 0,               //shows grid starting tick within data content         tickinterval:1,         ticklength: 10,                 //tick length (height)         tickwidth: 2,                   //tick width (2px)         tickcolor: '#666666',          minorgridlinewidth: 0,          //shows grid starting tick within data content         minortickinterval:.1,         minorticklength: 6,             //minortick length (height -> half of tick ticklength)         minortickwidth: 1,              //minortick width (1px)         minortickcolor: '#666666',          min: 0, //prevent generating sizes lower 0 on x-axis         max: 15,          labels:{             y: 25         }     },     yaxis: [{         title: {             text: 'm/s'         },         gridlinewidth: 0,         linecolor: '#8bc926',         linewidth: 2,          min: 0,         max: 200,          offset: 15      //space between y-axis , x-axis     }, {         title: {             text: 'bar'         },         gridlinewidth: 0,         linecolor: '#389fff',         maxzoom: 0,         linewidth: 2,          min: 0,         max: 300     }],     plotoptions: {         spline: {             marker: {                 enabled: true             }         }     },     series: [{         color: '#8bc926',         data: [             {x: 0, y: 80},             {x: 1, y: 110},             {x: 2, y: 100},             {x: 3, y: 50},             {x: 4, y: 75},             {x: 5, y: 90}         ],         yaxis: 0     },     {         color: '#389fff',         data: [             {x: 0, y: 170},             {x: 1, y: 210},             {x: 2, y: 240},             {x: 3, y: 210},             {x: 4, y: 170},             {x: 5, y: 100}         ],         yaxis: 1     }] 

js fiddle (full example code)

it's not part of api, can use yaxis.zoomenabled option: http://jsfiddle.net/0zczvlr9/ - set these axes don't want enable zooming.


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -