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/09 10:39:17 UTC

[GitHub] polluxll opened a new issue #8847: Bar超出gird底部

polluxll opened a new issue #8847: Bar超出gird底部
URL: https://github.com/apache/incubator-echarts/issues/8847
 
 
   我再使用bar图表的时候发现有时候Bar回超出grid范围的底部。
   
   
   
   
   echarts@^3.5.4
   
   
   
   
   var option = {
                   title: { show: false },
                   toolbox: { show: false },
                   tooltip: {
                       trigger: 'axis'
                   },
                   grid: {
                       x: 65,
                       y: 40,
                       x2: 50,
                       y2: 25
                   },
                   legend: {
                       show: true,
                       data: ['serie1', 'serie2']
                   },
                   xAxis: {
                       type: 'category',
                       boundaryGap: true,
                       axisTick: {
                           alignWithLabel: true
                       },
                       splitLine: {
                           show: false
                       },
                       axisLine: {
                           lineStyle: {
                               color: "#000"
                           }
                       },
                       axisLabel: {
                           color: "#000",
                           formatter:function(value){
                               var vSplit=value.split('-');
                               return vSplit[1]+'月'+vSplit[2]+'日';
                           }
                       },
                       data: ["2018-07-17","2018-07-18","2018-07-19","2018-07-20","2018-07-21","2018-07-22","2018-07-23","2018-07-24","2018-07-25","2018-07-26","2018-07-27","2018-07-28","2018-07-29","2018-07-30","2018-07-31"]
                   },
                   yAxis: [{
                       type: 'value',
                       scale: true,
                       axisLabel: {
                           formatter: '{value}'
                       }
                   }, {
                       type: 'value',
                       scale: true,
                       axisLabel: {
                           formatter: '{value}'
                       }
                   }],
                   series: [{
                       name: 'serie1',
                       type: 'bar',
                       yAxisIndex: 0,
                       itemStyle: {
                           normal: { color: '#1d84e7' }
                       },
                       data: ["-","-","-",1004350.14,1165847.3,1825186.81,660983.55,2676262.08,2974929.46,887539.18,727581.57,1765389.83,2301493.07,2626195.38,1733012.92]
                   }, {
                       name: 'serie2',
                       type: 'line',
                       smooth: true,
                       yAxisIndex: 1,
                       itemStyle: {
                           normal: {
                               color: "#e0232d",
                               lineStyle: {
                                   color: "#e0232d"
                               }
                           }
                       },
                       markArea: areaStyle,
                       data: [43,55,47,46,59,19,69,95,94,63,102,188,104,113,110]
                   }]
               };
   
   
   
   
   var option = {
                   title: { show: false },
                   toolbox: { show: false },
                   tooltip: {
                       trigger: 'axis'
                   },
                   grid: {
                       x: 65,
                       y: 40,
                       x2: 50,
                       y2: 25
                   },
                   legend: {
                       show: true,
                       data: ['serie1', 'serie2']
                   },
                   xAxis: {
                       type: 'category',
                       boundaryGap: true,
                       axisTick: {
                           alignWithLabel: true
                       },
                       splitLine: {
                           show: false
                       },
                       axisLine: {
                           lineStyle: {
                               color: "#000"
                           }
                       },
                       axisLabel: {
                           color: "#000",
                           formatter:function(value){
                               var vSplit=value.split('-');
                               return vSplit[1]+'月'+vSplit[2]+'日';
                           }
                       },
                       data: ["2018-07-17","2018-07-18","2018-07-19","2018-07-20","2018-07-21","2018-07-22","2018-07-23","2018-07-24","2018-07-25","2018-07-26","2018-07-27","2018-07-28","2018-07-29","2018-07-30","2018-07-31"]
                   },
                   yAxis: [{
                       type: 'value',
                       scale: true,
                       axisLabel: {
                           formatter: '{value}'
                       }
                   }, {
                       type: 'value',
                       scale: true,
                       axisLabel: {
                           formatter: '{value}'
                       }
                   }],
                   series: [{
                       name: 'serie1',
                       type: 'bar',
                       yAxisIndex: 0,
                       itemStyle: {
                           normal: { color: '#1d84e7' }
                       },
                       data: ["-","-","-",1004350.14,1165847.3,1825186.81,660983.55,2676262.08,2974929.46,887539.18,727581.57,1765389.83,2301493.07,2626195.38,1733012.92]
                   }, {
                       name: 'serie2',
                       type: 'line',
                       smooth: true,
                       yAxisIndex: 1,
                       itemStyle: {
                           normal: {
                               color: "#e0232d",
                               lineStyle: {
                                   color: "#e0232d"
                               }
                           }
                       },
                       markArea: areaStyle,
                       data: [43,55,47,46,59,19,69,95,94,63,102,188,104,113,110]
                   }]
               };
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   

----------------------------------------------------------------
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