View Source LbEcharts (lb_echarts v0.0.2)

Library to use Echarts in LiveBook

Summary

Functions

Creates a bar chart

Create a stacked bar chart

Functions

Creates a bar chart

Options

  • :title - Title of the chart
  • :legend - Legend of the chart
  • :x - X axis data
  • :y - Y axis data

Examples

  iex> LbEcharts.bar(%{
  ...>   title: "Bar Chart",
  ...>   legend: ["sales"],
  ...>   x: ["shirt", "cardign", "chiffon shirt", "pants", "heels", "socks"],
  ...>   y: [5, 20, 36, 10, 10, 20]
  ...> })

Create a stacked bar chart

Options

  • :title - Title of the chart
  • :categories - Categories of the chart
  • :orientation - Orientation of the chart
  • :stacked_data - Stacked data of the chart

Examples

iex> LbEcharts.stacked_bar(%{ ...> title: "Stacked Bar Chart", ...> categories: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], ...> orientation: "vertical", ...> stacked_data: %{ ...> "mail" => [120, 132, 101, 134, 90, 230, 210], ...> "video" => [220, 182, 191, 234, 290, 330, 310], ...> "search" => [150, 232, 201, 154, 190, 330, 410], ...> "direct" => [320, 332, 301, 334, 390, 330, 320] ...> }})