Hi,
I have data chart rendered using HtmlHelper on my MVC application. How can handle the click event on the series items?
I am using Ignite UI 2015 Vol 1.
Hi Keanchan,
Thank you for posting on our forums.
With each IgniteUI control, the MVC wrappers include a method called AddClientEvent() which can be used to Define the JavaScript function associated with the event. To learn more please review our help documentation. For handling the click action on the igDataChart, I recommend using the seriesMouseLeftButtonDown event.
Please let me know if you have further questions regarding this matter.
Hi Jose,
Thank you for the quick reply. I could not find 'AddClientEvent()' on Html.Infragistics().DataChart. Below is my sample code:
@(Html.Infragistics().DataChart(Model.Customers.AsQueryable()) .DataBind().ID("chart") .Axes(a => { a.CategoryX("XLabel").Label(d => d.FirstName) .LabelAngle(45) .Title("FirstName") .LabelVisibility(Visibility.Visible); a.NumericY("YLabel").Title("Id").Label(d => d.Id); }) .Series(s => { s.Column("Y1") .Title("Id") .XAxis("XLabel") .YAxis("YLabel") .IsTransitionInEnabled(true) .IsHighlightingEnabled(true) .ShowTooltip(true) .ValueMemberPath(d => d.Id); }) .Render() )
Please advice.