def get_chart(self, rows, x_label, y_label):
     chunks = _chunks(list(rows), self.chunk_size + 1)
     charts = []
     if self.request.GET.get('group_by', '') == 'domain':
         chunks = sorted(chunks, key=lambda k: k[0][0])
     for chunk in chunks:
         chart = MultiBarChart(chunk[0][0], x_axis=Axis(x_label), y_axis=Axis(y_label, '.0%'))
         chart.height = 300
         chart.rotateLabels = 0
         chart.marginBottom = 80
         chart.marginLeft = 100
         self._chart_data(chart, chunk[1:])
         charts.append(chart)
     return charts
    def get_chart(self, rows, x_label, y_label):
        chunks = _chunks(list(rows), self.chunk_size+1)
        charts = []
        for chunk in chunks:

            chart = MultiBarChart(chunk[0][0], x_axis=Axis(x_label), y_axis=Axis(y_label))
            chart.forceY = [0, 100]
            chart.height = 300
            chart.rotateLabels = 0
            chart.marginBottom = 80
            chart.marginLeft = 100
            self._chart_data(chart, chunk[1:])
            charts.append(chart)
        return charts
    def get_chart(self, rows, x_label, y_label):
        chunks = _chunks(list(rows), self.chunk_size + 1)
        charts = []
        for chunk in chunks:

            chart = MultiBarChart(chunk[0][0],
                                  x_axis=Axis(x_label),
                                  y_axis=Axis(y_label))
            chart.forceY = [0, 100]
            chart.height = 300
            chart.rotateLabels = 0
            chart.marginBottom = 80
            chart.marginLeft = 100
            self._chart_data(chart, chunk[1:])
            charts.append(chart)
        return charts
Exemplo n.º 4
0
 def get_chart(self, rows, x_label, y_label):
     chunks = _chunks(list(rows), self.chunk_size + 1)
     charts = []
     if self.request.GET.get('group_by', '') == 'domain':
         chunks = sorted(chunks, key=lambda k: k[0][0])
     for chunk in chunks:
         chart = MultiBarChart(chunk[0][0],
                               x_axis=Axis(x_label),
                               y_axis=Axis(y_label, '.0%'))
         chart.height = 300
         chart.rotateLabels = 0
         chart.marginBottom = 80
         chart.marginLeft = 100
         self._chart_data(chart, chunk[1:])
         charts.append(chart)
     return charts