-
Notifications
You must be signed in to change notification settings - Fork 719
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
feat(grid): update scale types in vx/grid #775
Conversation
@@ -109,15 +109,15 @@ export default withTooltip<AreaProps, TooltipData>( | |||
/> | |||
<LinearGradient id="area-background-gradient" from={background} to={background2} /> | |||
<LinearGradient id="area-gradient" from={accentColor} to={accentColor} toOpacity={0.1} /> | |||
<GridRows<number> |
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 generic type can be inferred from the input scale and this is no longer needed.
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.
had a couple comments on the doc strings, but lgtm otherwise!
/** `@vx/scale` or `d3-scale` object used to map from ScaleInput to y-coordinates. */ | ||
scale: Scale<ScaleInput, number>; | ||
scale: Scale; | ||
/** Exact values used to generate grid coordinates (y- for Rows, x- for Columns) lines using `scale`. Overrides `numTicks` if specified. */ |
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.
should we remove the (y- for Rows, x- for Columns)
piece here? also I think a leftover typo from me, could likely also remove the word coordinates
here
/** `@vx/scale` or `d3-scale` object used to map from ScaleInput to x-coordinates. */ | ||
scale: Scale<ScaleInput, number>; | ||
scale: Scale; | ||
/** Exact values used to generate grid coordinates (y- for Rows, x- for Columns) lines using `scale`. Overrides `numTicks` if specified. */ |
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.
ditto re removing y- ... and x-
from comment + removing coordinates
💥 Breaking Changes
Similar to
@vx/axis
in #773 ,@vx/grid
components now accept D3 Scale as generic type instead ofScaleInput
. Developers should not expect to specify this generic type as it can be inferred from the passed scale.