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.

Error when using ngx-charts-line-chart in version 9.0.0

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
  • support request - use StackOverflow (add the ngx-charts tag) or the gitter chat for support questions

Current behavior The ngx-charts-line-chart is throwing an error in the console Error: <rect> attribute x: Expected length, "NaN". and is not visible. This error occurred after updating the package to version 9.0.0.

Expected behavior The chart should not throw an error in the console and should be visible.

Reproduction of the problem Current template config: <ngx-charts-line-chart [scheme]="{domain: ['#ef6c00']}" [results]="data" [xAxis]="true" [yAxis]="true" [legend]="false" [showXAxisLabel]="true" [showYAxisLabel]="true" [xAxisLabel]="'X-Axis-Label'" [yAxisLabel]="'Y-Axis-Label'" [autoScale]="true">

What is the motivation / use case for changing the behavior?

Please tell us about your environment: Windows: v10 Node: v9.8.0 NPM: v6.2.0 Yarn: 1.7.0

  • ngx-charts version: 9.0.0

  • Angular version: 6.0.9

  • Browser: all

  • Language: TypeScript 2.7.2

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
radzik07commented, Jul 16, 2019

so why was this closed? it should be reopened, as the blitz shows https://stackblitz.com/edit/vertical-bar-chart-ubfedd the lib does not handle empty arrays properly, one thing is putting NaN in svg and throwing that errors, and another one is that odd empty tooltip + line showing up when hovering…

version 12.0.1

0reactions
AyushRawat1996commented, Nov 14, 2019

@Mazi10987 Please try the same with “new Date()” function like - "series": [ { "name": new Date("2019-03-24T05:14:00Z"), "value": "0.031" }, { "name": new Date("2019-03-24T05:19:00Z"), "value": "0.015" }] instead of "series": [ { "name": "2019-03-24T05:14:00Z", "value": "0.031" }, { "name": "2019-03-24T05:19:00Z", "value": "0.015" }

Read more comments on GitHub >

github_iconTop Results From Across the Web

swimlane/ngx-charts - Gitter
Hello. I am trying to use a line chart. The example from the documentation from Stackblitz does not start, because the view parameter...
Read more >
Modifying the inner CSS of ngx-charts - Stack Overflow
This problem doesn't occur in "@swimlane/ngx-charts": "^9.0.0". However if you want to change the style in your version to solve this, use ......
Read more >
@swimlane/ngx-charts - npm
Declarative Charting Framework for Angular. Latest version: 20.1.2, last published: 20 days ago. Start using @swimlane/ngx-charts in your ...
Read more >
Ngx-Charts 20.1.0 Angular Chart Framework
Show Grid Lines. Round Domains. Rotate X Axis Ticks. Use Gradients. Hide bar if value is 0. Show Legend. Show Data Label. Round...
Read more >
Angular Project Publish Error at 92% #11326 | Support Center
Nebula Core version 10.0.0. Abp (6.0.0). I am getting below error when I run npm run publish command. The error always appears at...
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