pygal.svg module

Svg helper

class pygal.svg.Svg(graph)[source]

Bases: object

Svg related methods

add_scripts()[source]

Add the js to the svg

add_styles()[source]

Add the css to the svg

confidence_interval(node, x, low, high, width=7)[source]
draw_no_data()[source]

Write the no data text to the svg

gauge_background(serie_node, start_angle, center, radius, small_radius, end_angle, half_pie, max_value)[source]
get_strokes()[source]

Return a css snippet containing all stroke style options

line(node, coords, close=False, **kwargs)[source]

Draw a svg line

node(parent=None, tag='g', attrib=None, **extras)[source]

Make a new svg node

ns = 'http://www.w3.org/2000/svg'
pre_render()[source]

Last things to do before rendering

render(is_unicode=False, pretty_print=False)[source]

Last thing to do before rendering

serie(serie)[source]

Make serie node

slice(serie_node, node, radius, small_radius, angle, start_angle, center, val, i, metadata)[source]

Draw a pie slice

solid_gauge(serie_node, node, radius, small_radius, angle, start_angle, center, val, i, metadata, half_pie, end_angle, max_value)[source]

Draw a solid gauge slice and background slice

transposable_node(parent=None, tag='g', attrib=None, **extras)[source]

Make a new svg node which can be transposed if horizontal