Open joewalnes opened 12 years ago
I've also run into this problem when displaying graphs in jQuery tabs.
+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?
Yes, PRs are reviewed and merged. How would your proposed solution work?
On 2 September 2016 at 00:27, Dmitry A. Efimenko notifications@github.com 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 https://github.com/joewalnes/smoothie/issues/13#issuecomment-244242601, or mute the thread https://github.com/notifications/unsubscribe-auth/AAVa41RTr3OZK5gB1rWR83U3n4M80lOHks5ql19sgaJpZM4CkIH0 .
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.
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
(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?