From e3acadfd5a68855925ed21775001aecdee8ddcc8 Mon Sep 17 00:00:00 2001 From: Ryan Mandel Date: Tue, 23 Sep 2014 11:41:59 -0700 Subject: [PATCH] altered _set_view to use CompleteLogView Just to see if it works. --- pygal/graph/graph.py | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/pygal/graph/graph.py b/pygal/graph/graph.py index fca3101..3aa8acf 100644 --- a/pygal/graph/graph.py +++ b/pygal/graph/graph.py @@ -24,7 +24,7 @@ Commmon graphing functions from __future__ import division from pygal.interpolate import INTERPOLATIONS from pygal.graph.base import BaseGraph -from pygal.view import View, LogView, XYLogView +from pygal.view import View, LogView, XYLogView, CompleteLogView from pygal.util import ( truncate, reverse_text_len, get_texts_box, cut, rad, decorate) from math import sqrt, ceil, cos @@ -52,18 +52,29 @@ class Graph(BaseGraph): def _set_view(self): """Assign a view to current graph""" + xlog = False + ylog = False if self.logarithmic: + ylog = True if self._dual: - view_class = XYLogView - else: - view_class = LogView - else: - view_class = View - - self.view = view_class( + #view_class = XYLogView + xlog = True + #else: + #view_class = LogView + #else: + #view_class = View + + #self.view = view_class( + # self.width - self.margin.x, + # self.height - self.margin.y, + # self._box) + self.view = CompleteLogView( self.width - self.margin.x, self.height - self.margin.y, - self._box) + self._box, + True, + xlog, + ylog) def _make_graph(self): """Init common graph svg structure"""