/+junk/pygooglechart-py3k

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/%2Bjunk/pygooglechart-py3k

« back to all changes in this revision

Viewing changes to pygooglechart.py

  • Committer: gak
  • Date: 2008-08-25 08:04:26 UTC
  • Revision ID: git-v1:463fda3d9ed015271db8982b8a8cdb3e6cc60b36
 - Fixed bug with automatic scaling and pie charts
 - Axis labels now can be entered as numbers

Show diffs side-by-side

added added

removed removed

Lines of Context:
603
603
 
604
604
    def set_axis_labels(self, axis_type, values):
605
605
        assert(axis_type in Axis.TYPES)
606
 
        values = [urllib.quote(a) for a in values]
 
606
        values = [urllib.quote(str(a)) for a in values]
607
607
        axis_index = len(self.axis)
608
608
        axis = LabelAxis(axis_index, axis_type, values)
609
609
        self.axis.append(axis)
894
894
        for dataset in self.data:
895
895
            yield ('x', dataset)
896
896
 
 
897
    def scaled_data(self, data_class, x_range=None, y_range=None):
 
898
        if not x_range:
 
899
            x_range = [0, sum(self.data[0])]
 
900
        return Chart.scaled_data(self, data_class, x_range, self.y_range)
 
901
 
897
902
 
898
903
class PieChart2D(PieChart):
899
904