Saving hidden charts

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
kmanuele
Newbie
Newbie
Posts: 13
Joined: Mon Feb 09, 2004 5:00 am

Saving hidden charts

Post by kmanuele » Thu May 26, 2005 5:34 am

When the user saves a chart to a metafile, we want the chart form to be maximized, otherwise the image scale is bad.

To avoid flicker, we save the state of the form, then:

Visible = false;
WindowState = wsMaximized;

Chart1->SaveToMetafileEnh(filename);

then restore the form to user's size and make visible

Howeve, the chart is not maximized when hidden. We can get this work if we maximize without hiding the chart, but we don't want the flicker of maximizing and restoring the chart while it's visible.

We also need the generic ability to create and save charts (as metafiles) that are not displayed on the screen.

Help?

Kevin

Pep
Site Admin
Site Admin
Posts: 3273
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Thu Jun 16, 2005 8:43 am

Hi Kevin,

how about increasing the size of the Chart manually before do the Export ?

kmanuele
Newbie
Newbie
Posts: 24
Joined: Wed Jan 12, 2005 5:00 am

Post by kmanuele » Thu Jun 16, 2005 10:41 pm

That doesn't help. We want this to be automatic without user actions. For example, we need a "save all charts to file" function that requires no user actions, and doesn't flash dozens of charts on the screen.

The underlying problem is TChart's implementation of custom items, which derive their properties from screen dimensions and do not function correctly if the chart->Visible = false. Our charts have custom axes and custom-positioned annotations.

We do not understand why Steema implemented "custom" items differently than "normal" items, especially in an OOP environment. This seems to be a continuous problem for users.

We have a work-around that is crude, but successful.

Post Reply