D3blackbox(function () { const axis = d3.axisLeft() .tickFormat(d => `${d3.format(".2s")(d)}`) .scale(this.props.scale) .ticks(this.props.data.length); d3.select(this.refs.anchor) .call(axis); })
svg.selectAll(".label") .data(graph.nodes) .enter().append("text") .attr("class", "label") .style('fill', 'black') .text(function (d) { return d.name; }) .call(cola.drag)
renderAxis() { var node = ReactDOM.findDOMNode(this); d3.select(node).call(this.props.axis); }
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); }
updateAxis() { const axis = select(this.axisRef.current) .call(this.state.axis); if (this.props.orientation === AxisOrientation.BOTTOM && this.props.rotateText) { axis.selectAll('text') .style('text-anchor', 'end') .attr('dx', '-1em') .attr('dy', '-.2em') .attr('transform', 'rotate(-65)'); } }
//Append the labels at each axis axis.append("text") .attr("class", "legend") .style("font-size", "11px") .attr("text-anchor", "middle") .attr("dy", "0.35em") .attr("x", function(d, i){ return rScale(maxValue * cfg.labelFactor) * Math.cos(angleSlice*i - Math.PI/2); }) .attr("y", function(d, i){ return rScale(maxValue * cfg.labelFactor) * Math.sin(angleSlice*i - Math.PI/2); }) .text(function(d){return d}) .call(wrap, cfg.wrapWidth);
gd._fullLayout._pielayer.selectAll('.trace').each(function(cd) { var cd0 = cd[0], trace = cd0.trace, traceSelection = d3.select(this); traceSelection.style({opacity: trace.opacity}); traceSelection.selectAll('.top path.surface').each(function(pt) { d3.select(this).call(styleOne, pt, trace); }); });
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(); } });
renderGrid() { var node = ReactDOM.findDOMNode(this); d3.select(node).call(this.props.grid); }
D3blackbox(function () { const axis = d3.axisLeft() .tickFormat(d => `${d3.format(".2s")(d)}`) .scale(this.props.scale) .ticks(this.props.data.length); d3.select(this.refs.anchor) .call(axis); })
svg.selectAll(".label") .data(graph.nodes) .enter().append("text") .attr("class", "label") .style('fill', 'black') .text(function (d) { return d.name; }) .call(cola.drag)