Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot override the ymin value when all y values are equal to ymin #80

Closed
monicao opened this issue Sep 26, 2012 · 3 comments
Closed

Cannot override the ymin value when all y values are equal to ymin #80

monicao opened this issue Sep 26, 2012 · 3 comments

Comments

@monicao
Copy link

monicao commented Sep 26, 2012

When all y values in a data set are 0 the y-axis range is -1 to 1. I tried overriding the ymin value, but the change did not take effect because the ymin == ymax.

  Morris.Line({
    element: 'sales_chart',
    data: data['product_analytics'],
    xkey: 'time',
    ykeys: ['sales'],
    ymin: 0,
    labels: ['Total Sales'],
    smooth: false,
    preUnits: '$'
  });

Screenshot: http://d.pr/i/D5KY

@oesmith
Copy link
Contributor

oesmith commented Sep 26, 2012

Try the latest master, I've slightly modified the ymin/ymax behaviour. FWIW, I recommend setting ymax to auto N in these situations (where N is a sensible number for your dataset).

@monicao
Copy link
Author

monicao commented Sep 26, 2012

Thanks for the quick fix. I was going to submit a pull request but you beat me to it. Really like morris.js so far.

@oesmith
Copy link
Contributor

oesmith commented Sep 26, 2012

No problems - I'm glad it's working for you.

Cheers!

Olly

On 26 Sep 2012, at 21:47, Monica Olinescu notifications@github.com wrote:

Thanks for the quick fix. I was going to submit a pull request but you beat
me to it. Really like morris.js so far.


Reply to this email directly or view it on
GitHubhttps://github.com/oesmith/morris.js/issues/80#issuecomment-8905118.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants