This is a migrated thread and some comments may be shown as answers.

Line Chart can show missing value as zero?

5 Answers 397 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Shiwani
Top achievements
Rank 1
Shiwani asked on 27 Feb 2017, 09:06 AM

Hello ,

I am using telerik report designer R3 2016, and when I m drawing line chart using line chart, consider i have a data for the days 1,2,4 and 7 in the x-axis and 0 -100 in y axis . The line chart draws perfectly on the nodes 1 to 2, 2 to 4 and 4 to 7. But the the problem is here in x- axis 3, 5 and 6 is missing (obviously the node not drawn there) . is that any way to show the line chart 1 to 2, 2 to 3 ( go default to zero even no value is mention to draw), 3 to 4, 4 to 5, 5 to 6, 6 to 7.  Exactly to say the missing values which is not given from the user it should go down to zero and draw the nodes which the actual data. please see the screen shot for further reference.

When no value it should not directly pass to next node, My idea to show the amount of sales in particular day/month, the missing days/month not having any data means no sales. should go down to zero. If I process from back-end its huge amount of data generate for zeros.

Using C# code, we can set the missing value property as zero, but in designer i am not able to find this property, please can anyone help me to come out of this.

 

 

5 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 27 Feb 2017, 04:45 PM
Hello Shiwani,

The Graph item is designed to connect points. You can use an expression evaluating the data point's value (Graph.Series.Y property) that is based on a conditional function like IsNull:
=IsNull(Sum(Fields.val),0)


The attached video can be previewed in IE browser. The video illustrates the above suggestions.

Regards,
Stef
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Shiwani
Top achievements
Rank 1
answered on 28 Feb 2017, 06:02 AM
Thank you so much Stef, The issue has been resolved.
0
James
Top achievements
Rank 1
Iron
answered on 08 May 2019, 02:43 PM

I am having the same issue with a Line Chart where the missing I have data that looks like the attached image data.jpg and the chart looks like the attached image chart.jpg.  For my Graph.Series.Y property I have = IsNull(Count(Fields.Id), 0).  Why are the missing dates not going down to zero?  Please help!

James

0
James
Top achievements
Rank 1
Iron
answered on 08 May 2019, 03:32 PM
I also attempted this "= IIf(Fields.id Is Null, 0, Count(Fields.id))" in the Y expression and it gives me the same issue where 0 is not returned, but as you can see the id field for the first day of the data is null.  So for some reason it appears that Fields.id is not being treated as NULL even though it is NULL.
0
Neli
Telerik team
answered on 13 May 2019, 11:03 AM
Hi James,

Note that by default our aggregate functions ignore Null values. Therefore, Count(Null) will result in 0 and you may skip the check for Null values. You may use the following Expression for Series Y value :

= Count(Fields.Id)

Take a look also at the attached report.

Regards,
Neli
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Shiwani
Top achievements
Rank 1
Answers by
Stef
Telerik team
Shiwani
Top achievements
Rank 1
James
Top achievements
Rank 1
Iron
Neli
Telerik team
Share this question
or