private void DoDashTrend(Chart tChart1, Chart tChart2) { tChart1.Panel.MarginLeft = 10; tChart2.Panel.MarginLeft = 10; tChart1.Axes.Left.Title.Text = AppResources.Participation; tChart1.Axes.Left.Labels.Size.Width = 5; tChart2.Axes.Left.Labels.Size.Width = 5; tChart2.Axes.Left.Title.Text = AppResources.DollarValue; tChart1.Series.Clear(); tChart2.Series.Clear(); Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(); Steema.TeeChart.Styles.Line line2 = new Steema.TeeChart.Styles.Line(); tChart1.Series.Clear(); tChart1.Series.Add(line1); tChart1.Series.Add(line2); line1.LinePen.Width = 4; line2.LinePen.Width = 4; line1.FillSampleValues(20); line2.FillSampleValues(20); line1.Smoothed = true; line2.Smoothed = true; Steema.TeeChart.Styles.Area area1 = new Steema.TeeChart.Styles.Area(); Steema.TeeChart.Styles.Area area2 = new Steema.TeeChart.Styles.Area(); Steema.TeeChart.Styles.Line movAvg = new Steema.TeeChart.Styles.Line(); Steema.TeeChart.Functions.MovingAverage movAvgFunc = new Steema.TeeChart.Functions.MovingAverage(tChart2.Chart); movAvgFunc.PeriodStyle = Steema.TeeChart.Functions.PeriodStyles.NumPoints; movAvgFunc.Period = 4; movAvg.Function = movAvgFunc; movAvg.DataSource = area2; movAvg.LinePen.Width = 4; movAvg.Smoothed = true; tChart2.Series.Add(area1); tChart2.Series.Add(area2); tChart2.Series.Add(movAvg); //tChart2.AfterDraw+=new PaintChartEventHandler(tChart2_AfterDraw); movAvg.AfterDrawValues += new PaintChartEventHandler(movAvg_AfterDrawValues); area1.Transparency = 35; area2.Transparency = 35; area1.FillSampleValues(20); area2.FillSampleValues(20); tChart2.Legend.Visible = true; tChart2.Legend.Font.Size = 12; tChart2.Legend.LegendStyle = LegendStyles.Values; tChart2.Legend.MaxNumRows = 2; tChart2.Legend.Alignment = LegendAlignments.Bottom; //} }