Page 1 of 1

Make a tmp copy of chart including customaxis?

Posted: Fri Feb 15, 2008 8:30 am
by 9349911
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:

Posted: Fri Feb 15, 2008 9:19 am
by yeray
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.