You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2022/01/11 10:41:24 UTC
[GitHub] [echarts] william-spec commented on issue #16359: [Bug] when you init and setOption for many times without dispose, the chart will not be rendered
william-spec commented on issue #16359:
URL: https://github.com/apache/echarts/issues/16359#issuecomment-1009834282
the code is like this
``let num = 0;
useEffect(() => {
if(num > 0){
let dom = document.getElementById('chart');
let myChart = echarts.init(dom)
myChart.setOption(...);
}
}, [num]);
{num === 0 ? (
<div id='chart' style={{width: '200px', height: '200px'}}></div>
) : (
<div>
暂无数据
</div>
)}``
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org