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

Customize tooltip text of line chart series point

3 Answers 286 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Quest Resource Management
Top achievements
Rank 1
Quest Resource Management asked on 12 Feb 2013, 10:39 AM
Hello,

I have a json data format as below:
  • xField: [5,7,9,7,1]
  • yField: [1,5,9,8,6]
  • Tooltip: ["A","B","C","D","E"]
This data is to be displayed Kendo UI Line Chart. I am able to plot line chart using xField and yField values.

But I am unable to customize the tooltip text (it is showing either xField or yField). I referred documentation but cannot find way to achieve this.

Is there any way to provide different/customize value in tooltip as well as data label?

Please assist me on this.

Thanks

3 Answers, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 14 Feb 2013, 09:18 AM
Hi Eric,

You can customize the text displayed in the Chart's tooltip using tooltip template. For a working example please check this online demo. 

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!
0
Quest Resource Management
Top achievements
Rank 1
answered on 14 Feb 2013, 09:46 AM
Hello Iliana,

Thanks for your reply.

But I wanted to show tooltip from different JSON array, as explained in first sample data.

My category is - xField: [5,7,9,7,1]
My series is - yField: [1,5,9,8,6]
My tooltip will be shown from - density: ["A","B","C","D","E"]

Now I am supposed to display the values of Density in tooltip of series (dynamically).

Thanks
0
Iliana Dyankova
Telerik team
answered on 18 Feb 2013, 10:35 AM
Hello Eric,

First of all, let me apologize for the misunderstanding. I am afraid what you would like to achieve is not supported in Kendo UI Chart and its implementation requires additional code. As a possible approach I can suggest hooking up to the DataSource schema' s parse() method, loop through both JSON arrays and pass the "density" field to the first JSON. 

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