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

Display another data on tooltip except category and value

12 Answers 1270 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Johnny
Top achievements
Rank 1
Johnny asked on 16 Mar 2012, 04:16 PM
Hello,
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

Sort by
0
Iliana Dyankova
Telerik team
answered on 19 Mar 2012, 03:00 PM
Hello Vaf,

You could customize the text of the tooltip using dataItem in the template.
For example:
tooltip: {
   ...
   template: "#= dataItem.employeeName #"
  }

For convenience I created a sample project and attached it.


Greetings,
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
Johnny
Top achievements
Rank 1
answered on 19 Mar 2012, 08:26 PM
Thanks for the answer!it's very useful!
0
Neil
Top achievements
Rank 1
answered on 10 May 2012, 09:02 AM
Hey, 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 " -, , ._" ?
0
Iliana Dyankova
Telerik team
answered on 10 May 2012, 04:56 PM
Hello Nail,

I have already provided answers to your questions in this forum thread. Please check it and let me know if you need further assistance. 

Greetings,

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
osman
Top achievements
Rank 1
answered on 05 Jun 2013, 12:06 PM
can i show another chart in tooltip box ? when hover point ? so can i write javascript into tooltip? is it possible?
0
Iliana Dyankova
Telerik team
answered on 06 Jun 2013, 01:48 PM
Hello Osman,

In order to achieve this you could use a tooltip.template. 

Regards,
Iliana Nikolova
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
osman
Top achievements
Rank 1
answered on 13 Jun 2013, 06:52 AM
 I wanna Make Kendo Bar Chart (line chart ......) But I need to convert them for ex: 6032 second to 0 day ,0 hour ,10 minutes ,32 second (it shows in x direction or y direction) . how is it possible in kendo chart? Can Send me Any Example?
0
Iliana Dyankova
Telerik team
answered on 14 Jun 2013, 11:18 AM
Hello Osman,

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.
 
Regards,
Iliana Nikolova
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
osman
Top achievements
Rank 1
answered on 14 Jun 2013, 11:49 AM
If You Look the My Attached Folder You Gonna Understand me
0
Iliana Dyankova
Telerik team
answered on 19 Jun 2013, 12:05 PM
Hi Osman,

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,
Iliana Nikolova
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Javier
Top achievements
Rank 1
answered on 09 Jun 2015, 02:57 PM
This link is not working http://demos.kendoui.com/beta/dataviz/bar-charts/index.html
0
Iliana Dyankova
Telerik team
answered on 12 Jun 2015, 08:10 AM

Hi Javier,

The correct link is http://demos.telerik.com/kendo-ui/beta/bar-charts/index.

Regards,
Iliana Nikolova
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Charts
Asked by
Johnny
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Johnny
Top achievements
Rank 1
Neil
Top achievements
Rank 1
osman
Top achievements
Rank 1
Javier
Top achievements
Rank 1
Share this question
or