基本信息
文件名称:vue弹窗里面使用echarts不显示的问题及解决.docx
文件大小:15.58 KB
总页数:4 页
更新时间:2025-05-21
总字数:约1.83千字
文档摘要

vue弹窗里面使用echarts不显示的问题及解决

initEcharts(){

???constmyChart=this.$echarts.init(document.getElementById(sCharts))

???constoption={

????tooltip:{

?????trigger:axis,

?????axisPointer:{

??????type:cross

?????}

????},

????xAxis:[

?????{

??????type:category,

??????data:[

???????1月,

???????2月,

???????3月,

???????4月,

???????5月,

???????6月,

???????7月,

???????8月,

???????9月,

???????10月,

???????11月,

???????12月

??????],

??????axisPointer:{

???????type:shadow

??????}

?????}

????],

????yAxis:[

?????{

??????type:value,

??????name:总体积,

??????min:0,

??????max:10,

??????interval:1,

??????axisLabel:{

???????formatter:{value}m3

??????}

?????},

?????{

??????type:value,

??????name:使用负荷,

??????min:0,

??????max:100,

??????interval:10,

??????axisLabel:{

???????formatter:{value}%

??????}

?????}

????],

????series:[

?????{

??????name:总体积,

??????type:bar,

??????data:[2.0,4.9,5.5,2.2,4.6,6.7,5.6,6.2,3.6,2.0,6.4,3.3],

??????itemStyle:{

???????normal:{

????????color:#d0e17d

???????}

??????}

?????},

?????{

??????name:使用负荷,

??????type:line,

??????yAxisIndex:1,

??????data:[100,22,33,45,63,80,20,23,23,65,12,6.2],

??????itemStyle:{

???????normal:{

????????color:#898989

???????}

??????}

?????}

????]

???}

???myChart.setOption(option);

??},

总结

以上为个人经验,希望能给大家一个参考,也希望大家多多支持。