Reset Graph

TeeChart for ActiveX, COM and ASP
Post Reply
ProgLabs
Newbie
Newbie
Posts: 11
Joined: Wed Nov 12, 2003 5:00 am
Location: New York

Reset Graph

Post by ProgLabs » Sat Jan 31, 2004 9:14 pm

:?: 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?

Pep
Site Admin
Site Admin
Posts: 3301
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Feb 02, 2004 11:19 am

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

Post Reply