svg/charts/graph.py
def calculate_bottom_margin(self):
		"""
		Calculate the margin in pixels below the plot area, setting
		border_bottom.
		"""
		bb = 7
		if self.key and self.key_position == 'bottom':
			bb += len(self.data) * (self.font_size + 5)
			bb += 10
		if self.show_x_labels:
			max_x_label_height_px = self.x_label_font_size
			if self.rotate_x_labels:
				label_lengths = map(len, self.get_x_labels())
				max_x_label_len = functools.reduce(max, label_lengths)
				max_x_label_height_px *= 0.6 * max_x_label_len
			bb += max_x_label_height_px
			if self.stagger_x_labels:
				bb += max_x_label_height_px + 10
		if self.show_x_title:
			bb += self.x_title_font_size + 5
		self.border_bottom = bb
def calculate_bottom_margin(self):
		bb = 7
		if self.key and self.key_position == 'bottom':
			bb += len(self.data) * (self.font_size + 5)
			bb += 10
		if self.show_x_labels:
			max_x_label_height_px = self.x_label_font_size
			if self.rotate_x_labels:
				label_lengths = map(len, self.get_x_labels())
				max_x_label_len = functools.reduce(max, label_lengths)
				max_x_label_height_px *= 0.6 * max_x_label_len
			bb += max_x_label_height_px
			if self.stagger_x_labels:
				bb += max_x_label_height_px + 10
		if self.show_x_title:
			bb += self.x_title_font_size + 5
		self.border_bottom = bb
def calculate_bottom_margin ( self ) : bb = 7 if self . key and self . key_position == 'bottom' : bb += len ( self . data ) * ( self . font_size + 5 ) bb += 10 if self . show_x_labels : max_x_label_height_px = self . x_label_font_size if self . rotate_x_labels : label_lengths = map ( len , self . get_x_labels ( ) ) max_x_label_len = functools . reduce ( max , label_lengths ) max_x_label_height_px *= 0.6 * max_x_label_len bb += max_x_label_height_px if self . stagger_x_labels : bb += max_x_label_height_px + 10 if self . show_x_title : bb += self . x_title_font_size + 5 self . border_bottom = bb
Calculate the margin in pixels below the plot area, setting
		border_bottom.
Calculate the margin in pixels below the plot area setting border_bottom .