How do I put a label on a scatterline

4 posts, 0 answers
  1. Johnathan
    Johnathan avatar
    2 posts
    Member since:
    Oct 2011

    Posted 02 Jan 2013 Link to this post

    I am plotting data with lines that are percentiles.  I would like to have a label on the line that tells the name of the series.  I want it on the line not off to the left where users have to correlate the color back to the line they are on.   

    Here is an example where the percentage floats on the line

    http://www.cdc.gov/growthcharts/data/set1clinical/cj41c017.pdf 
  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 03 Jan 2013 Link to this post

    Hi Johnathan,

    I am not quite sure if I understand your scenario correctly, but if you would like to display labels with the series's name over the line you could use a template for the series labels. For example: 
    $("#chart").kendoChart({
      //....
      seriesDefaults: {
          type: "scatterLine",
          labels: {
              visible: true,
              template: "#= series.name #",
              position: "center"
           }
       }
    });

    If you are requesting a different functionality please elaborate a bit more. This way I would be able to advice you further and suggest the most appropriated solution (if such is possible). Thank you in advance.

    Kind 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!
  3. Johnathan
    Johnathan avatar
    2 posts
    Member since:
    Oct 2011

    Posted 03 Jan 2013 Link to this post

    This code seems to put a label above every data point.  I just want one label for the whole series.
  4. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 04 Jan 2013 Link to this post

    Hello Johnathan,

    Thank you for the details. I am afraid what you are trying to achieve is not supported in Kendo UI, however it sounds good and I recommend sending it as a feature request at our UserVoice portal. This way the community would be able to evaluate it and if this suggestion turns out to be popular we will consider its implementation. Please excuse us for the inconvenience caused.
     
    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