i have the problem, that if i choose an averageline in stairsmode, that the last period isnt be visible at the chart. For example there are 9 values an the average function have an period of three values. In that case the chart must draw three lines in different positions, but there only apperas two lines. I have a small sample code for you to reproduce and understand my problem:
Code: Select all
tChart1.Dock = DockStyle.Fill;
tChart1.Aspect.View3D = false;
tChart1.Axes.Left.Grid.Visible = false;
tChart1.Axes.Left.MaximumOffset = 20;
tChart1.Axes.Left.MinimumOffset = 20;
Steema.TeeChart.Styles.FastLine avgLine = new Steema.TeeChart.Styles.FastLine();
Steema.TeeChart.Styles.Points dataLine = new Steema.TeeChart.Styles.Points();
Steema.TeeChart.Functions.Average avg = new Steema.TeeChart.Functions.Average();
avgLine.Function = avg;
avgLine.Function.Period = 3;
avgLine.Function.PeriodStyle = Steema.TeeChart.Functions.PeriodStyles.NumPoints;
avgLine.Function.PeriodAlign = Steema.TeeChart.Functions.PeriodAligns.First;
avgLine.Stairs = true;
avgLine.DataSource = dataLine;
avgLine.Color = Color.Red;
dataLine.Add(2);
dataLine.Add(2);
dataLine.Add(2);
dataLine.Add(3);
dataLine.Add(3);
dataLine.Add(3);
dataLine.Add(4);
dataLine.Add(4);
dataLine.Add(4);
tChart1.Series.Add(dataLine);
tChart1.Series.Add(avgLine);
Thanks in advance!
BTW: Why doesnt work the Maximum-/MinimumOffset in the new TChart version?