I use the rCharts nPlot() function to display grouped or grouped histograms, data like contingency table data. "MultiBarChart" is displayed in a brilliant application. Below is a snippet of code that I use in my brilliant application.
graphData <- reactive({ as.data.frame(table(eval(inputVar1()),eval(inputVar2()))) }) output$myChart <- renderChart({ p1 <- nPlot(Freq ~ Var1, group="Var2", data=graphData(), type="multiBarChart") p1$addParams(dom='myChart') return(p1) })
In my dataset, one categorical variable has 16 levels. When this variable is displayed along the x axis of "multiBarChart", not all labels are displayed. Is there a way in nPlot to change the font size of axis labels? I think something like cex.axis=0.5 or cex.lab=0.5 or something like that.
Alternatively, is there a parameter like las= that would allow me to rotate the axis label 90 degrees and possibly have a cleaner graph where all labels of categorical variables are displayed along the x axis of the graph.
Any advice a group can provide is greatly appreciated !!
Chris
source share