You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by GitBox <gi...@apache.org> on 2018/08/23 08:09:51 UTC

[GitHub] zhans1099 commented on issue #7412: 双Y轴柱状+折线图,设置yaxis的min、max后柱状图柱条下边界超越X轴

zhans1099 commented on issue #7412: 双Y轴柱状+折线图,设置yaxis的min、max后柱状图柱条下边界超越X轴
URL: https://github.com/apache/incubator-echarts/issues/7412#issuecomment-415330198
 
 
   想了零时解决办法
   添加辅助条
   1、辅助条的数字和 yMin 值一样
   2、对应的data 的 value值也要相应的减去 ymin 的值
   
   app.title = '堆叠柱状图';
   option = {
   tooltip : {
   trigger: 'axis',
   axisPointer : { // 坐标轴指示器,坐标轴触发有效
   type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
   }
   },
   legend: {
   data: ["汽温", "壁温", "氧化", "超温"],
   bottom: 1
   },
   grid: {
   left: '3%',
   right: '4%',
   bottom: '3%',
   containLabel: true
   },
   xAxis : [
   {
   type : 'category',
   data : ["1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7"]
   }
   ],
   yAxis : [
   {
   min: function(){return 450},
   max: function(){return 500},
   type : 'value'
   }
   ],
   series : [
   {
   name: '辅助',
   type: 'bar',
   stack: '广告',
   itemStyle: {
   normal: {
   barBorderColor: 'rgba(0,0,0,0)',
   color: 'rgba(0,0,0,0)'
   },
   emphasis: {
   barBorderColor: 'rgba(0,0,0,0)',
   color: 'rgba(0,0,0,0)'
   }
   },
   data: [450, 450, 450, 450, 450, 450, 450]
   },
   {
   name:'应收',
   type:'bar',
   data:[450, 450, 453, 450, 450, 450, 450]
   },
   {
   name:'电视',
   type:'bar',
   stack: '广告',
   data:[10, 20, 30, "-", "-", 40, "-"]
   },
   {
   name:'手机',
   type:'bar',
   stack: '广告',
   data:["-", "-", "-", "-", 50, "-", "-"]
   },
   {
   name:'网页',
   type:'bar',
   stack: '广告',
   data:["-", "-", "-", 0, "-", "-", 0]
   }
   ]
   };

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@echarts.apache.org
For additional commands, e-mail: dev-help@echarts.apache.org