public static void DrawArrow(ArrowPoint point, Color color, TChart chart) { Steema.TeeChart.Styles.Arrow Tmparrow = new Steema.TeeChart.Styles.Arrow(chart.Chart); Tmparrow.Add(point.xs, point.ys); Tmparrow.EndXValues[0] = point.xd; Tmparrow.EndYValues[0] = point.yd; Tmparrow.Color = color; }
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; }
/// <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(Export_JPEG)); this.arrowSeries1 = new Steema.TeeChart.Styles.Arrow(); this.button1 = new System.Windows.Forms.Button(); this.button2 = new System.Windows.Forms.Button(); this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog(); this.gridBand1 = new Steema.TeeChart.Tools.GridBand(); this.checkBox1 = new System.Windows.Forms.CheckBox(); this.panel1.SuspendLayout(); this.chartContainer.SuspendLayout(); this.SuspendLayout(); // // textBox1 // this.textBox1.Size = new System.Drawing.Size(466, 32); this.textBox1.Text = "Exporting to JPEG graphic format is available using the Export Dialog or by code " + "at run-time."; // // panel1 // this.panel1.Controls.Add(this.checkBox1); this.panel1.Controls.Add(this.button2); this.panel1.Controls.Add(this.button1); this.panel1.Location = new System.Drawing.Point(0, 32); this.panel1.Size = new System.Drawing.Size(466, 41); // // tChart1 // // // // this.tChart1.Aspect.ZOffset = 0; // // // // // // // // // this.tChart1.Axes.Bottom.Grid.Visible = false; // // // // // // this.tChart1.Axes.Left.Grid.Visible = false; // // // this.tChart1.Axes.Right.Visible = false; this.tChart1.Cursor = System.Windows.Forms.Cursors.Default; // // // this.tChart1.Header.Lines = new string[] { "tChart1" }; this.tChart1.Header.Visible = false; // // // // // // this.tChart1.Legend.Bevel.ColorOne = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); // // // this.tChart1.Legend.Brush.Visible = false; // // // this.tChart1.Legend.Pen.Transparency = 1; this.tChart1.Legend.Pen.Visible = false; // // // this.tChart1.Legend.Shadow.Height = 1; this.tChart1.Legend.Shadow.Visible = false; this.tChart1.Legend.Shadow.Width = 1; // // // // // // #if VS2005 this.tChart1.Legend.Symbol.Shadow.Smooth = true; #endif this.tChart1.Legend.Symbol.Squared = true; this.tChart1.Legend.TextSymbolGap = 4; // // // // // // this.tChart1.Panel.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(254)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); this.tChart1.Series.Add(this.arrowSeries1); this.tChart1.Size = new System.Drawing.Size(466, 213); this.tChart1.Tools.Add(this.gridBand1); // // // // // // // // // this.tChart1.Walls.Back.Pen.Visible = false; this.tChart1.Walls.Back.Visible = false; // // // // // // this.tChart1.Walls.Bottom.Pen.Visible = false; this.tChart1.Walls.Bottom.Size = 5; // // // // // // this.tChart1.Walls.Left.Pen.Visible = false; this.tChart1.Walls.Left.Size = 5; // // chartContainer // this.chartContainer.Location = new System.Drawing.Point(0, 73); this.chartContainer.Size = new System.Drawing.Size(466, 213); // // arrowSeries1 // this.arrowSeries1.Color = System.Drawing.Color.Red; this.arrowSeries1.ColorEach = true; this.arrowSeries1.LabelMember = "Labels"; // // // // // // this.arrowSeries1.Marks.Callout.ArrowHead = Steema.TeeChart.Styles.ArrowHeadStyles.None; this.arrowSeries1.Marks.Callout.ArrowHeadSize = 8; // // // this.arrowSeries1.Marks.Callout.Brush.Color = System.Drawing.Color.Black; this.arrowSeries1.Marks.Callout.Distance = 0; this.arrowSeries1.Marks.Callout.Draw3D = false; this.arrowSeries1.Marks.Callout.Length = 0; this.arrowSeries1.Marks.Callout.Style = Steema.TeeChart.Styles.PointerStyles.Rectangle; this.arrowSeries1.Marks.Callout.Visible = false; // // // this.arrowSeries1.Marks.Pen.Visible = false; this.arrowSeries1.Marks.Transparent = true; // // // // // // this.arrowSeries1.Pointer.Brush.Color = System.Drawing.Color.Red; this.arrowSeries1.Pointer.Brush.ForegroundColor = System.Drawing.Color.Empty; this.arrowSeries1.Pointer.InflateMargins = false; // // // this.arrowSeries1.Pointer.Pen.Transparency = 1; this.arrowSeries1.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Rectangle; this.arrowSeries1.StartXValues = this.arrowSeries1.XValues; this.arrowSeries1.StartYValues = this.arrowSeries1.YValues; this.arrowSeries1.Title = "arrowSeries1"; // // // this.arrowSeries1.XValues.DataMember = "X"; this.arrowSeries1.XValues.Order = Steema.TeeChart.Styles.ValueListOrder.Ascending; // // // this.arrowSeries1.YValues.DataMember = "Y"; // // button1 // this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.button1.Location = new System.Drawing.Point(8, 8); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(107, 23); this.button1.TabIndex = 0; this.button1.Text = "Save to &JPEG..."; this.button1.Click += new System.EventHandler(this.button1_Click); // // button2 // this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.button2.Location = new System.Drawing.Point(127, 8); this.button2.Name = "button2"; this.button2.Size = new System.Drawing.Size(137, 23); this.button2.TabIndex = 1; this.button2.Text = "Show &export dialog..."; this.button2.Click += new System.EventHandler(this.button2_Click); // // saveFileDialog1 // this.saveFileDialog1.FileName = "doc1"; this.saveFileDialog1.Title = "Save Image (JPEG)"; // // gridBand1 // this.gridBand1.Axis = this.tChart1.Axes.Left; // // // this.gridBand1.Band1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(38)))), ((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(0))))); // // // this.gridBand1.Band2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(140)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); // // checkBox1 // #if VS2005 this.checkBox1.AutoSize = true; this.checkBox1.UseVisualStyleBackColor = true; #endif this.checkBox1.Location = new System.Drawing.Point(304, 14); this.checkBox1.Name = "checkBox1"; this.checkBox1.Size = new System.Drawing.Size(106, 17); this.checkBox1.TabIndex = 2; this.checkBox1.Text = "Save Grey Scale"; // // Export_JPEG // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(466, 286); this.Name = "Export_JPEG"; this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); this.chartContainer.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.checkBox1 = new System.Windows.Forms.CheckBox(); this.checkBox2 = new System.Windows.Forms.CheckBox(); this.checkBox3 = new System.Windows.Forms.CheckBox(); this.timer1 = new System.Windows.Forms.Timer(this.components); this.arrowSeries1 = new Steema.TeeChart.Styles.Arrow(); this.gridBand1 = new Steema.TeeChart.Tools.GridBand(); this.panel1.SuspendLayout(); this.SuspendLayout(); // // textBox1 // this.textBox1.Name = "textBox1"; this.textBox1.Size = new System.Drawing.Size(466, 63); this.textBox1.Text = "Each Arrow is represented as a point with Starting and Ending coordinates. This " + "demo changes arrow positions randomly."; // // panel1 // 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, 63); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(466, 33); // // tChart1 // // // tChart1.Aspect // this.tChart1.Aspect.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality; this.tChart1.Aspect.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit; // // tChart1.Header // // // tChart1.Header.Font // // // tChart1.Header.Font.Brush // this.tChart1.Header.Font.Brush.Color = System.Drawing.Color.FromArgb(((System.Byte)(254)), ((System.Byte)(64)), ((System.Byte)(64)), ((System.Byte)(0))); this.tChart1.Header.Lines = new string[] { "tChart1" }; // // tChart1.Legend // this.tChart1.Legend.Visible = false; this.tChart1.Location = new System.Drawing.Point(0, 96); 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.arrowSeries1); this.tChart1.Size = new System.Drawing.Size(466, 190); this.tChart1.Tools.Add(this.gridBand1); // // tChart1.Walls // // // tChart1.Walls.Back // this.tChart1.Walls.Back.Visible = false; // // tChart1.Walls.Bottom // this.tChart1.Walls.Bottom.Size = 5; // // tChart1.Walls.Left // this.tChart1.Walls.Left.Size = 5; // // 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(16, 8); this.checkBox1.Name = "checkBox1"; this.checkBox1.Size = new System.Drawing.Size(91, 21); 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(112, 8); this.checkBox2.Name = "checkBox2"; this.checkBox2.Size = new System.Drawing.Size(66, 21); this.checkBox2.TabIndex = 1; this.checkBox2.Text = "&Animate"; this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged); // // checkBox3 // this.checkBox3.Checked = true; this.checkBox3.CheckState = System.Windows.Forms.CheckState.Checked; this.checkBox3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.checkBox3.Location = new System.Drawing.Point(184, 8); this.checkBox3.Name = "checkBox3"; this.checkBox3.Size = new System.Drawing.Size(40, 21); this.checkBox3.TabIndex = 2; this.checkBox3.Text = "&3D"; this.checkBox3.CheckedChanged += new System.EventHandler(this.checkBox3_CheckedChanged); // // timer1 // this.timer1.Interval = 50; this.timer1.Tick += new System.EventHandler(this.timer1_Tick); // // arrowSeries1 // this.arrowSeries1.HorizAxis = Steema.TeeChart.Styles.HorizontalAxis.Both; this.arrowSeries1.LabelMember = "Labels"; // // arrowSeries1.Marks // // // arrowSeries1.Marks.Pen // this.arrowSeries1.Marks.Pen.Visible = false; // // arrowSeries1.Marks.Symbol // // // arrowSeries1.Marks.Symbol.Shadow // this.arrowSeries1.Marks.Symbol.Shadow.Height = 1; this.arrowSeries1.Marks.Symbol.Shadow.Visible = true; this.arrowSeries1.Marks.Symbol.Shadow.Width = 1; this.arrowSeries1.Marks.Transparent = true; // // arrowSeries1.Pointer // // // arrowSeries1.Pointer.Brush // this.arrowSeries1.Pointer.Brush.Color = System.Drawing.Color.Red; this.arrowSeries1.Pointer.InflateMargins = false; // // arrowSeries1.Pointer.Pen // this.arrowSeries1.Pointer.Pen.Color = System.Drawing.Color.FromArgb(((System.Byte)(254)), ((System.Byte)(64)), ((System.Byte)(0)), ((System.Byte)(0))); this.arrowSeries1.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Rectangle; this.arrowSeries1.StartXValues = this.arrowSeries1.XValues; this.arrowSeries1.StartYValues = this.arrowSeries1.YValues; this.arrowSeries1.Title = "arrow1"; this.arrowSeries1.VertAxis = Steema.TeeChart.Styles.VerticalAxis.Both; // // arrowSeries1.XValues // this.arrowSeries1.XValues.DataMember = "X"; this.arrowSeries1.XValues.Order = Steema.TeeChart.Styles.ValueListOrder.Ascending; // // arrowSeries1.YValues // this.arrowSeries1.YValues.DataMember = "Y"; // // gridBand1 // this.gridBand1.Axis = this.tChart1.Axes.Left; // // gridBand1.Band1 // this.gridBand1.Band1.Color = System.Drawing.Color.FromArgb(((System.Byte)(102)), ((System.Byte)(192)), ((System.Byte)(192)), ((System.Byte)(255))); // // gridBand1.Band2 // this.gridBand1.Band2.Color = System.Drawing.Color.FromArgb(((System.Byte)(25)), ((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(255))); // // SeriesType_Arrow // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(466, 286); this.Name = "SeriesType_Arrow"; this.panel1.ResumeLayout(false); this.ResumeLayout(false); }