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 1285

Summary: Histogram sort Y does not work after source value changing
Product: VCL TeeChart Reporter: Bert Kreisel <bert.kreisel>
Component: FunctionsAssignee: Steema Issue Manager <issuemanager>
Status: CONFIRMED ---    
Severity: normal CC: sandra
Priority: Normal    
Version: 150420   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Chart Series: Line Delphi / C++ Builder RAD IDE Version: RAD XE5

Description Bert Kreisel 2015-08-31 04:01:43 EDT
Let a Histogram funktion series be sorted by "Y".
After Changing the values of the source series (change the number of sample values of a random serie) the Histogram series is no longer sorted by "Y". (It will be sorted again after changing the sort settings.)
Comment 1 sandra pazos 2015-08-31 08:11:25 EDT
Hello Bert,

Thanks for your requests. We can reproduce it. Seems the problem is caused, because, is necessary use the CheckOrder method in design-time. We will try to fix it to upcoming version of TeeChart Pro VCL/FMX.  Meantime, you can use the code below in runtime to fix the problem:

type
  TForm1 = class(TForm)
    Chart1: TChart;
    Series1: TBarSeries;
    Series2: TFastLineSeries;
    TeeFunction1: THistogramFunction;
    TeeCommander1: TTeeCommander;
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
Series1.FillSampleValues(10);
Series2.YValues.Order := loAscending;
Series2.CheckOrder;
end;