Chart for WinForms - How to Create Custom Legend Radio Buttons to Control Visibility of a Chart Series
This example demonstrates how to show chart series (Point, Line, or Area) depending on the selection state of a custom radio button in the chart legend.
Use the ChartControl.CustomDrawSeries event handler to create a custom appearance for radio buttons based on the color of a selected series. Handle the ChartControl.LegendItemChecked event and use e.CheckedElement and SeriesBase.CheckedInLegend proeprties to show (or hide) the chart series when you switch between radio buttons.
- MainForm.cs (VB: MainForm.vb)