highstock - Highcharts padding for range selector when displaying last label on y axis? -
when display last label of yaxis, spacing of range selector gets crowded.
example: http://jsfiddle.net/georgeludwig/fttkq/7/
you can see how "75" , "30" kind of jammed in there.
is there way more space around range selector? i've been messing around various padding values, , nothing works.
code:
<code> $(function () { var chart = new highcharts.stockchart({ chart: { renderto: 'container', alignticks: false }, yaxis: [{ // primary yaxis endontick: true, showlastlabel: true, title: { text: 'time published', style: { color: '#89a54e' } }, gridlinewidth: 0, opposite: true, }, { // secondary yaxis showlastlabel: true, title: { text: '% audience coverage', style: { color: '#4572a7' } }, }], series: [{ yaxis: 0, type: "scatter", data:[ [1142294400000,2], [1183334400000,5], [1199232000000,18], [1230768000000,9], [1262304000000,4], [1294012800000,20], [1325548800000,1], [1357084800000,6] ] }, { yaxis: 1, type: "areaspline", data:[ [1142294400000,9], [1183334400000,10], [1199232000000,15], [1230768000000,25], [1262304000000,35], [1294012800000,46], [1325548800000,47], [1357084800000,68] ] }] }); }); </code>
you can use maxpadding (http://api.highcharts.com/highcharts#yaxis.maxpadding) setting tickinterval (http://api.highcharts.com/highcharts#yaxis.tickinterval)
yaxis: [{ // primary yaxis showlastlabel: false, title: { text: 'time published', style: { color: '#89a54e' } }, gridlinewidth: 0, opposite: true, tickinterval:10, maxpadding:1 }, { // secondary yaxis showlastlabel: false, maxpadding:0.2, tickinterval:25, title: { text: '% audience coverage', style: { color: '#4572a7' } }, }],
Comments
Post a Comment