From 3d4523365e622c5bfbd3881c3c5190eb8a18730a Mon Sep 17 00:00:00 2001 From: Florian Mounier Date: Mon, 3 Aug 2015 10:20:57 +0200 Subject: [PATCH] Minor fixes --- docs/changelog.rst | 1 + pygal/graph/dual.py | 2 +- pygal/graph/graph.py | 2 +- pygal/state.py | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 764140f..ea71092 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -14,6 +14,7 @@ Changelog * Activate element on tooltip hovering. (#106) * Fix radar axis behaviour (#247) * Add tooltip support in metadata to add a title (#249). +* Take config class options in account too. 2.0.0 diff --git a/pygal/graph/dual.py b/pygal/graph/dual.py index 4f0087c..e86f675 100644 --- a/pygal/graph/dual.py +++ b/pygal/graph/dual.py @@ -39,7 +39,7 @@ class Dual(Graph): pos = float(x_label.get('value')) title = x_label.get('label', self._format(pos)) elif is_str(x_label): - pos = x_pos[i] + pos = x_pos[i % len(x_pos)] title = x_label else: pos = self._x_adapt(float(x_label)) diff --git a/pygal/graph/graph.py b/pygal/graph/graph.py index 1e79cc3..cad4b12 100644 --- a/pygal/graph/graph.py +++ b/pygal/graph/graph.py @@ -761,7 +761,7 @@ class Graph(PublicApi): pos = float(y_label.get('value')) title = y_label.get('label', self._format(pos)) elif is_str(y_label): - pos = y_pos[i] + pos = y_pos[i % len(y_pos)] title = y_label else: pos = float(y_label) diff --git a/pygal/state.py b/pygal/state.py index 96ce666..fb7d81c 100644 --- a/pygal/state.py +++ b/pygal/state.py @@ -30,6 +30,7 @@ class State(object): def __init__(self, graph, **kwargs): """Create the transient state""" + self.__dict__.update(**graph.config.__class__.__dict__) self.__dict__.update(**graph.config.__dict__) self.__dict__.update(**graph.__dict__) self.__dict__.update(**kwargs)