NULL[empty, missing] values on line chart

Thread is closed for posting
2 posts, 0 answers
  1. Fum
    Fum avatar
    1 posts
    Member since:
    Jan 2015

    Posted 29 Jan 2015 Link to this post

    Hi, I'm new to Telerik and I had a questions.

    I've created a line chart with date values along the x-axis and data along the y-axis.

    Some of the data values are missing,
    yet I'd still like to connect the points,
    from the first data point through to the last without a break in the line.

    Is there a way to connect lines through null values?

    If I had all the values for a given data set,
    it'd look like this:

    With missing values,
    Ideally, it'd look like this: *in case missing the 3rd value

    But when generating the chart with missing values,
    I receive a error.

    I hope solution like this. *UI for Silverlight Forum

    Thank you.
  2. Adrian
    Adrian avatar
    174 posts

    Posted 30 Jan 2015 Link to this post

    Hello Fum,

    Thank you for contacting us.

    Currently ignoring nil data values is not available out of the box. To achieve the desired scenario you should filter your data manually and create line series with the filtered data set. Please consider the code snippet below:
    for (int i = 0; i < values.count; i++) {
        TKChartDataPoint *point = [TKChartDataPoint dataPointWithX:[NSDate dateWithTimeInterval:i * 60 * 60 sinceDate:now] Y:values[i]];
        if ([point.dataYValue isEqual:[NSNull null]]) {
        [dataPoints addObject:point];

    This seems to be a reasonable feature and we will consider implementing it. I logged it in our feedback portal. Feel free to vote/comment there. I also updated your Telerik points for this suggestion.

    I will be glad to assist you if you have further questions.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top