const _arc = edge => { const draw = line().curve(curveBasis); const midX = (edge.source.x + edge.target.x) / 2; const midY = (edge.source.x - edge.target.x) * 2; return draw([[edge.source.x, 0], [midX, midY], [edge.target.x, 0]]); }
function createLine({ data, curve = d3Shape.curveLinear }): string { return d3Shape.line().curve(curve)(data); }
function Line(props) { const { data } = props; const lineGenerator = line() .curve(curveCatmullRom.alpha(0.5)) .x(d => d.x) .y(d => d.y); return ( <path stroke={'red'} fill={'none'} d={lineGenerator(data)} /> ); }
render() { const {className, curve, data, x, y, ...props} = this.props; const line = d3.line() .curve(curve) .x(x) .y(y); return ( <path {...props} className={cx('line', className)} d={line(data)} fill="none" /> ); }
const lineGenerator = d3Shape .line() .curve(curve) .x(d => x(d.index)) .y(d => y(d.value));
this.lineGenerator = d3Shape .line() .curve(curve) .x((d, i) => this.x(this.now - (limit - 1 - i) * duration)) .y(d => this.y(d));
const t = d3_transition().duration(500); const line = d3_line() .curve(d3_curveBasis) .x((d, i) => x(i)) .y(d => y(d));
.curve(d3.curveCardinal) .x(function (d) { return x(d.rank);
function createLine({ data, curve = d3Shape.curveLinear }): string { return d3Shape.line().curve(curve)(data); }
this.lineGenerator = d3Shape .line() .curve(curve) .x((d, i) => this.x(this.now - (limit - 1 - i) * duration)) .y(d => this.y(d));
const lineGenerator = d3Shape .line() .curve(curve) .x(d => x(d.index)) .y(d => y(d.value));