If you look at the
Github Repo[
^], there are samples on how to:
1.
Use Tooltips[
^]
2.
Custom ToolTips[
^]
From the
UsingTooltips example:
private void ToolTipChanghed()
{
Chart1.Series[0].ToolTip = SeriesToolTip.Text;
Chart1.Series[0].LegendToolTip = LegendToolTip.Text;
Chart1.Series[0].LabelToolTip = PointLabelToolTip.Text;
Chart1.Series[0].Points[1].ToolTip = PointToolTip.Text;
}
private void UsingToolTips_Load(object sender, System.EventArgs e)
{
ToolTipChanghed();
}
private void ToolTip_TextChanged(object sender, System.EventArgs e)
{
ToolTipChanghed();
}
private void textBox1_TextChanged(object sender, System.EventArgs e)
{
ToolTipChanghed();
}
}
You want VB code ... I find ChatGpt is good at converting code, not 100% but enough to get you close. On the odd occasion, it gets it right.
Use: "Convert the following code from C# to VB.net:" and paste the code underneath. You should get the following:
Imports System
Public Class YourClassName
Private Sub ToolTipChanghed()
Chart1.Series(0).ToolTip = SeriesToolTip.Text
Chart1.Series(0).LegendToolTip = LegendToolTip.Text
Chart1.Series(0).LabelToolTip = PointLabelToolTip.Text
Chart1.Series(0).Points(1).ToolTip = PointToolTip.Text
End Sub
Private Sub UsingToolTips_Load(sender As Object, e As EventArgs)
ToolTipChanghed()
End Sub
Private Sub ToolTip_TextChanged(sender As Object, e As EventArgs)
ToolTipChanghed()
End Sub
Private Sub textBox1_TextChanged(sender As Object, e As EventArgs)
ToolTipChanghed()
End Sub
End Class
It looks like the code generated is okay. I have not tested it.
Best thing to do is download the code, compile and run the sample projects. See how it works.
Update
I just downloaded and ran the
ChartSamples project and had a poke around. Choose the
Index tab, then scroll down to
ToolTips, and there you will find 3 examples. All 3 show ToolTips.