How to set one to red and second to blue?
import pygal
chart = pygal.Line()
chart.x_labels = range(5)
chart.add('one', [1, None, 3, None, 5])
chart.add('two', range(5))
chart.render_to_png(__file__ + '-linear.png')
You can use Pygal's Custom Styles to define specific colors for the series that you are loading. The only drawback is that the colors are assigned based on series order, so in your case you should set the colors parameter to ('red','blue') so that they match your serie order.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With