Page 1 of 1

Problems with Copy-Paste the whole chart.

Posted: Mon Oct 12, 2020 9:57 am
by 15685014
Hello.
I have a WinForms project that targets .NET Framework 4.8. And I'm trying to Copy-Paste (Ctrl+C, Ctrl+V in form designer) the whole chart (the original chart can be placed on the same form or even on another form in my project).
I expect to have fully independent chart that copies all properties values (as well all series proeperties values) from the original chart.
But in fact it works unpredictably: sometimes the original chart disappears, sometime some (or even all) series on the original disappears. Sometimes all series are visualy copied to a copy chart but when I try to change some properties on copy chart/copy series - they are actually changed for the original chart/original series.
So is that a bug? How can I copy the whole chart with all it's propeties, series and series properties?
Thanl you.

Re: Problems with Copy-Paste the whole chart.

Posted: Tue Oct 13, 2020 8:20 am
by Christopher
Hello,

Yes, you can copy an entire chart with all its properties and so forth using the native chart templates (*.ten) - there's an example of how to do this in the Feature Demo of our GitHub examples (here):
TeeChartNetExamples_2020-10-13_10-16-53.png
TeeChartNetExamples_2020-10-13_10-16-53.png (175.85 KiB) Viewed 12862 times

We haven't had any requests to ensure that the above functionality should work at DesignTime on a Windows Forms using cut-and-paste, so it's not really a functionality we have looked into. We can look into it of course - could you be so kind as to send us a project (or two) with which we can reproduce your problem here?

Re: Problems with Copy-Paste the whole chart.

Posted: Tue Oct 13, 2020 4:56 pm
by 15685014
Just created new WinForms (.NET Framework) application, added Steema.TeeChart.NET nuget package, placed TСhart on form (Dock = Top) and added pie chart on it. When I Ctrl+С / Ctrl+V that chart on the same form it looks like:
Image
pie1 series is moved to a new chart, not copied to it.
Sample project

Re: Problems with Copy-Paste the whole chart.

Posted: Wed Oct 14, 2020 1:11 pm
by Christopher
bairog wrote:
Tue Oct 13, 2020 4:56 pm
pie1 series is moved to a new chart, not copied to it.
Yes, I can see what you mean - this is because you are copying the TChart object and not the Series object. I'm not sure how this is supposed to work in the Visual Studio Designer, but I will look into it further.

In the meantime, you will be able to use the native template files as I suggested to you in my first reply.

Re: Problems with Copy-Paste the whole chart.

Posted: Thu Nov 05, 2020 6:38 am
by 15685014
Any updates on this? It's a real pain to create similar complex charts from scratch without be able to simply copy them..

Re: Problems with Copy-Paste the whole chart.

Posted: Thu Nov 05, 2020 9:32 am
by Christopher
Hello,
bairog wrote:
Thu Nov 05, 2020 6:38 am
Any updates on this? It's a real pain to create similar complex charts from scratch without be able to simply copy them..
You don't have to create them from scratch, as I mentioned, you can use the TeeChart native template files. To make it clear, please find a short screenshot gif I made to show you what I mean:

Image