Display single point in line chart
See original GitHub issueI’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:
- Created 6 years ago
- Comments:6
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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');
@FrankL-git that works great, thanks! I added that answer to the SO post here as well- https://stackoverflow.com/a/69193173/228369