Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 1750

Summary: Add function NumPoints period style not calculating correctly
Product: .NET TeeChart Reporter: christopher ireland <chris>
Component: ChartAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED FIXED    
Severity: major    
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

Description christopher ireland 2017-01-16 06:59:24 EST
run this code & note how the totals are different:

		private void InitializeChart()
		{
			FastLine funcSeries = new FastLine(tChart1.Chart);
			funcSeries.Marks.Visible = true;
			Steema.TeeChart.Functions.Add chartTotalFunction = new Steema.TeeChart.Functions.Add();
			chartTotalFunction.Period = 5; 
			chartTotalFunction.PeriodAlign = Steema.TeeChart.Functions.PeriodAligns.Last;
			chartTotalFunction.PeriodStyle = Steema.TeeChart.Functions.PeriodStyles.NumPoints;
			funcSeries.Function = chartTotalFunction;


			Line series = new Line(tChart1.Chart);
			for (int i = 0; i < 20; i++)
			{
				series.Add(i, i);
			}

			funcSeries.Marks.Visible = true;
			series.Marks.Visible = true;
			funcSeries.DataSource = series;

			double tot1 = funcSeries.YValues.Total;
			double tot2 = series.YValues.Total;
		}