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 - Sample data located in tools_clustering.pas IrisDataSet.Lines is misaligned which causes LoadIrisData to fail (Delphi 10 Seattle)
Summary: Sample data located in tools_clustering.pas IrisDataSet.Lines is misaligned w...
Status: RESOLVED WORKSFORME
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Demos (show other bugs)
Version: 150420
Hardware: PC Windows
: Normal trivial
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-22 11:52 EDT by Roumen
Modified: 2015-11-16 07:33 EST (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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