FormidableLabs / FormidableLabs/victory
Avoiding crowding of labels in VictoryLine chart
- Dominant language
- TypeScript
- Stars
- 11.2k
- Forks
- 536
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
When a large dataset is plotted as a line chart, noticing that the tick labels for the data on the chart are overlapping with each other causing it to become obscure. Is there a way to avoid this issue? Can the library decide which labels to display without overlapping? Or, can we provide a set of labels to be displayed, like `tickValues` maybe?
**Victory version**
Which npm version are you using?
N/A
**Code**
This issue can be reproduced in the editable source present in [VictoryLine](https://formidable.com/open-source/victory/docs/victory-line#victoryline) chart with the below snippet:
```
`${datum.y}k`}
/>
```
**Expected behavior**
Victory should automatically and selectively render a limited set of labels that helps render the chart neatly, or, should accept it as a prop similar to `tickValues`.
**Screenshots**

**Additional context**
Another observation from this example is that some labels like `0k` are overlapping with the y-axis line, which shouldn't happen. Although the position of the labels can be adjusted manually, I feel this should be taken care of automatically by the library.

Any inputs are appreciated!
Contributor guide
Assessment
This issue has not been assessed yet.