代码拉取完成,页面将自动刷新
ToolTip 希望可以跟随手指在屏幕上滑动的时候连续地触发
所以canvas上绑定了 touchmove
结果是 可以实现 但是延迟卡的厉害
这应该怎么弄?
建议增加防抖机制,参考
moveLineA(e){
let currMoveTime = Date.now();
let duration = currMoveTime - lastMoveTime;
if (duration < Math.floor(1000 / 60)) return;//每秒60帧
lastMoveTime = currMoveTime;
let currIndex=canvaLineA.getCurrentDataIndex(e);
if(currIndex>-1&&currIndex<canvaLineA.opts.categories.length){
let riqi=canvaLineA.opts.categories[currIndex];
let leibie=canvaLineA.opts.series[0].name;
let shuju=canvaLineA.opts.series[0].data[currIndex];
this.Interactive=leibie+':'+riqi+'-'+shuju+'元';
}
canvaLineA.showToolTip(e, {
format: function (item, category) {
return category + ' ' + item.name + ':' + item.data
}
});
},
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
登录 后才可以发表评论