Page 1 of 1
DrawZone: Wrong Radius
Posted: Wed Apr 06, 2011 8:05 am
by 10554786
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
Re: DrawZone: Wrong Radius
Posted: Wed Apr 06, 2011 8:44 am
by narcis
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:
Anyway, I have added the defect to the bug list (TV52015474) to be fixed for future releases.
Re: DrawZone: Wrong Radius
Posted: Wed Apr 06, 2011 12:33 pm
by 10554786
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
Re: DrawZone: Wrong Radius
Posted: Wed Apr 06, 2011 1:04 pm
by narcis
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.