Esempio n. 1
0
        private void tchartdisplay_2groups(string title, float[,] data, string[] ttt, int count)
        {
            int i;
            Color c;
            tChart1.Visible = true;
            label3.Visible = false;
            tChart1.Series.Clear();
            tChart1.Header.Text = title;
            tChart1.Legend.FontSeriesColor = true;
            tChart1.Legend.Visible = false;

            switch (comboBox5.SelectedIndex)
            {
                case 0:
                    Steema.TeeChart.Styles.Bar bar = new Steema.TeeChart.Styles.Bar();
                    for (i = 0; i < count; i++)
                    {
                        c = Color.FromArgb(global.r.Next(0, 256), global.r.Next(0, 256), global.r.Next(0, 256), global.r.Next(0, 256));
                        bar.Add(data[i,0], ttt[i]+"����", c);
                    }

                    Steema.TeeChart.Styles.Bar bar1 = new Steema.TeeChart.Styles.Bar();
                    for (i = 0; i < count; i++)
                    {
                        c = Color.FromArgb(global.r.Next(0, 256), global.r.Next(0, 256), global.r.Next(0, 256), global.r.Next(0, 256));
                        bar1.Add(data[i, 1], ttt[i] +"������", c);
                    }
                    tChart1.Series.Add(bar);
                    tChart1.Series.Add(bar1);
                    break;
                case 1:
                    Steema.TeeChart.Styles.Pie pie = new Steema.TeeChart.Styles.Pie();
                    for (i = 0; i < count; i++)
                    {
                        c = Color.FromArgb(global.r.Next(0, 256), global.r.Next(0, 256), global.r.Next(0, 256), global.r.Next(0, 256));
                        pie.Add(data[i,0], ttt[i]+"����", c);
                    }
                    Steema.TeeChart.Styles.Pie pie1 = new Steema.TeeChart.Styles.Pie();
                    for (i = 0; i < count; i++)
                    {
                        c = Color.FromArgb(global.r.Next(0, 256), global.r.Next(0, 256), global.r.Next(0, 256), global.r.Next(0, 256));
                        pie1.Add(data[i, 1], ttt[i] + "������", c);
                    }
                    tChart1.Series.Add(pie);
                    tChart1.Series.Add(pie1);
                    break;
                case 2:
                    Steema.TeeChart.Styles.Pyramid pi = new Steema.TeeChart.Styles.Pyramid();
                    for (i = 0; i < count; i++)
                    {
                        c = Color.FromArgb(global.r.Next(0, 256), global.r.Next(0, 256), global.r.Next(0, 256), global.r.Next(0, 256));
                        pi.Add(data[i,0], ttt[i]+"����", c);
                    }
                    Steema.TeeChart.Styles.Pyramid pi1 = new Steema.TeeChart.Styles.Pyramid();
                    for (i = 0; i < count; i++)
                    {
                        c = Color.FromArgb(global.r.Next(0, 256), global.r.Next(0, 256), global.r.Next(0, 256), global.r.Next(0, 256));
                        pi1.Add(data[i, 1], ttt[i]+"������", c);
                    }
                    tChart1.Series.Add(pi);
                    tChart1.Series.Add(pi1);
                    break;
                case 3:
                    Steema.TeeChart.Styles.Donut dt = new Steema.TeeChart.Styles.Donut();
                    for (i = 0; i < count; i++)
                    {
                        c = Color.FromArgb(global.r.Next(0, 256), global.r.Next(0, 256), global.r.Next(0, 256), global.r.Next(0, 256));
                        dt.Add(data[i,0], ttt[i]+"����", c);
                    }
                    Steema.TeeChart.Styles.Donut dt1 = new Steema.TeeChart.Styles.Donut();
                    for (i = 0; i < count; i++)
                    {
                        c = Color.FromArgb(global.r.Next(0, 256), global.r.Next(0, 256), global.r.Next(0, 256), global.r.Next(0, 256));
                        dt1.Add(data[i, 1], ttt[i]+"������", c);
                    }
                    tChart1.Series.Add(dt);
                    tChart1.Series.Add(dt1);
                    break;
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.pyramidSeries1 = new Steema.TeeChart.Styles.Pyramid();
     this.checkBox1      = new System.Windows.Forms.CheckBox();
     this.checkBox2      = new System.Windows.Forms.CheckBox();
     this.checkBox3      = new System.Windows.Forms.CheckBox();
     this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
     this.label1         = new System.Windows.Forms.Label();
     this.button1        = new System.Windows.Forms.Button();
     this.gridBand1      = new Steema.TeeChart.Tools.GridBand();
     this.panel1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
     this.SuspendLayout();
     //
     // textBox1
     //
     this.textBox1.Name = "textBox1";
     this.textBox1.Size = new System.Drawing.Size(496, 48);
     this.textBox1.Text = "The Pyramid series draws points stacked in a vertical pyramid shape. Border, patt" +
                          "ern, size and colors can be customized. It allows null (missing) points and can " +
                          "be also displayed inverted.";
     //
     // panel1
     //
     this.panel1.Controls.Add(this.button1);
     this.panel1.Controls.Add(this.label1);
     this.panel1.Controls.Add(this.numericUpDown1);
     this.panel1.Controls.Add(this.checkBox3);
     this.panel1.Controls.Add(this.checkBox2);
     this.panel1.Controls.Add(this.checkBox1);
     this.panel1.Location = new System.Drawing.Point(0, 48);
     this.panel1.Name     = "panel1";
     this.panel1.Size     = new System.Drawing.Size(496, 42);
     //
     // tChart1
     //
     //
     // tChart1.Aspect
     //
     this.tChart1.Aspect.SmoothingMode     = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
     this.tChart1.Aspect.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
     //
     // tChart1.Header
     //
     this.tChart1.Header.Lines = new string[] {
         "Pyramid series"
     };
     this.tChart1.Location = new System.Drawing.Point(0, 90);
     this.tChart1.Name     = "tChart1";
     //
     // tChart1.Panel
     //
     //
     // tChart1.Panel.Brush
     //
     this.tChart1.Panel.Brush.Color = System.Drawing.Color.FromArgb(((System.Byte)(254)), ((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(255)));
     this.tChart1.Series.Add(this.pyramidSeries1);
     this.tChart1.Size = new System.Drawing.Size(496, 259);
     this.tChart1.Tools.Add(this.gridBand1);
     //
     // tChart1.Walls
     //
     //
     // tChart1.Walls.Bottom
     //
     //
     // tChart1.Walls.Bottom.Pen
     //
     this.tChart1.Walls.Bottom.Pen.Visible = false;
     this.tChart1.Walls.Bottom.Size        = 5;
     //
     // tChart1.Walls.Left
     //
     //
     // tChart1.Walls.Left.Pen
     //
     this.tChart1.Walls.Left.Pen.Visible = false;
     this.tChart1.Walls.Left.Size        = 5;
     //
     // pyramidSeries1
     //
     //
     // pyramidSeries1.Brush
     //
     this.pyramidSeries1.Brush.Color = System.Drawing.Color.Red;
     this.pyramidSeries1.ColorEach   = true;
     //
     // pyramidSeries1.Marks
     //
     //
     // pyramidSeries1.Marks.Symbol
     //
     //
     // pyramidSeries1.Marks.Symbol.Shadow
     //
     this.pyramidSeries1.Marks.Symbol.Shadow.Height  = 1;
     this.pyramidSeries1.Marks.Symbol.Shadow.Visible = true;
     this.pyramidSeries1.Marks.Symbol.Shadow.Width   = 1;
     this.pyramidSeries1.Title = "pyramid1";
     //
     // pyramidSeries1.XValues
     //
     this.pyramidSeries1.XValues.DataMember = "X";
     this.pyramidSeries1.XValues.Order      = Steema.TeeChart.Styles.ValueListOrder.Ascending;
     //
     // pyramidSeries1.YValues
     //
     this.pyramidSeries1.YValues.DataMember = "Y";
     //
     // checkBox1
     //
     this.checkBox1.Checked         = true;
     this.checkBox1.CheckState      = System.Windows.Forms.CheckState.Checked;
     this.checkBox1.FlatStyle       = System.Windows.Forms.FlatStyle.Flat;
     this.checkBox1.Location        = new System.Drawing.Point(17, 5);
     this.checkBox1.Name            = "checkBox1";
     this.checkBox1.Size            = new System.Drawing.Size(95, 24);
     this.checkBox1.TabIndex        = 0;
     this.checkBox1.Text            = "&Color each";
     this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
     //
     // checkBox2
     //
     this.checkBox2.FlatStyle       = System.Windows.Forms.FlatStyle.Flat;
     this.checkBox2.Location        = new System.Drawing.Point(119, 5);
     this.checkBox2.Name            = "checkBox2";
     this.checkBox2.Size            = new System.Drawing.Size(81, 24);
     this.checkBox2.TabIndex        = 1;
     this.checkBox2.Text            = "&Inverted";
     this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged);
     //
     // checkBox3
     //
     this.checkBox3.FlatStyle       = System.Windows.Forms.FlatStyle.Flat;
     this.checkBox3.Location        = new System.Drawing.Point(205, 5);
     this.checkBox3.Name            = "checkBox3";
     this.checkBox3.Size            = new System.Drawing.Size(99, 24);
     this.checkBox3.TabIndex        = 2;
     this.checkBox3.Text            = "&Null points ?";
     this.checkBox3.CheckedChanged += new System.EventHandler(this.checkBox3_CheckedChanged);
     //
     // numericUpDown1
     //
     this.numericUpDown1.Location  = new System.Drawing.Point(344, 8);
     this.numericUpDown1.Name      = "numericUpDown1";
     this.numericUpDown1.Size      = new System.Drawing.Size(51, 20);
     this.numericUpDown1.TabIndex  = 3;
     this.numericUpDown1.TabStop   = false;
     this.numericUpDown1.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
     this.numericUpDown1.Value     = new System.Decimal(new int[] {
         50,
         0,
         0,
         0
     });
     this.numericUpDown1.TextChanged  += new System.EventHandler(this.numericUpDown1_ValueChanged);
     this.numericUpDown1.ValueChanged += new System.EventHandler(this.numericUpDown1_ValueChanged);
     //
     // label1
     //
     this.label1.AutoSize  = true;
     this.label1.Location  = new System.Drawing.Point(304, 10);
     this.label1.Name      = "label1";
     this.label1.Size      = new System.Drawing.Size(39, 16);
     this.label1.TabIndex  = 4;
     this.label1.Text      = "&Size %";
     this.label1.TextAlign = System.Drawing.ContentAlignment.TopRight;
     //
     // button1
     //
     this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
     this.button1.Location  = new System.Drawing.Point(408, 8);
     this.button1.Name      = "button1";
     this.button1.TabIndex  = 5;
     this.button1.Text      = "&Edit...";
     this.button1.Click    += new System.EventHandler(this.button1_Click);
     //
     // gridBand1
     //
     this.gridBand1.Axis = this.tChart1.Axes.Left;
     //
     // gridBand1.Band1
     //
     this.gridBand1.Band1.Color = System.Drawing.Color.FromArgb(((System.Byte)(127)), ((System.Byte)(128)), ((System.Byte)(128)), ((System.Byte)(128)));
     //
     // gridBand1.Band2
     //
     this.gridBand1.Band2.Color = System.Drawing.Color.FromArgb(((System.Byte)(127)), ((System.Byte)(224)), ((System.Byte)(224)), ((System.Byte)(224)));
     //
     // SeriesType_Pyramid
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(496, 349);
     this.Name = "SeriesType_Pyramid";
     this.panel1.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
     this.ResumeLayout(false);
 }