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

Having Issue With Tool Tips With Series Data

2 Answers 25 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Cedric Gaines
Top achievements
Rank 2
Cedric Gaines asked on 05 Jun 2016, 05:59 AM

Good Evening,

I currently have a chart, and it's rending as expected, but the problem comes in when trying get the tools tips working.

Here is what the data will look like...

{
     name: system 1,
     data: [100,200,300],
     hitDates: [01-01-2016, 01-02-2016, 01-03-2016]
},
{
     name: system 2,
     data: [400,500,400],
     hitDates: [01-01-2016, 01-02-2016, 01-03-2016]
}

So as you can see, 'Name' is a string and data and hitDates are arrays but will be equal in length.

I've tried everything to get get the tooltip to bind to simply show per point (name, data(hits), and hitDates)

series.name works fine, but since data and hitDates are arrays, it simply prints out the complete array.  I've even tried series.data[series.index] and index seems to always be 0.  I've tried dataItem.data and that just comes back as undefined.

Any help would be GREATLY appreciated.

Thanks In Advance

2 Answers, 1 is accepted

Sort by
0
Dimiter Topalov
Telerik team
answered on 07 Jun 2016, 03:22 PM
Hello Cedric,

The current value is accessible in the ToolTip template as value, and you can use the JavaScript array.indexOf() method to find the item from the second array, that is in the same index, as the current value is in the data array, as shown in the following dojo:

http://dojo.telerik.com/UjeSi

I hope this helps.

Regards,
Dimiter Topalov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Cedric Gaines
Top achievements
Rank 2
answered on 08 Jun 2016, 03:52 AM

You my friend are AWESOME!!!!

exactly what I needed!!!

thanks a million

Tags
Charts
Asked by
Cedric Gaines
Top achievements
Rank 2
Answers by
Dimiter Topalov
Telerik team
Cedric Gaines
Top achievements
Rank 2
Share this question
or