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

x-axis labels jump (includes builder example as reproducer) #63

Open
arnehormann opened this issue Nov 6, 2015 · 3 comments
Open

x-axis labels jump (includes builder example as reproducer) #63

arnehormann opened this issue Nov 6, 2015 · 3 comments

Comments

@arnehormann
Copy link

In an example created in your amazing builder (code below), time labels are displayed in 6-seconds intervals. The offset cycles after some frames - between 0, 2 and 4, probably depending on the scroll position. Visually, this leads to very distracting jumps.

This may be a duplicate of #53 - depending on what "flickering" is.

html:

<canvas id="smoothie-chart" width="893" height="258">

javascript:

var chart = new SmoothieChart({millisPerPixel:78,maxValueScale:1.23,interpolation:'step',scaleSmoothing:0.092,grid:{fillStyle:'rgba(0,0,0,0.97)',strokeStyle:'#2f2e2f',sharpLines:true,millisPerLine:2000,verticalSections:10,borderVisible:false},labels:{fillStyle:'rgba(255,255,255,0.51)',fontSize:12},timestampFormatter:SmoothieChart.timeFormatter,horizontalLines:[{color:'#ffffff',lineWidth:1,value:0},{color:'#880000',lineWidth:2,value:3333},{color:'#880000',lineWidth:2,value:-3333}]}),
    canvas = document.getElementById('smoothie-chart'),
    series = new TimeSeries();

chart.addTimeSeries(series, {lineWidth:2,strokeStyle:'none',fillStyle:'rgba(75,177,255,0.30)'});
chart.streamTo(canvas, 342);

I don't use smoothie yet, but it's a great library, really cool! I'm definitely going to use it! 👍

@drewnoakes
Copy link
Collaborator

Thanks for the example. You're right -- this is the same issue as 53. Want to take a stab at fixing it?

@arnehormann
Copy link
Author

I'd like to, but right now, I can't. Sorry. I could definitely dig into it when I intend to use it, but I can't provide a reliable timeframe.

@drewnoakes
Copy link
Collaborator

In the past I worked around this by increasing the spacing of lines.

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