Page 1 of 1

Reset Graph

Posted: Sat Jan 31, 2004 9:14 pm
by 9079769
:?: After using the TeeCommander and zooming and rotating the graph, is there a way to return the graph to it's starting state? I figured that the first button on the commander would do that, but this is not the case.

How can I reset the graph to its initial state without clearing all of the data that has been added to it through my application?

Posted: Mon Feb 02, 2004 11:19 am
by Pep
Hi,

I think the best way to do this is saveing to the initial Chart to stream and then restore it using a button (placed in the TeeCommander bar) :

Code: Select all

Dim InitialChart
Private Sub Command1_Click()
TChart1.ClearChart
TChart1.Import.LoadFromStream InitialChart
End Sub

Private Sub Form_Load()
With TChart1
    .Aspect.View3D = False
    .AddSeries scBar
    .Series(0).AddXY 0, 50, "", clTeeColor
    .Series(0).AddXY 1, 80, "", clTeeColor
    .Series(0).AddXY 2, 60, "", clTeeColor
End With
TeeCommander1.Chart = TChart1
InitialChart = TChart1.Export.asNative.SaveToStream(True)
End Sub