How to draw Yaxis label in highcharts -


is there way draw yaxis lable using highcharts/highstock api? value of label end value of series. color same color of series.

i found there renderer api, seems difficult know exact position of point.

yaxis label

here's older example uses renderer function:

http://jsfiddle.net/jlbriggs/4frgg/4/

function(chart){     $(chart.series).each(function(i, serie){         //to appropraite 'y' position         var point = serie.data[serie.data.length-1];         chart.renderer.text(             //the text render             '<span style="font-weight:bold;color:' + serie.color + ';">' + serie.name + '</span>',             //the 'x' position             chart.plotleft+chart.plotwidth+5,             //the 'y' position             chart.plottop + point.ploty+3).add()     }); }); 

you using data labels, enabled last data point:

http://jsfiddle.net/jlbriggs/zxlza/0/

you using 'tickpositions' property, , formatter function on axis labels

http://api.highcharts.com/highcharts#yaxis.tickpositions

http://api.highcharts.com/highcharts#yaxis.labels.formatter


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

javascript - Clean way to programmatically use CSS transitions from JS? -

android - send complex objects as post php java -