Here's a correction to my previous message

« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by James Parsons on 3rd August 2014
On reflection, my previous message made the process of rounding to the nearest integer more complex than needed. Rather than converting to a string and back to a number, I should have just used Math.round() as follows:

var numlabels = typeof(opt['ylabels.count']) == 'number' ? opt['ylabels.count'] : 5;
numlabels = Math.round(numlabels); // Ensure that numlabels is an integer

Add a reply

« Back to message list