Exemplo n.º 1
0
    def c3_hbar(self):
        """c3 Horizontal Bar

        Example showing how to generate a horizontal bar chart using c3 module.
        """

        from random import randint
        from zoom.vis.c3 import hbar

        page_title = 'C3 Horizontal Bar Chart'

        xaxis_label = 'Month'

        legend = 'North', 'South'
        labels = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug',
                  'Sep', 'Oct', 'Nov', 'Dec')

        data = [(m, randint(1, 100), randint(1, 100)) for m in labels]

        visualization = hbar(data, legend=legend, title='Page Hits by Month')

        return locals()
Exemplo n.º 2
0
    def jqplot_hbar(self):
        """jqPlot Horizontal Bar Chart

        Example showing how to generate a horizontal bar chart using jqplot module.
        """

        from random import randint
        from zoom.vis.jqplot import hbar

        page_title = 'JQPlot Horizontal Bar Chart'

        legend = 'Page1', 'Page2'
        months = 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'
        data = [(m, randint(1, 10000), randint(1, 10000)) for m in months]

        visualization = hbar(
            data,
            title='Page Hits by Month',
            seriesColors=['red', '#cc88aa'],
            legend=legend,
        )

        return locals()
Exemplo n.º 3
0
    def jqplot_hbar(self):
        """jqPlot Horizontal Bar Chart

        Example showing how to generate a horizontal bar chart using jqplot module.
        """

        from random import randint
        from zoom.vis.jqplot import hbar

        page_title = 'JQPlot Horizontal Bar Chart'

        legend = 'Page1', 'Page2'
        months = 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'
        data = [(m, randint(1, 10000), randint(1, 10000)) for m in months]

        visualization = hbar(
            data,
            title='Page Hits by Month',
            seriesColors=['red', '#cc88aa'],
            legend=legend,
        )

        return locals()
Exemplo n.º 4
0
    def c3_hbar(self):
        """c3 Horizontal Bar

        Example showing how to generate a horizontal bar chart using c3 module.
        """

        from random import randint
        from zoom.vis.c3 import hbar

        page_title = 'C3 Horizontal Bar Chart'

        xaxis_label = 'Month'

        legend = 'North', 'South'
        labels = (
            'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
            'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'
        )

        data = [(m, randint(1, 100), randint(1, 100)) for m in labels]

        visualization = hbar(data, legend=legend, title='Page Hits by Month')

        return locals()