How to display 0 for series value when the data is missing?

3 posts, 0 answers
  1. Chris Ward
    Chris Ward avatar
    56 posts
    Member since:
    Jan 2010

    Posted 14 Jan Link to this post

    I would like to use the ChartView control to create charts of time line data. The SQL database that I am querying against has a data point for every minute for thousands of counters.  For space savings, the application that stores the data does not create a record if the value of the data points is ZERO for that minute.  For this data, that is a savings of more than 75%.

    When creating a line chart, is it possible to have RadChartView treat the missing data points with the value of ZERO?  In my test application, ChartView seems to approximate the missing values and simply draws a straight line between the two point that do have a value.  This is not an accurate representation of the data. What I need is from the line chart to go to 0 for the minutes there there is no data.

    I've used other charting applications that have this capability.

    Chris

     

  2. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3412 posts

    Posted 16 Jan Link to this post

    Hello, Chris,        

    RadChartView supports empty values in the series. In general, empty values means missing Y value for a particular X value. The empty X value is skipped from drawing. NullValues is supported only for Cartesian series like Bar, Line, Spline, Area and SplineArea. Additional information is available in the following help article: https://docs.telerik.com/devtools/winforms/controls/chartview/null-values-support-

    An alternative approach is to iterate the source collection and specify zero for the empty values in order to achieve your requirement. Feel free to use this approach which suits your requirements best.

    I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

    Regards,
    Dess | Tech Support Engineer, Sr.
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Chris Ward
    Chris Ward avatar
    56 posts
    Member since:
    Jan 2010

    Posted 16 Jan in reply to Dess | Tech Support Engineer, Sr. Link to this post

    Ok, thank you .  I suspected that was the case.  I will find a way to populate the data source with zero's.

     

    CHris

     

     

Back to Top