han06
han06

Reputation: 57

how to bring up the diagram (pie and bar chart) as a tooltip in vb.net

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

Answers (1)

Tanmay Nehete
Tanmay Nehete

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

Related Questions