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.

null values are being treated as zeros in LineChart

See original GitHub issue

I am submitting a…

  • Feature request
  • Design defect
  • Source code defect
  • Demo/documentation defect
  • Other

charts version:

0.16.25

Issue description

If I pass null values to a LineChart, instead of getting gaps in the data, the graph graphs the value as a 0 on the y-axis.

Steps to produce the issue

{
					date: new Date(2019, 0, 1),
					value: 10000
				},
				{
					date: new Date(2019, 0, 1),
					value: null
				},

Current behavior

Graphs as zeros

Expected behavior

I’m expecting something a little like this: https://www.carbondesignsystem.com/data-visualization/axes-and-labels/#gaps-in-data

Screenshot or recording

image

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
anne-stevenscommented, Feb 3, 2020

Nulls should not be rendered as zeros. A zero is an actual value that a user, sensor or system acutally input. A null the absence of a value. It is conceptually very different than zero. In the line chart example, nulls should simply not be plotted.

0reactions
theiliadcommented, Mar 18, 2020

Closed by #464

Read more comments on GitHub >

github_iconTop Results From Across the Web

Display empty cells, null (#N/A) values, and hidden worksheet ...
Click Hidden and Empty Cells. Excel Charting dialog for Hidden and Empty Cells. In the Show empty cells as: options box, click Gaps,...
Read more >
Null values are shown as 0 on a line chart
When plotting time series data (or other data too) with Null values on a series, the line chart forces missing values to be...
Read more >
Line Chart can show missing value as zero? - Telerik
Exactly to say the missing values which is not given from the user it should go down to zero and draw the nodes...
Read more >
Chart creation - Omitting Null values - Anaplan Community
Solved: Hi Team, i would like to create a chart wherein the zero values need not be plotted on a graph.In other words,...
Read more >
Represent null data as zero in line chart
- The x axis starts in February 2021, with Value=3 in level 0 (thus, there are three items with value 0). There are...
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