-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
[v-2.0] Linechart x-scale gets confused with a lot of datapoints. #1598
Comments
I think what happens is that the time scale decides that it can't show 1 hour increments for all the data, and jumps up to 1 day instead of trying 2 hours, 3 hours, etc. Shouldn't be too hard to address |
I'm not sure the approach to take to fix that. Any ideas would be appreciated. |
I have some ideas that in theory don't sound too hard. Will try and design it out. |
It actually goes from 2 minute increments to 1 hour increments. IMHO 1,5,10,15 30 and 60 minute increments would make more sense for a timeline at this scale. I am curious what kind of solution you come up with. |
We talked a bit about partial ticks. I also really like your suggestion. Making another tick level that is in fact 15 minute increments of an hour. To that we could add more like 6 or 12 hour increments for days, etc. Really anything that is a common partial time unit. @etimberg? This way we wouldn't really need to do partial ticks and instead just create enough specificity levels to accommodate any time range. |
@tannerlinsley I don't think this would be a replacement for partial ticks. The behaviour I showed above would still occur with the smaller time units. You would see an empty graph where you would not expect it. Closely related to this, I come to think of the following. Maybe implement suggestedMin/suggestedMax for the X-axis? If you want to show a graph from 01:10 to 03:10 but happen to only have data starting at 01:15 and ending at 01:45... how would you do that? (Imagine wanting to show a floating window of the last 2 hours of data, and it's 03:10 now). |
There the "to" and "from" properties that limit the min and max of the x scale. Will that not do? |
Yes it would. |
It's |
Oh good. |
I set it like this:
But that does not override the rounding of the intervals. |
@stephanarts I have a PR for this in #1724 |
Nice, I hope I have the time to check this this week. |
When the number of datapoints / width ratio is too high, the chart is no longer rendering it correctly.
This is with 60 datapoints that can be rendered correctly:
But when the width is reduced, it appears like this:
This is the configuration (minus the set of datapoints):
Edit:
Looking at it again made me realise this probably has something to do with the rounding of the ticks to whole hours... maybe it's intended behaviour, but I find it looking odd. Especially because I do have data that could be displayed in the 'blank' area if I wanted to.
The text was updated successfully, but these errors were encountered: