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

TimeSeries chops off data if client width is 0 #13

Open
joewalnes opened this issue Apr 6, 2012 · 5 comments
Open

TimeSeries chops off data if client width is 0 #13

joewalnes opened this issue Apr 6, 2012 · 5 comments

Comments

@joewalnes
Copy link
Owner

(Reported by Rob Knapp)

I just discovered something about smoothie charts that I wanted to point out.

In render, you chop off the TimeSeries data based on age. If it happend more than the clientWidth*MillisPerPixel millis ago, it gets dropped.

At least on Chrome, the clientWidth of a canvas can be 0 under some circumstances.

For example, I have some smoothie charts on a JQuery tab. If I move to a different tab, the clientWidth goes to zero and all the data gets chopped off.

I've gotten around this by adding dimension.width>0 as a condition on the while loop that culls the data... but I'm sure there is a better solution... perhaps an option that grabs the dimension array once and reuses it?

@drewnoakes drewnoakes changed the title TimeSeries chops of data if client width is 0 TimeSeries chops off data if client width is 0 Sep 1, 2014
@jimux
Copy link

jimux commented Sep 19, 2014

I've also run into this problem when displaying graphs in jQuery tabs.

@DmitryEfimenko
Copy link

+1
Looks like the library is not maintained. Last commit two years ago.
Would anyone even be able to perform a PR merge if there was one?

@drewnoakes
Copy link
Collaborator

Yes, PRs are reviewed and merged. How would your proposed solution work?

On 2 September 2016 at 00:27, Dmitry A. Efimenko [email protected]
wrote:

+1
Looks like the library is not maintained. Last commit two years ago.
Would anyone even be able to perform a PR merge if there was one?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#13 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAVa41RTr3OZK5gB1rWR83U3n4M80lOHks5ql19sgaJpZM4CkIH0
.

@DmitryEfimenko
Copy link

I don't have a proposed solution for this yet. Similar thing happens if you apply display: none to the chart. For the moment I just apply position: absolute; top: -1000px but that has its own issues.

On the topic of PRs... what about existing PRs? PR for tooltips and LineDash seem legit. I didn't look at others.

@DmitryEfimenko
Copy link

DmitryEfimenko commented Sep 12, 2016

it appears that the chart option maxDataSetLength can help with retaining data even after chart's width is changed to 0. Set it to something high. However, this might lead to performance issue

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

4 participants