# 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")) }) }) }