當前位置: 首頁>>代碼示例>>Python>>正文


Python MultiBarChart.forceY方法代碼示例

本文整理匯總了Python中corehq.apps.reports.graph_models.MultiBarChart.forceY方法的典型用法代碼示例。如果您正苦於以下問題:Python MultiBarChart.forceY方法的具體用法?Python MultiBarChart.forceY怎麽用?Python MultiBarChart.forceY使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在corehq.apps.reports.graph_models.MultiBarChart的用法示例。


在下文中一共展示了MultiBarChart.forceY方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: get_chart

# 需要導入模塊: from corehq.apps.reports.graph_models import MultiBarChart [as 別名]
# 或者: from corehq.apps.reports.graph_models.MultiBarChart import forceY [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))
     chart.forceY = [0, 100]
     chart.height = 700
     chart.rotateLabels = -90
     chart.marginBottom = 390
     chart.marginLeft = 100
     self._chart_data(chart, columns, rows)
     return [chart]
開發者ID:SEL-Columbia,項目名稱:commcare-hq,代碼行數:11,代碼來源:table_card_report.py

示例2: get_chart

# 需要導入模塊: from corehq.apps.reports.graph_models import MultiBarChart [as 別名]
# 或者: from corehq.apps.reports.graph_models.MultiBarChart import forceY [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 forceY [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


注:本文中的corehq.apps.reports.graph_models.MultiBarChart.forceY方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。