pyechart Y轴数值过大不能完全显示
![img](https://img-mid.csdnimg.cn/release/static/image/mid/ask/232746064966139.png?x-oss-process=image/auto-orient,1/resize,w_320,m_lfit)
核心代码如下
c_000300 = (
Line(init_opts=opts.InitOpts(width='400px', height='225px', theme=ThemeType.CHALK))
.add_xaxis(x_time)
.add_yaxis('沪深300', y_000300,
is_smooth=True, is_symbol_show=False
)
.set_global_opts(
title_opts=opts.TitleOpts(title='沪深300', pos_top='10%', pos_right='40%'),
tooltip_opts=opts.TooltipOpts(trigger='axis'),
xaxis_opts=opts.AxisOpts(type_='category', boundary_gap=True),
yaxis_opts=opts.AxisOpts(max_=1.02 * d_000300['收盘'][0],
min_=0.98 * d_000300['收盘'][0],
type_='value',
splitline_opts=opts.SplitLineOpts(is_show=True)),
legend_opts=opts.LegendOpts(is_show=False)
)
.set_series_opts(
# markline_opts=opts.MarkLineItem(y=d_000001['收盘'][0], name='昨日收盘'),
label_opts=opts.LabelOpts(is_show=False)
)
尝试过设置margin的值,但是又会与y轴重叠