vis.selectAll('g.node') .style('opacity', 1) .data(nodes, function (d) { if (d.weight > 0) { // console.log(d) return d.id } })
function keepNodesOnTop () { $('.nodeStrokeClass').each(function (index) { var gnode = this.parentNode gnode.parentNode.appendChild(gnode) }) d3.selectAll('circle').attr('r', function (d) { return d.weight }) }
handleSelectAllClick() { this.hasSelectionChanged = true; this.setState((state, props) => { const selectedItems = this.selectAll(state.selectedItems, props.fileTree, state.allSelected); const selectedFiles = this.getSelectedFiles(selectedItems); return { selectedItems, allSelected: !state.allSelected, selectedFiles, }; }); }
svg .selectAll(".line") .data(data) .enter() .append("path") .attr("fill", "none") .attr("stroke", d => color(d.key)) .attr("stroke-width", 1.5) .attr("d", d => { return d3 .line() .x(d => x(d3.isoParse(d.x))) .y(d => y(+d.value))(d.values); });
svg .selectAll("mylayers") .data(data) .enter() .append("path") .style("fill", d => color(d.key)) .attr( "d", d3 .area() .x(d => x(d3.isoParse(d.data.x))) .y0(d => y(d[0])) .y1(d => y(d[1])) );
var dblclick = function () { if (toggle === 0) { var d = d3.select(this).node().__data__ node.style('opacity', function (o) { return neighboring(d, o) | neighboring(o, d) ? 1 : 0 }) d3.selectAll('.link') .style('opacity', function (o) { return o.source === d || o.target === d ? 1 : 0 }) toggle = 1 } else { node.style('opacity', 1) link.style('opacity', 1) toggle = 0 } }
d3.selectAll('circle') .attr('r', function (d) { return (d.weight || 0) / 5 + 0.2 })
selectionTree.directories[directory] = this.selectAll( selectionTree.directories[directory], fileTree.directories[directory],
svg .append("g") .selectAll("g") // Enter in the stack data = loop key per key = group per group .data(data) .enter() .append("g") .attr("fill", d => color(d.key)) .selectAll("rect") // enter a second time = loop subgroup per subgroup to add all rectangles .data(d => d) .enter() .append("rect") .attr("x", d => x(d.data.x)) .attr("y", d => y(d[1])) .attr("height", d => y(d[0]) - y(d[1])) .attr("width", x.bandwidth());
function keepNodesOnTop () { $('.nodeStrokeClass').each(function (index) { var gnode = this.parentNode gnode.parentNode.appendChild(gnode) }) d3.selectAll('circle').attr('r', function (d) { return d.weight }) }
vis.selectAll('g.node') .style('opacity', 1) .data(nodes, function (d) { if (d.weight > 0) { // console.log(d) return d.id } })
d3.selectAll('circle') .attr('r', function (d) { return (d.weight || 0) / 5 + 0.2 })
var dblclick = function () { if (toggle === 0) { var d = d3.select(this).node().__data__ node.style('opacity', function (o) { return neighboring(d, o) | neighboring(o, d) ? 1 : 0 }) d3.selectAll('.link') .style('opacity', function (o) { return o.source === d || o.target === d ? 1 : 0 }) toggle = 1 } else { node.style('opacity', 1) link.style('opacity', 1) toggle = 0 } }