Skip to content
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

Implement .elasticRadius for Bubble Overlay charts #661

Closed
hypsypops opened this issue Aug 1, 2014 · 4 comments
Closed

Implement .elasticRadius for Bubble Overlay charts #661

hypsypops opened this issue Aug 1, 2014 · 4 comments
Milestone

Comments

@hypsypops
Copy link

Circles should resize as data is filtered in other charts using .elasticRadius([boolean]) as done in the standard bubble chart.

Seems like it would be simple, but I'm still a little noob-ish and haven't been able to successfully do it myself. :)

Thanks for a great library!

@gordonwoodhull
Copy link
Contributor

gordonwoodhull commented Aug 1, 2014

Are you talking about

  1. adjusting the scale of bubbles so that the smallest and largest are always the same size, no matter the data, or are you saying
  2. the bubbles don't resize when filters are applied?

If you're saying 2., it seems to work on the crime example.

http://dc-js.github.io/dc.js/crime/

If you're saying 1., yes this would be very simple, as it's only a couple of lines of code that set the radius scale domain, here:
https://github.com/dc-js/dc.js/blob/master/src/bubble-chart.js#L63

But I'd prefer to implement the feature at the bubbleMixin level rather than duplicating it, and that will take some minor refactoring.

@hypsypops
Copy link
Author

I'm saying number 1.

Currently, as you filter down through the data the bubbles get smaller and smaller, so you can't see any relationships between what's left. Relative sizing would fix that, and I think it's something other users may want in the future.

@gordonwoodhull gordonwoodhull added this to the v2.1 milestone Sep 4, 2014
@gordonwoodhull
Copy link
Contributor

Would gladly take a PR on this; I believe it is just a matter of moving some code up from bubble chart to bubble mixin, and adding the relevant tests to the bubble overlay.

@gordonwoodhull
Copy link
Contributor

Implemented in dc.js 2.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants