i'm using multiple axes , set 1 axis use max. if axis shown max works ok, want. if axis shown first axis max can change bigger value. how can show max, , not above it?
to see go http://jsfiddle.net/bx9sb/ . has 3 axis, , temperature axis has max of 30. untick axes, , click temperature. max 30, great. next click show pressure axis. temperature axis has gone 35, instead of 30. how can stay on 30.
$(function () { $('#container').highcharts({ chart: { zoomtype: 'xy' }, title: { text: 'average monthly weather data tokyo' }, subtitle: { text: 'source: worldclimate.com' }, xaxis: [{ categories: ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'] }], yaxis: [{ // primary yaxis labels: { formatter: function() { return this.value +'°c'; }, style: { color: '#89a54e' } }, title: { text: 'temperature', style: { color: '#89a54e' } }, opposite: true, max: 30 }, { // secondary yaxis gridlinewidth: 0, title: { text: 'rainfall', style: { color: '#4572a7' } }, labels: { formatter: function() { return this.value +' mm'; }, style: { color: '#4572a7' } } }, { // tertiary yaxis gridlinewidth: 0, title: { text: 'sea-level pressure', style: { color: '#aa4643' } }, labels: { formatter: function() { return this.value +' mb'; }, style: { color: '#aa4643' } }, opposite: true }], tooltip: { shared: true }, legend: { layout: 'vertical', align: 'left', x: 120, verticalalign: 'top', y: 80, floating: true, backgroundcolor: '#ffffff' }, series: [{ name: 'rainfall', color: '#4572a7', type: 'column', yaxis: 1, data: [49.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4], tooltip: { valuesuffix: ' mm' } }, { name: 'sea-level pressure', type: 'spline', color: '#aa4643', yaxis: 2, data: [1016, 1016, 1015.9, 1015.5, 1012.3, 1009.5, 1009.6, 1010.2, 1013.1, 1016.9, 1018.2, 1016.7], marker: { enabled: false }, dashstyle: 'shortdot', tooltip: { valuesuffix: ' mb' } }, { name: 'temperature', color: '#89a54e', type: 'spline', data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6], tooltip: { valuesuffix: ' °c' } }] }); });
Comments
Post a Comment