-
Notifications
You must be signed in to change notification settings - Fork 19.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix(custom): fix user-defined info
property was not available in the event handler
#18400
Conversation
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.
Thanks for your contribution! Please add a test case.
@Ovilia it seems that the test case is already there: https://github.com/sobolewsk/echarts/blob/branches/fix-issue-15789/test/custom-feature.html#L124 |
NVM, I figured it out. Unit test added. |
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.
Thanks for your contribution. Only a small problem needs to be fixed.
test/ut/spec/series/custom.test.ts
Outdated
@@ -69,4 +69,46 @@ describe('custom_series', function () { | |||
expect(resultPaletteColors).toEqual(colors); | |||
}); | |||
|
|||
it('should pass user defined data to event handlers', async () => { | |||
const data = [ | |||
[10, 16,], |
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.
Extra comma here.
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.
Thanks for reviewing. Fixed!
Thank you @Ovilia for reviewing and merging! |
info
property was not available in the event handler
Brief Information
This pull request is in the type of:
What does this PR do?
Fixes #15789
Fixed issues
Details
Before: What was the problem?
The
info
field (user defined data) was not available in the event handler.After: How does it behave after the fixing?
The
info
field is now properly passed to the event handlers. To verify please use thetest/custom-feature.html
test.Document Info
One of the following should be checked.
Misc
ZRender Changes
Related test cases or examples to use the new APIs
N.A.
Others
Merging options
Other information