relatorio

view examples/vbar_chart @ 70:3a19cb44ebdf

Follow PyCha official interface instead of my own
author Nicolas Évrard <nicoe@openhex.org>
date Thu Oct 30 11:03:36 2008 +0100 (3 years ago)
parents 55bce5686933
children
line source
1 options:
2 width: 600
3 height: 500
4 legend:
5 hide: false
6 position:
7 right: 40
8 padding: {bottom: 70, left: 70, right: 10, top: 10}
9 axis:
10 y:
11 interval: 20
12 padding: 5
13 x:
14 ticks:
15 {% for idx, line in enumerate(o.lines) %}
16 - v: $idx
17 label: $line.item.name
18 {% end %}
19 chart:
20 type: vbar
21 output_type: svg
22 dataset:
23 - - Sales
24 -
25 {% for idx, line in enumerate(o.lines) %}
26 - [$idx, $line.amount]
27 {% end %}
28 - - Absolute sales
29 -
30 {% for idx, line in enumerate(o.lines) %}
31 - [$idx, ${abs(line.amount)}]
32 {% end %}