本文整理匯總了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_()