Reputation: 57
I was confused to make tooltip but comes out a pie chart or bar, please give instructions, advice, or reference.
thanks
Upvotes: 2
Views: 91
Reputation: 2198
Try this :
private void chData_MouseMove(object sender, MouseEventArgs e)
{
try
{
int cursorX = Convert.ToInt32(chData.ChartAreas[0].AxisX.PixelPositionToValue(e.Location.X));
tipInfo = "Bat 1: " + ch1Array[cursorX].ToString("0.00") + Environment.NewLine + "Bat 2: " + ch2Array[cursorX].ToString("0.00") + Environment.NewLine;
tooltip.SetToolTip(chData, tipInfo);
}
catch { }
}
This is just a simple example. You can also call chart Binding Method.
Upvotes: 1