Make a tmp copy of chart including customaxis?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
moelski
Advanced
Posts: 212
Joined: Mon Apr 23, 2007 12:00 am
Location: Germany
Contact:

Make a tmp copy of chart including customaxis?

Post by moelski » Fri Feb 15, 2008 8:30 am

Hi support,

I know I asked you some weeks ago how to clone a chart. But I don´t get it working correctly and hopefully you can give me an additional hint.

I need a peace of code which clones a chart into a tmp-chart including customaxis. And the customaxis have to be assigned within the tmp-chart to the series as in the original chart.

I can us this code to make a clone:

Code: Select all

            _tmpChart.Assign(MainChart);
            for i := 0 to MainChart.SeriesCount - 1 do
              CloneChartSeries(MainChart.Series[i]).ParentChart := _tmpChart;
But it seems to me that some properties are not cloned. For example the color and the vertical axis for the series.

Could you please give me a working example how to clone the whole chart excepted data and the events (the events are not important for my clone chart)? But it is really important to get all series and axis stuff cloned incuding custom axis!

Help would be appreciated :roll:

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

Post by Yeray » Fri Feb 15, 2008 9:19 am

Hi Dominik,

You could clone your chart importing to a stream and the importing to the new chart. Is the same we discussed here.

And for events, you should assign your events manually as described here.
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

Post Reply