-
ankit255February 4, 2018 at 6:19 am #8141
Code below fails when I add the filter line – any ideas? ‘Dt’ is a variable.
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) .filter(function (d) { return d.Dept== Dt;}) .label(function (d) { // returns label for each node. return trimLabel(d.key)}) .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);
You must be logged in to reply to this topic.
© 2024 — vizuly.io