public AddStdFunctionsChart(ChartView BaseChart) { addFunction = new Steema.TeeChart.Functions.Add(); bar = new Bar(); theAddLine = new Line(); var = new Variables.Variables(); BaseChart.Chart.Series.Add(bar); BaseChart.Chart.Series.Add(theAddLine); bar.Title = "Data"; bar.SeriesColor = var.GetPaletteBasic[0]; theAddLine.Title = "Add"; theAddLine.LinePen.Width = 6; theAddLine.Color = var.GetPaletteBasic[2]; for (int i = 0; i < var.GetValorStdAdd1.Length; i++) { bar.Add(i, var.GetValorStdAdd1[i]); } theAddLine.Function = addFunction; theAddLine.DataSource = bar; BaseChart.Chart.Axes.Left.SetMinMax(BaseChart.Chart.Axes.Left.MinYValue, BaseChart.Chart.Axes.Left.MaxYValue + 100); BaseChart.Chart.Axes.Bottom.SetMinMax(BaseChart.Chart.Axes.Bottom.MinXValue, BaseChart.Chart.Axes.Bottom.MaxXValue); BaseChart.Chart.Axes.Left.Increment = 500; BaseChart.Chart.Axes.Bottom.Labels.Visible = false; BaseChart.Chart.Axes.Left.Grid.Visible = false; BaseChart.Chart.Axes.Left.AxisPen.Visible = true; BaseChart.Chart.Header.Visible = false; Themes.AplicarMarksTheme1(BaseChart); theAddLine.Marks.Visible = true; theAddLine.Marks.Width += 40; theAddLine.Marks.DrawEvery = 2; ImplementiOSMarks(BaseChart.Chart); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.checkBox1 = new System.Windows.Forms.CheckBox(); this.barSeries1 = new Steema.TeeChart.Styles.Bar(); this.add1 = new Steema.TeeChart.Functions.Add(); this.lineSeries1 = new Steema.TeeChart.Styles.Line(); this.panel1.SuspendLayout(); this.SuspendLayout(); // // textBox1 // this.textBox1.Name = "textBox1"; this.textBox1.Size = new System.Drawing.Size(466, 63); this.textBox1.Text = "The Add function calculates the sum of all points in the data source.\r\n\r\nIt can a" + "lso be used to calculate sums by every \"n\" number of points."; // // panel1 // 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, 34); // // 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.Shadow // this.tChart1.Header.Font.Shadow.Visible = true; this.tChart1.Header.Lines = new string[] { "Add function" }; this.tChart1.Location = new System.Drawing.Point(0, 97); 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.barSeries1); this.tChart1.Series.Add(this.lineSeries1); this.tChart1.Size = new System.Drawing.Size(466, 189); // // 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; // // checkBox1 // this.checkBox1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.checkBox1.Location = new System.Drawing.Point(20, 8); this.checkBox1.Name = "checkBox1"; this.checkBox1.Size = new System.Drawing.Size(127, 21); this.checkBox1.TabIndex = 0; this.checkBox1.Text = "&By every 2 points"; this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged); // // barSeries1 // // // barSeries1.Brush // this.barSeries1.Brush.Color = System.Drawing.Color.FromArgb(((System.Byte)(254)), ((System.Byte)(0)), ((System.Byte)(0)), ((System.Byte)(255))); // // barSeries1.Marks // // // barSeries1.Marks.Brush // this.barSeries1.Marks.Brush.Color = System.Drawing.Color.FromArgb(((System.Byte)(0)), ((System.Byte)(0)), ((System.Byte)(0))); // // barSeries1.Marks.Font // // // barSeries1.Marks.Font.Brush // this.barSeries1.Marks.Font.Brush.Color = System.Drawing.Color.Red; this.barSeries1.Marks.Font.Size = 7; // // barSeries1.Marks.Symbol // // // barSeries1.Marks.Symbol.Shadow // this.barSeries1.Marks.Symbol.Shadow.Height = 1; this.barSeries1.Marks.Symbol.Shadow.Visible = true; this.barSeries1.Marks.Symbol.Shadow.Width = 1; // // barSeries1.Pen // this.barSeries1.Pen.Color = System.Drawing.Color.FromArgb(((System.Byte)(254)), ((System.Byte)(0)), ((System.Byte)(0)), ((System.Byte)(153))); this.barSeries1.Title = "Data"; // // barSeries1.XValues // this.barSeries1.XValues.DataMember = "X"; this.barSeries1.XValues.Order = Steema.TeeChart.Styles.ValueListOrder.Ascending; // // barSeries1.YValues // this.barSeries1.YValues.DataMember = "Bar"; // // lineSeries1 // // // lineSeries1.Brush // this.lineSeries1.Brush.Color = System.Drawing.Color.FromArgb(((System.Byte)(254)), ((System.Byte)(255)), ((System.Byte)(128)), ((System.Byte)(0))); this.lineSeries1.DataSource = this.barSeries1; this.lineSeries1.Function = this.add1; // // lineSeries1.LinePen // this.lineSeries1.LinePen.Color = System.Drawing.Color.FromArgb(((System.Byte)(254)), ((System.Byte)(153)), ((System.Byte)(77)), ((System.Byte)(0))); // // lineSeries1.Marks // // // lineSeries1.Marks.Brush // this.lineSeries1.Marks.Brush.Color = System.Drawing.Color.FromArgb(((System.Byte)(0)), ((System.Byte)(128)), ((System.Byte)(0))); // // lineSeries1.Marks.Font // // // lineSeries1.Marks.Font.Brush // this.lineSeries1.Marks.Font.Brush.Color = System.Drawing.Color.White; this.lineSeries1.Marks.Font.Size = 7; // // lineSeries1.Marks.Symbol // // // lineSeries1.Marks.Symbol.Shadow // this.lineSeries1.Marks.Symbol.Shadow.Height = 1; this.lineSeries1.Marks.Symbol.Shadow.Visible = true; this.lineSeries1.Marks.Symbol.Shadow.Width = 1; this.lineSeries1.Marks.Visible = true; // // lineSeries1.Pointer // this.lineSeries1.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Rectangle; this.lineSeries1.Title = "Add"; // // lineSeries1.XValues // this.lineSeries1.XValues.Order = Steema.TeeChart.Styles.ValueListOrder.Ascending; // // Function_Add // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(466, 286); this.Name = "Function_Add"; this.panel1.ResumeLayout(false); this.ResumeLayout(false); }