Hide line portions in chart

9 posts, 0 answers
  1. David
    David avatar
    12 posts
    Member since:
    Oct 2014

    Posted 07 May 2015 Link to this post

    Hi guys,
    I want to hide some line portions in a telerik chart, I don't know how to explain it, so I've created an  example image to show you my idea

     

    How you can see in this case I assumed that in March there isn't any data, so the line must by invisible in that month

  2. Nasko
    Admin
    Nasko avatar
    909 posts

    Posted 11 May 2015 Link to this post

    Hello David,

    By design the line will not be interrupted when there isn't any data for a particular month. You can work around this behavior by defining a separate line series for each line. For more information, please check the Graph help articles.

    Regards,
    Nasko
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  3. DevCraft banner
  4. David
    David avatar
    12 posts
    Member since:
    Oct 2014

    Posted 12 May 2015 in reply to Nasko Link to this post

    Sorry but I don't understand, I've a datasource like this
    for example for the line B in march I don't want anything, what would be the correct datasource?
  5. Nasko
    Admin
    Nasko avatar
    909 posts

    Posted 15 May 2015 Link to this post

    Hello David,

    You will need to change your data source like this: screenshot.

    Attached is a sample report demonstrating the approach.

    Regards,
    Nasko
    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
  6. David
    David avatar
    12 posts
    Member since:
    Oct 2014

    Posted 26 May 2015 in reply to Nasko Link to this post

    but where there are blank cell, for example(Jan, b) or (May, A) the value is null?
  7. David
    David avatar
    12 posts
    Member since:
    Oct 2014

    Posted 26 May 2015 in reply to David Link to this post

    setting the value to null i'll recevive this errore message:

    "An error has occured while processing Chart 'chart1':
    Cannot set Column 'B' to be null. Please use DBNull instead."

  8. Roman
    Roman avatar
    3 posts
    Member since:
    Sep 2014

    Posted 05 Nov 2015 Link to this post

    So there is no solution to achieve hiding parts of line for null values, without creating separate series?
  9. Roman
    Roman avatar
    3 posts
    Member since:
    Sep 2014

    Posted 05 Nov 2015 in reply to Roman Link to this post

    If I want chart appearance like here
    http://www.telerik.com/clientsfiles/b78815cb-4e2b-4726-9897-45e928c60eba_Gap-default.png?sfvrsn=0
  10. Nasko
    Admin
    Nasko avatar
    909 posts

    Posted 10 Nov 2015 Link to this post

    Hello Roman,

    To achieve the appearance of the chart in the provided screenshot you will need to create a separate series for each line.

    Regards,
    Nasko
    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
DevCraft banner