[xy-chart][grid] add x/yGridValues, bump @vx/grid to fix band-scale bug #146
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.
🏆 Enhancements
🐛 Bug Fix
This PR makes the following improvements/bug fixes for
@data-ui/xy-chart
@vx/grid
to^0.0.180
so that we can leverage some new functionality and fixesx
andy
gridlines where they don't work forband
type scalesx/yGridOffset
controls the offset of the gridline from the grid / tick value. This is useful for band scales which are offset bybandwidth() / 2
. This defaults tobandwidth() / 2
if the scale is a band type, and 0 otherwiseallows a user to specify the exact values for grid lines. If not defined, these fall back to
X/YAxis.props.tickValuesif available (so grid and ticks are in sync by default but can be independent), or undefined in which case the
@vx/gridcomponents will fallback to
numTicks`.numTicks
can be set onX/YAxis
components and are used by default for the gridDemo of custom
xGridValues
cc @conglei @kristw @rmusa