Comments (13)
This case with 6 levels is more or less what I'm trying to do
1 School District -> 20 Schools -> 3 Grades -> many Teachers -> 4 Classroom -> many Students
This is what it looks like when you have so many levels
from d3treer.
That definitely helps. The problem is the labelling. In this case, I think the Mike Bostock version works much better. I'm trying to think through I can provide access to both while minimizing function and parameter bloat. I'll try to work through it and will enjoy your input.
from d3treer.
@ignacio82 I spent a couple of hours implementing the example from Mike Bostock and the fork by Zan Armstrong. I think it will work much better with your example. Actually, thinking I might just go entirely with this version instead. Would you try it?
devtools::install_github("timelyportfolio/d3treeR@experiment/bostock")
Most everything on the R side should stay about the same.
Thanks.
from d3treer.
@timelyportfolio great step in the right direction. The one big thing missing are the colors. This is what I get:
and this is what I get with googleVis:
Thanks!
from d3treer.
Are you using the treemap
package? d3treeR
is designed to leverage the multitude of color options provided within that package. Do the colors on hover/mouseover appear more correct?
If you are using the treemap
package, can you get a treemap
that looks like the one with googleVis
? Within treemap
, there is a nifty function called itreemap
that might be helpful. However, the aggregates seem to not fit the scale as I would expect. I'll pose the question over on the treemap
repo.
from d3treer.
I was able to get the colors like I want.Two more questions. Is it possible to add a legend for the color like in googleVis? is it possible to personalize what the tooltip is going to show?
Thanks
from d3treer.
Legends are very important, and I'm wondering how best to accomplish them, since treemap
returns a range
but not the full scale
, so I'll need to recreate in d3.js
. Guessing I'll try out the new d3-legend
component from @susielu.
I do plan to have customizable tooltips also using one of the libraries such as d3-tip
or kodama
.
from d3treer.
also, see mtennekes/treemap#18
from d3treer.
Thanks for the great work!
from d3treer.
Another option would be to rip the legend off from treemap
with gridSVG
. Almost thinking this will be the quickest way to get something up and going, but that will mean I will not have an immediate solution for JSON
data.
from d3treer.
@ignacio82 see mtennekes/treemap#18 for a new fun.aggregate
argument in treemap
that should achieve the coloring you expect. Please let me know how it works.
thanks again for working through this with me.
from d3treer.
@timelyportfolio thanks! fun.aggregate
solves the problem!
from d3treer.
I'll close this for now, since it is partially resolved. I think the other standalone issues will pick up the remaining pieces. Thanks so much @ignacio82.
from d3treer.
Related Issues (20)
- Can Treemap options be maintained after rendering d3tree3 HOT 6
- height and width setting in d3tree or d3tree2 not working in shiny HOT 2
- cant install the library HOT 3
- package d3treeR not available HOT 10
- Treemap as input for reactive variable/function? HOT 4
- Interactive treemaps in loop (d3treeR) HOT 3
- Treemap isnt displayed HOT 1
- update to d3v5 HOT 1
- d3tree doesn't render HOT 5
- CRAN Any plan? HOT 17
- New Line in Group Name HOT 1
- Disable top right number and grey bar HOT 4
- tooltip help HOT 1
- d3TreeR not working in R version 3.5.3 HOT 2
- d3tree2 is not collapsing back when rootname is clicked HOT 3
- conflict between d3treeR and forceNetwork
- Can clickActions be set to follow a URL?
- xml error?
- R v4.0 HOT 1
- Cannot download this awesome package for R version 4.1 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from d3treer.