#8 Python library fixes

version-1
open
nobody
Helpers (11)
5
2008-06-11
2008-02-27
No

Hello,

This is a patch to fix some bugs for the pie graph related methods.

Here's a small changelog in emacs's changelog format (see http://www.gnu.org/software/emacs/manual/html_node/emacs/Format-of-ChangeLog.html#Format-of-ChangeLog\):

2008-02-27 Chaouche yassine <yacinechaouche@yahoo.com>

* OpenFlashChart.py :
(graph.__init__):
(graph.pie_data):
(graph.clear_pie_data):
(graph.pie_slice_colours):
(graph.pie_chart):
(graph.pie):
(graph.pie_values):
(graph.render):
preceded all pie attribute names with a leading "_", to prevent conflicts with
methods names.

(graph.set_is_fixed_num_decimals_forced):
(graph.set_is_decimal_separator_comma):
(graph.set_is_thousand_separator_disabled):
Made the code compatible with python 2.4 (the ternary operator syntax is not supported in versions 2.4 and earlier)

(graph.pie):
added some arbitrary default values to method arguments so that the caller is not obliged to specify them all.

(graph.pie_slice_colours):
This method is defined twice, the second definition is not correct. Commented the code for review by it's author.

(graph.render):
Just a matter of new lines here, to make the code more readable.

Discussion

  • Yacine Chaouche

    Yacine Chaouche - 2008-02-27

    Logged In: YES
    user_id=1277649
    Originator: YES

    Updated :

    008-02-27 Chaouche yassine <yacinechaouche@yahoo.com>
    * OpenFlashChart.py
    (graph_object.render):
    Fixed the title rendering code : wrapped {font-style:%s} around the self.title_size attribute
    Fixed the labels rendering code : using urllib.quote to prevent strange caracters to mess things up
    Added a small sugar for pie slices : if no colours were defined, then make random colours
    Added a make_random_colours method to be used for slices colours.

    2008-02-27 Chaouche yassine <yacinechaouche@yahoo.com>

    * OpenFlashChart.py :
    (graph_object.render):
    Wrapped the data_url into urllib.quote() so that it wont be interpreted as a parameter to the swf object;
    File Added: OpenFlashChart.py

     
  • Yacine Chaouche

    Yacine Chaouche - 2008-02-27

    updated version of OpenFlashChart.py

     
  • John Vandervort

    John Vandervort - 2008-06-11
    • labels: --> Helpers
    • milestone: --> version-1
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks