Page 1 of 1

How to draw lines on 3D walls?

Posted: Thu Mar 30, 2006 8:01 pm
by 9236851
BCB6 and TeeChart Pro v7.05

How to draw e.g. a horizontal line on the bottom wall, at a position matching a certain zValue?

Thanks in advance,

Wiebe

Posted: Fri Mar 31, 2006 8:36 am
by narcis
Hi Wiebe,

You can custom draw on TChart's canvas using its OnAfterDraw event and do something like the following code:

Code: Select all

void __fastcall TForm1::Chart1AfterDraw(TObject *Sender)
{
	int index=Series1->ZValues->Locate(15);

	Chart1->Canvas->MoveTo3D(Chart1->Axes->Bottom->IStartPos, Chart1->Axes->Bottom->PosAxis, Series1->CalcZPos(index));
	Chart1->Canvas->LineTo3D(Chart1->Axes->Bottom->IEndPos, Chart1->Axes->Bottom->PosAxis, Series1->CalcZPos(index));
}

Posted: Fri Mar 31, 2006 2:50 pm
by 9236851
Thanks NarcĂ­s,

Excellent.
However, "walldrawing" requires some imagination since properies like IEndPos and IStartPos are nowhere available nor explained in Help.
Or am I missing something?

Wiebe

Posted: Mon Apr 03, 2006 11:21 am
by Pep
Hi Wiebe,

yes, these properties has not been explained in the TeeChart Help files. We'll add them for the next releases.

In case you still having problems painting on the Chart please do not hesitate to let us know and we'll try to help you..