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