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 1351

Summary: Sample data located in tools_clustering.pas IrisDataSet.Lines is misaligned which causes LoadIrisData to fail (Delphi 10 Seattle)
Product: VCL TeeChart Reporter: Roumen <rchristov>
Component: DemosAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED WORKSFORME    
Severity: trivial CC: rchristov, sandra
Priority: Normal    
Version: 150420   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

Description Roumen 2015-10-22 11:52:42 EDT
When Clustering demo is loaded, there is an exception in LoadIrisData procedure.
Reason: the strings in IrisDataSet.lines are misaligned - after the last 
'5.0,3.3,1.4,0.2,Iris-setosa'#$D#$A
next data point is split into 2 lines:
'7.0,3.2,4.7,1.4,Iris-'#$D#$A'versicolor'#$D#$A
Workaround:
  s:= IrisDataSet.Lines.Text;
  s:= StringReplace(s, '-'#13#10, '-', [rfReplaceAll]);
  sl:= TStringList.Create;
  try
    sl.Text:= s;
    for t:=0 to sl.Count-1 do
    begin
      s:=sl[t];
// original code remains here
...
    end;

  finally
    {$IFDEF D15}FormatSettings.{$ENDIF}DecimalSeparator:=Old;
    sl.Free;
  end;
I do not know why using
IrisDataSet.Lines.Text:= s;
or
IrisDataSet.SetTextBuffer(@s[1]);
did not work - IrisDataSet.Lines were not updated
Comment 1 sandra pazos 2015-10-27 11:00:19 EDT
Hello Roumem, 

We can't reproduce the problem you are experiencing using the latest TeeChart VCL/FMX, build 2015.16.150901. Could you confirm the problem you are experiencing doesn't occur in the last TeeChart VCL version? 

Thanks in advance
Regards,

Sandra