echarts y轴显示 没有数据_echarts y轴数据问题
关键的代码贴出来分析下你好,我已经把代码贴到评论贴里面了,帮我分下下,看是不是代码的问题?这个是更新数据的代码:chartsOption.series[0].data=dataList!=""?dataList:[];//数据当前值chartsOption.series[0].name=kpiName!=""?kpiName:[];chartsOption.xAxis[0].data=time..
关键的代码贴出来分析下你好,我已经把代码贴到评论贴里面了,帮我分下下,看是不是代码的问题?这个是更新数据的代码:chartsOption.series[0].data= dataList!=""?dataList:[];//数据当前值chartsOption.series[0].name= kpiName!=""?kpiName:[];chartsOption.xAxis[0].data=timeList!=""?timeList:[];//x轴刻度 //chartsOption.title.text=kpiName; //option.tooltip.formatter=kpiName;//x轴 //chartsOption.legend.data[0]=[""+kpiName+""]; //非入口或再次使用,图表已被加载注册 require('echarts').init(document.getElementById(chart_id)).setOption(chartsOption,true);这个是配置项 varchartsOption={ tooltip:{ trigger:'axis', /formatter:"
{a}({b})"+ "当前值:{c}"+ "同比:{c1}"+ "环比:{c2}"+ "",/ borderColor:"#A4CFFF", borderWidth:"1", padding:'10', formatter:function(params,ticket,callback){ //setTimeout(function(){callback(ticket,reqTrendDataTip(params[0].name));},10); //return'loading'; returnreqTrendDataTip(params[0].name); }, backgroundColor:'rgba(230,242,255,0.88)' }, calculable:false, animation:false, legend:{ data:[], show:false, padding:0, itemGap:0/, selectedMode:'multiple'/ }, toolbox:{ show:true, feature:{ mark:{show:false}, dataZoom:{show:true}, dataView:{show:false}, magicType:{show:true,type:['line','bar']}, restore:{show:true}, saveAsImage:{show:true} }, orient:'vertical', x:'right', y:'top' }, dataZoom:{ show:true, realtime:true, start:20, end:80, height:15, handleColor:'rgba(161,205,239,1)', fillerColor:'rgba(228,240,247,1)', backgroundColor:'rgba(243,243,243,1)' }, xAxis:[ { type:'category', show:true, boundaryGap:false, axisLabel:{ //rotate:45, textStyle:{ fontWeight:100, fontStyle:'normal', fontSize:11, fontFamily:'微软雅黑,Arial,Verdana,sans-serif', align:'center' }//, //interval:15 }, axisLine:{//坐标轴 show:false }, data:[],//x轴坐标数据 splitLine:{ show:false }, axisTick:{ show:false } } ], yAxis:[ { type:'value', show:false } ], series:[ { name:'',//标题 type:'line', symbol:"emptyCircle", smooth:true, data:[],//数据 itemStyle:{ normal:{ color:'#1E97D2', lineStyle:{ color:'#1E97D2' } } } } ], grid:{ x:40, //y:35, y:0, x2:42, y2:45, borderWidth:0 }, title:{ text:'', x:'center', show:false }};看下我的代码有问题么?
DAMO开发者矩阵,由阿里巴巴达摩院和中国互联网协会联合发起,致力于探讨最前沿的技术趋势与应用成果,搭建高质量的交流与分享平台,推动技术创新与产业应用链接,围绕“人工智能与新型计算”构建开放共享的开发者生态。
更多推荐



所有评论(0)