We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to trigger the ChartRegionEvents in the chart control?

Platform: WinForms |
Control: Chart |
Published Date: April 30, 2011 |
Last Revised Date: June 25, 2019

 

The ChartRegionMouseEventHandler is used to raise the chart region related mouse events.

The Chart handles the following mouse related events when the user interacts with the Chart using the mouse on certain specific regions in the Chart - Axis Labels, Chart Points or a custom region.

  • ChartRegionClick Event
  • ChartRegionMouseEnter Event
  • ChartRegionMouseHover Event
  • ChartRegionMouseMove Event
  • ChartRegionMouseLeave Event
  • ChartRegionMouseUp Event
  • ChartRegionMouseDown Event

C#

// Add the ChartRegionMouseDown event

this.chartControl1.ChartRegionMouseDown += new Syncfusion.Windows.Forms.Chart.ChartRegionMouseEventHandler(this.chartControl1_ChartRegionMouseDown);

//Specifies Action to the ChartRegionMouseDown Event

private void chartControl1_ChartRegionMouseDown(object sender, Syncfusion.Windows.Forms.Chart.ChartRegionMouseEventArgs e)

{

if(e.Region.SeriesIndex == 0 )

{

OutputText(String.Format("MouseDown Series 1 Bar {0} Point : {1}", e.Region.PointIndex, e.Point));

}

}

VB

' Add the ChartRegionMouseDown Event

AddHandler chartControl1.ChartRegionMouseDown, AddressOf chartControl1_ChartRegionMouseDown

'Specifies Action to the ChartRegionMouseDown Event

Private Sub chartControl1_ChartRegionMouseDown(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Chart.ChartRegionMouseEventArgs) Handles chartControl1.ChartRegionMouseDown

If e.Region.SeriesIndex = 0 Then

OutputText(String.Format("MouseDown Series 1 Bar {0} Point : {1}", e.Region.PointIndex, e.Point))

End If

End Sub ''chartControl1_ChartRegionMouseDown

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon