VictoryScatter size function no longer includes active param
After upgrading from 0.21 to 0.24 the VictoryScatter component does not include the active param for the size function like it used to. Was this removed intentionally? If so what is the work around to get this kind of functionality back?
<VictoryScatter
size={(d, active) => {
console.log(active); // undefined
return active ? 5 : 3;
}}
/>
@tkiethanom this is a regression. I'll get it cleaned up for the next release.
@tkiethanom actually, I'm not able to reproduce this issue in the latest version. Note that undefined is the expected value for active if the prop has not explicitly been set.
I think what might be going on is that the evaluation of functional props has been moved down to the level of the primitive component, so Point in this example. If you're writing your own dataComponent for VictoryScatter, you'll want to evaluate this prop within your component.
I'm going to close this issue, since I can't reproduce it, but please let me know if you have more questions, or if you can't get this working correctly.
@boygirl So this example https://formidable.com/open-source/victory/gallery/voronoi-tooltips-grouped doesn't work with the latest version right?
@tkiethanom I opened a related issue #926. I found that the scatter dots do receive the active prop but not when they are being moused over directly.
For anyone still wondering about this, the way to use active is now:
<VictoryScatter
size={({active}) => {
return active ? 5 : 3;
}}
/>