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
Saving hidden charts
Hi Kevin,
how about increasing the size of the Chart manually before do the Export ?
how about increasing the size of the Chart manually before do the Export ?
Pep Jorge
http://support.steema.com
http://support.steema.com
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.
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.