From 3aa4a7af6ebbeff6e91c8e577420b784f35ad319 Mon Sep 17 00:00:00 2001 From: Yohann Rebattu Date: Thu, 9 Jan 2020 17:02:33 +0100 Subject: [PATCH] Fixed stacked bar node property overriding --- pygal/graph/stackedbar.py | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/pygal/graph/stackedbar.py b/pygal/graph/stackedbar.py index abc08121..53707be9 100644 --- a/pygal/graph/stackedbar.py +++ b/pygal/graph/stackedbar.py @@ -25,6 +25,7 @@ from pygal.adapters import none_to_zero from pygal.graph.bar import Bar +from pygal.util import alter class StackedBar(Bar): @@ -138,16 +139,19 @@ def _bar(self, serie, parent, x, y, i, zero, secondary=False): width -= 2 * serie_margin height = self.view.y(zero) - y r = serie.rounded_bars * 1 if serie.rounded_bars else 0 - self.svg.transposable_node( - parent, - 'rect', - x=x, - y=y, - rx=r, - ry=r, - width=width, - height=height, - class_='rect reactive tooltip-trigger' + alter( + self.svg.transposable_node( + parent, + 'rect', + x=x, + y=y, + rx=r, + ry=r, + width=width, + height=height, + class_='rect reactive tooltip-trigger' + ), + serie.metadata.get(i) ) return x, y, width, height