The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi, I need to click on a collumn, in a bar chart, and get a specific event. I know its possible to launch an event when cliking a series on the chart. My problem is, i need to get a different result for each collumn, and the event seems to be relative to the whole series.
Is there any way to do this, or at least to know in which collumn i have clicked?
It's really important for me to get this done, any help would be very appreciated. Thanks.
ADAdministrator Syncfusion Team May 12, 2008 04:43 AM UTC
Hi Tiago,
Thanks for your interest in Syncfusion products. ChartSeries click event does not return the column on which it was clicked, but using the MouseEventArgs of the event we can get the column of the chartseries.
The following lines of code can be used to get the chart point on which click was made.
C# Code:
Point pt = e.GetPosition((UIElement)sender);
//get the x axis value based on the clicked co - ordinates double Xvalue = area.PointToValue(area.PrimaryAxis, pt);
//get the Y axis value based on the clicked co - ordinates double Yvalue = area.PointToValue(area.SecondaryAxis, pt);
The following lines of code can be used to get the column on which click was made.