DrawZone: Wrong Radius

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
to2
Newbie
Newbie
Posts: 25
Joined: Thu Dec 03, 2009 12:00 am

DrawZone: Wrong Radius

Post by to2 » Wed Apr 06, 2011 8:05 am

Hello,

I use DrawZone in a polar chart. However, the drawn radius of the zone doesn't match the radius on the axis scale. Please find attached an example.

- Win 7, 32 Bit
- CB2010
- TC 8.08

Thomas
Attachments
TChartTest.zip
(7.04 KiB) Downloaded 400 times

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: DrawZone: Wrong Radius

Post by Narcís » Wed Apr 06, 2011 8:44 am

Hi to2,

If I create a new application from scratch with code below it works fine for me. So I guess It must be something you set at designtime.

Code: Select all

void __fastcall TForm1::FormCreate(TObject *Sender)
{
	Chart1->Axes->Left->SetMinMax(0, 10);
	Series1->AddPolar(0, 0, "", clTeeColor);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Series1BeforeDrawValues(TObject *Sender)
{
	Series1->DrawZone(0, 5, 0);
}
After testing with the properties in the *.dfm file I found that what makes a difference is CircleLabels property. Setting it to false works fine:

Code: Select all

 Series1->CircleLabels=False;
Anyway, I have added the defect to the bug list (TV52015474) to be fixed for future releases.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

to2
Newbie
Newbie
Posts: 25
Joined: Thu Dec 03, 2009 12:00 am

Re: DrawZone: Wrong Radius

Post by to2 » Wed Apr 06, 2011 12:33 pm

After testing with the properties in the *.dfm file I found that what makes a difference is CircleLabels property. Setting it to false works fine
Well, I need the labels.
Anyway, I have added the defect to the bug list (TV52015474) to be fixed for future releases.
I would appreciate a fix in a 8.x maintenance release.

Thanks for your investigations. I'll realize zone drawing by an extra series.

Thomas

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: DrawZone: Wrong Radius

Post by Narcís » Wed Apr 06, 2011 1:04 pm

Hi Thomas,
Well, I need the labels.
In that case an alternative is using TChart's OnBeforeDrawAxes event and calling Draw method as shown here:

Code: Select all

void __fastcall TForm1::FormCreate(TObject *Sender)
{

  Chart1->Axes->Left->SetMinMax(0, 10);
  Series1->AddPolar(0, 0, "", clTeeColor);
  Series1->CircleLabels=True;
  Chart1->Draw();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Chart1BeforeDrawAxes(TObject *Sender)
{
  Series1->DrawZone(0, 5, 0);
}
I would appreciate a fix in a 8.x maintenance release.
This is unlikely. TeeChart 2010 VCL (aka v9) was published almost one year ago and there are no plans to publish another v8 maintenance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply