Exemplo n.º 1
0
        private void DrawEllipseShadow(Steema.TeeChart.Drawing.Graphics3D g, Color AColor, Rectangle R)
        {
            int    x, y, t;
            int    Steps;
            double tmpW, tmpH;

            g.Pen.Visible   = false;
            g.Brush.Solid   = true;
            g.Brush.Visible = true;
            g.Brush.Color   = AColor;


            x = (R.Left + R.Right) / 2;
            y = (R.Top + R.Bottom) / 2;

            Steps = Math.Min(x, y) / 10;
            tmpW  = 0.5 * (R.Right - R.Left) / Steps;
            tmpH  = 0.5 * (R.Bottom - R.Top) / Steps;

            for (t = Steps; t > 0; --t)
            {
                Graphics3D.ApplyDark(ref AColor, 8);
                g.Brush.Color = AColor;
                R             = Rectangle.FromLTRB(x - Convert.ToInt32(t * tmpW), y - Convert.ToInt32(t * tmpH), x + Convert.ToInt32(t * tmpW), y + Convert.ToInt32(t * tmpH));
                g.Ellipse(R);
            }
        }
Exemplo n.º 2
0
        private void calendar_BeforeDrawValues(object sender, Steema.TeeChart.Drawing.Graphics3D g)
        {
            var item = sender as Steema.TeeChart.Styles.Calendar;

            Rectangle rectangle = item.RectCell(1, 1);

            g.Rectangle(rectangle);
        }
Exemplo n.º 3
0
        private void tChart1_BeforeDrawSeries(object sender, Steema.TeeChart.Drawing.Graphics3D g)
        {
            Rectangle R;

            if (checkBox1.Checked)
            {
                R = tChart1.Chart.ChartRect;
                R = Rectangle.FromLTRB(R.Left + 80, R.Bottom - 40, R.Right - 80, R.Bottom);
                DrawEllipseShadow(g, tChart1.Panel.Color, R);
            }
        }
Exemplo n.º 4
0
 private void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
 {
     if (checkBox2.Checked)             // draw 3D axes
     {
         Steema.TeeChart.Drawing.Graphics3D gr = tChart1.Graphics3D;
         // set pen style
         gr.Pen.Color = Color.Blue;
         gr.Pen.Width = 1;
         gr.Pen.Style = System.Drawing.Drawing2D.DashStyle.Dot;
         // center position
         int tmpY = gr.ChartYCenter + gr.RotationCenter.Y;
         int tmpX = gr.ChartXCenter + gr.RotationCenter.X;
         int tmpZ = (tChart1.Aspect.Width3D / 2) + gr.RotationCenter.Z;
         // draw axes
         Rectangle cr = tChart1.Chart.ChartRect;
         gr.HorizontalLine(cr.Left, cr.Right, tmpY, tmpZ);
         gr.VerticalLine(tmpX, cr.Top, cr.Bottom, tmpZ);
         gr.ZLine(tmpX, tmpY, 0, tChart1.Aspect.Width3D);
     }
 }
        private void movAvg_AfterDrawValues(object sender, Steema.TeeChart.Drawing.Graphics3D g)
        {
            Series series  = sender as Series;
            Chart  tChart2 = series.Chart;

            if ((tChart2.Series.Count > 2) && (sender == tChart2.Series[2]) && (tChart2.Series[2].Function is Steema.TeeChart.Functions.MovingAverage))
            {
                g.Font.Color = Color.White;
                g.Font.Size  = 16;
                Steema.TeeChart.Drawing.PointDouble point =
                    new Steema.TeeChart.Drawing.PointDouble(tChart2.Series[2].CalcXPos(3), tChart2.Series[2].CalcYPos(3));
                string seriesLabel = AppResources.DeltaAverage;
                double textWidth   = g.TextWidth(seriesLabel);
                double textHeight  = g.TextHeight(seriesLabel);
                g.Brush.Color        = Color.Black;
                g.Brush.Transparency = 40;
                g.Pen.Color          = tChart2.Series[2].Color;
                g.Pen.Width          = 2;
                g.Pen.Visible        = true;
                g.Rectangle(point.X - 4, point.Y, point.X + textWidth + 4, point.Y + textHeight + 4);
                g.TextAlign = TextAlignment.Start;
                g.TextOut(point.X, point.Y, seriesLabel);
            }
        }
Exemplo n.º 6
0
 void cGauge_BeforeDrawHand(object sender, Steema.TeeChart.Drawing.Graphics3D g)
 {
     DrawNGauge(g);
     DrawLGauge(g);
 }
 private void pieSeries4_BeforeDrawValues(object sender, Steema.TeeChart.Drawing.Graphics3D g)
 {
     this.tChart1.Chart.ChartRect = new Rectangle(this.tChart1.Width / 2, this.tChart1.Height / 2, this.tChart1.Width / 2 - 20, this.tChart1.Height / 2 - 20);
 }