优秀范例:https://blog.csdn.net/weixin_44146276/article/details/102705998
关于折线的参数
def add_yaxis(
series_name
: str,
y_axis
: types
.Sequence
[types
.Union
[opts
.LineItem
, dict]],
is_selected
: bool = True,
is_connect_nones
: bool = False,
xaxis_index
: Optional
[Numeric
] = None,
yaxis_index
: Optional
[Numeric
] = None,
color
: Optional
[str] = None,
is_symbol_show
: bool = True,
symbol
: Optional
[str] = None,
symbol_size
: Union
[Numeric
, Sequence
] = 4,
stack
: Optional
[str] = None,
is_smooth
: bool = False,
is_clip
: bool = True,
is_step
: bool = False,
is_hover_animation
: bool = True,
z_level
: types
.Numeric
= 0,
z
: types
.Numeric
= 0,
markpoint_opts
: Union
[opts
.MarkPointOpts
, dict, None] = None,
markline_opts
: Union
[opts
.MarkLineOpts
, dict, None] = None,
tooltip_opts
: Union
[opts
.TooltipOpts
, dict, None] = None,
label_opts
: Union
[opts
.LabelOpts
, dict] = opts
.LabelOpts
(),
linestyle_opts
: Union
[opts
.LineStyleOpts
, dict] = opts
.LineStyleOpts
(),
areastyle_opts
: Union
[opts
.AreaStyleOpts
, dict] = opts
.AreaStyleOpts
(),
itemstyle_opts
: Union
[opts
.ItemStyleOpts
, dict, None] = None,
)
LineItem:折线图数据项
class LineItem(
name
: Union
[str, Numeric
] = None,
value
: Union
[str, Numeric
] = None,
symbol
: Optional
[str] = None,
symbol_size
: Union
[Sequence
[Numeric
], Numeric
] = None,
symbol_rotate
: Optional
[Numeric
] = None,
symbol_keep_aspect
: bool = False,
symbol_offset
: Optional
[Sequence
] = None,
label_opts
: Union
[LabelOpts
, dict, None] = None,
itemstyle_opts
: Union
[ItemStyleOpts
, dict, None] = None,
tooltip_opts
: Union
[TooltipOpts
, dict, None] = None,
)
官方文档:https://pyecharts.org/#/zh-cn/rectangular_charts?id=lineitem:折线图数据项