Пример #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     mystyle++;
     tChart1.Series.Clear();
     switch (mystyle)
     {
         case 1:
             Steema.TeeChart.Styles.Area area = new Steema.TeeChart.Styles.Area();
             area.Add(data);
             tChart1.Series.Add(area);
             break;
         case 2:
             Steema.TeeChart.Styles.Arrow arrow= new Steema.TeeChart.Styles.Arrow();
             arrow.Add(data);
             tChart1.Series.Add(arrow);
             break;
         case 3:
             Steema.TeeChart.Styles.Bar Bar = new Steema.TeeChart.Styles.Bar();
             Bar.Add(data);
             tChart1.Series.Add(Bar);
             break;
         case 4:
             Steema.TeeChart.Styles.Bar3D Bar3D = new Steema.TeeChart.Styles.Bar3D();
             Bar3D.Add(data);
             tChart1.Series.Add(Bar3D);
             break;
         case 5:
             Steema.TeeChart.Styles.BarJoin BarJoin = new Steema.TeeChart.Styles.BarJoin();
             BarJoin.Add(data);
             tChart1.Series.Add(BarJoin);
             break;
         case 6:
             Steema.TeeChart.Styles.Bezier Bezier = new Steema.TeeChart.Styles.Bezier();
             Bezier.Add(data);
             tChart1.Series.Add(Bezier);
             break;
     }
     if (mystyle > 10)
         mystyle = 0;
 }
Пример #2
0
 /// <summary>
 /// 趋势分析
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnFenxi_Click(object sender, EventArgs e)
 {
     tChart1.Series.Clear();
     for (int i = 0; i < chkItemList.CheckedItems.Count; i++)
     {
         Steema.TeeChart.Styles.Bezier templ = new Steema.TeeChart.Styles.Bezier();
         templ.Marks.Visible = true;
         templ.Marks.Style   = 0;
         tChart1.Series.Add(templ);
         ChkItem tempitem = (ChkItem)chkItemList.CheckedItems[i];
         templ.Title = tempitem.Mc;
         DataRow[] temprows = dsItes.Tables[0].Select("xmdm='" + tempitem.Dm + "'");
         for (int j = 0; j < temprows.Length; j++)
         {
             if (App.IsNumeric(temprows[j]["xmjg"].ToString()))
             {
                 tChart1.Series[tChart1.Series.Count - 1].Add(Convert.ToSingle(temprows[j]["xmjg"]), temprows[j]["cssj"].ToString());
                 //tChart1.Series[tChart1.Series.Count - 1].Marks = temprows[j]["xmjg"].ToString();
             }
         }
     }
 }
