bandow commented on issue #20176:
URL: https://github.com/apache/echarts/issues/20176#issuecomment-2236165662

     // areaStyle: {  
                 //   color: function(params) {  
                 //       // const value = params.value[1]; // 
假设您正在处理的是折线图中的第二个数据点(索引为1)  
                 //       const value = params[params.length-1]; // 
假设您正在处理的是折线图中的第二个数据点(索引为1) 
                 //       if (value > 26) {  
                 //           // 对于大于26的值,使用从红色到深红色的渐变  
                 //           return new echarts.graphic.LinearGradient(0, 0, 
0, 1, [  
                 //               {offset: 0, color: 'rgb(255, 0, 0)'}, // 红色  
                 //               {offset: 1, color: 'rgb(128, 0, 0)'}  // 深红色  
                 //           ]);  
                 //       } else if (value >= 22) {  
                 //           // 对于大于等于22且小于等于26的值,使用从绿色到深绿色的渐变  
                 //           return new echarts.graphic.LinearGradient(0, 0, 
0, 1, [  
                 //               {offset: 0, color: 'rgb(0, 255, 0)'}, // 绿色  
                 //               {offset: 1, color: 'rgb(0, 128, 0)'}  // 深绿色  
                 //           ]);  
                 //       } else {  
                 //           // 对于小于22的值,使用从蓝色到深蓝色的渐变  
                 //           return new echarts.graphic.LinearGradient(0, 0, 
0, 1, [  
                 //               {offset: 0, color: 'rgb(0, 0, 255)'}, // 蓝色  
                 //               {offset: 1, color: 'rgb(0, 0, 128)'}  // 深蓝色  
                 //           ]);  
                 //       }  
                 //   }  
                 // }为什么不生效呢?


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