Draft proposal and open for discussion: timeseries chart crashing when too many ticks #160
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It's a draft proposition of a solution to solve an old but 'niche' crash of chartjs when setting a time unit on a too big range. For example range from 1600 to 2020 and time unit set to
day
which resolves in a crash.The problem is mainly that we allow to force and set a time unit that is not compatible with the data range. We could believe that it should be handled by the user but in our case data are not static and can evolve so it appears that the check should be done on the component level and prevent the crash here.
We have few options that I see:
Another solution would be to make this check optional and use it only in Studio where we control dataFrame format, only maintain it with API changes ?
I’m not really happy with any of the solutions that’s why I haven’t finished to really write the function and this PR and I’m curious of your opinions here, anyone that has some free time and want to contribute with his opinion or a proposition on this subject is more than welcome.