-
PaulApril 25, 2016 at 7:03 pm #6131
Can you provide any guidance on isolating the visualization div? We’ve had a lot of fun customizing the visualization, but something seemingly easy has stopped progress. Seems like anything I comment out in the weightedtreeTest.html, breaks the visualization. Any direction on isolating the vis itself would be much appreciated!
vizulyApril 25, 2016 at 7:46 pm #6132Hi Paul,
Could you provide a little more detail? When you say “breaks” the visualization, what is happening? What lines specifically are you commenting out?
Typically you will have one DOM container (usually a DIV tag) that you pass into the weighted_tree() at initialization.
– Tom
PaulApril 26, 2016 at 3:29 pm #6133Sorry I was a bit vague. I wanted to only load the visualization, but my guess is the script section under the code I’ve commented out below is expecting inputs for the CSS menu.
This is what I’ve commented out.
<!-- <div id='cssmenu'> <ul class="main-menu"> <li class='active'> <a><span>Display</span><br><span class="setting"></span></a> <ul class="options" callback="changeSize"> <li id="currentDisplay" class="selected"><a></a></li> <li item_value="1000,1000"><a>1000px - 1000px</a></li> <li item_value="800,600"><a>800px - 600px</a></li> <li item_value="375,667"><a>375px - 667px</a></li> <li item_value="320,568"><a>320px - 568px</a></li> </ul> </li> <li class='active'><a><span>Theme </span><br><span class="setting"></span></a> <ul class="options" callback="changeSkin"> <li item_value="None"><a>None</a></li> <li item_value="Axiis" class="selected"><a>Axiis</a></li> </ul> </li> <li class='active'><a><span class="label">Data </span><br><span class="setting"></span></a> <ul class="options" callback="changeData"> <li item_value="0" class="selected"><a>Federal</a></li> <li item_value="1"><a>State</a></li> <li item_value="2"><a>Local</a></li> </ul> </li> </ul> </ul> </div> --> <!-- Our main content container--> <div class="container" style="width:100%"> <div id="viz_container" class="z-depth-3"> </div> </div>
Thanks,
PZvizulyApril 26, 2016 at 3:42 pm #6134Hi Paul,
Thanks for the clarification. This is actually a great question, as I am sure you are not the only one who wants to use the tree just by itself.
You can comment out the html tags like you did and just change ONE line of code in the script below to make it run.
Around line 151 change this:
changeSize(d3.select("#currentDisplay").attr("item_value"));
to this:
changeSize("1000,1000");
(this is sizing it 1000px by 1000px)That should have you up and running.
– Tom
-
|
You must be logged in to reply to this topic.