oddcitizenape commented on issue #7793:
URL: https://github.com/apache/echarts/issues/7793#issuecomment-1809813774

   > i tried this , but its does not work , based on echart documentation each 
series can have one markArea object not an array
   > 
   > ```
   > 
   > 
   > markArea: [ {
   >                itemStyle: {
   >                    normal: {
   >                        color: "red"
   >                     },
   > 
   >                },
   >                data: [
   >                    [ {yAxis: 0 }, { yAxis: 1 }],
   >                ]
   >            },
   >            {
   >                itemStyle: {
   >                    normal: {
   >                        color: 'blue'
   >                     },
   >                },
   >                data: [
   >                    [{ yAxis: 1 }, { yAxis: 2 }],
   >                ]
   >            }],`
   > ```
   
   It's been a while, but maybe someone is interested. You should have just 
formatted the object a little differently. Then you don't need a workaround. 
That's a bit misleading, but it works:
   
   `
    series: [
       {
         name: 'Axis name #1',
         type: 'line',
         smooth: true,
         data: data,
         markArea: {
           data: [
             [ 
               {
                 name: 'Warning',
                 yAxis: 110,
                 itemStyle: {
                   color: 'yellow',
                   opacity: 0.3,
                 },
               },
               { yAxis: 130 },
             ],
             [
               {
                 name: 'Alarm',
                 yAxis: 130,
                 itemStyle: {
                   color: 'red',
                   opacity: 0.3,
                 },
               },
               { yAxis: 450 }
             ]
           ],
         }
       },
     ],
   `


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to