Code: Select all
with TSeriesDataText.Create(Chart1, sLines) do
try
TextDelimiter:=',';
IncludeIndex:=false;
IncludeHeader:=true;
IncludeLabels:=true;
IncludeColors:=true;
SaveToFile('chart1.txt');
finally
Free;
end;
Text,Colors,X,Y,EndX,EndY
And then try to load it back with:
Code: Select all
with SeriesTextSource1 do
begin
Fields.Clear;
AddField('Text',1);
AddField('Colors',2);
AddField('X',3);
AddField('Y',4);
AddField('EndX',5);
AddField('EndY',6);
FieldSeparator := ',';
DecimalSeparator := '.';
FileName := 'chart1.txt';
Series := sLines;
Active := True;
end;
When I check the datasource for the series it lists the fields:
Text
X
Y
EndX
EndY
but no Colors as an option for source.
What am I missing to get the colors to import?