r - nPLot x-axis Date variable and default stacked Bar plot in rCharts -
i using nplot, x-axis date variable, want date in data 'yyyy-mm-dd', tilted vertically (90 degrees). want nplot show chart stacked default. please me out.
output$testchart = renderchart({ testchart = nplot(count~date, data = df, group = 'category', type = 'multibarchart') testchart$chart(reducexticks = f) testchart$xaxis(staggerlabels = t) testchart$chart(stacked = t) testchart$xaxis(tickformat = "#! d3.time.format('%y-%m-%d') !#") return(testchart) })
and in server.r
output$mytabs = renderui({ tabs = tabsetpanel( tabpanel('tab1', h5("tab1"), fluidrow(showoutput("testchart")) ) ) mainpanel(tabs)
})
in ui.r
uioutput('mytabs')
suppose stored plot in object n1
. here how can customize seek.
n1$chart(stacked = true) n1$xaxis( tickformat = "#! d3.time.format('%y-%m-%d') !#", rotatelabels = 90 ) n1
i have no way verify works. suggest post data , code used generate plot. doing so, works you, useful others come across question.
Comments
Post a Comment