Chart configuration¶
How¶
pygal is customized at chart level with the help of the Config class).
Instance¶
The config class works this way:
from pygal import Config
config = Config()
config.show_legend = False
config.human_readable = True
config.fill = True
chart = pygal.XY(config)
...
and you can share the config object between several charts. For one shot chart rendering several shorthand are available:
Attribute¶
Config values are settable on the chart object.
chart = pygal.XY(config)
chart.show_legend = False
chart.human_readable = True
chart.fill = True
...
Keyword args¶
Config values can be given as keyword args at init:
chart = pygal.XY(show_legend=False, human_readable=True, fill=True)
And at render:
chart = pygal.XY()
chart.render(show_legend=False, human_readable=True, fill=True)