Provide documentation for curve implementation
See original GitHub issueIs your feature request related to a problem? Please describe. I’ve been unable to successfully implement curveBasis (or any other d3 curve function) with the curve input for ngx-charts-line-chart. There is a real lack of documentation for proper use. When trying to import d3 or d3-shape, I get typescript errors like this:
/node_modules/@types/d3-shape/index"' has no exported member 'curveBasis'.
Describe the solution you’d like Documentation for implementing a curve function (i.e: how to import d3 or d3-shape to get various curve options.)… or at least some support on this issue. There is already a ticket open for this but has not had a resolution., the plunkr is also out of date.
Update/Add Curve Documentation #720
Additional context Software Package Versions:
@angular/animations: 8.2.11
@angular/cdk: 8.2.3
@angular/common: 8.2.11
@angular/compiler: 8.2.11
@angular/core: 8.2.11
@angular/flex-layout: 8.0.0-beta.26
@angular/forms: 8.2.11
@angular/material: 8.2.3"
@angular/platform-browser: 8.2.11
@angular/platform-browser-dynamic: 8.2.11
@angular/router: 8.2.11
@swimlane/ngx-charts: 13.0.2
@types/d3-shape: 1.3.2"
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
instead of importing as
import * as shape from 'd3-shape';
I tried import {curveBasis} from ‘d3-shape’;
and then defined my curve var as
curve: any = curveBasis;
Previously examples have shown to use shape.curveBasis. Found a solution after looking at usage in ngx-charts source code. 😃 Probably should still have some documentation on how to use this… or updating any demos.
@SivaKaruturi check out this comment from the linked bug, it should help you make sure your typings are installed correctly and some suggestions in how to import the curve. It’s worked for me where I’ve needed it.