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/11/05 01:25:49 UTC

[GitHub] lsy9202 commented on issue #9332: 双grid时添加多yAxis时报错:xAxis and yAxis must use the same grid

lsy9202 commented on issue #9332: 双grid时添加多yAxis时报错:xAxis and yAxis must use the same grid
URL: https://github.com/apache/incubator-echarts/issues/9332#issuecomment-435728905
 
 
   改成这样不报错了,好像是xAxisIndex和yAxisIndex要成对出现。但是新情况是左右两边的yAxis都是只有一个显示刻度和文字,另一个只显示轴线没有刻度和文字。
   
   var option = {
       grid:[{
           height:"40%"
       },{
           height:"40%",
           bottom:"40px"
       }],
       xAxis: [{
           type: 'category',
           gridIndex:0,
           data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
       },{
           gridIndex:0
       },{
           gridIndex:1
       },{
           type: 'category',
           gridIndex:1,
           data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
       }],
       yAxis: [{
           type: 'value',
           gridIndex:0
       },{
           type:'value',
           gridIndex:0,
           scale:true,
           position:'right'
       },{
           type: 'value',
           gridIndex:1
       },{
           type:'value',
           gridIndex:1,
           scale:true,
           position:'right'
       }],
       series: [{
           data: [820, 932, 901, 934, 1290, 1330, 1320],
           type: 'line',
           xAxisIndex:0,
           yAxisIndex:0
       },{
           data: [820, 932, 901, 934, 1290, 1330, 1320],
           type: 'line',
           xAxisIndex:3,
           yAxisIndex:3
       }]
   };
   

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