当前位置: 首页>>代码示例>>Python>>正文


Python MultiBarChart.height方法代码示例

本文整理汇总了Python中corehq.apps.reports.graph_models.MultiBarChart.height方法的典型用法代码示例。如果您正苦于以下问题:Python MultiBarChart.height方法的具体用法?Python MultiBarChart.height怎么用?Python MultiBarChart.height使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在corehq.apps.reports.graph_models.MultiBarChart的用法示例。


在下文中一共展示了MultiBarChart.height方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: get_chart

# 需要导入模块: from corehq.apps.reports.graph_models import MultiBarChart [as 别名]
# 或者: from corehq.apps.reports.graph_models.MultiBarChart import height [as 别名]
 def get_chart(self, rows, columns, x_label, y_label):
     chart = MultiBarChart('% of Groups Receiving Grades', x_axis=Axis(x_label), y_axis=Axis(y_label, '.0%'))
     chart.height = 400
     chart.rotateLabels = -60
     chart.marginBottom = 90
     chart.marginLeft = 100
     self._chart_data(chart, columns, rows)
     return [chart]
开发者ID:kkrampa,项目名称:commcare-hq,代码行数:10,代码来源:table_card_report.py

示例2: get_chart

# 需要导入模块: from corehq.apps.reports.graph_models import MultiBarChart [as 别名]
# 或者: from corehq.apps.reports.graph_models.MultiBarChart import height [as 别名]
 def get_chart(self, rows, columns, x_label, y_label):
     chart = MultiBarChart('Adoption of Practices', x_axis=Axis(x_label), y_axis=Axis(y_label))
     chart.forceY = [0, 100]
     chart.height = 700
     chart.rotateLabels = -55
     chart.marginBottom = 390
     chart.marginLeft = 350
     self._chart_data(chart, columns, rows)
     return [chart]
开发者ID:SEL-Columbia,项目名称:commcare-hq,代码行数:11,代码来源:adoption_bar_char_report.py

示例3: get_chart

# 需要导入模块: from corehq.apps.reports.graph_models import MultiBarChart [as 别名]
# 或者: from corehq.apps.reports.graph_models.MultiBarChart import height [as 别名]
    def get_chart(self, rows, columns, x_label, y_label):
        chart = MultiBarChart('Adoption of Practices', x_axis=Axis(x_label), y_axis=Axis(y_label, '%'))

        if self.report_config['group'] == 'domain':
            chart.height = 550
            chart.rotateLabels = -55
            chart.marginBottom = 250
        elif self.report_config['group'] == 'practice':
            chart.height = 700
            chart.rotateLabels = -55
            chart.marginBottom = 400
        else:
            chart.height = 320
            chart.rotateLabels = 0
            chart.marginBottom = 50

        chart.marginLeft = 200
        chart.marginRight = 150
        self._chart_data(chart, columns, rows)
        return [chart]
开发者ID:LifeCoaching,项目名称:commcare-hq,代码行数:22,代码来源:adoption_bar_char_report.py

示例4: get_chart

# 需要导入模块: from corehq.apps.reports.graph_models import MultiBarChart [as 别名]
# 或者: from corehq.apps.reports.graph_models.MultiBarChart import height [as 别名]
 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
开发者ID:kkrampa,项目名称:commcare-hq,代码行数:16,代码来源:adoption_disaggregated_report.py

示例5: get_chart

# 需要导入模块: from corehq.apps.reports.graph_models import MultiBarChart [as 别名]
# 或者: from corehq.apps.reports.graph_models.MultiBarChart import height [as 别名]
    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
开发者ID:SEL-Columbia,项目名称:commcare-hq,代码行数:16,代码来源:adoption_disaggregated_report.py

示例6: charts

# 需要导入模块: from corehq.apps.reports.graph_models import MultiBarChart [as 别名]
# 或者: from corehq.apps.reports.graph_models.MultiBarChart import height [as 别名]
 def charts(self):
     chart = MultiBarChart(None, Axis(''), Axis(''))
     chart.height = 400
     chart.marginBottom = 100
     chart.data = self.get_data_for_graph()
     return [chart]
开发者ID:,项目名称:,代码行数:8,代码来源:


注:本文中的corehq.apps.reports.graph_models.MultiBarChart.height方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。