Search code examples
morris.js

Morris chart set y axis value


I am trying to display a chart for app ranking using morris.js. The ranks will be between 1 to 50. So there will not be 0 rank. I want the max y axis value to be 1, not 0. Please review the images. How can i configure this? Please help.

screenshot
(source: perk.com)


Solution

  • Use ymin (or ymax, if you invert the scale).

    http://www.oesmith.co.uk/morris.js/lines.html