Reputation: 3802
Looking at http://jsfiddle.net/0tfkfh2v/16/ which does what I want but it doesn't display the average amount - how would I get around this?
yAxis.addPlotLine({
value: (sum/count),
color: 'red',
width: 2,
id: 'avgLine'
});
Thanks
Upvotes: 0
Views: 251
Reputation: 10075
Add label
inside yAxis.addPlotLine({...})
yAxis.addPlotLine({
value: (sum / count),
label: {
text: (sum / count).toFixed(2),
verticalAlign: 'middle',
align: 'right',
rotation: 0,
},
color: 'red',
width: 2,
id: 'avgLine'
});
Upvotes: 1