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

Adding additional context information to a chart's series?

1 Answer 52 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Michael Hunt
Top achievements
Rank 1
Michael Hunt asked on 19 Jan 2015, 04:27 PM
Hi,

I am using 2014.3.1024.40 of the ASP.NET for AJAX Controls.

I have a chart with a stacked ColumnSeries.

I want to be able to click on any of the columns and display a new browser window with additional information about that specific point in the series.  I figure I could easily do that in the OnSeriesClick event handler in javascript.  I could do a window.open with a URL to the aspx page I want to display.

I see that the args that are passed to the OnSeriesClick event can give me things like the value and category of that series point.

But I need to pass an ID that I can use as a querystring parameter in the URL I will build in the OnSeriesClick event handler function.

So, is there a way to add additional "context" information to the series, so that I can read and use it in the OnSeriesClick event handler function?

Adding context like this is the type of thing that can be done with your treeview control, so that with that control, for instance, you can then pass the context information to a web service to populate the node with a web service...

Or is there a different way to do this with the HTMLChart control?

Thanks,
Michael

1 Answer, 1 is accepted

Sort by
0
Danail Vasilev
Telerik team
answered on 20 Jan 2015, 07:43 AM
Hello Michael,

You can provided such an information in a data source field which can be bound to the chart. After that you can use the dataItem object in order to obtain it. See an example in the HtmlRadChart bar action url forum post.

Regards,
Danail Vasilev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Chart (HTML5)
Asked by
Michael Hunt
Top achievements
Rank 1
Answers by
Danail Vasilev
Telerik team
Share this question
or