fix(axis): correct tick alignment in ordinal scale with numeric values #1609
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.
Summary
The tick line and label correctly renders now when using an ordinal scale with numeric values on the x axis.
Details
The changes were applied in #1446 to remove tick labels that were outside the domain in a multi-layer time axis.
The problem was caused by the fact that the tick position was limited to the min value between the
domain[0]
and the value itself. Thedomain[0]
, in a continuous scale is the minimum, but when using an ordinal scale, thedomain[0]
is the first value of the domain and, in a non ordered or just reversed, numerical domain, it can be different than the actual min. This caused the wrong positioning of the labels.In the VRT test, the change on the data order is desired to check for regressions.
If you want to double-check locally just replace the changed line to the original version:
Issues
fix #1608
Checklist
:xy
,:partition
):interactions
,:axis
)closes #123
,fixes #123
)