-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
PackedCircle #11443
Comments
With some carefull own logic with creating the bubbles you could create this already using a bubble chart. But if you want it as an chart type that does that logic for you I think it would suit better as an external chart type and not something for the core |
agreed, it's probably not core. I've got close using the sample I linked, but getting the returned X,Y, and Radius scaled to fit into the canvas is making my head hurt! Sample code here in case it's of use to anyone (and hopefully someone points to where I'm going wrong) - at the moment there's still sometimes gaps or overlay of the circles that I don't see in the jsfiddle, and bubbles get clipped at the edge of the canvas.
|
another, clunky, solution using the D3 v3 layout.pack algorithm https://stackoverflow.com/a/76911169/1569675 |
Would love this as well |
Feature Proposal
I have a need for a PackedCircle chart - similar to a TreeMap but arbitrary sized circles clustered around a center (my use case only requires a single level rather than nested)
have found them supported in a number of other libraries, and while they are not as space efficient as treemaps, it's something I keep getting requests to support in the internal dashboard I maintain
Possible Implementation
had started a discussion on kurkle/chartjs-chart-treemap#15 and as well as the packing solution they use found this https://stackoverflow.com/a/21612877/1569675 (not DS3 specific, just a canvas implementation). As an interim, I might experiment with using this logic and then using it to populate a bubble chart, though it doesn't assign a 'center of gravity' to the middle of the box which would be a more desirable behavior
The text was updated successfully, but these errors were encountered: