Add Shapes to charts.
def test_shape(): chart = open_flash_chart() t = title(text="Random shape") chart.title = t s = shape(colour="#89ad34") s.values = [{'x': 6, 'y': 5}, {'x': 8, 'y': 8}, {'x': 6, 'y': 5}, {'x': 6, 'y': 9}, {'x': 2, 'y': 10}] chart.add_element(s) x = x_axis() x.offset = False x.labels = labels(labels=months) chart.x_axis = x return chart
Data used to generate the chart — shape.json