Problem w/ restoring tchart state from a saved string

TeeChart for ActiveX, COM and ASP
Post Reply
Phoenix
Newbie
Newbie
Posts: 14
Joined: Thu May 08, 2003 4:00 am
Location: Blacksburg, VA
Contact:

Problem w/ restoring tchart state from a saved string

Post by Phoenix » Fri Mar 12, 2004 3:54 pm

We use the export and import "asNative" capabilities of TChart in order to implement a cancel button to get the user back to a known state. Unfortunately certain changes don't seem to be undone. We have found several cases of this, although we don't feel like this is all of them. As a workaround for now, is there any way to reset a tchart control back to the initial state? Is there something wrong with our techinque?

I've included a sample .xls file at
http://www.phoenix-int.com/~nsharp/teeC ... roblem.xls
To use it, load it up and press the "Setup Chart" button, which will
initialize the chart to a known state and saves off a copy of the settings into a class variable. Use the "Make Changes" button to make some minor modifications to the look of the chart. Then press the "Cancel Changes" button, which loads in the saved state from the first step. Some of the changes will be cancelled, others will not.

1) If a header exists originally and is removed, it will be put back into place by the cancel button. The other way around doesn't work - if you have no title and then add one, the cancel button will not remove the title.
2) If a background image is added, it will not be removed by the cancel.
3) If a the legend is removed, it will not be re-added

Thanks again.

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Tue Mar 16, 2004 12:12 pm

Hi Pheonix,

Have you tried using the ITChart.ClearChart method to reset the chart control?
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Post Reply