Persist changed LabelText when Assign chart to another chart

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
SteveP
Advanced
Posts: 132
Joined: Sun Sep 07, 2003 4:00 am

Persist changed LabelText when Assign chart to another chart

Post by SteveP » Mon May 22, 2006 3:49 pm

I am using chart1.Assign to copy one chart to another invisible chart so that I may change some of the copied chart's properties (colors) before it is printed. I do not wish to change these properties on the original chart because the user would see them. The original chart has series created at run time.

The original chart has its axis labels changed in OnGetAxisLabel by changing that event's LabelText property. These changed labels do not persist into the copied chart. Can they be or is there a way to access the appropriate label index in the copied chart and change its text ?
Trying to use DestChart.Axes.Bottom.Assign(SourceChart.Axes.Bottom);
causes no labels to be on the copied chart.

I also draw on the original chart's canvas at some axis labels positions using TextOut and this is not shown on the copied chart. Drawing directly onto the copied chart's canvas using textOut in the same manner as onto the original chart did not result in that text being shown.

Is there another approach to make a copy of a chart for this prupose ?

Steve

Post Reply