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?
Reset Graph
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) :
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
Pep Jorge
http://support.steema.com
http://support.steema.com