Occurs when the chart is clicked.
Namespace: MindFusion.Charting.WebForms
Package: MindFusion.Charting.WebForms
C#
![]() |
---|
public event Chart.AreaClickHandler Click |
Visual Basic
![]() |
---|
Public Event Click As Chart.AreaClickHandler |
The AreaEventArgs class specifies the data for the event.
The following code example demonstrates how to handle the Click event to recognize which bar in a chart is clicked:
C#
![]() |
---|
protected void BarChart1_Click(object sender, MindFusion.Charting.WebForms.Chart.AreaEventArgs e) |
Visual Basic
![]() |
---|
Protected Sub BarChart1_Click(ByVal sender As Object, ByVal e As MindFusion.Charting.WebForms.Chart.AreaEventArgs) 'check the selected index If (e.AreaIndex = 0) Then 'write the clicked index in the session object Page.Session("index") = "0" End If 'if second bar is clicked If (e.AreaIndex = 1) Then 'write the clicked index in the session object Page.Session("index") = "1" End If 'redirect Response.Redirect("PieChart.aspx") End Sub |