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).
TChart Height problem (VB6 - TeeChart v. 5)
TChart Height problem (VB6 - TeeChart v. 5)
- Attachments
-
- TChart Test.zip
- (2.8 KiB) Downloaded 775 times
Re: TChart Height problem (VB6 - TeeChart v. 5)
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.
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,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: TChart Height problem (VB6 - TeeChart v. 5)
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.
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.
Re: TChart Height problem (VB6 - TeeChart v. 5)
Hello,
I'm afraid that's not a TeeChart limitation:
http://www.bigresource.com/Tracker/Track-vb-zkEhFP8crt/
http://www.bigresource.com/Tracker/Track-vb-uIrjdRveOX/
I'm afraid that's not a TeeChart limitation:
http://www.bigresource.com/Tracker/Track-vb-zkEhFP8crt/
http://www.bigresource.com/Tracker/Track-vb-uIrjdRveOX/
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |