pyOFC2 Python Open Flash Chart 2

Line Dot

Example of Dotted Line Chart

def test_line_dot():
    
    t = title(text=time.strftime('%a %Y %b %d'))     
    l1 = line_dot()
    l1.values = map(lambda x: math.sin(x)*1.9 + 7, frange(0,6.2, 0.2))
    l1.halo_size = 0
    l1.width = 2
    l1.dot_size = 4
    
    l2 = line_dot()
    l2.values = map(lambda x: math.sin(x)*1.9 + 10, frange(0,6.2, 0.2))
    l2.halo_size = 1
    l2.width = 1
    l2.dot_size = 4
    
    l3 = line_dot()
    l3.values = map(lambda x: math.sin(x)*1.9 + 4, frange(0,6.2, 0.2))
    l3.halo_size = 1
    l3.width = 6
    l3.dot_size = 4
                   
    y = y_axis()
    y.min, y.max, y.steps = 0, 15, 5
    
    chart = open_flash_chart()
    chart.title = t
    chart.add_element(l1)
    chart.add_element(l2)    
    chart.add_element(l3)
    chart.y_axis = y
    return chart

Data used to generate the chart — line_dot.json

© 2009 Pradeep Kishore Gowda