aggarwal-h opened a new pull request, #18778: URL: https://github.com/apache/echarts/pull/18778
## Brief Information This pull request is in the type of: - [ ] bug fixing - [x] new feature - [ ] others ### What does this PR do? This PR adds a `triggerOnNull` option to the axisPointer that enables the triggering of the axisPointer on `null` values when using the `echarts.connect` or `dispatchAction` API. ### Fixed issues None. ## Details ### Before: What was the problem? Prior to this PR, when connecting multiple charts using `echarts.connect` with trigger set to `axis`, the axisPointer would not get triggered if the value in the connected chart was `null`. An example of this can be seen in the image below (https://codesandbox.io/s/echarts-without-toggleonnull-fy4g4d?file=/src/index.js): <img width="646" alt="SCR-20230617-lhpv" src="https://github.com/apache/echarts/assets/77129877/1027f180-285b-4514-8fbe-14b50f3e6d9d"> ### After: How does it behave after the fixing? After this PR, the user can set the option to trigger the axisPointer on `null` using the `triggerOnNull` option, like below: ```js axisPointer: { triggerOnNull: true } ``` _Note_: axisPointer's `snap` property should be disabled in the `xAxis` to see this work. <img width="1372" alt="SCR-20230617-lovx" src="https://github.com/apache/echarts/assets/77129877/9e2168d1-d7e7-4f1f-a896-a06983395e5c"> ## Document Info One of the following should be checked. - [ ] This PR doesn't relate to document changes - [x] The document should be updated later - [ ] The document changes have been made in apache/echarts-doc#xxx ## Misc ### ZRender Changes - [ ] This PR depends on ZRender changes (ecomfe/zrender#xxx). ### Related test cases or examples to use the new APIs N.A. ## Others ### Merging options - [x] Please squash the commits into a single one when merging. ### Other information -- 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]
