- Timestamp:
- 09/12/08 12:08:53 (4 years ago)
- Files:
-
- 1 modified
-
trunk/src/chart.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/chart.py
r99 r100 504 504 return 505 505 506 surfaceWidth = self.surface.get_width() 507 surfaceHeight = self.surface.get_height() 508 509 # Compute legend dimensions 506 510 padding = 4 507 511 bullet = 15 … … 515 519 width = padding + bullet + padding + width + padding 516 520 521 # Compute legend position 522 legend = self.options.legend 523 if legend.position.right is not None: 524 legend.position.left = (surfaceWidth 525 - legend.position.right 526 - width) 527 if legend.position.bottom is not None: 528 legend.position.top = (surfaceHeight 529 - legend.position.bottom 530 - height) 531 532 # Draw the legend 517 533 cx.save() 518 534 cx.rectangle(self.options.legend.position.left, … … 615 631 style={}, 616 632 hide=False, 617 position=Option(top=20, left=40 ),633 position=Option(top=20, left=40, bottom=None, right=None), 618 634 ), 619 635 padding=Option(
