question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update/Add Curve Documentation

See original GitHub issue

I’m submitting a … (check one with “x”)

[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here

Current behavior In the documentation for line-chart (and probably all other charts that support changing curves), it says that you can change the curve with the curve by providing it with other d3 curves. It links to a list of these curves, but nowhere does it actually list the curves that you can input or how you would input them. After a lot of searching, I found the list of supported curves, but this doesn’t help either as inputting the label’s name’s doesn’t seem to work.

Expected behavior I expect to be told how to actually use the curve directive so that I can use it if I would like.

Reproduction of the problem

  1. Check the documentation
  2. Pretend you had no previous knowledge of how ngx-charts works
  3. Attempt to change the curve type.

What is the motivation / use case for changing the behavior? New users will be able to use the library to its fullest by knowing how to use it’s features.

Please tell us about your environment: N/A

  • ngx-charts version: Probably 7.something?

  • Angular version: 4.x.x

  • Browser: [all]

  • Language: [all]

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:1
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

16reactions
cole21771commented, Feb 6, 2018

That is great to know, however, I think it would be helpful to give more instruction on how to do this by either linking to a plunker or to another md file explaining how to use it.

8reactions
MichaelJFordhamcommented, May 20, 2020

For anyone searching (like I was), here’s what you need to do:

In the terminal run: npm install @types/d3-shape (typings is now depreciated)

In the component, import: import * as shape from 'd3-shape';

Then declare a variable like: curve = shape.curveCardinal.tension(0);

And finally in the ngx-chart component inputs, use this:

<ngx-charts-line-chart
            ...(other inputs)...
            [curve]="curve"
></ngx-charts-line-chart>

There are more curve functions here if you don’t want .curveCardinal.tension(0).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Curve 1.0.0 documentation
Curve DAO. Overview · Vote-Escrowed CRV · Implementation Details · Querying Balances, Locks and Supply · Working with Vote-Locks.
Read more >
Namespace: CIQ - ChartIQ Documentation
Displays a floating label over the y-axis. Draws a rectangle, with curved corners, on the canvas. It then calls CIQ.createLabel to print the...
Read more >
netconvert - SUMO Documentation - DLR
The main use of importing stop data is to update/add access information ... Builds parameterized curves whenever the angular change between ...
Read more >
Documentation Project Planning is in the Numbers
You can improve your documentation project planning and imrpove the ... factor (or even “familiarity with content” to account for a learning curve)....
Read more >
CIAO Documentation - Chandra X-ray Center
improve the documentation: bug list update; add threads caveats; ... I use dmextract to get the light curve for a point source in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found