Chart Control for C# Windows Forms Chart features of scroll and zoom, selection, tooltip, trackball, title, legend, smart labels, drill down Chart Selection for WinForms C# Tutorial
The WinForms Chart Control provides selection feature for developers to design more interactive Chart for their C# Windows Forms applications. The following tutorial shows how to add the selection functionality to charts in C# and design more interactive chart in Windows Forms template projects.
Before we use the selection feature, we need to add the control to the controller collection in chart. The below C# code shows how to add the selection function. chart1.Controllers.Add(new ChartSelectionController()); chart1.SelectionMode = ChartSelectionMode.SingleDataPoint; chart1.SelectedPointChanged += new ChartSelectedChangedEventHandler(chart1_SelectedPointChanged);
It is possible to add the ChartSelectionController automatically when we set the value of the SelectionMode property like one of below options. chart1.SelectionMode = ChartSelectionMode.SingleDataPoint; chart1.SelectionMode = ChartSelectionMode.MultipleDataPoints;
If users want to use PieSeries and multiple selections, the following sample show the steps to use it. And the slice may offset from the center when it is selected. |