当前位置: 首页>>代码示例>>C#>>正文


C# ZedGraphControl.Update方法代码示例

本文整理汇总了C#中ZedGraph.ZedGraphControl.Update方法的典型用法代码示例。如果您正苦于以下问题:C# ZedGraphControl.Update方法的具体用法?C# ZedGraphControl.Update怎么用?C# ZedGraphControl.Update使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ZedGraph.ZedGraphControl的用法示例。


在下文中一共展示了ZedGraphControl.Update方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateChart

 public void CreateChart(ZedGraphControl zgc)
 {
     EventHandler method = null;
     this._myMainPane.Title.Text = this._reportTitle;
     this._myMainPane.XAxis.Title.Text = "TOW";
     this._myMainPane.YAxis.Title.Text = "Data";
     this._myMainPane.XAxis.IsVisible = true;
     this._myMainPane.XAxis.Type = AxisType.Linear;
     this._myMainPane.YAxis.MajorGrid.IsVisible = true;
     this._myMainPane.YAxis.MinorGrid.IsVisible = true;
     this._myMainPane.CurveList.Clear();
     this._myMainPane.Chart.Fill = new Fill(Color.White, Color.LightGoldenrodYellow, 45f);
     if ((this._myMainXaxisData != null) && (this._myMainXaxisData.Length > 0))
     {
         this._myMainPane.AddCurve(this._curveLabel, this._myMainXaxisData, this._myMainYaxisData, this._curveColor, SymbolType.Diamond);
         this._myMainPane.AxisChange();
         if (method == null)
         {
             method = delegate {
                 zgc.Update();
                 zgc.Refresh();
             };
         }
         base.Invoke(method);
     }
     zgc.Size = new Size(base.ClientRectangle.Width - 0x19, base.ClientRectangle.Height - 40);
 }
开发者ID:facchinm,项目名称:SiRFLive,代码行数:27,代码来源:frmMPMStatsPlots.cs

示例2: CreateChart

 public void CreateChart(ZedGraphControl zgc)
 {
     EventHandler method = null;
     this._myMainPane.YAxis.MajorGrid.IsVisible = true;
     this._myMainPane.YAxis.MinorGrid.IsVisible = true;
     this._myMainPane.CurveList.Clear();
     this._myMainPane.Chart.Fill = new Fill(Color.White, Color.LightGoldenrodYellow, 45f);
     this._myMainPane.Title.Text = this._reportTitle;
     this._myMainPane.XAxis.Title.Text = "Data";
     this._myMainPane.YAxis.Title.Text = "Probability";
     this._myMainPane.YAxis.Scale.MaxAuto = false;
     this._myMainPane.YAxis.Scale.MinAuto = false;
     this._myMainPane.YAxis.Scale.Max = 1.0;
     this._myMainPane.YAxis.Scale.Min = 0.0;
     if ((this._myMainXaxisData != null) && (this._myMainXaxisData.Length > 0))
     {
         Stats stats = new Stats();
         double[] y = new double[this._myMainXaxisData.Length];
         for (int i = 0; i < this._myMainXaxisData.Length; i++)
         {
             y[i] = (i + 1) * (1.0 / ((double) this._myMainXaxisData.Length));
         }
         stats.SortArray(this._myMainXaxisData.Length, this._myMainXaxisData);
         this._myMainPane.AddCurve(this._curveLabel, this._myMainXaxisData, y, this._curveColor, SymbolType.Diamond);
         this._myMainPane.AxisChange();
         if (method == null)
         {
             method = delegate {
                 zgc.Update();
                 zgc.Refresh();
             };
         }
         base.Invoke(method);
     }
     zgc.Size = new Size(base.ClientRectangle.Width - 0x19, base.ClientRectangle.Height - 0x2d);
 }
开发者ID:facchinm,项目名称:SiRFLive,代码行数:36,代码来源:frmCDFPlots.cs

