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

3rd value on bar chart

2 Answers 97 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Philip Senechal
Top achievements
Rank 1
Philip Senechal asked on 10 Mar 2012, 01:52 AM
Hello,

Is it possible to include a 3rd value for a bar chart to provide a different value on click through?

Here is my scenario...I'm passing in Employee Name (category) and Number of Requests (value) as my data points for a bar chart. I've setup a click through on the chart, but I'd like to pass the Employee ID instead of the Employee Name. I'm bringing in the Employee ID into my model and creating a local data source. Is there anything I can assign the Employee ID value to so that I can use it with the click through?

Thanks!

2 Answers, 1 is accepted

Sort by
0
Accepted
Iliana Dyankova
Telerik team
answered on 14 Mar 2012, 05:40 PM
Hi Philip,

You could pass the EmployeeID on the onSeriesClick function using the dataItem.
For example:
function onSeriesClick(e) {
 alert("Employee ID is: " + e.dataItem.EmployeeID);
 }

For more convenience I created a sample project and attached it.


Kind 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
Philip Senechal
Top achievements
Rank 1
answered on 14 Mar 2012, 06:14 PM
Thanks Iliana...that worked perfectly.

I'll keep that dataItem option in mind as it could very well come in handy for other things on the Chart.
Tags
Charts
Asked by
Philip Senechal
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Philip Senechal
Top achievements
Rank 1
Share this question
or