base.init(config => {
const chart = new F2.Chart(config);
chart.tooltip({
custom: true,
showXTip: true,
showYTip: true,
snap: true,
crosshairsType: 'xy',
crosshairsStyle: {
lineDash: [ 2 ]
}
});
chart.axis("day", false)
chart.source(this.baseData, {
value: {
formatter:(val) =>{
if (val > 10000) {
return val / 10000 + "w"
}
return val;
}
}
});
chart
.line()
.position('day*price')
chart.render();
// 需要把 chart 返回
return chart;
});

2***@qq.com
- 发布:2021-04-21 12:16
- 更新:2021-04-21 12:16
- 阅读:358
小程序修改y轴的名称无法正常显示
分类:uni-app
0 个回复