CalcXSizeValues() incorrect for invisible chart

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
marder
Advanced
Posts: 115
Joined: Thu May 29, 2008 12:00 am

CalcXSizeValues() incorrect for invisible chart

Post by marder » Wed Jan 11, 2012 4:25 pm

Hi.

I just regarded that THorizBarSeries.CalcXSizeValues() does always return 0 if the containing TChart is located on an not visible form (TeeChart Pro V2011).

I use this function for preparations of the series marks before exporting/printing a chart (automated export without showing gui).
The export of the chart works correctly, but calling CalcXSizeValues() on the series always returns 0 in this case.

I also tried calling Invalidate() and Repaint() on the chart, but the result is the same.

Is this a known issue?
Can you provide me any workaround?

Thanks for your help!

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

Re: CalcXSizeValues() incorrect for invisible chart

Post by Yeray » Thu Jan 12, 2012 9:34 am

Hi Marder,

Try with a Draw call. I've made a simple testing project and this call seems to make the difference. It's attached.
testHorizBar.zip
(2.47 KiB) Downloaded 524 times
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

marder
Advanced
Posts: 115
Joined: Thu May 29, 2008 12:00 am

Re: CalcXSizeValues() incorrect for invisible chart

Post by marder » Tue Feb 07, 2012 10:12 am

Dear Yeray.

Sorry for the late response! I did just see that I forgot to respond to you :(

Your suggestion works perfectly!
Thanks for your help!

Post Reply