-
Notifications
You must be signed in to change notification settings - Fork 729
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
Missing docs @vx/shape #390
Comments
Update: I've rechecked your commit messages and it seems that the Maybe it should be added to the docs. Update again: Seems like |
There were a number of breaking changes of v0.0.181. While the docs a bit behind due to all of the updates we have other resources that are up to date.
|
Thanks for the quick reply. Have already checked the first two links out. Looked over the gallery examples just now and on the BarGroup there's no example for the tooltip, but for an After the update I was not able to get it working with <BarGroup
data={data}
keys={keys}
height={yMax}
x0={x0}
x0Scale={x0Scale}
x1Scale={x1Scale}
yScale={yScale}
color={color}
rx={4}
onMouseMove={x => event => {
this.handleTooltip(event, x)
}}
onMouseOut={() => hideTooltip}
/> |
here's one with tooltip, it follows the same pattern as the onClick: https://vx-demo.now.sh/barstack <BarGroup
data={data}
keys={keys}
height={yMax}
x0={x0}
x0Scale={x0Scale}
x1Scale={x1Scale}
yScale={yScale}
color={color}
>
{barGroups => {
return barGroups.map(barGroup => {
return (
<Group key={`bar-group-${barGroup.index}-${barGroup.x0}`} left={barGroup.x0}>
{barGroup.bars.map(bar => {
return (
<rect
key={`bar-group-bar-${barGroup.index}-${bar.index}-${bar.value}-${bar.key}`}
x={bar.x}
y={bar.y}
width={bar.width}
height={bar.height}
fill={bar.color}
rx={4}
onMouseMove={event => {
this.handleTooltip(event, bar)
}}
onMouseOut={hideTooltip}
/>
);
})}
</Group>
);
});
}}
</BarGroup> this change is outlined in the data binding section of: #383 |
Oh, so I need to do that extra |
Correct, this gives you more control over what is rendered while removing a confusing api design choice i made almost 2 years ago |
@hshoff Thanks for the headsup there. Going to update the version now and applying all the breaking changes to make it work again. |
Hello.
I've updated
@vx/shape
to0.0.181
which currently breaks my build, since somehow a new prop has been introduced calledcolor
which is required. I've checked the docs and have found nothing at all about this prop.How does this prop work and what does it do? To not break the build, I've set the prop to
color={() => false}
which makes all my bars black.The text was updated successfully, but these errors were encountered: