Line chart - can show missing value as zero?

3 posts, 1 answers
  1. Pon
    Pon avatar
    2 posts
    Member since:
    Mar 2015

    Posted 19 Jun 2015 Link to this post

    Hi,

     

    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. Please help me out from this problem with possible solutions. 

     

    Thanks,

    Jagan

  2. Answer
    EZ
    EZ avatar
    65 posts
    Member since:
    May 2015

    Posted 19 Jun 2015 in reply to Pon Link to this post

    Have you tried setting the series missingValues property to "zero"?

    Missing Values Docs

    Here is a DEMO

     

    series: [{
       type: "line",
       field: "Count",
       categoryField: "Date",
       missingValues : "zero",
    }],

     

  3. Pon
    Pon avatar
    2 posts
    Member since:
    Mar 2015

    Posted 19 Jun 2015 in reply to EZ Link to this post

    Wow amazing, This what I looking for.

    thank you very much.

    You saved my day. It is working Fine :)

     

    Regards,

    Jagan

     

     

Back to Top