victory
victory copied to clipboard
The fixLabelOverlap attribute for VictoryAxis does not seem to fix overlapping in all scenarios
Questions
For discussions about features or questions about how to use Victory, please start a new discussion rather than opening an issue.
Bug Reports
Checklist
-
[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
I have a chart with a time series on the x axis. Victory charts is automatically displaying the appropriate axis tick label based on the time series data. In some instances these labels are overlapping. Adding in fixLabelOverlap={true}
will work in some instances but not all
Reproduction
This sandbox demonstrates the issue. By toggling the fix overlap value Chart 1 will correctly display labels without overlapping while Chart 2 will not.
Also, as a side question, it looks as though Victory Charts does some magic to display the appropriate label for time series data. As can be seen in the sandbox where some labels are months and others are years. Is there a way to configure this where months will display in the short format (e.g Sep, Oct) and when displaying years it might display some thing like ('22, '23)?
I have tried using tickFormat
but that will update all labels to display with the same format even if some are months and some are years.