Grouped tree map with D3plus 2

39 views
Skip to first unread message

lawl...@gmail.com

unread,
Jan 24, 2019, 9:17:01 AM1/24/19
to d3plus
Hi all,

I'm looking to create a simple grouped/zoomable tree map with D3plus V2. Here is an example from D3plus V1 that does what I want.

http://d3plus.org/examples/advanced/9860411/

The groupBy method in V2 seems to group by color but does not allow for click and zoom like V1. Is this possible with V2? Is there an example or code that I can reference?

Thank you .

Alex Simoes

unread,
Jan 24, 2019, 11:34:26 AM1/24/19
to lawl...@gmail.com, d3plus
Take a look at this example: http://d3plus.org/examples/d3plus-hierarchy/getting-started/ which uses the groupBy method (as you mentioned). All you would have to do is set .depth(0) in the config and you'll be able to click on your grouping to see the deeper nesting.

Hope this helps!

--
You received this message because you are subscribed to the Google Groups "d3plus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to d3plus+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ted Lawless

unread,
Jan 24, 2019, 11:43:24 AM1/24/19
to Alex Simoes, d3plus
Thank you. This does help. Setting .depth(0) is what I was missing.

Ted

Alex Simoes

unread,
Jan 24, 2019, 11:49:24 AM1/24/19
to Ted Lawless, d3plus
Great! Glad it worked out.
Reply all
Reply to author
Forward
0 new messages