pyOFC2 Python Open Flash Chart 2

Area Line Chart

Make an area chart.

See also Area Hollow

def test_area_line():
                                         
    t = title(text="Area Chart")
    a = area_line()
    a.width = 2
    a.dot_size = 4
    a.halo_size = 1
    a.colour = '#C4B86A'
    a.fill_colour = '#C4B8AA'
    a.fill_alpha = 0.7 
    a.values = scurve()
    chart = open_flash_chart()
    chart.title = t
    chart.add_element(a)
    y  = y_axis()
    y.min, y.max, y.steps = -2, 2, 2
    y.labels = None
    y.offset = False
    
    x = x_axis()
    x.labels = scurve()
    x.steps = 2
    xlbls = x_axis_labels(steps=4, rotate="vertical")
    x.labels = xlbls
    
    chart.y_axis = y
    chart.x_axis = x
    return chart

Data used to generate the chart — area_line.json

© 2009 Pradeep Kishore Gowda