Example #1
0
    def __init__(self, type, name):
        Chart.__init__(self, type, name)

        # create the bar element and set its values
        element = Line(values=[9,8,7,6,5,4,3,2,1])

        # create the chart and set its title
        self.chart = ofc2.open_flash_chart(title=str(datetime.datetime.now()))
        self.chart.add_element(element)
Example #2
0
    def __init__(self, type, name):
        Chart.__init__(self, type, name)

        # create the bar element and set its values
        element = Line(values=[9, 8, 7, 6, 5, 4, 3, 2, 1])

        # create the chart and set its title
        self.chart = ofc2.open_flash_chart(title=str(datetime.datetime.now()))
        self.chart.add_element(element)
Example #3
0
    def __init__(self, type, name):
        Chart.__init__(self, type, name)

        # create the bar element and set its values
        element = BarStack(values=[ [ 2.5, 5 ], [ 7.5 ], [ 5, { 'val': 5, 'colour': '#ff0000' } ], [ 2, 2, 2, 2, { "val": 2, 'colour': '#ff00ff' } ] ])

        # create the chart and set its title
        self.chart = ofc2.open_flash_chart(title=str(datetime.datetime.now()))
        self.chart.set_y_axis(min=0, max=14, steps=7)
        self.chart.set_x_axis(labels=['a', 'b', 'c', 'd'])
        self.chart.add_element(element)
Example #4
0
    def __init__(self, type, name):
        Chart.__init__(self, type, name)

        # create the bar element and set its values
        element = BarStack(
            values=[[2.5, 5], [7.5], [5, {
                'val': 5,
                'colour': '#ff0000'
            }], [2, 2, 2, 2, {
                "val": 2,
                'colour': '#ff00ff'
            }]])

        # create the chart and set its title
        self.chart = ofc2.open_flash_chart(title=str(datetime.datetime.now()))
        self.chart.set_y_axis(min=0, max=14, steps=7)
        self.chart.set_x_axis(labels=['a', 'b', 'c', 'd'])
        self.chart.add_element(element)