Loading colors with SeriesTextSource
Posted: Tue Feb 06, 2007 11:29 pm
When I save a line series with:
The fields in the result file are in the order:
Text,Colors,X,Y,EndX,EndY
And then try to load it back with:
I get an error that my color is not a value floating point value.
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?
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?