lsy9202 edited a comment 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都是只有一个显示刻度和文字,另一个只显示轴线没有刻度和文字。
   ```js
   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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to