options:
  width: 600
  height: 500
  legend: 
    hide: false
    position: 
      right: 40
  padding: {bottom: 70, left: 70, right: 10, top: 10}
  axis:
    y:
      interval: 20
      padding: 5
    x:
      ticks:
      {% for idx, line in enumerate(o.lines) %}
        - v: $idx
          label: $line.item.name
      {% end %}
chart:
  type: vbar
  output_type: svg
  dataset:
    - - Sales
      -
      {% for idx, line in enumerate(o.lines) %}
        - [$idx, $line.amount]
      {% end %}
    - - Absolute sales
      -
      {% for idx, line in enumerate(o.lines) %}
        - [$idx, ${abs(line.amount)}]
      {% end %}
