Quantcast
Channel: adjusting axis labels NVD3 graph in rCharts - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Answer by Ramnath for adjusting axis labels NVD3 graph in rCharts

$
0
0

The answer to your question can be found here. The basic idea is to set the option reduceXTicks to FALSE and also stagger the labels.

n1 <- nPlot(value ~ region, data = dat, group = 'variable',   type = 'multiBarChart')n1$chart(reduceXTicks = FALSE)n1$xAxis(staggerLabels = TRUE)

If the labels are big, you can control the size of the text using CSS. For now, you would have to manually insert this into your HTML, but in future version of rCharts, I will make it easy to add arbitrary HTML/CSS/JS to your chart, straight from the R console.

<style>svg text {font-size: 9px;}</style>

Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>