|
|
@ -67,10 +67,30 @@ class Line(Graph): |
|
|
|
points = serie.points |
|
|
|
points = serie.points |
|
|
|
view_values = list(map(self.view, points)) |
|
|
|
view_values = list(map(self.view, points)) |
|
|
|
if self.show_dots: |
|
|
|
if self.show_dots: |
|
|
|
|
|
|
|
if self.show_only_major_dots: |
|
|
|
|
|
|
|
major_dots_index = [] |
|
|
|
|
|
|
|
if self.x_labels: |
|
|
|
|
|
|
|
if self.x_labels_major: |
|
|
|
|
|
|
|
major_dots_index = [] |
|
|
|
|
|
|
|
for major in self.x_labels_major: |
|
|
|
|
|
|
|
start = -1 |
|
|
|
|
|
|
|
while True: |
|
|
|
|
|
|
|
try: |
|
|
|
|
|
|
|
index = self.x_labels.index( |
|
|
|
|
|
|
|
major, start + 1) |
|
|
|
|
|
|
|
except ValueError: |
|
|
|
|
|
|
|
break |
|
|
|
|
|
|
|
else: |
|
|
|
|
|
|
|
major_dots_index.append(index) |
|
|
|
|
|
|
|
start = index |
|
|
|
|
|
|
|
elif self.x_labels_major_every: |
|
|
|
|
|
|
|
major_dots_index = range( |
|
|
|
|
|
|
|
0, len(self.x_labels), self.x_labels_major_every) |
|
|
|
|
|
|
|
|
|
|
|
for i, (x, y) in enumerate(view_values): |
|
|
|
for i, (x, y) in enumerate(view_values): |
|
|
|
if None in (x, y): |
|
|
|
if None in (x, y) or (self.show_only_major_dots |
|
|
|
|
|
|
|
and i not in major_dots_index): |
|
|
|
continue |
|
|
|
continue |
|
|
|
|
|
|
|
|
|
|
|
metadata = serie.metadata.get(i) |
|
|
|
metadata = serie.metadata.get(i) |
|
|
|
classes = [] |
|
|
|
classes = [] |
|
|
|
if x > self.view.width / 2: |
|
|
|
if x > self.view.width / 2: |
|
|
|