Simple Bar Chart Example

Source code can be found on Github

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

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(%{})