1# -*- coding: utf-8 -*- 2# This file is part of pygal 3# 4# A python svg graph plotting library 5# Copyright © 2012-2016 Kozea 6# 7# This library is free software: you can redistribute it and/or modify it under 8# the terms of the GNU Lesser General Public License as published by the Free 9# Software Foundation, either version 3 of the License, or (at your option) any 10# later version. 11# 12# This library is distributed in the hope that it will be useful, but WITHOUT 13# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 14# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 15# details. 16# 17# You should have received a copy of the GNU Lesser General Public License 18# along with pygal. If not, see <http://www.gnu.org/licenses/>. 19 20"""Horizontal Stacked Line graph""" 21 22from pygal.graph.horizontal import HorizontalGraph 23from pygal.graph.stackedline import StackedLine 24 25 26class HorizontalStackedLine(HorizontalGraph, StackedLine): 27 28 """Horizontal Stacked Line graph""" 29 30 def _plot(self): 31 """Draw the lines in reverse order""" 32 for serie in self.series[::-1]: 33 self.line(serie) 34 for serie in self.secondary_series[::-1]: 35 self.line(serie, True) 36