本文整理汇总了Python中pyecharts.Line._repr_html_方法的典型用法代码示例。如果您正苦于以下问题:Python Line._repr_html_方法的具体用法?Python Line._repr_html_怎么用?Python Line._repr_html_使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyecharts.Line
的用法示例。
在下文中一共展示了Line._repr_html_方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_line_type_fil
# 需要导入模块: from pyecharts import Line [as 别名]
# 或者: from pyecharts.Line import _repr_html_ [as 别名]
def test_line_type_fil():
line = Line("折线图-面积图示例")
line.add("商家A", CLOTHES, clothes_v1, is_fill=True, line_opacity=0.2,
area_opacity=0.4, symbol=None)
line.add("商家B", CLOTHES, clothes_v2, is_fill=True, area_color='#000',
area_opacity=0.3, is_smooth=True)
assert '"step": true' not in line._repr_html_()
示例2: test_line_user_define_markpoint
# 需要导入模块: from pyecharts import Line [as 别名]
# 或者: from pyecharts.Line import _repr_html_ [as 别名]
def test_line_user_define_markpoint():
line = Line("折线图示例")
line.add(
"商家A",
CLOTHES,
clothes_v1,
mark_point=["average", {"coord": ["裤子", 10], "name": "这是我想要的第一个标记点"}],
)
line.add(
"商家B",
CLOTHES,
clothes_v2,
is_smooth=True,
mark_point=[{"coord": ["袜子", 80], "name": "这是我想要的第二个标记点"}],
)
html_content = line._repr_html_()
assert '"value": 80' in html_content
assert '"value": 10' in html_content
示例3: test_line_user_define_marks
# 需要导入模块: from pyecharts import Line [as 别名]
# 或者: from pyecharts.Line import _repr_html_ [as 别名]
def test_line_user_define_marks():
line = Line("折线图示例")
line.add(
"商家A",
CLOTHES,
clothes_v1,
mark_point=["average", "max", "min"],
symbol_size=50,
mark_point_symbol="diamond",
mark_point_textcolor="#40ff27",
)
line.add(
"商家B",
CLOTHES,
clothes_v2,
mark_point=["average", "max", "min"],
mark_point_symbol="arrow",
mark_point_symbolsize=40,
)
assert '"symbolSize":50' not in line._repr_html_()
示例4: test_line_type_step
# 需要导入模块: from pyecharts import Line [as 别名]
# 或者: from pyecharts.Line import _repr_html_ [as 别名]
def test_line_type_step():
line = Line("折线图-阶梯图示例")
line.add("商家A", CLOTHES, clothes_v1, is_step=True, is_label_show=True)
assert '"step": true' in line._repr_html_()