Having Issue With Tool Tips With Series Data

3 posts, 0 answers
  1. Cedric Gaines
    Cedric Gaines avatar
    9 posts
    Member since:
    Dec 2004

    Posted 05 Jun 2016 Link to this post

    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. Dimiter Topalov
    Dimiter Topalov avatar
    628 posts

    Posted 07 Jun 2016 Link to this post

    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:


    I hope this helps.

    Dimiter Topalov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Cedric Gaines
    Cedric Gaines avatar
    9 posts
    Member since:
    Dec 2004

    Posted 07 Jun 2016 in reply to Dimiter Topalov Link to this post

    You my friend are AWESOME!!!!

    exactly what I needed!!!

    thanks a million

Back to Top