There are several ways to do this.
Option 1 is to use the TagPair Tag property when setting up your data. If the tag is a string, it will be displayed as a hint for the point.
PointPair pp = new PointPair(....); pp.Tag = "This is a custom tooltip";
Option 2 is to subscribe to a PointValueEvent graph control and provide a custom value in the event handler.
graph.PointValueEvent += OnPointValueRequested; ... private string OnPointValueRequested(object sender, GraphPane pane, CurveItem curve, int pointIndex) { PointPair point= curve[pointIndex]; string tooltip = String.Format("({0}, {1})", point.X point.Y); return tooltip; }
Also keep in mind that there is a bug with using tooltips in Vista and above. You may need to fix your copy of ZedGraph to fix it if you haven't already.
source share