I want to display on tooltip another dataitems except the x category and y value. eg. i want to display in a timeplot how much monoey spends in some months, but i want to display on tooltip who spends the money and I icnlude who spends on json file, eg:
"name" : "john" ,
"amount" : 724456 ,
"date" : "2012-02-05"
"name" : "Nick" ,
"amount" : 290000 ,
"date" : "2012-02-01"
How can i display the "name" on tooltip, if the category is "date" and value is "amount"??
12 Answers, 1 is accepted
You could customize the text of the tooltip using dataItem in the template.
For convenience I created a sample project and attached it.
the Telerik team
So default is that the tooltip displays the value of the point, I added to display the date like this:
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 :
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 am not quite sure if I understand your question correctly. Could you please provide more detailed information about the exact functionality you are trying to implement? This way I would be able to advice you further and provide concrete recommendations. Thank you in advance for your cooperation.
Thank you for the provided image in your last post. You could achieve this using valueAxis.lables.template - hence create a custom function which converts seconds in days, hours etc.Regards,
The correct link is http://demos.telerik.com/kendo-ui/beta/bar-charts/index.Regards,