-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Propagate filters on composite chart to children fixes #677 and #706 #1435
Conversation
Seems too simple somehow! 😄 If this is correct, then
I'll try to devise more tests / examples. |
Thanks @gordonwoodhull, I had not realized that Also, had not realized behavior of d3.dispatch with same event names - changed in composite chart, also changed another similar usage in coordinateGridMixin. I think additional test can be added to one of the existing test groups for setting/removing filter(s) and checking in children. Would you like to take a shot? Adding an example would definitely be cool. |
I'll see what I can do when I merge this later this week. Need to rest today. Until then, any further tests or examples are welcome! |
Added few additional test cases. I think these should cover the updated functionality. |
Ah, thanks for pointing that out! I'll merge that along with this. |
Thanks @kum-deepak! Merged for 3.0.4 Amazing how simple this turned out to be, after all the other fixes anyway. I went with namespacing the event with The unique ids we use for charts in a page, but there is no risk of the charts interfering with each other here. I didn't manage to write any more composite chart examples today. Hope to return to that another day! |
Final change is quite small.
All filter related calls eventually call
.filter
, so covering just one case proved to be enough. Got a simpler code by listening to 'filtered' event and replacing filters on children. Overriding was getting messy because coordinate mixin already overridesfilter
.