TChart Height problem (VB6 - TeeChart v. 5)

TeeChart for ActiveX, COM and ASP
Post Reply
MShefi
Newbie
Newbie
Posts: 20
Joined: Fri Nov 15, 2002 12:00 am

TChart Height problem (VB6 - TeeChart v. 5)

Post by MShefi » Thu Oct 27, 2011 12:40 pm

Hi

I have a question regarding the height of the TeeChart control (v. 5).

I have a bug when trying to draw rectangles with texts on the TChart control (my program is written in VB6).
At the initialization, I calculate the needed height of the TChart.
Afterwards I draw the lines using the IAxes functions CalcXPosValue and CalcXPosValue (of the left and Bottom axes).

The problem is that in the initialization, when I calculate the needed height of the TChart for 1000 rectangles, I get the following:

TChart1.Height = [CurrentRowHeight] * (TChart1.Axis.left.Maximum + 1)

CurrentRowHeight is constant - I assign the size of the text to it, so it's value is 300 Twips = 20 Pixels.
TChart1.Axis.left.Maximum - it equals to the rows number (1000).
Attachments
TChart Test.zip
(2.8 KiB) Downloaded 775 times

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: TChart Height problem (VB6 - TeeChart v. 5)

Post by Yeray » Mon Oct 31, 2011 10:31 am

Hello,

I'm not sure to understand the purpose of this. It looks like if you'd like to draw the axis grid manually, isn't it? Why don't you use the built-in axis grid?
Anyway, probably the rounding in CalcXPosValue and CalcYPosValue gives this +-1 pixel differences. To avoid it, you could calculate the position of the first line and draw the next lines simply adding 20 pixels on the Y, without any CalcYPosValue call.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

MShefi
Newbie
Newbie
Posts: 20
Joined: Fri Nov 15, 2002 12:00 am

Re: TChart Height problem (VB6 - TeeChart v. 5)

Post by MShefi » Tue Nov 01, 2011 8:17 am

Yes I agree but the real problem is in TChart1.Height property,
when I'm setting values over 245000 or something like that this property is limited to this number.
in my case I'm setting 1000(Lines) * 300(twips) = 300000 and after my set I'm still see that
the TChart1.Height is still at 245000 - it seems like limited for this number ,

any idea about this limitation ?

Thanks.

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: TChart Height problem (VB6 - TeeChart v. 5)

Post by Yeray » Fri Nov 04, 2011 10:23 am

Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply