angular8中 如何引入兩個echarts版本


下載echarts2和echarts4的源碼,然后在index.html中

1.先引入echarts4版本

2.然后引入echarts2版本 並且將echarts2源碼中所有echarts 替換為echarts2

使用的時候 如果需要使用版本4  

declare const echarts: any;
echarts.init(document.getElementById('box'))

  

如果要使用版本2

declare const echarts2: any;
echarts2.init(document.getElementById('box'));

  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM