本文整理汇总了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]
示例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]
示例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