How to highlight a series on mouse hover in WinForms Chart?
To optionally highlight points on a chart when the mouse hovers over them, enable the AutoHighlight property of the ChartControl class. You can change the auto-highlight color for any series by setting the color using the HighlightInterior property of the ChartStyleInfo class in WinForms Chart.
C#
// Highlighting the chart series
this.chartControl1.AutoHighlight = true;
// Specifies the color for the Highlight interior color for the series
this.chartControl1.Series[0].Style.HighlightInterior = new BrushInfo(GradientStyle.BackwardDiagonal, Color.LightBlue, Color.AntiqueWhite);
VB
'Highlighting the chart series
Me.chartControl1.AutoHighlight = True
Me.chartControl1.Series(0).Style.HighlightInterior = New BrushInfo(GradientStyle.BackwardDiagonal, Color.LightBlue, Color.AntiqueWhite)
Output:
Conclusion
I hope you enjoyed learning about how to highlight a series on mouse hover in WinForms Chart.
You can refer to our WinForms Chart feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started with configuration specifications. You can also explore our WinForms Chart examples to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion®, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!