-
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
Fixes bubble chart filtering issues #1025
Conversation
…s to keep smaller bubbles on top.
One thing I noticed... |
I definitely agree with the small bubbles change, and But wouldn't |
Ahh, you know what, it probably would be. |
Yep, that's one of those OO inheritance pitfalls. I had to implement |
Updated with Yeah, not sure what to do about that |
I think we could fix it with a breaking change of xAccessor, as you suggest. Technically I guess a bubbleChart is not a coordinateGridMixin but something else. Or maybe all coordinateGridMixins should have an xAccessor, just usually defaulting to the the keyAccessor. |
I am making Thanks @mtraynham! |
Bubble charts have a label, that is not always visible given a particular radius. It's hidden by setting
opacity=0
. Unfortunately this still allows you click the text, and filter the bubble. This is problematic as a user can select a bubble that may be close to another bubble and filter the wrong one, because the label was long or the bubbles overlap... Adding astyle='display: none/block'
update to the selection does work, but to prevent any interaction with theopacity
working properly, it needs to happen after the transition. Thus,dc.afterTransition
was added.The other issue with bubble charts, small bubbles may be hidden behind large bubbles. Sorting the data descending by radius before hand, ensures that larger bubbles are first in the data and thus higher in the DOM, behind smaller bubbles. A call to d3.selection.order is required for them to properly be sorted.