title: Rounding y-value labels with Morris.js charts
body: <p>I have plotted some JSON data using Morris.js.  The graph works fine, however I'm trying to tweak the labels along the y-axis in a line chart.</p>
  <p>Currently, the yLabels are being automatically generated by morris.js using the JSON data's range of values (where x-axis is time).  In my example JSON, values range from 54 to -47, so the yLabels being generated are 54, 29, 4, -22, -47. Instead, however, I'd like to round these values to -50, -25, 0, 25, and 50.  I would also like the &quot;0&quot; line to stand out, hopefully with a different colour.</p>
  <p>As I'm dynamically creating the data, these won't be fixed, in another chart the values may range between -2.5 and +2.5 (in which case I'd want the labels along the y axis to be -2.5, -1.25, 0, 1.25, 2.5).</p>
  <p>How would I round the labels morris.js is creating and make the &quot;0&quot; line red?</p>
  <p>I have tried creating an array of yLabels (<code>yLabels: ['-50','-25','0','25','50'],</code>), but it didn't work, and even if it had I don't want to &quot;hard-code&quot; values because as I said, each chart will be different and dynamically generated.</p>
  <p>Any help is greatly appreciated.</p>
  <h1>UPDATE</h1>
  <p>In the first example, I have been able to get what I want putting ymin and ymax of -50 and 50 respectively, but like I mentioned, I don't want to hard-code these values as the ymin/max will vary depending on the JSON being parsed. Is there a way I can always ensure the middle line is always 0, and morris determines the two y values above and below it?</p>