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

Infinite loop when data indicates horizontal line #66

Closed
observerss opened this issue Jun 29, 2012 · 4 comments
Closed

Infinite loop when data indicates horizontal line #66

observerss opened this issue Jun 29, 2012 · 4 comments

Comments

@observerss
Copy link

for data looks like this

var day_data = [
{"period": "2012-10-01", "licensed": 0, "sorned": 0},
{"period": "2012-09-30", "licensed": 0, "sorned": 0},
{"period": "2012-09-29", "licensed": 0, "sorned": 0},
{"period": "2012-09-20", "licensed": 0, "sorned": 0},
{"period": "2012-09-19", "licensed": 0, "sorned": 0},
{"period": "2012-09-18", "licensed": 0, "sorned": 0},
{"period": "2012-09-17", "licensed": 0, "sorned": 0},
{"period": "2012-09-16", "licensed": 0, "sorned": 0},
{"period": "2012-09-15", "licensed": 0, "sorned": 0},
{"period": "2012-09-10", "licensed": 0, "sorned": 0}
];

this.yInterval = 0

drawGrid mehtod will run into a infinite loop.

@observerss
Copy link
Author

my workaround:

add the code below before "this.dirty = true; "

  if (this.yInterval == 0){
    this.options.ymax += 1;
    this.yInterval = 1;
  }

@HungYuHei
Copy link

I got the similar problem if all of the y-key with zero value, and from the console I found Error: Problem parsing d="H725"

my data looks like this

[{"date":"2012-07-01","value":0},{"date":"2012-07-02","value":0},{"date":"2012-07-03","value":0}]

@observerss your workaround doesn't work for me, could you paste your full code?

@oesmith oesmith closed this as completed in eacbc01 Jul 3, 2012
@oesmith
Copy link
Contributor

oesmith commented Jul 3, 2012

This is fixed on master now.

I also recommend using an auto N value in the ymax and/or ymin options, so you can set the range that the graph will show when there's absolutely no variance in the data values.

@HungYuHei
Copy link

@oesmith thanks a lot, you save my day

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

3 participants