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 1752 - Add function PeriodAligns.Last not plotting accurately
Summary: Add function PeriodAligns.Last not plotting accurately
Status: RESOLVED FIXED
Alias: None
Product: .NET TeeChart
Classification: Unclassified
Component: Chart (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-17 04:57 EST by christopher ireland
Modified: 2017-01-17 05:18 EST (History)
0 users

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments
screenshot (77.42 KB, image/jpeg)
2017-01-17 04:57 EST, christopher ireland
Details

Note You need to log in before you can comment on or make changes to this bug.
Description christopher ireland 2017-01-17 04:57:22 EST
Created attachment 696 [details]
screenshot

See screenshot ...

note the first point of Series1, the funcSeries, which has a value of 6 which equals (0+1+2+3) - BUT- this value 6 is not plotted on the last point in this group with value 3. It is plotted on the first point of the next group with value 4. Again, the second point of Series has a value of 22 which equals (4+5+6+7) - again, the last point in this series is 7, but funcSeries plots the value 22 on point 8.

code:
    Line series;
    FastLine funcSeries;
    Add chartTotalFunction;
    private void InitializeChart()
    {
      funcSeries = new FastLine(tChart1.Chart);
      funcSeries.Marks.Visible = true;
      chartTotalFunction = new Add();
      chartTotalFunction.Period = new TimeSpan(0, 12, 0, 0).TotalDays;
      chartTotalFunction.PeriodAlign = Steema.TeeChart.Functions.PeriodAligns.Last;
      chartTotalFunction.PeriodStyle = Steema.TeeChart.Functions.PeriodStyles.Range;
      funcSeries.Function = chartTotalFunction;


      series = new Line(tChart1.Chart);
      DateTime today = DateTime.Today;

      for (int i = 0; i < 20; i++)
      {
        series.Add(today, i);
        today = today.AddHours(3);
      }

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

      tChart1.Axes.Bottom.Labels.Angle = 90;
      tChart1.Axes.Bottom.Increment = new TimeSpan(0, 3, 0, 0).TotalDays;
      tChart1.Axes.Bottom.Labels.DateTimeFormat = "dd/MM/yy hh:mm";
    }