I make a chart and set the hotspot showing point values successfully.
And I want to show the values into another control such as label or textbox something.
I make use of the mousehoverhotspot event and wrote a handler for it:
private void MyChart_MouseHoverHotSpot(object sender, WinHotSpotEventArgs e)
{
label2.Text = e.AttrValues["X"] + " " + e.AttrValues["xLabel"] + " " + e.AttrValues["value"];
}
I run the program in debug mode, from IDE.
The strange thing is that, when I point to any point in the chart, the tooltip shows successfully but the label does not. When I add a breakpoint at the above code, the event is actually fired and when I continue running the program (i.e. pressing "F5"), the label shows the values.
My finding is that the label only shows the values when i add the breakpoint to the line. I tried the Refresh() method but it does not work.
Am I missing something?
Thanks in advance. |