-
Notifications
You must be signed in to change notification settings - Fork 19.8k
feat(axisPointer): trigger axisPointer when data is null (with echarts.connect) #18778
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(axisPointer): trigger axisPointer when data is null (with echarts.connect) #18778
Conversation
|
Thanks for your contribution! Document changes are required in this PR. Please also make a PR to apache/echarts-doc for document changes and update the issue id in the PR description. When the doc PR is merged, the maintainers will remove the |
Ovilia
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a useful feature! Could we have more test cases, including snap cases? Please checkout https://github.com/apache/echarts/wiki/How-to-make-a-pull-request#test
|
Thanks for your feedback @Ovilia! I have added some test cases. Please let me know if anything else is required 🙂. |
|
This PR has been automatically marked as stale because it has not had 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 PR. We are sorry for this but 2 years is a long time and the code base has been changed a lot. Thanks for your contribution anyway. |
|
This PR has been automatically closed because it has not had recent activity. Sorry for that and we are looking forward to your next contribution. |

Brief Information
This pull request is in the type of:
What does this PR do?
This PR adds a
triggerOnNulloption to the axisPointer that enables the triggering of the axisPointer onnullvalues when using theecharts.connectordispatchActionAPI.Fixed issues
None.
Details
Before: What was the problem?
Prior to this PR, when connecting multiple charts using
echarts.connectwith trigger set toaxis, the axisPointer would not get triggered if the value in the connected chart wasnull.An example of this can be seen in the image below (https://codesandbox.io/s/echarts-without-toggleonnull-fy4g4d?file=/src/index.js):

After: How does it behave after the fixing?
After this PR, the user can set the option to trigger the axisPointer on
nullvalues using thetriggerOnNulloption, like below:This enables them to trigger the axisPointer on the connected charts even if those do not have a value, or their value is
nullorundefined.Note: axisPointer's
snapproperty takes precedence over this feature and should be set tofalsein thexAxisfor this to work.Document Info
One of the following should be checked.
triggerOnNulloption echarts-doc#349Misc
ZRender Changes
Related test cases or examples to use the new APIs
N.A.
Others
Merging options
Other information
The documentation has been updated in this PR: apache/echarts-doc#349