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

Adding Values to tooltip, color changing, disableing the point.

1 Answer 280 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Neil
Top achievements
Rank 1
Neil asked on 10 May 2012, 09:14 AM
Hey,
saving Your time I`ll try to ask several questions in one thread.

 So I`m trying to do the same with the tooltip - to display something in addition to the default tooltip.

So default is that the tooltip displays the value of the point, I added to display the date like this:

tooltip: {
                            visible: true,
                            format: "{0:N0}",
                            template: "#= dataItem.Date #"
                        }


But then it only shows the date but not the value any more. Any advice ?

Ideally I would like to see the name value and date in the tooltip.

name being written when adding the series :   
 series:
                        [{
                            field: "Value1",
                            name: "GP3-PT-270517.PV_IND"
                        }, 
                        {
                        field: "Value2",
                        name: "Name2"
                        },

Interesting thing is that when i generate json file and the field name is "GP3-PT-270517.PV_IND" it doesnt work, hence i had to rename it to Value1, Value 2 and so on. Why is that ? json doesnt like " -, , ._" ? 

I couldn`t find how to change the colour of the lines on my chart ? hwo to change the width of the line and how disable the round circles on the line.

Thank You in advance, 
Much Aprech,
N

1 Answer, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 10 May 2012, 03:29 PM
Hi Neil,

You could customize the text in the tooltip via dataItem variable in the template. For example: 

tooltip: {
   visible: true,
   template: "#= dataItem.name # - #= dataItem.date #"
}

You can configure the line chart via its configuration options:
  • color property - changes the color;
  • width property - changes the width of the lines;
  • markers property - configuration of the markers.  

Indeed, this is a valid JSON, but it is not recommended to use any of these symbols ".", ",", "%", "-" in the name of the objects, because the DataSource internally uses regular expressions. 

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
Neil
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Share this question
or