使用pyecharts生成折线图时,显示不全
效果如图
主代码如下
c = (
Line(init_opts=opts.InitOpts(width='800px', height='400px'))
.add_xaxis(x_time)
.add_yaxis('上证', y_000001,
markpoint_opts=opts.MarkPointOpts(
data=[
opts.MarkPointItem(type_='max', name='最高点'),
opts.MarkPointItem(type_='min', name='最低点'),
]
),
is_smooth=True
)
.set_global_opts(
title_opts=opts.TitleOpts(title='市场指数'),
tooltip_opts=opts.TooltipOpts(trigger='axis'),
xaxis_opts=opts.AxisOpts(type_='category', boundary_gap=True),
yaxis_opts=opts.AxisOpts(min_=d_000001['收盘'][0],
type_='value',
splitline_opts=opts.SplitLineOpts(is_show=True)),
)
.render()
)