Problems with Copy-Paste the whole chart.

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
bairog
Advanced
Posts: 128
Joined: Fri Dec 07, 2018 12:00 am

Problems with Copy-Paste the whole chart.

Post by bairog » Mon Oct 12, 2020 9:57 am

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.

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Problems with Copy-Paste the whole chart.

Post by Christopher » Tue Oct 13, 2020 8:20 am

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 15797 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?
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

bairog
Advanced
Posts: 128
Joined: Fri Dec 07, 2018 12:00 am

Re: Problems with Copy-Paste the whole chart.

Post by bairog » Tue Oct 13, 2020 4:56 pm

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

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Problems with Copy-Paste the whole chart.

Post by Christopher » Wed Oct 14, 2020 1:11 pm

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.
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

bairog
Advanced
Posts: 128
Joined: Fri Dec 07, 2018 12:00 am

Re: Problems with Copy-Paste the whole chart.

Post by bairog » 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..

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Problems with Copy-Paste the whole chart.

Post by Christopher » Thu Nov 05, 2020 9:32 am

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
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Post Reply