Bug:
Vue 用 echarts畫圖時tooltip.formatter中的參數(shù)params不會更新狼钮,導(dǎo)致顯示內(nèi)容有誤仁期。
解決方案:
在數(shù)據(jù)發(fā)生改變時计螺,先清空原來的數(shù)據(jù)蕾各。
this.chart.clear();
// or
this.chart.setOption( {}, true)
原因:
使用setOption時默認(rèn)是數(shù)據(jù)合并
Bug:
Vue 用 echarts畫圖時tooltip.formatter中的參數(shù)params不會更新狼钮,導(dǎo)致顯示內(nèi)容有誤仁期。
解決方案:
在數(shù)據(jù)發(fā)生改變時计螺,先清空原來的數(shù)據(jù)蕾各。
this.chart.clear();
// or
this.chart.setOption( {}, true)
原因:
使用setOption時默認(rèn)是數(shù)據(jù)合并