victory
victory copied to clipboard
VictoryGroup breaks when a VictoryBar has y={(datum)=>null} inside a victoryStack and has large X values
Describe the bug VictoryChart no longer displays correct x values when what i wrote in the title happens
Victory version 36.6.0
Code Sandbox link Please include a code sandbox link or a similar reproduction if possible.
To Reproduce Steps to reproduce the behavior:
- go to click on the sandbox link
- see all the bars in the chart are aligned to the right
- remove y={(datum)=>null} and see it fix itself
Expected behavior one part of the group disappears while the other works normally
Desktop (please complete the following information):
- OS: Windows 10
- Browser: chrome
- Version 104.0.5112.102 (Official Build) (64-bit)
Try to return a number instead of null
.
<VictoryBar
y={(datum) => 0}
...
/>
The y
prop should return type of DataGetterPropType
which is string | string[] | number | number[]
.
in the chart im using i want 0 to be a legitimate value that appears while hovered, while null to be like missing data in victoryLine
edit: this is for tooltip purposes, hover to work for 0 and not work for null