Loading TRadarSeries from file

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Timo
Newbie
Newbie
Posts: 12
Joined: Wed Jul 11, 2007 12:00 am
Contact:

Loading TRadarSeries from file

Post by Timo » Fri Jul 20, 2007 8:33 am

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?

Pep
Site Admin
Site Admin
Posts: 3299
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Jul 23, 2007 3:44 pm

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.

Timo
Newbie
Newbie
Posts: 12
Joined: Wed Jul 11, 2007 12:00 am
Contact:

Post by Timo » Tue Jul 24, 2007 7:07 am

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).

Pep
Site Admin
Site Admin
Posts: 3299
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Sat Jul 28, 2007 8:42 am

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;

Post Reply