Changeset 56:c0e3672508cf

Show
Ignore:
Timestamp:
08/20/08 11:09:25 (2 years ago)
Author:
Nicolas ?vrard <nicoe@…>
Branch:
default
Message:

Added line chart

Location:
examples
Files:
1 added
4 modified

Legend:

Unmodified
Added
Removed
  • examples/demo.py

    r55 r56  
    2828repos.add_report(Invoice, 'image/png', 'vbar_chart', report_name='vbar') 
    2929repos.add_report(Invoice, 'image/png', 'hbar_chart', report_name='hbar') 
     30repos.add_report(Invoice, 'image/png', 'line_chart', report_name='line') 
    3031 
    3132inv = Invoice(customer={'name': 'John Bonham', 
     
    8485vbar_report, _ = repos.reports[Invoice]['vbar'] 
    8586file('vbar.png', 'w').write(vbar_report(inv).render().getvalue()) 
     87line_report, _ = repos.reports[Invoice]['line'] 
     88file('line.png', 'w').write(line_report(inv).render().getvalue()) 
    8689 
  • examples/hbar_chart

    r55 r56  
    88    y: 
    99      interval: 15 
     10      padding: 5 
    1011    x: 
    1112      ticks: 
  • examples/pie_chart

    r54 r56  
    1010    {% for line in o.lines %} 
    1111      - - ${line.item.name}  
    12         - - [0, ${abs(line.amount)}] 
     12        - - [0, $line.amount] 
    1313    {% end %} 
  • examples/vbar_chart

    r55 r56  
    77  axis: 
    88    y: 
    9       interval: 15 
     9      interval: 20 
     10      padding: 5 
    1011    x: 
    1112      ticks: