本文整理汇总了Python中pyecharts.Bar.chart_id方法的典型用法代码示例。如果您正苦于以下问题:Python Bar.chart_id方法的具体用法?Python Bar.chart_id怎么用?Python Bar.chart_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyecharts.Bar
的用法示例。
在下文中一共展示了Bar.chart_id方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_bar_stack
# 需要导入模块: from pyecharts import Bar [as 别名]
# 或者: from pyecharts.Bar import chart_id [as 别名]
def test_bar_stack():
bar = Bar("柱状图数据堆叠示例")
bar.add("商家A", CLOTHES, clothes_v1, is_stack=True)
bar.add("商家B", CLOTHES, clothes_v2, is_stack=True)
bar.chart_id = "id_chart_id"
html_content = bar._repr_html_()
assert "id_chart_id" == bar.chart_id
assert "dataZoom" not in html_content
assert "stack_" in html_content