Пример #3
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SeriesType_Bezier));
     this.bezierSeries1 = new Steema.TeeChart.Styles.Bezier();
     this.button1       = new System.Windows.Forms.Button();
     this.gridBand1     = new Steema.TeeChart.Tools.GridBand();
     this.panel1.SuspendLayout();
     this.chartContainer.SuspendLayout();
     this.SuspendLayout();
     //
     // textBox1
     //
     this.textBox1.Size = new System.Drawing.Size(466, 63);
     this.textBox1.Text = resources.GetString("textBox1.Text");
     //
     // panel1
     //
     this.panel1.Controls.Add(this.button1);
     this.panel1.Location = new System.Drawing.Point(0, 63);
     this.panel1.Size     = new System.Drawing.Size(466, 34);
     //
     // tChart1
     //
     //
     //
     //
     this.tChart1.Aspect.SmoothingMode     = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
     this.tChart1.Aspect.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
     //
     //
     //
     //
     //
     //
     //
     //
     //
     this.tChart1.Axes.Bottom.AxisPen.Visible = false;
     //
     //
     //
     this.tChart1.Axes.Bottom.Grid.Visible = false;
     //
     //
     //
     this.tChart1.Axes.Bottom.MinorTicks.Visible = false;
     //
     //
     //
     this.tChart1.Axes.Bottom.Ticks.Visible = false;
     //
     //
     //
     //
     //
     //
     this.tChart1.Axes.Left.AxisPen.Visible = false;
     //
     //
     //
     this.tChart1.Axes.Left.Grid.Visible = false;
     //
     //
     //
     this.tChart1.Axes.Left.MinorTicks.Visible = false;
     //
     //
     //
     this.tChart1.Axes.Left.Ticks.Visible = false;
     this.tChart1.BackColor = System.Drawing.Color.Transparent;
     //
     //
     //
     this.tChart1.Header.Lines = new string[] {
         "Bezier curves"
     };
     //
     //
     //
     //
     //
     //
     this.tChart1.Panel.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(254)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
     //
     //
     //
     this.tChart1.Panel.Brush.Gradient.Angle       = 275;
     this.tChart1.Panel.Brush.Gradient.Direction   = System.Drawing.Drawing2D.LinearGradientMode.BackwardDiagonal;
     this.tChart1.Panel.Brush.Gradient.EndColor    = System.Drawing.Color.FromArgb(((int)(((byte)(254)))), ((int)(((byte)(21)))), ((int)(((byte)(60)))), ((int)(((byte)(89)))));
     this.tChart1.Panel.Brush.Gradient.MiddleColor = System.Drawing.Color.FromArgb(((int)(((byte)(254)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
     this.tChart1.Panel.Brush.Gradient.Sigma       = true;
     this.tChart1.Panel.Brush.Gradient.SigmaFocus  = 1F;
     this.tChart1.Panel.Brush.Gradient.SigmaScale  = 0.8F;
     this.tChart1.Panel.Brush.Gradient.StartColor  = System.Drawing.Color.FromArgb(((int)(((byte)(254)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
     this.tChart1.Panel.Brush.Gradient.UseMiddle   = true;
     this.tChart1.Panel.Brush.Gradient.Visible     = true;
     this.tChart1.Series.Add(this.bezierSeries1);
     this.tChart1.Size = new System.Drawing.Size(466, 189);
     this.tChart1.Tools.Add(this.gridBand1);
     //
     //
     //
     //
     //
     //
     //
     //
     //
     this.tChart1.Walls.Bottom.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
     this.tChart1.Walls.Bottom.Size        = 3;
     //
     //
     //
     //
     //
     //
     this.tChart1.Walls.Left.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
     this.tChart1.Walls.Left.Size        = 3;
     //
     // chartContainer
     //
     this.chartContainer.Location = new System.Drawing.Point(0, 97);
     this.chartContainer.Size     = new System.Drawing.Size(466, 189);
     //
     // bezierSeries1
     //
     //
     //
     //
     this.bezierSeries1.ColorEach = true;
     //
     //
     //
     this.bezierSeries1.LinePen.Color = System.Drawing.Color.Red;
     //
     //
     //
     //
     //
     //
     this.bezierSeries1.Marks.Callout.ArrowHead     = Steema.TeeChart.Styles.ArrowHeadStyles.None;
     this.bezierSeries1.Marks.Callout.ArrowHeadSize = 8;
     //
     //
     //
     this.bezierSeries1.Marks.Callout.Brush.Color = System.Drawing.Color.Black;
     this.bezierSeries1.Marks.Callout.Distance    = 0;
     this.bezierSeries1.Marks.Callout.Draw3D      = false;
     this.bezierSeries1.Marks.Callout.Length      = 10;
     this.bezierSeries1.Marks.Callout.Style       = Steema.TeeChart.Styles.PointerStyles.Rectangle;
     //
     //
     //
     //
     //
     //
     this.bezierSeries1.Pointer.Style   = Steema.TeeChart.Styles.PointerStyles.Rectangle;
     this.bezierSeries1.Pointer.Visible = true;
     this.bezierSeries1.Title           = "bezierSeries1";
     //
     //
     //
     this.bezierSeries1.XValues.DataMember = "X";
     this.bezierSeries1.XValues.Order      = Steema.TeeChart.Styles.ValueListOrder.Ascending;
     //
     //
     //
     this.bezierSeries1.YValues.DataMember = "Y";
     //
     // button1
     //
     this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
     this.button1.Location  = new System.Drawing.Point(12, 5);
     this.button1.Name      = "button1";
     this.button1.Size      = new System.Drawing.Size(75, 23);
     this.button1.TabIndex  = 4;
     this.button1.Text      = "&Edit...";
     this.button1.Click    += new System.EventHandler(this.button1_Click);
     //
     // gridBand1
     //
     this.gridBand1.Axis = this.tChart1.Axes.Left;
     //
     //
     //
     this.gridBand1.Band1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(178)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
     //
     //
     //
     this.gridBand1.Band2.Color   = System.Drawing.Color.FromArgb(((int)(((byte)(178)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
     this.gridBand1.Band2.Visible = false;
     //
     // SeriesType_Bezier
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(466, 286);
     this.Name = "SeriesType_Bezier";
     this.panel1.ResumeLayout(false);
     this.chartContainer.ResumeLayout(false);
     this.ResumeLayout(false);
     this.PerformLayout();
 }