function removeZoombox(gd) { d3.select(gd) .selectAll('.zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners') .remove(); }
g.selectAll("ellipse") .data([-150, 150]) .enter().append("ellipse") .attr("cx", function(d) { return d; }) .attr("cy", 0) .attr("rx", 10) .attr("ry", 7) .attr("fill", "#bbb");
d3.select('body') .append('div') .classed('buttons', true) .selectAll('.button') .data(this.scenes) .enter() .append('button') .classed('scene', true) .text(d => d.label) .on('click', d => this.loadScene(d)) .on('touchstart', d => this.loadScene(d))
//Draw the background circles axisGrid.selectAll(".levels") .data(d3.range(1,(cfg.levels+1)).reverse()) .enter() .append("circle") .attr("class", "gridCircle") .attr("r", function(d, i){return radius/cfg.levels*d;}) .style("fill", "#CDCDCD") .style("stroke", "#CDCDCD") .style("fill-opacity", cfg.opacityCircles) .style("filter" , "url(#glow)");
_xAxis(el) { const { _xScale } = this; const xAxis = d3 .axisBottom() .scale(_xScale()) .ticks(5); d3.select(el).call(xAxis); d3.select('g.axis') .selectAll('text') .attr('dx', 50) .style('display', d => d === 5 && 'none'); }
svg.selectAll(".node") .data(nodes) .enter().append("g") .attr("class", "nodeRT") .attr("transform", function(d) { return "rotate(" + (d.x - 90) + ")translate(" + d.y + ")"; })
svg.selectAll(".layer") .data(layers) .enter().append("path") .attr("class", "layer") .attr("d", function(d) { return area(d.values); }) .style("fill", function(d, i) { return z(i); });
svg.append("g") .attr("class", "y axis") .attr("transform", `translate(${width},0)`) .call(yAxis) .selectAll("g") .filter((value)=> !value) .classed("zero", true)
componentDidMount(){ const svg = d3.select(this.refs.svg); let rect = svg.selectAll('rect') .data(this.state.data) .enter().append('rect') .attr('fill', 'green') .attr('height', 100) .attr('width', 100) // svg.selectAll('rect') // .attr('fill', 'blue') }
svg.selectAll(".group") .data(graph.groups) .enter().append("rect") .attr("rx", 8).attr("ry", 8) .attr("class", "group") .style("fill", function (d, i) { return color(i); })
function removeZoombox(gd) { d3.select(gd) .selectAll('.zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners') .remove(); }