pygal.view module

Projection and bounding helpers

class pygal.view.Box(xmin=0, ymin=0, xmax=1, ymax=1)[source]

Bases: object

Chart boundings

fix(with_margin=True)[source]

Correct box when no values and take margin in account

property height

Helper for box height

margin = 0.02
set_polar_box(rmin=0, rmax=1, tmin=0, tmax=6.283185307179586)[source]

Helper for polar charts

swap()[source]

Return the box (for horizontal graphs)

property width

Helper for box width

property xmax

X maximum getter

property xmin

X minimum getter

property ymax

Y maximum getter

property ymin

Y minimum getter

class pygal.view.HorizontalLogView(width, height, box)[source]

Bases: XLogView

Transposed Logarithmic projection

x(x)[source]

Project x as y

y(y)[source]

Project y as x

class pygal.view.HorizontalView(width, height, box)[source]

Bases: View

Same as view but transposed

x(x)[source]

Project x as y

y(y)[source]

Project y as x

class pygal.view.LogView(width, height, box)[source]

Bases: View

Y Logarithmic projection

y(y)[source]

Project y

class pygal.view.Margin(top, right, bottom, left)[source]

Bases: object

Class reprensenting a margin (top, right, left, bottom)

property x

Helper for total x margin

property y

Helper for total y margin

class pygal.view.PolarLogView(width, height, box)[source]

Bases: View

Logarithmic polar projection

class pygal.view.PolarThetaLogView(width, height, box, aperture=1.0471975511965976)[source]

Bases: View

Logarithmic polar projection

class pygal.view.PolarThetaView(width, height, box, aperture=1.0471975511965976)[source]

Bases: View

Logarithmic polar projection

class pygal.view.PolarView(width, height, box)[source]

Bases: View

Polar projection for pie like graphs

class pygal.view.ReverseView(width, height, box)[source]

Bases: View

Same as view but reversed vertically

y(y)[source]

Project reversed y

class pygal.view.View(width, height, box)[source]

Bases: object

Projection base class

x(x)[source]

Project x

y(y)[source]

Project y

class pygal.view.XLogView(width, height, box)[source]

Bases: View

X logarithmic projection

x(x)[source]

Project x

class pygal.view.XYLogView(width, height, box)[source]

Bases: XLogView, LogView

X and Y logarithmic projection