xwq163zmsh opened a new issue, #20128:
URL: https://github.com/apache/echarts/issues/20128

   ### Version
   
   5.3.3
   
   ### Link to Minimal Reproduction
   
   
https://echarts.apache.org/examples/zh/editor.html?code=PYBwLglsB2AEC8sDeAoWsDGwA2wBOAXLANoBEAxAAyUDMNAbPaQDSwXWMCcnLb5ALBgCGAIwwBTXhXEBWGgCYakgLrM0sACZCwQgM7iwRVOnS7gAVzwSixdSZKkwATxCTWpeZQCM8qZ680ft78QV4yoUyqdiZkAGL44rpgvAqUrHTy6d7pNPzpnJRR9uhkAMpg4iCuvPKerF4AHJmwXpxerIp5sPIFRcVkACKJ4njJ9TJp3Qod2S0yXa2FasUOAOoG2ELQGrycDawA7Af1s9ys_IXRyuoAvsuw2OIA5uLbNtHGxRAaRO3R6BAKgBbcpOR5GO7_TTaIQ2UjlSrVdzxPCJZJ9eyPABmhjYXkoAFIWFD9I8MGB8O8VvZPtSTM5XERSEJsNhiXT7AB6TmwQD3yoBTuUA9GaAb7lAPCGgAN5QA5qoAia0AIW6wSBgR5QlaK8FsQAWioBIBPZHMhHOQKuKDPETIg0AAbiN9LqDWrTWxALPKOvudP11IxJix-CB2gqhFgWPM0HJUDgAApoEIgeIAJSGg2osCWOAAckAyvqAWSUQMAfrBU7AANSwKMxgDcUJu0Xd6FpJm-REyUMB4hBznVSBrJi0OjhQ30oyk6yVWx2nvQeAgTwAFrjSPiia6TKTxOTKSQjbXN_SXA7mazbRzuXyhWKpXKFYDlQb0PamdrDysuys63STWbLda3Nvb1e987H2KZ8THHQMfT9EYiCDENIBgWBI2jOMEw5JMU3zQAw5UAJ-UczzAti1LcQKyfat7j6AAPABBMiIF0IxonfNhhAqJ58CcQ8hGo3QABUIAwABrOiVl0adgAAdygll9GrW57icKiaIhe4BwgRIbDrBjSBEIQ8EPZTEgAGSEJwLDAAAhJwmTwMTSBk5Db13JktJ0pc9N0QzjPMMyLLYKzRJs9A7jshUHLYJzdJGFS3
 KMkzzMs6zbPUkLNO08LJwM6LPNinz4oC64biAA&_source=echarts-doc-preview
   
   ### Steps to Reproduce
   
   1、折线图options
   ```
   option = {
     tooltip: {
       trigger: 'axis'
     },
     legend: [
       {
         itemStyle: {},
         data: ["Email", "Union Ads"],
         left: "0%",
         selector: [
             {
               type: "all",
               // 可以是任意你喜欢的 title
               title: "全选",
             },
             {
               type: "inverse",
               title: "反选",
             },
           ],
         formatter: function (name) {
             return '当前pod: ' + name;
         }
       },
       {
         itemStyle: {},
         data: ["Video Ads", "Direct","Search Engine"],
         right: "0%",
         selector: [
             {
               type: "all",
               // 可以是任意你喜欢的 title
               title: "全选",
             },
             {
               type: "inverse",
               title: "反选",
             },
           ],
         formatter: function (name) {
             return '历史pod: ' + name;
         }
       },
     ],
     grid: {
       left: '3%',
       right: '4%',
       bottom: '3%',
       containLabel: true
     },
     toolbox: {
       feature: {
         saveAsImage: {}
       }
     },
     xAxis: {
       type: 'category',
       boundaryGap: false,
       data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
     },
     yAxis: {
       type: 'value'
     },
     series: [
       {
         name: 'Email',
         type: 'line',
         stack: 'Total',
         data: [120, 132, 101, 134, 90, 230, 210]
       },
       {
         name: 'Union Ads',
         type: 'line',
         stack: 'Total',
         data: [220, 182, 191, 234, 290, 330, 310]
       },
       {
         name: 'Video Ads',
         type: 'line',
         stack: 'Total',
         data: [150, 232, 201, 154, 190, 330, 410]
       },
       {
         name: 'Direct',
         type: 'line',
         stack: 'Total',
         data: [320, 332, 301, 334, 390, 330, 320]
       },
       {
         name: 'Search Engine',
         type: 'line',
         stack: 'Total',
         data: [820, 932, 901, 934, 1290, 1330, 1320]
       }
     ]
   };
   ```
   2、legend有两个
    ```
   legend: [
       {
         itemStyle: {},
         data: ["Email", "Union Ads"],
         left: "0%",
         selector: [
             {
               type: "all",
               // 可以是任意你喜欢的 title
               title: "全选",
             },
             {
               type: "inverse",
               title: "反选",
             },
           ],
         formatter: function (name) {
             return '当前pod: ' + name;
         }
       },
       {
         itemStyle: {},
         data: ["Video Ads", "Direct","Search Engine"],
         right: "0%",
         selector: [
             {
               type: "all",
               // 可以是任意你喜欢的 title
               title: "全选",
             },
             {
               type: "inverse",
               title: "反选",
             },
           ],
         formatter: function (name) {
             return '历史pod: ' + name;
         }
       },
     ],
   ```
   3、每个legend的selector的多选和反选功能不能独立使用,点击后对两个图例都生效
   
   ### Current Behavior
   
   1、折线图
   
![image](https://github.com/apache/echarts/assets/68945100/8b3ed77e-25be-43f1-90ef-9638d464a8cc)
   2、点击左侧图例反选按钮
   
![image](https://github.com/apache/echarts/assets/68945100/158299b3-0c5a-459d-b76f-1901d592a5e6)
   3、点击右侧全选按钮
   
![image](https://github.com/apache/echarts/assets/68945100/a9b0eb66-37b2-4f1c-98d2-b5646685e632)
   
   
   ### Expected Behavior
   
   options中legend设置多个legend,每个legend的selector的多选和反选功能不能独立使用,点击后对两个图例都生效
   
   ### Environment
   
   ```markdown
   - OS:
   - Browser:
   - Framework:
   ```
   
   
   ### Any additional comments?
   
   _No response_


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