-
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
dc.js should use a namespace when subscribing to events #842
Comments
You can work around this by putting your event in a namespace, e.g. Probably dc.js should namespace its own use of events, but it has only recently been ported to |
I was able to work around it by copying the interal focusChart method into my event, like so
But I believe it's a bug when a user can unknowingly override internal library behavior. |
Does the namespacing not work? Seems a lot more elegant to me. |
Oh it does, I was just posting how I originally fixed it. |
Cool. Yes, it probably makes sense for dc.js to always subscribe and unsubscribe using a namespace like |
I guess the only breakage here would be if people are intentionally overriding or disabling internal usage of events. |
Yeah, but if people are overriding internal events for functionality, they should expect them to change or break on version changes. Especially since version 2 is still in beta. |
Beta actually means interface freeze for us, but it would be easy to put this in 2.1. |
When creating two charts where one is focused on the other with either rangeChart or focusChart, adding an on filtered event to the rangeChart overrides the behavior. For example, these are charts from the stock demo:
however, if you add
to the end of the volumeChart, moveChart will only show the selected values, but it no longer updates its x domain.
The text was updated successfully, but these errors were encountered: