xAxis labels render on each other
See original GitHub issueWhen the graph is small and there are many ticks, some labels are rendered over each other
I see tickTotal
is hard coded according to the width of the graph. I can set the tickTotal
manually, but ideally I want it to be set automatically with any given data. Is there a recommended way to handle that case?
https://codesandbox.io/s/0owow0zpkp
(first graph has xType=“time”)
UPDATE:
Just found out I can use tickLabelAngle
and increase bottom margin. Is this the best approach?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:7
- Comments:12 (4 by maintainers)
Top Results From Across the Web
xAxis.labels.allowOverlap | highcharts API Reference
How to handle overflowing labels on horizontal axis. If set to "allow" , it will not be aligned at all. By default it...
Read more >How to render custom label colors for different xAxis labels?
Inside the XAxisRenderer.swift (not the XAxisRendererHorizontalBarChart like the other answer suggested) add this list with your colors ...
Read more >Axes Labels Formatting | Axes and Grids
With AnyChart, you've got a full control over the axes labels: you can format them, tune visual appearance and position. All major settings...
Read more >xAxis.labels - API Reference - Kendo UI Chart - Documentation
If set to true the chart will mirror the axis labels and ticks. If the labels are normally on the left side of...
Read more >Asymptote FAQ - Section 6 Questions about 2D graphs
How can I draw x axis ticks on the right side, with the tick labels on the left ... How can I prevent...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think there might another margin you don’t know about! Adding margin in style can be helpful, although it just adds margin around the inner svg. If you want to add internal margin, ie within the svg, you need to use the margin prop on the plot itself. (See https://uber.github.io/react-vis/documentation/api-reference/xy-plot for more). So your component might become something like
that is 100% what i would recommend. did that end up working out for you?