-
Notifications
You must be signed in to change notification settings - Fork 524
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
when the label is a color like "red" it renders "rgb(255,0,0) #928
Comments
I suspect prop strings like |
Related: d3/d3-interpolate#42 |
Related PR: d3/d3-interpolate#43 |
+1, in my case it was "Chocolate", lol. |
I ran into this today too: https://codesandbox.io/s/xjz0l4wwj4 I wonder if it's worth waiting for d3-interpolate? That PR has been open for a year an a half at this point. |
Any update to this? Really annoying, converting the word 'Azure' to it's RGB info... |
From victory-animation.js it seems that this code is trying to interpolate the data, instead of interpolating only values passed as visual parameters. With the current code base the following workaround helps make sure that the data labels are "not interpolable": \x03 is ascii for "end of text", but several other values work too. (Workaround tested on https://codesandbox.io/s/xjz0l4wwj4 ) |
As discussed in other comments, Victory uses https://formidable.com/open-source/victory/docs/victory-transition#animationwhitelist <VictoryChart style={style}>
<VictoryBar
animate={{
animationWhitelist: ["data"]
}}
data={this.state.data}
style={{
data: this.state.style
}}
/>
</VictoryChart> This prop allows you to select which attributes are included in the animation, and any excluded components will not be interpolated. By default, every Victory component includes this as a static property, so you can check out the source for examples of the properties you would include. If there are not other
I'm going to close this issue for now, since I don't believe further action is required on Victory's side, but let me know if this doesn't work and we need to re-open to discuss alternate solutions. |
Hello and thanks for the great library!
I've reproduced the issue here but I need the animation so what solution?:
https://codesandbox.io/s/k062y8l13v
the fix is to comment out the animate property
<VictoryPie
// animate={{ duration: 500, easing: "cubicOut" }}
colorScale={colors}
data={data}
height={500}
width={500}
y={datum => datum._percent}
labelRadius={110}
labelComponent={}
/>
The text was updated successfully, but these errors were encountered: