To add ToolTips to the Chart's DataSeries, complete the following steps:
1. Add C1Chart to the Form.
2. Add the following directive to declare the C1.Win.C1Chart namepace:
Imports C1.Win.C1Chart
•C#
using C1.Win.C1Chart;
3. Add the following code in the Form_load procedure to declare the dataseries and add the tooltips to the dataseries:
C1Chart1.ToolTip.Enabled = True
Dim sc As ChartDataSeriesCollection = C1Chart1.ChartGroups(0).ChartData.SeriesList
For Each ds As ChartDataSeries In sc
ds.TooltipText = "Series: {#TEXT}" + ControlChars.Cr + ControlChars.Lf + "x = {#XVAL}" + ControlChars.Cr + ControlChars.Lf + "y = {#YVAL}"
Next ds
•C#
ChartDataSeriesCollection sc =
c1Chart1.ChartGroups[0].ChartData.SeriesList;
foreach (ChartDataSeries ds in sc)
ds.TooltipText = "Series: {#TEXT}" + '\r' + '\n' + "x = {#XVAL}" + '\r' + '\n' + "y = {#YVAL}";
// Enable tooltip
c1Chart1.ToolTip.Enabled = true;
This topic illustrates the following:
When you hover over the points in the data series on the chart area at run time, the tooltips appear for each point, like the following: