You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
492 B

# Module to create a stacked bar chart in highcharter
barplotUI<-function(id){
ns<-NS(id)
tagList(
h4("Cluster"),
highchartOutput(ns("barplot"))
)
}
barplotServer<-function(id, data){
moduleServer(id, function(input, output, session){
output$barplot<-renderHighchart({
data|>
group_by(Cluster)|>
summarise(n=n())|>
hchart("bar", hcaes(x=Cluster, y=n))|>
hc_plotOptions(bar=list(stacking="normal"))
})
})
}