-
PatrickMarch 20, 2018 at 2:59 pm #8290
With several good pointers from Tom, I have my weighted tree working very well. I have one small issue:
A large number of nodes representing only 1 unit are very small, and difficult for the user to click on or mouse-over. Some nodes have one branch of 1 unit and one of 2 units. There’s a huge difference in the node size and the connecting strokes.
Where is the thickness of the stokes established, and how can I make the smallest one 2 or 3 times the size they appear now?
TIA
vizulyMarch 20, 2018 at 3:03 pm #8291Hi Patrick,
This is a pretty easy fix, but it does require you go into the src/viz/weightedtree.js file.
Look for this line here in the ‘measure()’ function.
nodeScale.range([1.5,scale/2]);
The first value in the nodeScale.range (1.5) is the diameter in pixels of the smallest node, and the the thickness of the smallest line stroke. You can simply change that smaller value to something bigger, like say ‘4’ and that will mean the smallest circle will have a diameter of 4px and the smallest line a thickness of 4px.
Keep up the good work, sounds like you are making lots of progress in your modifications.
Cheers,
Tom
PatrickMarch 20, 2018 at 4:52 pm #8293Thanks again Tom. I’m really getting to like weighted trees. I look forward to learning much more js.
-
|
You must be logged in to reply to this topic.