Questions tagged [d3tree]
19 questions
3
votes
1 answer
Dynamically update html page text base don the d3 tree node selected
I have a working D3 collapsible tree based on this example. I have added a paragraph element at the top of my html page (in a separate div) that I want to update the text of based on the tree node a user clicks. Using the example linked above, if a…

Broly
- 799
- 3
- 16
2
votes
0 answers
Data Lineage graph using D3.js
I want to create a similar data lineage graph using D3.js. I tried to use d3.hierarchy and tree. But those don't support multiple parents. Also, I want to open a popup when the user clicks on the node. I will get the data from the server as a…

Sarath S Nair
- 603
- 2
- 14
- 29
2
votes
0 answers
d3 v5 tree layout data update recreates tree instead of updating nodes
I am working on an application where I want to show my hierarchical data in tree structure. This data keeps updating and I want to update tree as per newly received data. I have implemented it successfully using D3 V3 by merging the new data with…

Mahesh
- 982
- 8
- 20
2
votes
1 answer
Display uneven Trees with d3tree
I have the following data that I read from csv file:
Level1,Level2,Level3,value
1,1.1,1.1.1,1.0
1,1.2,,1.1
1,1.3,1.3.1,1.0
2,2.1,,1.1
2,2.2,2.2.1,1.5
3,3.1,3.1.1,1.2
3,3.1,3.1.2,1.4
As you can see my tree depth varies for different branches. I use…

Murat Erenturk
- 79
- 8
1
vote
0 answers
Text wrapping in d3 tree
I am struggling to wrap long text in a d3 collapsible tree. I used the code in this answer and it seems to be working fine as long as the text gets split into 2 lines but something weird is happening when the text gets split into more than 2…

Broly
- 799
- 3
- 16
1
vote
0 answers
Interactive graph changes from many colors to black only when clicked on
I create an interactive treemap based on the following code:
library(treemap)
library(devtools)
install_github("timelyportfolio/d3treeR")
library(d3treeR)
tm2 <- treemap(
dtf = mData_col,
index = c("GICS_SECTOR_NAME",…

Nuller
- 89
- 6
1
vote
2 answers
Angular D3 tree does not collapse back into its parent
We were able to use this example for Angular here(https://bl.ocks.org/d3noob/1a96af738c89b88723eb63456beb6510) and achieve the collapsible tree diagram. But it's not collapse back into its parent or our click action is not working properly.
Here is…

Anish Manchappillil
- 697
- 2
- 10
- 19
1
vote
1 answer
Managing large hierarchical data (collapsible tree) with auto-zooming to the expanded node
I am very new to D3 and am trying to visualize a large hierarchical data (something like this) following this. Since every box in my data contains a line of text, no matter how I set the height and width of the container/the tree, the data is not…

MSH
- 73
- 1
- 3
- 11
1
vote
0 answers
How to get get selected node id - Js Tree ContextMenu
This is my code:
When clicked on Open ( need to display on Which Node Open is Selected )
enter image description here
d3.contextMenu = function (menu, openCallback) {
// create the div element that will hold the context…

Tarun teja
- 59
- 3
- 7
1
vote
0 answers
R Shiny: widen d3Tree for long labels
Using d3Tree R package to visualize a tree in R Shiny with long labels - is it possible to increase the space between nodes of different levels? Setting the width property doesn't seem to do anything - below is a reproducible example with width set…

Vlad
- 3,058
- 4
- 25
- 53
0
votes
1 answer
d3 custom curve direction between 2 links - "parent to child" when parent is behind the child
I have some nodes and links and am drawing a graph, I successfully draw the following graph,
I want to change the connections from G to D and from E to C like the second screenshot with the red lines.
some code
// the diagonal link…

hahaha
- 1,001
- 1
- 16
- 32
0
votes
0 answers
Links in d3.js tree are not being removed within Angular, but in vanilla JavaScript
I'm creating horizontal tree from nested array. After tree is created, the links from one node to another are regularly being updated, but the removal functionality is not working.
import { Component, OnInit } from '@angular/core';
import * as d3…

gyan mishra
- 94
- 5
0
votes
0 answers
Using interactive treemap (d3tree) in slide presentation
I have created a treemap using the treemap package and successfully made it interactive using the d3tree package.
How can I add the interactive treemap into a Google Slide, so that it will be interactive from within the presentation?
I currently…
0
votes
1 answer
How can I expand child nodes when a node is clicked in d3?
I am new to d3 and I'm a trying to make a visualization with interactive nodes where each node can be clicked. When the node is clicked it should expand to show child nodes. I was able to get all the nodes to display interactively and I added an on…

Eric Cortez
- 31
- 4
0
votes
0 answers
Clarification on Typescript interface when using generics
I have got an object called datum which is of type HierarchyPointNode
datum: HierarchyPointNode
HierarchyPointNode and TreeNodeDatum are imported as follows:
import { TreeNodeDatum } from…

jeril
- 1,109
- 2
- 17
- 35