为图设置标题,并且同时为展示每条线的LegendLabels,两都会叠在一起,看不清
leslieDD opened this issue · comments
opt.Legend.Padding = charts.Box{
Top: 200,
Bottom: 100,
}
opt.Legend.Top = "200"
这个尝试很多,没有效果,
charts.LegendLabelsOptionFunc(lineTitle, charts.PositionCenter)
上面这行,后面的位置参数倒是有效果
可以,和顺序有关系:
在设置charts.LineRender
的opts ...OptionFunc
参数时,charts.LegendLabelsOptionFunc
放在func(opt *charts.ChartOption) {opt.Legend.Padding = ....}
之前就有效果,之前是放在后面的,怎么调都没有效果
自定义属性放在最后的函数处理,因为默认的OptionFunc都有可能会有默认的覆盖值