ctc1995 opened a new issue #10073: 在使用markArea属性时报错
URL: https://github.com/apache/incubator-echarts/issues/10073
 
 
   
   ```
   option = {
       xAxis: {
           type: 'category',
           data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
       },
       yAxis: {
           type: 'value'
       },
       series: [{
           data: [120, 200, 150, 80, 70, 110, 130],
           type: 'bar',
           markLine: {
               symbol: 'none',
               lineStyle: {
                   color: 'blue',
                   type: 'solid',
                   width: 4,
               },
               data: [
                       [{
                           x: '20%',
                           y: '42.5%'
                       },
                       {
                           x: '22.6%',
                           y: '11.4%'
                       }],
                       [{
                           x: '31.8%',
                           y: '11.4%'
                       },
                       {
                           x: '34%',
                           y: '31%'
                       }], // 自己去计算百分比
                   ]
           },
           markArea: {
               data: [
                   [
                       {
                           x: '20%',
                           y: '42.5%'
                       },
                       {
                           x: '22.6%',
                           y: '11.4%'
                       }
                   ]
               ]
           }
       }]
   };
   
   
   ```
   这段代码,在运行时会报如下错误:
   `Cannot read property '0' of undefined`
   
我想要用echarts绘制一个带有连接线的柱状图。我通过markLine可以绘制连接线,但是我需要在连接区域写样式,并且加入一些标签说明。当我定义markArea时发生了上述报错。
   请问我该如何设置markArea?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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