Line Series - Break Line

2 posts, 0 answers
  1. Juan Sola
    Juan Sola avatar
    26 posts
    Member since:
    Jan 2007

    Posted 21 Jun 2012 Link to this post

    I have a requirement that if the series type of line hits 0 to break the line and continue once the series has another value above 0.

    Is this possible? Can I hide certain data points?

    Let me know if a visual would help.
  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 25 Jun 2012 Link to this post

    Hello Juan,

    You could achieve this via the missingValues configuration option of the Kendo UI Chart. For example: 
    $("#chart").kendoChart({
      //...
      seriesDefaults: {
         type: "line",
         missingValues: "gap"
      },
      series: [{
         name: "World",
         data: [15.7, 20, 30, null, 26.6, 14, 36, 17]
          }, {
         name: "United States",
         data: [67.96, null, 74, null, 78]
       }],
      //...
    });

    Please note that you must set null to the missing values instead of 0.

    Regards,

    Iliana Nikolova
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top