areski / python-nvd3

Python Wrapper for NVD3 - It's time for beautiful charts
Other
660 stars 194 forks source link

Crowding of xticks #119

Open EvanPP opened 8 years ago

EvanPP commented 8 years ago

For this bar chart (based on a pandas Series), the xticks get crowded, as some of them are quite long.

When the same series is plotted using Bokeh and Plot.ly, the ticks are displayed down at an angle (perhaps these libraries detect the long names and re-orient accordingly)?

With matplotlib and pandas, the names get displayed vertically.

In each of the above cases, the crowding is avoided. In chart.add_serie(), I don't see an option to re-orient. Is this supported in the API? If not, how can I work around this issue? <img @src="http://imgur.com/xHJ1gfn">

quetzaluz commented 6 years ago

nvd3 offers a few options for this, some of which are configurable through this library. This library already has the xAxis_rotateLabel option which might offer what you need. You can also configure reduceXTicks in nvd3 and I'll see if I can add support for this and put up a PR this weekend (I am not sure how quickly PRs are reviewed for this library).

quetzaluz commented 6 years ago

More axis rendering options are now available in the develop branch of this repo