示例3: CreateChart

        // Call this method from the Form_Load method, passing your ZedGraphControl
        public void CreateChart(ZedGraphControl zgc)
        {
            GraphPane myPane = new GraphPane();
            zgc.GraphPane = myPane;
            zgc.IsShowPointValues = true;

            // Set the titles and axis labels
            myPane.Title.Text = "Data for: " + cbVideo.SelectedItem.ToString();
            myPane.XAxis.Title.Text = "Time, Ticks (hover mouse over a point for date/time)";

            // Hide the legend
            // myPane.Legend.IsVisible = false;

            // Add a curve
            LineItem curve = myPane.AddCurve("Average Rating", ARdata, Color.Red, SymbolType.Circle);
            curve.Line.Width = 2.0F;
            curve.Line.IsAntiAlias = true;
            curve.Symbol.Fill = new Fill(Color.Blue);
            curve.Symbol.Size = 7;
            curve.IsY2Axis = true;

            // Add a curve
            curve = myPane.AddCurve("Average New Rating", ANRdata, Color.Green, SymbolType.Circle);
            curve.Line.Width = 2.0F;
            curve.Line.IsAntiAlias = true;
            curve.Symbol.Fill = new Fill(Color.Blue);
            curve.Symbol.Size = 7;
            curve.IsY2Axis = true;

            // Add a curve
            curve = myPane.AddCurve("Raters", Rdata, Color.Blue, SymbolType.Triangle);
            curve.Line.Width = 2.0F;
            curve.Line.IsAntiAlias = true;
            curve.Symbol.Fill = new Fill(Color.Red);
            curve.Symbol.Size = 7;
            // Add a curve
            curve = myPane.AddCurve("Views", Vdata, Color.Yellow, SymbolType.Triangle);
            curve.Line.Width = 2.0F;
            curve.Line.IsAntiAlias = true;
            curve.Symbol.Fill = new Fill(Color.Red);
            curve.Symbol.Size = 7;
            // Add a curve
            curve = myPane.AddCurve("Comments", Cdata, Color.Magenta, SymbolType.Triangle);
            curve.Line.Width = 2.0F;
            curve.Line.IsAntiAlias = true;
            curve.Symbol.Fill = new Fill(Color.Red);
            curve.Symbol.Size = 7;
            // Add a curve
            curve = myPane.AddCurve("Favorites", Fdata, Color.Black, SymbolType.Triangle);
            curve.Line.Width = 2.0F;
            curve.Line.IsAntiAlias = true;
            curve.Symbol.Fill = new Fill(Color.Red);
            curve.Symbol.Size = 7;

            // Fill the axis background with a gradient
            myPane.Chart.Fill = new Fill(Color.White, Color.FromArgb(255, Color.ForestGreen), 45.0F);

            // Make the Y axis scale red
            myPane.YAxis.Scale.FontSpec.FontColor = Color.Red;
            myPane.YAxis.Title.FontSpec.FontColor = Color.Red;
            myPane.YAxis.Title.Text = "Numbers (Views, Comments, Raters, Favs)";
            // turn off the opposite tics so the Y tics don't show up on the Y2 axis
            myPane.YAxis.MajorTic.IsOpposite = false;
            myPane.YAxis.MinorTic.IsOpposite = false;
            // Don't display the Y zero line
            myPane.YAxis.MajorGrid.IsZeroLine = false;
            // Align the Y axis labels so they are flush to the axis
            myPane.YAxis.Scale.Align = AlignP.Inside;

            // Enable the Y2 axis display
            myPane.Y2Axis.IsVisible = true;
            // Make the Y2 axis scale blue
            myPane.Y2Axis.Scale.FontSpec.FontColor = Color.Blue;
            myPane.Y2Axis.Title.FontSpec.FontColor = Color.Blue;
            myPane.Y2Axis.Title.Text = "Rating [1-5] (Avg, ANR)";
            // turn off the opposite tics so the Y2 tics don't show up on the Y axis
            myPane.Y2Axis.MajorTic.IsOpposite = false;
            myPane.Y2Axis.MinorTic.IsOpposite = false;
            // Display the Y2 axis grid lines
            myPane.Y2Axis.MajorGrid.IsVisible = true;
            // Align the Y2 axis labels so they are flush to the axis
            myPane.Y2Axis.Scale.Align = AlignP.Inside;
            myPane.Y2Axis.Scale.Min = 1;
            myPane.Y2Axis.Scale.Max = 5;

            // Calculate the Axis Scale Ranges
            zgc.AxisChange();
            zgc.Refresh();
            zgc.Update();
            this.Width = this.Width + 1;
            this.Width = this.Width - 1;
        }
开发者ID:joshgoodwin,项目名称:TubeGuardian,代码行数:93,代码来源:frmStatAnalyzer.cs


注:本文中的ZedGraph.ZedGraphControl.Update方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。