~yacinechaouche/fortune/trunk

Viewing all changes in revision 11.

  • Committer: yacinechaouche at yahoo
  • Date: 2013-11-03 10:40:47 UTC
  • Revision ID: yacinechaouche@yahoo.com-20131103104047-58gsk6odt6ug7l2d
Improved the plotting feature :
 - Every product has its own plot
 - Two plots per page
 - Multiple pages possible

API Changes
The main API of Plotter now is :
- Plotter.plot (product_name,price_list) instead of Plotter.add_plot(product_name,price_list)
- Plotter.show() didn't change

utils.Plotter internal changes: 

- init_line_chart becomes create_linechart(pricelist). It automatically creates a linechart, positions it correctly in the upper or the bottom of self.drawing, fills its data and categoryNames.

- save saves the canvas, not the drawing. This allows for multiple pages documents.
- add_line becomes plot. it creates a linechart and adds it to the drawing
- extract_data now returns a formatted version of periods, with lots of empty values to accomodate space.
- show now calls only two methods       : save and open. 
- some extra methods                    : format_periods, add_plot, create_drawing
- some extra attributes                 : self.nb_of_plots
- some attributes aren't needed anymore : data, prodcuts, colors, linechart

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: