function removeZoombox(gd) { d3.select(gd) .selectAll('.zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners') .remove(); }
redrawArc() { const context = d3.select('#d3-arc'); context.remove(); this.drawArc(); }
// execute the rendering function of the nodes; this.renderedLinks.each(function(item) { if (item.visible()) { item.render(d3.select(this), propertyContainer, arrowContainer); } else { d3.select(this).remove(); } });
s.each(function(d) { // put xp and yp into d if pixel scaling is already done var x = d.xp || xa.c2p(d.x), y = d.yp || ya.c2p(d.y), p = d3.select(this); if(isNumeric(x) && isNumeric(y)) { // for multiline text this works better if(this.nodeName === 'text') p.attr('x', x).attr('y', y); else p.attr('transform', 'translate(' + x + ',' + y + ')'); } else p.remove(); });
propertyHoverOut(d) { const shape = d.ref.renderingShape; shape.style("fill", d.ref.renderingConfig().style.propertyNode.bgColor); if (d.ref.__internalType === "multiLink") { d3.selectAll(".MultiLinkHoverButton").remove(); } d.mouseEntered = false; }
updateBarChart(newData) { const svgCanvas = select(this.refs.canvas); const bars = svgCanvas.selectAll('.bar').data(newData); bars .transition() .attr('height', (datapoint) => datapoint * scale) .attr('y', (datapoint) => canvasHeight - datapoint * scale); bars.exit().remove(); }
function stylePies(d) { var trace = d[0].trace, pts = d3.select(this).select('g.legendpoints') .selectAll('path.legendpie') .data(Plots.traceIs(trace, 'pie') && trace.visible ? [d] : []); pts.enter().append('path').classed('legendpie', true) .attr('d', 'M6,6H-6V-6H6Z') .attr('transform', 'translate(20,0)'); pts.exit().remove(); if(pts.size()) pts.call(stylePie, d[0], trace); }
const Graph = (props) => { useEffect(() => { d3.select('.topo > *').remove(); draw(props) }, [props.shapes.length]); return <div className="topo" /> }
// When we're updating the arc, we are selecting the svg by the id property // Removing that svg, and then drawing with our new data again. redrawArc() { const context = d3.select(`#${this.props.id}`); context.remove(); this.drawArc(); }
componentWillUnmount() { d3.select('svg').remove() document.getElementById('root').style.overflow = '' }
s.style('stroke-width', 0) .each(function(d) { var shape = d3.select(this); try { shape.call(Color.fill, d[0].trace.fillcolor); } catch(e) { Lib.error(e, s); shape.remove(); } });
function killNote(transition) { transition .duration(700) .style('opacity', 0) .each('end', function(thisText) { var thisIndex = NOTEDATA.indexOf(thisText); if(thisIndex !== -1) NOTEDATA.splice(thisIndex, 1); d3.select(this).remove(); }); }
// execute the rendering function of the nodes; this.renderedNodes.each(function(item) { if (item.visible()) { item.render(d3.select(this)); } else { d3.select(this).remove(); } });
function removeZoombox(gd) { d3.select(gd) .selectAll('.zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners') .remove(); }