Line Chart can show missing value as zero?

6 posts, 0 answers
  1. Shiwani
    Shiwani avatar
    40 posts
    Member since:
    Oct 2016

    Posted 27 Feb 2017 Link to this post

    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.

     

     

  2. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 27 Feb 2017 Link to this post

    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
  3. Shiwani
    Shiwani avatar
    40 posts
    Member since:
    Oct 2016

    Posted 28 Feb 2017 in reply to Stef Link to this post

    Thank you so much Stef, The issue has been resolved.
  4. James
    James avatar
    12 posts
    Member since:
    Mar 2019

    Posted 08 May Link to this post

    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

  5. James
    James avatar
    12 posts
    Member since:
    Mar 2019

    Posted 08 May in reply to James Link to this post

    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.
  6. Neli
    Admin
    Neli avatar
    96 posts

    Posted 13 May Link to this post

    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
Back to Top