The issue was caused by the label overlapping logic only showing every Nth label. However N could change for each unique label length resulting in strange overlaps when the label length would change.
We now just choose one label length (the longest label) and use that throughout for spacing.
Fix issue with overlapping labels on series charts.
Explanation About What Code Achieves:
Fixes the series chart overlapping label issue here:
https://github.com/frappe/charts/issues/158
The issue was caused by the label overlapping logic only showing every Nth label. However N could change for each unique label length resulting in strange overlaps when the label length would change.
We now just choose one label length (the longest label) and use that throughout for spacing.
Screenshots/GIFs:
See here for a screenshot of the issue:
https://github.com/frappe/charts/issues/158
Steps To Test:
Create a series chart with labels that have a different number of characters. View before and after this change
TODOs: