|
|
@ -106,7 +106,7 @@ class Graph(BaseGraph): |
|
|
|
axis = self.svg.node(self.nodes['plot'], class_="axis x") |
|
|
|
axis = self.svg.node(self.nodes['plot'], class_="axis x") |
|
|
|
truncation = self.truncate_label |
|
|
|
truncation = self.truncate_label |
|
|
|
if not truncation: |
|
|
|
if not truncation: |
|
|
|
if self.x_label_rotation: |
|
|
|
if self.x_label_rotation or len(self._x_labels) <= 1: |
|
|
|
truncation = 25 |
|
|
|
truncation = 25 |
|
|
|
else: |
|
|
|
else: |
|
|
|
first_label_position = self.view.x(self._x_labels[0][1]) |
|
|
|
first_label_position = self.view.x(self._x_labels[0][1]) |
|
|
@ -214,10 +214,10 @@ class Graph(BaseGraph): |
|
|
|
"""Make the title""" |
|
|
|
"""Make the title""" |
|
|
|
if self.title: |
|
|
|
if self.title: |
|
|
|
self.svg.node(self.nodes['graph'], 'text', class_='title', |
|
|
|
self.svg.node(self.nodes['graph'], 'text', class_='title', |
|
|
|
x=self.margin.left + self.view.width / 2, |
|
|
|
x=self.margin.left + self.view.width / 2, |
|
|
|
y=self.title_font_size + 10 |
|
|
|
y=self.title_font_size + 10 |
|
|
|
).text = truncate(self.title, int(reverse_text_len( |
|
|
|
).text = truncate(self.title, int(reverse_text_len( |
|
|
|
self.width, self.title_font_size))) |
|
|
|
self.width, self.title_font_size))) |
|
|
|
|
|
|
|
|
|
|
|
def _serie(self, serie): |
|
|
|
def _serie(self, serie): |
|
|
|
"""Make serie node""" |
|
|
|
"""Make serie node""" |
|
|
|