You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "qyjandroid (via GitHub)" <gi...@apache.org> on 2023/12/21 08:59:07 UTC

[I] [Bug] 饼图监听click事件,触发dispatchAction (type:select),在不配置selectedMode为true的情况下不生效 [echarts]

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

   ### Version
   
   5.4.3
   
   ### Link to Minimal Reproduction
   
   https://echarts.apache.org/examples/zh/editor.html?code=PYBwLglsB2AEC8sDeAoW7JgDYFMBcya6xYOAHmAQOSAcdoPBGgnLGAUroAbKgK9ZUA0R6Avt8VhhgwLJBAFUgjACcIAc3k4Z1CKQC2XHrH7bcS6ABNJ29HPkALSrCoBGAAwBSLdNjA5OaNaoA3ZZABjAEMsF2lhCRtbAFZnAWkAZxxcANJDAFlgQ3xYADMQpPjBAHpikgBPEByqBICZUVCinSakjwSCAG1TQld0aCD1auZAbgNAQuiw11xc63smwQiCWe6MSuqQCBwJ6RkgwwgAV3bYDqoAZicuGwAWC4BdOeIgn2AIQwAZIIAjZIB5PxksEFIvksIVYKVAGDqgHrnQAA6YBAyMAfdGAO39AFxyIKSy1gahw6gAymByrgTL1iJ93NkZABhUTuagAYlyjK2rjJMgpAHVXmALAQAEwPPgC2ABTykFTHKi8q5xGznZz3TGA75YYkk2AJCzAADuBHROCF6BAwASaig0GoIq8ymZ0ly7nUQTAYoIeX20FSZtgAAoQEEduoEgBKHpqsw4MD7GRwAAGSE-YAAPiNRrxYAAdOBIQyJgAkSF9_oSADofCF9jheLxowBuTGCuuwLAQaA4AASOAUVj5ADYDbA5AEeSHQ_HVaH0AEaeKqHSAoY53Oba5dOPYNmx-O7V5cRAAF45KV9wRbsDsjuWbxkrCGJfSFdq-_LoVK5JvZs5KRqjXa3UFfWYx9pBxEALCCE0jk_EkXxVYcv01HU8j_PtAMEFDiCSFJrEg3poI3ElvwQsAZHLZChTQ9AMJwVIcAyLJqhNaB5FwW9KOowwfkZJJrAcIVDEdIJOgbJBYFLLBywIBwrgADk4WB-kGah6FsS4CSqCTmiEkSyxyc5ZjkgZqnoXkVNWPkNNDYTRPE2Arl5PT5MMuhThMtTYFOcy1Us7SJPsaTZIcxS6CuFyciuDySS8
 sSdPseyDMC6IQoIaJwt6SLrNs2KFJsehu0S2Be3VZIqLSAgiPLFLBAVJ9tAVXhaxQdRykpUCZDAIsYC9KgAibAIAGtLlyN0PRgb0CwGINYMa5q_TavYEl9MBBwAQWG6AvWw1xVPoorUlvCjlA2BIAEkjHIAgxoDItWkOk7sjIPs-LAIJbrO2ALuLR7ntO-6AMDWteD-lAGqalq2o6modsW0DGJogahsgEafT9cbg2wydoASUQcCLLBgHkL0ACJADPIwBF5UAQmtAAdTeB4AJzh3sBgHqyAA
   
   ### Steps to Reproduce
   
   1. 如果不开启 selectedMode: 'single',或者true,则dispatchAction select不生效。
   2. 如果开启selectedMode: 'single',则会出现selectchanged 事件触发两次。
   
   
   ### Current Behavior
   
   或许你会觉得监听onclick多余,因为selectedMode: 'single'本身就会触发selectchanged 。但是我的需求是要保障永远选中一个,不能全部不选中,selectedMode: 'single'这种模式可以取消全部选中。
   
   ### Expected Behavior
   
   我期望实现饼图永远有一个是选中状态,不可取消。 同时想要保障selectchanged 事件只触发一次
   
   ### Environment
   
   ```markdown
   - OS:windows 11 
   - Browser:chrome
   - 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: commits-unsubscribe@echarts.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


Re: [I] [Bug] 饼图监听click事件,触发dispatchAction (type:select),在不配置selectedMode为true的情况下不生效 [echarts]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #19429:
URL: https://github.com/apache/echarts/issues/19429#issuecomment-3695048534

   This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!


-- 
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: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


Re: [I] [Bug] 饼图监听click事件,触发dispatchAction (type:select),在不配置selectedMode为true的情况下不生效 [echarts]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #19429:
URL: https://github.com/apache/echarts/issues/19429#issuecomment-3679474155

   This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.


-- 
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: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


Re: [I] [Bug] 饼图监听click事件,触发dispatchAction (type:select),在不配置selectedMode为true的情况下不生效 [echarts]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #19429: [Bug] 饼图监听click事件,触发dispatchAction (type:select),在不配置selectedMode为true的情况下不生效
URL: https://github.com/apache/echarts/issues/19429


-- 
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: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


Re: [I] [Bug] 饼图监听click事件,触发dispatchAction (type:select),在不配置selectedMode为true的情况下不生效 [echarts]

Posted by "helgasoft (via GitHub)" <gi...@apache.org>.
helgasoft commented on issue #19429:
URL: https://github.com/apache/echarts/issues/19429#issuecomment-1866695721

   > If selectedMode: 'single' is enabled, the selectedchanged event will be triggered twice.
   
   It is triggered a second time because of your _dispatchAction_.
   
   > I hope that one of the pie charts will always be selected and cannot be cancelled.
   
   easy [Demo Code](https://echarts.apache.org/examples/en/editor.html?code=PYBwLglsB2AEC8sDeAoWtJgDYFMBcya6GOAHmAQOSAcdoPBGgnLGAUroAbKgK9aVEC-ANEWMMCyQQBVMQwAnCAHNpOCVQhgcAWw7oeRXHOgATUUXRTpACwqxKARgAMAUkq9xwKTmjnKAN3mQAxgEMsB0MMUCpLAFZ7R2IAZxxcH2VdAFlgXXxYADMAuOCAejziMABPEAzKGJ8JQUDozXQ4lxiCAG1gsXFYaD8VcqZAbgNAQuigzthcTPNraPF-EVgp4PQSsqoQCBwRzok_XQgAV2bYFsoAZjsHCwAWc4BdaeI_D2AIXQAZPwAjeIB5LwksPxzbJYOLcWAFQBg6oB650AAOmAQMjAH3RgDt_QBccsDcqMlKoAMolXAGUboD7OdISADCgmcVAAxJk6ZtRsSJKSAOovMAmAgAJkWsHqnR8rmUCiOlC5lyiFjO9juvIBXywBMJMRMwAA7gR0Th7uIQMAYkooNAqIK3PIGZ1Ms4VH4wMLNXtoIkjbAABQgPzbFQxACUhEJxAkODAewkcAABkgPmAAD4DQacWAAHTgSF0sYAJEgPV6YgA6DwBPY4TiccMAbl5Gh1xCwEGgOAAEjgZGZuQA2GtGCA-Tn-gOwaNKgewHyUkWUak-XTT6fqAf8gPp4cDq1ubEQABeGXFXctMDALJbpncxKwunnAc4Vb5vMXtc-8Ve9YyHVGKvVmpyODvNdUIBMPwDUON9OnleIV3fVUNSyb8b2vUZ7waeIcESSCHwVdDxA_GCwAkYt4N_Xk4gSJJUnSKgDWgaRcAtZDSJwXRvjpOJzBsGtdFtPxWhvJBYELLBiwIGxLgADjBbpeioOhLAuZYMksPk9z4gShNgM4pi6HpyjoLk5NKHclN4_iiwyS4uU0ySdNoE59JWdSjIDFTTOE6wxIk7TpNoS47LMx
 zCWcwSMg0jypIsOhwl8ghwn80ZArU8zLM88LaHbKLYE7WASNQpICDw4tb1GG5ggQ2Bis4SsUAAaxwHAQAQWBQEgGA80adYYhaawbjzTiwD8PNMnrXQAEk9DIV1XWAP14AAPka1qUMSRifUrFRijJQCJDAPMYFdCpFrAXs_GoxiLkyR1nRgN0QD9DoCjHaAYkEHA8ywYBpFdAAiQAzyMAReVAEJrQAHU3geBPu4G7K3QCBMmugbqhUABBS64BBixssSSg_RquqGpABaGN0Trut6vxRvSUgich2BodhzJ4aR5qUcQShHXRsBMeCNaNs9bbdhiD1DpMBmjVdUClgMyiDrorL5HasmyAIBZRhJ-XSAIbGQBKlaUE4FagA)


-- 
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: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


Re: [I] [Bug] 饼图监听click事件,触发dispatchAction (type:select),在不配置selectedMode为true的情况下不生效 [echarts]

Posted by "echarts-bot[bot] (via GitHub)" <gi...@apache.org>.
echarts-bot[bot] commented on issue #19429:
URL: https://github.com/apache/echarts/issues/19429#issuecomment-1865892912

   @qyjandroid It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
   <details><summary><b>TRANSLATED</b></summary><br>
   
   **TITLE**
   
   [Bug] The pie chart listens to the click event and triggers dispatchAction (type:select), which does not take effect if selectedMode is not set to true
   </details>


-- 
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: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


Re: [I] [Bug] 饼图监听click事件,触发dispatchAction (type:select),在不配置selectedMode为true的情况下不生效 [echarts]

Posted by "qyjandroid (via GitHub)" <gi...@apache.org>.
qyjandroid commented on issue #19429:
URL: https://github.com/apache/echarts/issues/19429#issuecomment-1867404001

   > > If selectedMode: 'single' is enabled, the selectedchanged event will be triggered twice.
   > 
   > It is triggered a second time because of your _dispatchAction_.
   > 
   > > I hope that one of the pie charts will always be selected and cannot be cancelled.
   > 
   > easy [Demo Code](https://echarts.apache.org/examples/en/editor.html?code=PYBwLglsB2AEC8sDeAoWtJgDYFMBcya6GOAHmAQOSAcdoPBGgnLGAUroAbKgK9aVEC-ANEWMMCyQQBVMQwAnCAHNpOCVQhgcAWw7oeRXHOgATUUXRTpACwqxKARgAMAUkq9xwKTmjnKAN3mQAxgEMsB0MMUCpLAFZ7R2IAZxxcH2VdAFlgXXxYADMAuOCAejziMABPEAzKGJ8JQUDozXQ4lxiCAG1gsXFYaD8VcqZAbgNAQuigzthcTPNraPF-EVgp4PQSsqoQCBwRzok_XQgAV2bYFsoAZjsHCwAWc4BdaeI_D2AIXQAZPwAjeIB5LwksPxzbJYOLcWAFQBg6oB650AAOmAQMjAH3RgDt_QBccsDcqMlKoAMolXAGUboD7OdISADCgmcVAAxJk6ZtRsSJKSAOovMAmAgAJkWsHqnR8rmUCiOlC5lyiFjO9juvIBXywBMJMRMwAA7gR0Th7uIQMAYkooNAqIK3PIGZ1Ms4VH4wMLNXtoIkjbAABQgPzbFQxACUhEJxAkODAewkcAABkgPmAAD4DQacWAAHTgSF0sYAJEgPV6YgA6DwBPY4TiccMAbl5Gh1xCwEGgOAAEjgZGZuQA2GtGCA-Tn-gOwaNKgewHyUkWUak-XTT6fqAf8gPp4cDq1ubEQABeGXFXctMDALJbpncxKwunnAc4Vb5vMXtc-8Ve9YyHVGKvVmpyODvNdUIBMPwDUON9OnleIV3fVUNSyb8b2vUZ7waeIcESSCHwVdDxA_GCwAkYt4N_Xk4gSJJUnSKgDWgaRcAtZDSJwXRvjpOJzBsGtdFtPxWhvJBYELLBiwIGxLgADjBbpeioOhLAuZYMksPk9z4gShNgM4pi6HpyjoLk5NKHclN4_iiwyS4uU0ySdNoE59JWdSjIDFTTOE6wxIk7TpNoS47L
 MxzCWcwSMg0jypIsOhwl8ghwn80ZArU8zLM88LaHbKLYE7WASNQpICDw4tb1GG5ggQ2Bis4SsUAAaxwHAQAQWBQEgGA80adYYhaawbjzTiwD8PNMnrXQAEk9DIV1XWAP14AAPka1qUMSRifUrFRijJQCJDAPMYFdCpFrAXs_GoxiLkyR1nRgN0QD9DoCjHaAYkEHA8ywYBpFdAAiQAzyMAReVAEJrQAHU3geBPu4G7K3QCBMmugbqhUABBS64BBixssSSg_RquqGpABaGN0Trut6vxRvSUgich2BodhzJ4aR5qUcQShHXRsBMeCNaNs9bbdhiD1DpMBmjVdUClgMyiDrorL5HasmyAIBZRhJ-XSAIbGQBKlaUE4FagA)
   
   Thank you very much, but I feel that unchecking and then checking again is not very user-friendly. I wonder if there is a better way.


-- 
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: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org