I have been trying to populate yaxis values on my highchart as per defined by me and results should be shown accordingly but all my efforts are in vain i am not able to manually set this.value
of yaxis of highchart . Following is a link to my Jsfiddle . Kindly help..
http://jsfiddle.net/CzHyC/12/
In the following JS COde I have been trying to set the this.value
of yaxis to the arrayed values of yAxisLabels but values are not being labled and chart is not dislayed accordingly.
JS CODE FOR YAXIS
var yAxisLabels = ['5','10','20','30','40','50'];
yAxis: {
labels: {
formatter: function () {
for (i=0; i<=5; i++) {
this.value=yAxisLabels[i];
return this.value;
}
}
},
title: {
text: 'Total fruit consumption'
},
stackLabels: {
enabled: true,
style: {
fontWeight: 'bold',
color: (Highcharts.theme && Highcharts.theme.textColor) || 'blue'
}
}
}