Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show tooltip on MS Chart

I am using MS Chart control to draw graphs on Winform.

I want to show the current (x,y) Value as tooltip on Mousedown on chartarea.

How do I do that?

like image 266
Gaddigesh Avatar asked Nov 15 '11 12:11

Gaddigesh


2 Answers

From the chart samples (Samples Environments for Microsoft Chart Controls)

// Set ToolTips for Data Point Series
chart1.Series[0].ToolTip = "Percent: #PERCENT";

// Set ToolTips for legend items
chart1.Series[0].LegendToolTip = "Income in #LABEL  is #VAL million";

// Set ToolTips for the Data Point labels
chart1.Series[0].LabelToolTip = "#PERCENT";

// Set ToolTips for second Data Point
chart1.Series[0].Points[1].ToolTip = "Unknown";
like image 118
zeFrenchy Avatar answered Oct 22 '22 12:10

zeFrenchy


This tooltip will appear on mouseover. I'm not sure if you can set it for mousedown event.

Chart1.Series["Series1"].ToolTip = "#VALY, #VALX";
like image 29
user898311 Avatar answered Oct 22 '22 13:10

user898311