This is a migrated thread and some comments may be shown as answers.

How do I put a label on a scatterline

3 Answers 89 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Johnathan
Top achievements
Rank 1
Johnathan asked on 02 Jan 2013, 10:40 PM
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 

3 Answers, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 03 Jan 2013, 05:10 PM
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!
0
Johnathan
Top achievements
Rank 1
answered on 03 Jan 2013, 05:28 PM
This code seems to put a label above every data point.  I just want one label for the whole series.
0
Iliana Dyankova
Telerik team
answered on 04 Jan 2013, 06:07 PM
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!
Tags
Charts
Asked by
Johnathan
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Johnathan
Top achievements
Rank 1
Share this question
or