Simple Bar Chart Example

Source code can be found on Github

Category 1Category 2Category 3Category 4Category 5Category 6Category 7Category 8Category 9Category 1004080120160200240855171855171897325897325169770169770598722598722983612983612869049869049927228927228109815109815607789607789826934826934

Click a bar. Any bar

Code

plot_content = BarChart.new(test_data)
  |> BarChart.set_val_col_names(["Series 1", "Series 2", "Series 3"])
  |> BarChart.type(:stacked)
  |> BarChart.data_labels(true)
  |> BarChart.orientation(:vertical)
  |> BarChart.event_handler("chart1_bar_clicked")
  |> BarChart.colours(["ff9838", "fdae53", "fbc26f", "fad48e", "fbe5af", "fff5d1"])
  

plot = Plot.new(500, 400, plot_content)
  |> Plot.titles("", "")
  |> Plot.axis_labels("", "")
  |> Plot.plot_options(%{})