天天看點

eChats折線圖更新資料不自然,要閃一下,動态資料解決

eChats折線圖更新資料不自然,要閃一下,動态資料解決

 使用eCharts動态更新資料功能的時候,更新時動畫會不自然,原因不知道,不過通過設定series值的方式就可以解決

chartRow.data.forEach((item) => {
    // childList.push([item.ts, item.num]) // 原來的方式
    childList.push({name: item.ts, value: [item.ts, item.num]}) // 新的方式設值
})
           

繼續閱讀