Hide/Show a Chart Series by Clicking a Legend Item
Environment
Product Version | Product | Author |
---|---|---|
2019.1.219 | RadChartView for WinForms | Desislava Yordanova |
Description
This article aims to show you a sample approach how to hide/show a chart series by clicking its legend item.
Solution
It is necessary to handle the Click event of each LegendItemElement and manipulate the visibility of the associated chart series. Handling the MouseEnter event of RadChartView and setting the ItemCapture to null ensures that the chart is focused as soon as you move the mouse cursor over the chart: