How to display WinForms Chart tooltips?
In WinForms Chart control, tooltips are used to display additional information when hovering over chart elements such as data points or chart areas. You can enable tooltips by setting the ShowToolTips property to true. By default, tooltips show the Y-value of the series.
To display custom text, use the PointsToolTipFormat property (e.g., "{1}" - The default Y value will be replaced by the corresponding ChartSeries.Style.ToolTip). Tooltips can also be applied to the chart area using the ChartAreaToolTip property.
For more details on supported format specifiers in PointsToolTipFormat, refer to the WinForms Chart documentation.
this.chartControl1 = new ChartControl();
. . .
this.chartControl1.ShowToolTips = true;
ChartSeries series1 = new ChartSeries("Sales Performance", ChartSeriesType.Column);
// Chart Area Tooltips
this.chartControl1.ChartArea.ChartAreaToolTip = "Chart Area";
// Series points Tooltips
series1.PointsToolTipFormat = "{1}";
series1.Style.ToolTip = "Series1";Me.ChartControl1 = New ChartControl()
. . .
Me.ChartControl1.ShowToolTips = True
Dim series1 As ChartSeries = New ChartSeries("Sales Performance", ChartSeriesType.Column)
' Chart Area Tooltips
Me.ChartControl1.ChartArea.ChartAreaToolTip = "Chart Area"
' Series points Tooltips
series1.PointsToolTipFormat = "{1}"
series1.Style.ToolTip = "Series1"Output
Conclusion
I hope you enjoyed learning about how to display WinForms Chart Tooltips.
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!