Page 1 of 1
Loading TRadarSeries from file
Posted: Fri Jul 20, 2007 8:33 am
by 10546060
Hi,
when i load a chart with some TRadarSeries by LoadCartfromFile, the color of the areas disappears. It just disappears in the chart, when i open the editor it's still set. I can't get the color of the series back in the chart, it's gone, even if i change the seriestype.
Regards,
Timo
BTW: Is this a good place to report bugs?
Posted: Mon Jul 23, 2007 3:44 pm
by Pep
Hi Timo,
which TeeChart Pro version are you using ?
Here, with TeeChart Pro v8 works fine with the following code :
Code: Select all
uses TeeStore, TeeExport;
procedure TForm1.FormCreate(Sender: TObject);
begin
series1.FillSampleValues();
Series1.Brush.Style := bsSolid;
Series1.Color := clblue;
end;
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
SaveChartToFile(Chart1,'e:\temp\RadarChart.tee',true,true);
Chart1.FreeAllSeries(nil);
end;
procedure TForm1.BitBtn2Click(Sender: TObject);
begin
LoadChartFromFile(TCustomChart(Chart1),'e:\temp\RadarChart.tee');
end;
The best place to report he bugs is here, at forums, we always try to find a workaround and also add them to our defect list to be considered for the further maintenance releases.
Posted: Tue Jul 24, 2007 7:07 am
by 10546060
Thanks for your reply.
Sorry, i didn't describe the problem exact enough. Try this:
Code: Select all
procedure TForm2.FormCreate(Sender: TObject);
var
I: Integer;
begin
chart1.AddSeries(TBarSeries.Create(chart1));
chart1.AddSeries(TBarSeries.Create(chart1));
chart1.AddSeries(TBarSeries.Create(chart1));
chart1[0].FillSampleValues();
chart1[1].FillSampleValues();
chart1[2].FillSampleValues();
chart1.View3D:=false;
changeallseriestype(chart1,TRadarSeries);
for I := 0 to chart1.seriesCount - 1 do
begin
TRadarseries(chart1[i]).Circled := true;
TRadarseries(chart1[i]).Transparency := 70;
TRadarseries(chart1[i]).CircleLabels := true;
TRadarseries(chart1[i]).marks.hide;
end;
end;
This creates a Chart i'd like to have and that i can't save. I worked around the problem by removing all series and adding new barseries + changing the series again. (Series-Properties are lost this way of course).
Posted: Sat Jul 28, 2007 8:42 am
by Pep
Hi Timo,
on way to solve it is to redefine its brush color to be saved into the tee :
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
var
I: Integer;
begin
chart1.AddSeries(TBarSeries.Create(chart1));
chart1.AddSeries(TBarSeries.Create(chart1));
chart1.AddSeries(TBarSeries.Create(chart1));
chart1[0].FillSampleValues();
chart1[1].FillSampleValues();
chart1[2].FillSampleValues();
chart1[0].name:='a';
chart1[1].name:='b';
chart1[2].name:='c';
chart1.View3D:=false;
changeallseriestype(chart1,TRadarSeries);
for I := 0 to chart1.seriesCount - 1 do
begin
(Chart1[i] as TRadarSeries).Brush.Color := Chart1[i].Color;
(Chart1[i] as TRadarSeries).Pen.Color := Chart1[i].Pen.Color;
TRadarseries(chart1[i]).Circled := true;
TRadarseries(chart1[i]).Transparency := 70;
TRadarseries(chart1[i]).CircleLabels := true;
TRadarseries(chart1[i]).marks.hide;
end;
end;