# How to use the d3-shape.lineRadial function in d3-shape

## To help you get started, we’ve selected a few d3-shape examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

DefinitelyTyped / DefinitelyTyped / types / d3-shape / d3-shape-tests.ts View on Github
// use Line generator ===============================================================

defaultLine([[10, 10], [20, 10], [20, 20]]);

const lineData: LineDatum[] = [
{ x: 10, y: 10, missing: false },
{ x: 20, y: 10, missing: false },
{ x: 20, y: 20, missing: false }
];

const linePathStringMaybe: string | null = line(lineData);

// lineRadial(...) create Line generator =====================================================

// DEPRECATED Naming conventions test (cross-testing with new naming conventions)

// context(...) ----------------------------------------------------------------------

if (context !== null) {
}
function getSpiralPath(startAngle, endAngle, startR, endR) {
var numPoints = (endAngle - startAngle) / (Math.PI * 2) * 40; // 40 points per 360deg

.angle(scaleLinear().range([startAngle, endAngle]))
.curve(d3CurveNatural);

return 'M' + polar2cart(startAngle, startR).join(',')
+ lineGen(scaleLinear().ticks(numPoints));
}
swimlane / ngx-charts / projects / swimlane / ngx-charts / src / lib / polar-chart / polar-series.component.ts View on Github
getLineGenerator(): any {
.angle(d =&gt; this.getAngle(d))
.curve(this.curve);
}
swimlane / ngx-charts / release / polar-chart / polar-series.component.js View on Github
PolarSeriesComponent.prototype.getLineGenerator = function () {
var _this = this;
.angle(function (d) { return _this.getAngle(d); })
.curve(this.curve);
};
PolarSeriesComponent.prototype.sortData = function (data) {
rumble-charts / rumble-charts / src / RadialLines.js View on Github
seriesVisible = value(seriesVisible, {seriesIndex: index, series, props});
if (!seriesVisible) {
return;
}

seriesAttributes = value(seriesAttributes, {seriesIndex: index, series, props});
seriesStyle = value(seriesStyle, {seriesIndex: index, series, props});

let linePath;
lineVisible = value(lineVisible, {seriesIndex: index, series, props});
if (lineVisible) {
const line = asAreas ?

const lineColor = series.color || color(index);

const curve = _.isString(props.interpolation) ?
curves[props.interpolation] :
props.interpolation;

line.angle(point => circularScale(point.x))
.defined(point => _.isNumber(point.y))
.curve(curve);

lineAttributes = value(lineAttributes, {seriesIndex: index, series, props});
lineStyle = value([series.style, lineStyle], {seriesIndex: index, series, props});
lineWidth = value(lineWidth, {seriesIndex: index, series, props});
FormidableLabs / victory / packages / victory-area / src / area.js View on Github
const getLineFunction = (props) => {
const { polar, scale, horizontal } = props;
const interpolationFunction = typeof props.interpolation === "function" && props.interpolation;
const interpolationName =
typeof props.interpolation === "string" && toNewName(props.interpolation);
return polar
? d3Shape
.defined(defined)
.curve(interpolationFunction || d3Shape[\${interpolationName}Closed])
.angle(getAngleAccessor(scale))
: d3Shape
.line()
.defined(defined)
.curve(interpolationFunction || d3Shape[interpolationName])
.x(horizontal ? getYAccessor(scale) : getXAccessor(scale))
.y(horizontal ? getXAccessor(scale) : getYAccessor(scale));
};
plouc / nivo / packages / radar / src / RadarGridLevels.js View on Github
)}

)
}

.angle(i =&gt; i * angleStep)
.curve(curveLinearClosed)

const points = range(dataLength)

if (animate !== true) {
return (
plouc / nivo / packages / nivo-radar / src / RadarShapes.js View on Github
({ radiusScale, angleStep, curveInterpolator }) => ({
.angle((d, i) => i * angleStep)
.curve(curveInterpolator),
})
),

## d3-shape

Graphical primitives for visualization, such as lines and areas.

ISC