pyOFC2 Python Open Flash Chart 2

Bar Chart 2

Add more than one bar to the chart

def test_bar_2():
                                                                                     
    t = title(text=time.strftime('%a %Y %b %d'))
    b1 = bar()
    b1.values = range(9,0,-1)
    b2 = bar()
    b2.values = [5,4,0,1,7,8,4,2,3,6]
    b2.colour = '#56acde'
    chart = open_flash_chart()
    chart.title = t    
    chart.add_element(b1)
    chart.add_element(b2)
    return chart

Data used to generate the chart — bar_2.json

© 2009 Pradeep Kishore Gowda