victory
victory copied to clipboard
Empty array for tickValues is not possible
Bugs and Questions
Checklist
-
[X] This is not a
victory-native
specific issue. (Issues that only appear invictory-native
should be opened here) -
[X] I have read through the FAQ and Guides before asking a question
-
[X] I am using the latest version of Victory
-
[X] I've searched open issues to make sure I'm not opening a duplicate issue
The Problem
Passing in a empty array for the tickValues attribute of a axis leads to victory calculating ticks and displaying ticks. Expected behavior: Do not display any ticks
This leads to problems where I want to render just full minutes on a time scale and the user decides to zoom between minutes.
Reproduction
https://codesandbox.io/embed/7jx36xwlmx
Zoom in between 0:00 and 0:01 until both are out of the chart. Then victory renders 0:00 labels which are not given through the tickValues.
@Sintifo you're right. This should be allowed. As a work around, you can use tickValues={[null]}
and VictoryAxis
will not render any ticks.
@boygirl Thank you for the workaround!