private void timer1_Tick(object sender, System.EventArgs e)
 {
     timer1.Stop();
     try
     {
         Steema.TeeChart.Drawing.Aspect asp = tChart1.Aspect;
         asp.Rotation += DeltaRotate;
         if ((asp.Rotation < 280) || (asp.Rotation > 350))
         {
             DeltaRotate = -DeltaRotate;
         }
         asp.Elevation += DeltaElevate;
         if ((asp.Elevation < 280) || (asp.Elevation > 350))
         {
             DeltaElevate = -DeltaElevate;
         }
     }
     finally
     {
         timer1.Start();
     }
 }
Esempio n. 2
0
        public SeriesType_Arrow()
        {
            // This call is required by the Windows Form Designer.
            InitializeComponent();

            r = new Random();

            // first, setup tChart
            Steema.TeeChart.Drawing.Aspect asp = tChart1.Aspect;
            asp.Orthogonal         = false;
            asp.Perspective        = 55;
            asp.Rotation           = 341;
            asp.Elevation          = 353;
            asp.Zoom               = 93;
            tChart1.Legend.Visible = false;

            // now the series
            arrowSeries1.ArrowWidth  = 32;
            arrowSeries1.ArrowHeight = 24;
            arrowSeries1.ColorEach   = true;
            AddRandomArrows();
        }
        private void timer1_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
        {
            timer1.Stop();
            Steema.TeeChart.Drawing.Aspect asp = tChart1.Aspect;
            // Pie series, do rotation...
            if (TheSeries is Steema.TeeChart.Styles.Pie)
            {
                (TheSeries as Steema.TeeChart.Styles.Pie).RotationAngle += 2;
            }
            else
            {
                if (!scaled)
                {
                    //Axis
                    tChart1.Axes.Left.Increment = (tChart1.Axes.Left.Maximum - tChart1.Axes.Left.Minimum) / 10;
                    scaled = true;
                }


                // scroll points...
                AddPoint(lineSeries1);
                AddPoint(lineSeries2);
                AddPoint(fastLineSeries1);
                // change 3D view (rotation / elevation) ...
                asp.Elevation += DeltaElev;
                if ((asp.Elevation > 320) || (asp.Elevation < 280))
                {
                    DeltaElev = -DeltaElev;
                }
                asp.Rotation += DeltaRot;
                if ((asp.Rotation > 355) || (asp.Rotation < 272))
                {
                    DeltaRot = -DeltaRot;
                }
            }
            // change view Zoom...
            asp.Zoom += Delta;
            // reverse zoom-in / zoom-out
            if ((asp.Zoom > 200) || (asp.Zoom < 2))
            {
                Delta = -Delta;
            }

            //	change from Pie to Lines..,
            if (asp.Zoom > 200)
            {
                pieSeries1.Active      = false;
                lineSeries1.Active     = false;
                lineSeries2.Active     = false;
                fastLineSeries1.Active = false;
                if (TheSeries == pieSeries1)
                {
                    TheSeries              = lineSeries1;
                    lineSeries1.Active     = true;
                    lineSeries2.Active     = true;
                    fastLineSeries1.Active = true;
                    asp.Perspective        = 85;
                    asp.Rotation           = 300;
                }
                else
                {
                    TheSeries        = pieSeries1;
                    asp.Rotation     = 360;
                    TheSeries.Active = true;
                }
            }
            // re-start the timer...
            timer1.Start();
        }