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

Bug: when keep adding a constant value to the TimeSeries #112

Open
Jesministrator opened this issue Nov 14, 2018 · 3 comments
Open

Bug: when keep adding a constant value to the TimeSeries #112

Jesministrator opened this issue Nov 14, 2018 · 3 comments

Comments

@Jesministrator
Copy link

please try to run the codes below:
`<script type="text/javascript">

  // Random data
  var line1 = new TimeSeries();
  //var line2 = new TimeSeries();
  setInterval(function() {
	  
    line1.append(new Date().getTime(), 0.6);
    //line2.append(new Date().getTime(), 0.5);
  }, 1000);

  var smoothie = new SmoothieChart({ grid: { strokeStyle: 'rgb(125, 0, 0)', fillStyle: 'rgb(60, 0, 0)', lineWidth: 1, millisPerLine: 250, verticalSections: 6 } });
  smoothie.addTimeSeries(line1, { strokeStyle: 'rgb(0, 255, 0)', fillStyle: 'rgba(0, 255, 0, 0.4)', lineWidth: 3 });
  //smoothie.addTimeSeries(line2, { strokeStyle: 'rgb(255, 0, 255)', fillStyle: 'rgba(255, 0, 255, 0.3)', lineWidth: 3 });

  smoothie.streamTo(document.getElementById("mycanvas"), 1000);
</script>`
@drewnoakes
Copy link
Collaborator

What exactly is the bug you're experiencing?

@fernandojsg
Copy link

I'm experiencing the same issue, after a while adding the same value, the graph just disappear and stop painting

@drewnoakes
Copy link
Collaborator

Try setting a fixed min/max range on the y-axis. If all values are the same, it will auto-calculate a zero range for y-values which probably throws off the rendering.

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