Changeset 109 for trunk/src/pie.py
- Timestamp:
- 10/27/08 16:49:58 (4 years ago)
- Files:
-
- 1 modified
-
trunk/src/pie.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/pie.py
r102 r109 60 60 self.xticks = [] 61 61 if self.options.axis.x.ticks: 62 lookup = dict([(slice.xval, slice) for slice in self.slices]) 62 # lookup = dict([(slice.xval, slice) for slice in self.slices]) 63 lookup = dict([(slice.name, slice) for slice in self.slices]) 63 64 for tick in self.options.axis.x.ticks: 64 65 if not isinstance(tick, Option): … … 71 72 else: 72 73 for slice in self.slices: 73 label = '%s (%.1f%%)' % (slice.xval, slice.fraction * 100) 74 self.xticks.append((slice.xval, label)) 74 # label = '%s (%.1f%%)' % (slice.xval, slice.fraction * 100) 75 # self.xticks.append((slice.xval, label)) 76 label = '%s (%.1f%%)' % (slice.name, slice.fraction * 100) 77 self.xticks.append((slice.name, label)) 75 78 76 79 def _renderBackground(self, cx): … … 130 133 131 134 self.xlabels = [] 132 lookup = dict([(slice.xval, slice) for slice in self.slices]) 135 # lookup = dict([(slice.xval, slice) for slice in self.slices]) 136 lookup = dict([(slice.name, slice) for slice in self.slices]) 133 137 134 138 cx.set_source_rgb(*hex2rgb(self.options.axis.labelColor))
