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.

Display single point in line chart

See original GitHub issue

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

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

Current behavior How can I display a single point in a line chart? Sorry if this isn’t the correct place for this question but I can’t find another one.

Expected behavior

Improve documentation with this topic.

Please tell us about your environment:

  • ngx-charts version: 5.3.1
  • Angular version: 4.2.5
  • Browser: [all]
  • Language: [TypeScript]

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
FrankL-gitcommented, Feb 22, 2021

I used stroke-width and stroke-linecap after the chart has been displayed. Assume the third line of your chart consists of a single data point. Then you can it display as follows:

const el = document.querySelectorAll('g.line-series path')[2]; el.setAttribute('stroke-width', '5'); el.setAttribute('stroke-linecap', 'round');

0reactions
chriszrccommented, Sep 15, 2021

@FrankL-git that works great, thanks! I added that answer to the SO post here as well- https://stackoverflow.com/a/69193173/228369

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to add a single data point in an Excel line chart?
1. Beside the source data, type the specified data point you will add in the chart. · 2. Right-click the line chart, and...
Read more >
How to add a single data point in an Excel line ... - Tutorialspoint
Under the All-Charts tab, in the Change Chart Type dialogue box, click Line in the left bar, then Line with Markers, and then...
Read more >
A Complete Guide to Line Charts | Tutorial by Chartio
Line charts are a fundamental chart type generally used to show change in values across time. Learn how to best use this chart...
Read more >
How to show an additional single point on a line graph in Excel?
Plot the single point as a separate series. You can then update the data for the single point and it will appear as...
Read more >
How can I display a line chart with only 1 data point
the definition of a line is two non-congruent points. By definition you cannot have a line with only one point. – Marc B....
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