Export to .ten with subchart, annotation, et al tools

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
asupriya
Advanced
Posts: 179
Joined: Mon Dec 01, 2008 12:00 am

Export to .ten with subchart, annotation, et al tools

Post by asupriya » Thu Sep 10, 2009 4:10 am

There seems to be a bug with Export feature of tchart to .ten format.

1. It crashes while loading a previously saved .ten file if the tchart had a subchart tool
2. It doesn't restore axis tool, annotation tool (In absence of subchart). It doesn't crash, but doesn't inform the user that some parts are not loaded.
3. Size of loaded chart is not preserved at least in few cases (seems to be a random bug as it worked for some other charts).

I am attaching an as-is VS2005 project that demonstrates the subchart tool scenario.

Its a high priority item for us and if you can provide a fix or workaround, it will be of great help.

Thanks
Attachments
CS-SubChart.zip
TChart crashes while loading a previously saved .ten file if the tchart had a subchart tool.
(13.9 KiB) Downloaded 432 times

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Export to .ten with subchart, annotation, et al tools

Post by Narcís » Thu Sep 10, 2009 9:38 am

Hi asupriya,
1. It crashes while loading a previously saved .ten file if the tchart had a subchart tool
I could reproduce this one and added it (TF02014397) to the bug list to be fixed.
2. It doesn't restore axis tool, annotation tool (In absence of subchart). It doesn't crash, but doesn't inform the user that some parts are not loaded.
I'm not able to reproduce this one. I modified your code as shown below and works fine. Does this code work fine for you? Can you please give us more detailed information about those issues and modify the code so that we can reproduce them here?

Code: Select all

        public Form1()
        {
            InitializeComponent();
            InitializeChart();
        }

        private Steema.TeeChart.Styles.FastLine fastline1;

        private void InitializeChart()
        {
					Steema.TeeChart.Tools.Annotation annotation1 = new Steema.TeeChart.Tools.Annotation(tChart1.Chart);
					annotation1.Text = "hello";

					Steema.TeeChart.Tools.AxisArrow axisArrow1 = new Steema.TeeChart.Tools.AxisArrow(tChart1.Chart);
					axisArrow1.Axis = tChart1.Axes.Left;

					Steema.TeeChart.Tools.AxisScroll axisScroll1 = new Steema.TeeChart.Tools.AxisScroll(tChart1.Chart);
					axisScroll1.Axis = tChart1.Axes.Bottom;

            fastline1 = new Steema.TeeChart.Styles.FastLine(tChart1.Chart);
            fastline1.FillSampleValues(500);
        }

        private void SaveBtn_Click(object sender, EventArgs e)
        {
            tChart1.Export.Template.IncludeData = true;
            tChart1.Export.Template.Save("C:\\testChart.ten");
        }

        private void RestoreBtn_Click(object sender, EventArgs e)
        {
            tChart1.Import.Template.Load("C:\\testChart.ten");
        }

        private void ChangeDataBtn_Click(object sender, EventArgs e)
        {
            fastline1.FillSampleValues(200);
        }
3. Size of loaded chart is not preserved at least in few cases (seems to be a random bug as it worked for some other charts).
I'm not sure how to reproduce this one either. Can you please give us some more details?

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

asupriya
Advanced
Posts: 179
Joined: Mon Dec 01, 2008 12:00 am

Re: Export to .ten with subchart, annotation, et al tools

Post by asupriya » Thu Sep 10, 2009 1:07 pm

Thanks. For other tools, I will prepare a similar project and upload.

For TF02014397, can you please set highest priority?

Thanks

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Export to .ten with subchart, annotation, et al tools

Post by Narcís » Thu Sep 10, 2009 2:13 pm

Hi asupriya,

TF02014397 has already been fixed for TeeChart for .NET 2009. I'm not able to tell you if this will be included in v3 yet.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

asupriya
Advanced
Posts: 179
Joined: Mon Dec 01, 2008 12:00 am

Re: Export to .ten with subchart, annotation, et al tools

Post by asupriya » Fri Sep 11, 2009 3:29 am

Reg. Annotation tool, I am uploading a VS2005 project. I guess the issue i am having with most of the tools is that these tool displays get updated with few chart event and the restored .ten created chart is not able to relink to these mouse events. I have similar issues with the AxisTool as I sync. some other charts when axistool is used to scroll the axis.

This leads me to think that .ten format is probably not the right format for me to use to restore the charts to their "original" status including associated event handlers. Do you suggest any other way of preserving everything, including event handlers?

Also, is there a way to export multiple charts (stacked vertically) into a single .ten file?

Reg. V4, we like to know the upgrade options (if available) from V3.5 to V4. With that info, I can talk to my manager to upgrade/buy V4.
Attachments
CS-CursorToolIntersection.zip
(15.25 KiB) Downloaded 428 times

asupriya
Advanced
Posts: 179
Joined: Mon Dec 01, 2008 12:00 am

Re: Export to .ten with subchart, annotation, et al tools

Post by asupriya » Mon Sep 14, 2009 6:27 am

Is there a way to pack multiple charts into one template? Of course, i need to be able to unpack as-is though!
Thanks

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Export to .ten with subchart, annotation, et al tools

Post by Narcís » Mon Sep 14, 2009 10:47 am

Hi asupriya,
Reg. Annotation tool, I am uploading a VS2005 project. I guess the issue i am having with most of the tools is that these tool displays get updated with few chart event and the restored .ten created chart is not able to relink to these mouse events. I have similar issues with the AxisTool as I sync. some other charts when axistool is used to scroll the axis.

This leads me to think that .ten format is probably not the right format for me to use to restore the charts to their "original" status including associated event handlers. Do you suggest any other way of preserving everything, including event handlers?
Yes, the problem is events are not exported. The only solution is reassigning them after loading a chart, for example:

Code: Select all

        private void RestoreBtn_Click(object sender, EventArgs e)
        {
            tChart1.Import.Template.Load("C:\\test2.ten");

						foreach (Steema.TeeChart.Tools.Tool t in tChart1.Tools)
						{
							if (t is Steema.TeeChart.Tools.CursorTool)
							{
								((Steema.TeeChart.Tools.CursorTool)t).Change += new CursorChangeEventHandler(cursor1_Change);
							}
						}
        }
Also, is there a way to export multiple charts (stacked vertically) into a single .ten file?
Not unless you use subcharts for that.
Reg. V4, we like to know the upgrade options (if available) from V3.5 to V4. With that info, I can talk to my manager to upgrade/buy V4.
Sure, you can find upgrade options from v3 to v4 here.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply