epochjs/epoch

Top of the realtime line graph has been cut.

redbox-cdn opened this issue · 6 comments

The realtime Line graph sometimes not show the top of graph.

Here is the SS.
ss

What should I modify the css or html..

My code is here.

<div id="test" class="epoch category20" style="width: 400px; height: 200px;"></div>

idx = ((new Date()).getTime()/1000)|0;
var request = [
  { label: 'Series 1', values: [ {time: idx, y: 0}] }
];

var request1 = $('#test').epoch({
    type: 'time.line',
    data: request,
    ticks: { time: 10, right: 6, left: 6 },                  
    fps: 30,
    margins: { top: 20, right: 70, bottom: 20, left: 70 },
    axes: ['right', 'bottom']
});
request = [{time: time, y: request}];
request1.push(request);

Thanks!

Hm, this is strange. I will look into asap and get back to you. Cheers!

Hi

It seems that this problem is related to scale unit.

If the values of data between 10 and 99, it's no problem.
But If the value of data between 9 and 11 (also 99 and 100) ,this graph is strange.

So I am consider changed into decimal point the scale unit.
ss2

Any word on this? I'm encountering a similar issue in my project. The lines at the top and bottom of the graph are thinner, as though partially truncated.

@segphault - haven't had the chance to look at it. If it's causing a problem my bet would be it's the CSS cutting off the top. Mind looking into it?

yeah, I'll see what I can figure out. It doesn't appear to be a CSS issue, the line runs all the way to the edge of the canvas element and the behavior doesn't appear to change when I set margins. I'm going to experiment with the code that computes the canvas size and see if that sheds any light.

Thanks so much!