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.
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
CartesianAxis: Improve interval option 'equidistantPreserveStart' #3768
CartesianAxis: Improve interval option 'equidistantPreserveStart' #3768
Changes from 16 commits
abe0583
695514f
f2b74bc
f79f31c
65cbf21
6ba9807
998d87d
26fb1ec
c7f51d2
ad76465
5ae63d5
6852d43
cb8ed8d
0f0fd91
ee4eb1e
257aef7
9d49913
bf89acd
86fa0e3
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section deserves scrutiny. Is this the behaviour we want to achieve?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this really true in the browser though?
I feel like all of these should be able to fit? every time?
I kind of think we shouldn't always preserve start and instead show as many as we can while maintaining equidistance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I construct the ticks in the test such that this is true in the browser.
But good point, if we were to dynamically allow starting from any tick but still only show equidistant ticks, we could show much more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really, we could consider to redo the interface completely. As far as I understand it, the options currently are:
We could have the option to choose
equidistant
withoutalwaysShowStart
.I admittedly find the naming of these strategies not that insightful. We should probably investigate how others do this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The more I think about this, I believe we should simply replace the existing
equidistantPreserveStart
with this implementation.This would be a breaking change, as it changes existing behaviour, but the change would only be to the better, namely we would show more ticks than we previously did, and there would yet be no collision.
@ckifer What do you think about this approach?
I like it, because it does not further complicate the API and it improves the existing behaviour (almost a bug fix)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm on board - if people complain that their chart looks better then... not sure lol. If anything we could do the same thing with preserveEnd if we wanted no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Thanks for the discussion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They will look better, Coltin! :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly 🚀. If there are complaints I will say but... they look better 😂