本帖最后由 sakuram 于 2011-06-16 14:19:33 编辑

解决方案 »

  1.   

     Zgl.IsShowPointValues = true;
    可以自动显示鼠标坐标点!至于自动缩放,我还不会!
      

  2.   

      public void  zedshowN( ZedGraphControl zg,int n)
            {
           //zg.GraphPane.CurveList[n]
                try
                {
                    zg.GraphPane.CurveList[n].IsVisible = true;
                    //zg.ZoomOutAll(zg.GraphPane);
                    zg.RestoreScale(zg.GraphPane);
                    zg.AxisChange();
                    zg.Refresh();
                }
                catch{}
            }
      

  3.   

     private void zedGraphControl2_MouseMove(object sender, MouseEventArgs e)
            {
                PointF mousePt = new PointF(e.X, e.Y);
                GraphPane myPane = this.zedGraphControl2.GraphPane;
                string tooltip = string.Empty;            // Find the Chart rect that contains the current mouse location
                ZedGraphControl s = (ZedGraphControl)sender;
                GraphPane pane = s.MasterPane.FindChartRect(mousePt);            // If pane is non-null, we have a valid location.  Otherwise, the mouse is not
                // within any chart rect.
                if (pane != null)
                {
                    double x, y;
                    // Convert the mouse location to X, and Y scale values
                    pane.ReverseTransform(mousePt, out x, out y);
                    // 获取横纵坐标信息
                    tooltip = "(坐标x:" + x.ToString("f6") + ",坐标y: " + y.ToString("f6") + ")";
                }
                // this.zedGraphControl1.GraphPane.Title.Text = tooltip;
                myPane.XAxis.Title.Text = tooltip;
                this.zedGraphControl2.Refresh();        }
      

  4.   

    http://sunxitao88.blog.163.com/blog/static/683144392008628101837311/ 详细
      

  5.   

    http://sunxitao88.blog.163.com/blog/static/683144392008628101837311/