Thank you for your indulgence .
function initialize()
{
viz = vizuly.viz.weighted_tree(document.getElementById("viz_container"));
//Here we create three vizuly themes for each radial progress component.
//A theme manages the look and feel of the component output. You can only have
//one component active per theme, so we bind each theme to the corresponding component.
theme = vizuly.theme.weighted_tree(viz).skin(vizuly.skin.WEIGHTED_TREE_AXIIS);
//Here we set some bases line properties for all three components.
viz.data(data) // Expects hierarchical array of objects.
.width(600) // Width of component
.height(600) // Height of component
.children(function (d) { return d.values }) // Denotes the property that holds child object array
.key(function (d) { return
d.id }) // Unique key
.value(function (d) {
return Number(d["agg_" + valueField]) }) // The property of the datum that will be used for the branch and node size
.fixedSpan(-1) // fixedSpan > 0 will use this pixel value for horizontal spread versus auto size based on viz width
.branchPadding(.07)
.label(function (d) { // returns label for each node.
return trimLabel(d.key || (d['Level' + d.depth]))})
.on("measure",onMeasure) // Make any measurement changes
.on("mouseover",onMouseOver) // mouseover callback - all viz components issue these events
.on("mouseout",onMouseOut) // mouseout callback - all viz components issue these events
.on("click",onClick); // mouseout callback - all viz components issue these events
//We use this function to size the components based on the selected value from the RadiaLProgressTest.html page.
changeSize(d3.select("#currentDisplay").attr("item_value"));
// Open up some of the tree branches.
viz.toggleNode(data.values[2]);
viz.toggleNode(data.values[2].values[0]);
viz.toggleNode(data.values[5]);
// viz.toggleNode(data.values[4]);
viz.toggleNode(data.values[5].values[2]);
// viz.toggleNode(data.values[6].values[0]);
viz.toggleNode(data.values[9]);
viz.toggleNode(data.values[9].values[0]);
// viz.toggleNode(data.values[11]);
// viz.toggleNode(data.values[11].values[0]);
//draw2();
//draw3();
drawLegend();
// toggleLegend();
slideupdate();
}
I tried calling fetching the csv file onece however i am not able to figure how to bind specific column of year attribute in csv data to my viz tree so that it can return the viz when slider value modifies.