Closed Dav1dde closed 9 years ago
@Dav1dde - Can you provide me with some sample data so I can test on my end?
I can confirm this. If the real time chart only receives the same value over and over it never draws the Y axis ticks or values.
any idea how we can set a minimum Y axis scale to prevent this from happening?
I did patch this functionallity into epoch manually. You can check the last commits https://github.com/Dav1dde/epoch/commits/master - this is just a quick and dirty (not even fix) workaround which adds a range option to pick the min and max based on the current values shown.
Thanks, @Dav1dde , I grabbed your changes. However, the scale is now always the same and doesn't expand like before. I wish there was some way to set a minimum value and still allow the graph to expand if necessary.
@cbdonohue This should work, use a function as range option. You can see it in action here: https://github.com/Dav1dde/mcw/blob/master/mcw/static/js/backend.js#L67-L73 (disclaimer the code is pretty messy, again ..)
Looks like a fix for this exists, but hasn't been implemented as a PR on the repository. Any takers?
@Dav1dde, @cbdonohue - Looking over this again I see that this ticket is actually reporting two problems that have been reported by others and are now fixed as of the latest version of epoch.
The first problem, an error being thrown with cannot property 'x' of undefined
was fixed with #203. The second, variable extent-based axes for real-time charts, was fixed with the introduction of multi-axes in #198.
Seeing as the issues are now resolved, I am going to close this ticket. Feel free to ask questions here or continue the conversation.
E.g. I have this graph representing memory useage of a process:
Now I can't set a fixed range from 0 to let's say 1GiB, because memory useage depends heavily on the circumstances, or in this example the memory useage doesn't change for the duration of the plot, as you can see, that really messes with Epoch, also triggering an exception (line 8,
Uncaught TypeError: Cannot read property 'x' of undefined
):I am not sure how to properly fix this, maybe replace the
range
option with an extent function (as called from the code)? Or an extent option which takes precedence over the range option.