Пример #1
0
        // Basic curve test - large dataset with NoDupePointList
        private void CreateGraph_NoDupePointList( ZedGraphControl z1 )
        {
            GraphPane myPane = z1.GraphPane;

            NoDupePointList list = new NoDupePointList();
            Random rand = new Random();

            for ( int i = 0; i < 100000; i++ )
            {
                double x = rand.NextDouble() * 1000;
                double y = rand.NextDouble() * 1000;

                list.Add( x, y );
            }

            LineItem myCurve = z1.GraphPane.AddCurve( "curve", list, Color.Blue, SymbolType.Diamond );
            myCurve.Line.IsVisible = false;

            z1.AxisChange();
            list.FilterMode = 3;
            list.FilterData( myPane, myPane.XAxis, myPane.YAxis );

            MessageBox.Show( list.Count.ToString() );
            int count = list.Count;
        }
Пример #2
0
 public void UpdateZedGraphThreadSafe()
 {
     if (this.InvokeRequired)
     {
         this.Invoke(new UpdateZedgraphDelegate(this.UpdateZedGraphThreadSafe), null);
     }
     else
     {
         zedGraphDataList = InformationHolder.Instance().zedGraphData;
         zedGraphCurve.Points = zedGraphDataList;
         zedGraphDataList.FilterData(ZedGraphFrontPage.GraphPane, ZedGraphFrontPage.GraphPane.XAxis, ZedGraphFrontPage.GraphPane.YAxis);
         //ZedGraphFrontPage.AxisChange();
         Refresh();
     }
 }