public CrossPointsProFunctionsChart(ChartView BaseChart) { line1 = new Line(); line2 = new Line(); crossPoints = new Steema.TeeChart.Functions.CrossPoints(); crossLine = new Line(); var = new Variables.Variables(); BaseChart.Chart.Title.Text = "Cross Point"; BaseChart.Chart.Axes.Left.Increment = 0.2; for (double x = -5; x < 5; x += 0.2) { line1.Add(x, Math.Sin(Math.PI / 2 * x)); line2.Add(x, Math.Sin(Math.PI / 6 * x) - 0.25); } line1.Title = "Wave 1"; line1.Color = var.GetPaletteBasic[0]; line1.LinePen.Width = 3; line2.Title = "Wave 2"; line2.Color = var.GetPaletteBasic[1]; line2.LinePen.Width = 3; crossLine.Title = "CrossPoints"; crossLine.Color = var.GetPaletteBasic[2]; crossLine.LinePen.Width = 3; crossLine.ColorEach = false; crossLine.DataSource = new object[] { line1, line2 }; crossLine.Function = crossPoints; crossLine.Pointer.Visible = true; BaseChart.Chart.Axes.Left.Automatic = true; BaseChart.Chart.Axes.Bottom.Automatic = true; BaseChart.Chart.Axes.Left.Ticks.Transparency = 100; BaseChart.Chart.Axes.Left.Increment = 0.2; BaseChart.Chart.Series.Add(line1); BaseChart.Chart.Series.Add(line2); BaseChart.Chart.Series.Add(crossLine); }
/// <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(Function_CrossPoints)); this.line1 = new Steema.TeeChart.Styles.Line(); this.line2 = new Steema.TeeChart.Styles.Line(); this.crossPoints1 = new Steema.TeeChart.Functions.CrossPoints(); this.line3 = new Steema.TeeChart.Styles.Line(); this.checkBox1 = new System.Windows.Forms.CheckBox(); this.panel1.SuspendLayout(); this.chartContainer.SuspendLayout(); this.SuspendLayout(); // // textBox1 // this.textBox1.Size = new System.Drawing.Size(480, 63); this.textBox1.Text = "CrossPoints function calculates coordinates for crossing points of source line se" + "ries. The yellow line series shows points where line1 and line2 cross."; // // panel1 // this.panel1.Controls.Add(this.checkBox1); this.panel1.Location = new System.Drawing.Point(0, 63); this.panel1.Size = new System.Drawing.Size(480, 33); // // tChart1 // // // // this.tChart1.Aspect.View3D = false; this.tChart1.Aspect.ZOffset = 0; // // // // // // // // // this.tChart1.Axes.Bottom.AxisPen.Color = System.Drawing.Color.FromArgb(((int)(((byte)(130)))), ((int)(((byte)(130)))), ((int)(((byte)(130))))); // // // this.tChart1.Axes.Bottom.Grid.Color = System.Drawing.Color.FromArgb(((int)(((byte)(130)))), ((int)(((byte)(130)))), ((int)(((byte)(130))))); this.tChart1.Axes.Bottom.Grid.Style = System.Drawing.Drawing2D.DashStyle.Solid; // // // // // // // // // this.tChart1.Axes.Bottom.MaximumOffset = 3; this.tChart1.Axes.Bottom.MinimumOffset = 3; // // // this.tChart1.Axes.Bottom.MinorTicks.Visible = false; // // // this.tChart1.Axes.Bottom.Ticks.Color = System.Drawing.Color.FromArgb(((int)(((byte)(130)))), ((int)(((byte)(130)))), ((int)(((byte)(130))))); // // // this.tChart1.Axes.Bottom.TicksInner.Visible = true; // // // // // // this.tChart1.Axes.Depth.AxisPen.Color = System.Drawing.Color.FromArgb(((int)(((byte)(130)))), ((int)(((byte)(130)))), ((int)(((byte)(130))))); // // // this.tChart1.Axes.Depth.Grid.Color = System.Drawing.Color.FromArgb(((int)(((byte)(130)))), ((int)(((byte)(130)))), ((int)(((byte)(130))))); this.tChart1.Axes.Depth.Grid.Style = System.Drawing.Drawing2D.DashStyle.Solid; // // // // // // // // // // // this.tChart1.Axes.Depth.MinorTicks.Visible = false; // // // this.tChart1.Axes.Depth.Ticks.Color = System.Drawing.Color.FromArgb(((int)(((byte)(130)))), ((int)(((byte)(130)))), ((int)(((byte)(130))))); // // // this.tChart1.Axes.Depth.TicksInner.Visible = true; // // // // // // this.tChart1.Axes.DepthTop.AxisPen.Color = System.Drawing.Color.FromArgb(((int)(((byte)(130)))), ((int)(((byte)(130)))), ((int)(((byte)(130))))); // // // this.tChart1.Axes.DepthTop.Grid.Color = System.Drawing.Color.FromArgb(((int)(((byte)(130)))), ((int)(((byte)(130)))), ((int)(((byte)(130))))); this.tChart1.Axes.DepthTop.Grid.Style = System.Drawing.Drawing2D.DashStyle.Solid; // // // // // // // // // // // this.tChart1.Axes.DepthTop.MinorTicks.Visible = false; // // // this.tChart1.Axes.DepthTop.Ticks.Color = System.Drawing.Color.FromArgb(((int)(((byte)(130)))), ((int)(((byte)(130)))), ((int)(((byte)(130))))); // // // this.tChart1.Axes.DepthTop.TicksInner.Visible = true; // // // // // // this.tChart1.Axes.Left.AxisPen.Color = System.Drawing.Color.FromArgb(((int)(((byte)(130)))), ((int)(((byte)(130)))), ((int)(((byte)(130))))); // // // this.tChart1.Axes.Left.Grid.Color = System.Drawing.Color.FromArgb(((int)(((byte)(130)))), ((int)(((byte)(130)))), ((int)(((byte)(130))))); this.tChart1.Axes.Left.Grid.Style = System.Drawing.Drawing2D.DashStyle.Solid; // // // // // // // // // this.tChart1.Axes.Left.MaximumOffset = 3; this.tChart1.Axes.Left.MinimumOffset = 3; // // // this.tChart1.Axes.Left.MinorTicks.Visible = false; // // // this.tChart1.Axes.Left.Ticks.Color = System.Drawing.Color.FromArgb(((int)(((byte)(130)))), ((int)(((byte)(130)))), ((int)(((byte)(130))))); // // // this.tChart1.Axes.Left.TicksInner.Visible = true; // // // // // // this.tChart1.Axes.Right.AxisPen.Color = System.Drawing.Color.FromArgb(((int)(((byte)(130)))), ((int)(((byte)(130)))), ((int)(((byte)(130))))); // // // this.tChart1.Axes.Right.Grid.Color = System.Drawing.Color.FromArgb(((int)(((byte)(130)))), ((int)(((byte)(130)))), ((int)(((byte)(130))))); this.tChart1.Axes.Right.Grid.Style = System.Drawing.Drawing2D.DashStyle.Solid; // // // // // // // // // // // this.tChart1.Axes.Right.MinorTicks.Visible = false; // // // this.tChart1.Axes.Right.Ticks.Color = System.Drawing.Color.FromArgb(((int)(((byte)(130)))), ((int)(((byte)(130)))), ((int)(((byte)(130))))); // // // this.tChart1.Axes.Right.TicksInner.Visible = true; // // // // // // this.tChart1.Axes.Top.AxisPen.Color = System.Drawing.Color.FromArgb(((int)(((byte)(130)))), ((int)(((byte)(130)))), ((int)(((byte)(130))))); // // // this.tChart1.Axes.Top.Grid.Color = System.Drawing.Color.FromArgb(((int)(((byte)(130)))), ((int)(((byte)(130)))), ((int)(((byte)(130))))); this.tChart1.Axes.Top.Grid.Style = System.Drawing.Drawing2D.DashStyle.Solid; // // // // // // // // // // this.tChart1.Axes.Top.MinorTicks.Visible = false; // // // this.tChart1.Axes.Top.Ticks.Color = System.Drawing.Color.FromArgb(((int)(((byte)(130)))), ((int)(((byte)(130)))), ((int)(((byte)(130))))); // // // this.tChart1.Axes.Top.TicksInner.Visible = true; // // // // // // // // // this.tChart1.Header.Brush.Gradient.EndColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(0))))); this.tChart1.Header.Brush.Gradient.MiddleColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); this.tChart1.Header.Brush.Gradient.SigmaFocus = 0F; this.tChart1.Header.Brush.Gradient.SigmaScale = 0F; this.tChart1.Header.Brush.Gradient.StartColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); // // // // // // this.tChart1.Header.Font.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); this.tChart1.Header.Lines = new string[] { "tChart1" }; // // // // // // // // // this.tChart1.Legend.Brush.Gradient.EndColor = System.Drawing.Color.FromArgb(((int)(((byte)(120)))), ((int)(((byte)(120)))), ((int)(((byte)(120))))); this.tChart1.Legend.Brush.Gradient.MiddleColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); this.tChart1.Legend.Brush.Gradient.SigmaFocus = 0F; this.tChart1.Legend.Brush.Gradient.SigmaScale = 0F; this.tChart1.Legend.Brush.Gradient.StartColor = System.Drawing.Color.FromArgb(((int)(((byte)(70)))), ((int)(((byte)(70)))), ((int)(((byte)(70))))); this.tChart1.Legend.Brush.Gradient.Visible = true; // // // // // // this.tChart1.Legend.Font.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); // // // this.tChart1.Legend.Pen.Visible = false; // // // // // // this.tChart1.Panel.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240))))); // // // this.tChart1.Panel.Brush.Gradient.EndColor = System.Drawing.Color.FromArgb(((int)(((byte)(70)))), ((int)(((byte)(70)))), ((int)(((byte)(70))))); this.tChart1.Panel.Brush.Gradient.MiddleColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); this.tChart1.Panel.Brush.Gradient.SigmaFocus = 0F; this.tChart1.Panel.Brush.Gradient.SigmaScale = 0F; this.tChart1.Panel.Brush.Gradient.StartColor = System.Drawing.Color.FromArgb(((int)(((byte)(70)))), ((int)(((byte)(70)))), ((int)(((byte)(70))))); this.tChart1.Panel.Brush.Gradient.UseMiddle = false; this.tChart1.Series.Add(this.line1); this.tChart1.Series.Add(this.line2); this.tChart1.Series.Add(this.line3); this.tChart1.Size = new System.Drawing.Size(480, 197); // // // // // // // // // // // // this.tChart1.Walls.Back.Brush.Gradient.EndColor = System.Drawing.Color.FromArgb(((int)(((byte)(120)))), ((int)(((byte)(120)))), ((int)(((byte)(120))))); this.tChart1.Walls.Back.Brush.Gradient.MiddleColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); this.tChart1.Walls.Back.Brush.Gradient.StartColor = System.Drawing.Color.FromArgb(((int)(((byte)(70)))), ((int)(((byte)(70)))), ((int)(((byte)(70))))); // // // this.tChart1.Walls.Back.Pen.Visible = false; // // // // // // // // // this.tChart1.Walls.Bottom.Brush.Gradient.EndColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(0))))); this.tChart1.Walls.Bottom.Brush.Gradient.MiddleColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); this.tChart1.Walls.Bottom.Brush.Gradient.SigmaFocus = 0F; this.tChart1.Walls.Bottom.Brush.Gradient.SigmaScale = 0F; this.tChart1.Walls.Bottom.Brush.Gradient.StartColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); // // // this.tChart1.Walls.Bottom.Pen.Visible = false; // // // // // // // // // this.tChart1.Walls.Left.Brush.Gradient.EndColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(0))))); this.tChart1.Walls.Left.Brush.Gradient.MiddleColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); this.tChart1.Walls.Left.Brush.Gradient.SigmaFocus = 0F; this.tChart1.Walls.Left.Brush.Gradient.SigmaScale = 0F; this.tChart1.Walls.Left.Brush.Gradient.StartColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); // // // this.tChart1.Walls.Left.Pen.Visible = false; // // // // // // this.tChart1.Walls.Right.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(192))))); // // // this.tChart1.Walls.Right.Brush.Gradient.EndColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(0))))); this.tChart1.Walls.Right.Brush.Gradient.MiddleColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); this.tChart1.Walls.Right.Brush.Gradient.SigmaFocus = 0F; this.tChart1.Walls.Right.Brush.Gradient.SigmaScale = 0F; this.tChart1.Walls.Right.Brush.Gradient.StartColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); // // // this.tChart1.Walls.Right.Pen.Visible = false; // // chartContainer // this.chartContainer.Location = new System.Drawing.Point(0, 96); this.chartContainer.Size = new System.Drawing.Size(480, 197); // // line1 // // // // this.line1.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(230)))), ((int)(((byte)(90))))); this.line1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(230)))), ((int)(((byte)(90))))); this.line1.ColorEach = false; // // // this.line1.LinePen.Color = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(61)))), ((int)(((byte)(98))))); // // // // // // // // // this.line1.Marks.Brush.Gradient.EndColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(0))))); this.line1.Marks.Brush.Gradient.MiddleColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); this.line1.Marks.Brush.Gradient.SigmaFocus = 0F; this.line1.Marks.Brush.Gradient.SigmaScale = 0F; this.line1.Marks.Brush.Gradient.StartColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); // // // this.line1.Marks.Callout.ArrowHead = Steema.TeeChart.Styles.ArrowHeadStyles.None; this.line1.Marks.Callout.ArrowHeadSize = 8; // // // this.line1.Marks.Callout.Brush.Color = System.Drawing.Color.Black; this.line1.Marks.Callout.Distance = 0; this.line1.Marks.Callout.Draw3D = false; this.line1.Marks.Callout.Length = 10; this.line1.Marks.Callout.Style = Steema.TeeChart.Styles.PointerStyles.Rectangle; this.line1.Marks.Callout.Visible = false; // // // // // // this.line1.Marks.Font.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); this.line1.Marks.Transparent = true; // // // // // // this.line1.Pointer.Brush.Color = System.Drawing.Color.Red; this.line1.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Rectangle; this.line1.Title = "line1"; // // // this.line1.XValues.DataMember = "X"; this.line1.XValues.Order = Steema.TeeChart.Styles.ValueListOrder.Ascending; // // // this.line1.YValues.DataMember = "Y"; // // line2 // // // // this.line2.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(150)))), ((int)(((byte)(220))))); this.line2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(150)))), ((int)(((byte)(220))))); this.line2.ColorEach = false; // // // this.line2.LinePen.Color = System.Drawing.Color.FromArgb(((int)(((byte)(146)))), ((int)(((byte)(94)))), ((int)(((byte)(32))))); // // // // // // // // // this.line2.Marks.Brush.Gradient.EndColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(0))))); this.line2.Marks.Brush.Gradient.MiddleColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); this.line2.Marks.Brush.Gradient.SigmaFocus = 0F; this.line2.Marks.Brush.Gradient.SigmaScale = 0F; this.line2.Marks.Brush.Gradient.StartColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); // // // this.line2.Marks.Callout.ArrowHead = Steema.TeeChart.Styles.ArrowHeadStyles.None; this.line2.Marks.Callout.ArrowHeadSize = 8; // // // this.line2.Marks.Callout.Brush.Color = System.Drawing.Color.Black; this.line2.Marks.Callout.Distance = 0; this.line2.Marks.Callout.Draw3D = false; this.line2.Marks.Callout.Length = 10; this.line2.Marks.Callout.Style = Steema.TeeChart.Styles.PointerStyles.Rectangle; this.line2.Marks.Callout.Visible = false; // // // // // // this.line2.Marks.Font.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); this.line2.Marks.Transparent = true; // // // // // // this.line2.Pointer.Brush.Color = System.Drawing.Color.Green; this.line2.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Rectangle; this.line2.Title = "line2"; // // // this.line2.XValues.DataMember = "X"; this.line2.XValues.Order = Steema.TeeChart.Styles.ValueListOrder.Ascending; // // // this.line2.YValues.DataMember = "Y"; // // line3 // // // // this.line3.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(90)))), ((int)(((byte)(40))))); this.line3.Color = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(90)))), ((int)(((byte)(40))))); this.line3.ColorEach = false; this.line3.DataSource = new object[] { ((object)(this.line1)), ((object)(this.line2)) }; this.line3.Function = this.crossPoints1; // // // this.line3.LinePen.Color = System.Drawing.Color.FromArgb(((int)(((byte)(145)))), ((int)(((byte)(46)))), ((int)(((byte)(12))))); // // // // // // // // // this.line3.Marks.Brush.Gradient.EndColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(0))))); this.line3.Marks.Brush.Gradient.MiddleColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); this.line3.Marks.Brush.Gradient.SigmaFocus = 0F; this.line3.Marks.Brush.Gradient.SigmaScale = 0F; this.line3.Marks.Brush.Gradient.StartColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); // // // this.line3.Marks.Callout.ArrowHead = Steema.TeeChart.Styles.ArrowHeadStyles.None; this.line3.Marks.Callout.ArrowHeadSize = 8; // // // this.line3.Marks.Callout.Brush.Color = System.Drawing.Color.Black; this.line3.Marks.Callout.Distance = 0; this.line3.Marks.Callout.Draw3D = false; this.line3.Marks.Callout.Length = 10; this.line3.Marks.Callout.Style = Steema.TeeChart.Styles.PointerStyles.Rectangle; this.line3.Marks.Callout.Visible = false; // // // // // // this.line3.Marks.Font.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); this.line3.Marks.Transparent = true; // // // // // // this.line3.Pointer.Brush.Color = System.Drawing.Color.Yellow; this.line3.Pointer.HorizSize = 2; this.line3.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Rectangle; this.line3.Pointer.VertSize = 2; this.line3.Pointer.Visible = true; this.line3.Title = "line3"; // // // this.line3.XValues.Order = Steema.TeeChart.Styles.ValueListOrder.Ascending; // // 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(133, 21); this.checkBox1.TabIndex = 0; this.checkBox1.Text = "&View crosspoints line"; this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged); // // Function_CrossPoints // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(480, 293); this.Name = "Function_CrossPoints"; this.panel1.ResumeLayout(false); this.chartContainer.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); }