Microsoft KB Archive/136902

= How To Create a 3-D Surface Graph in Visual FoxPro =

Article ID: 136902

Article Last Modified on 6/29/2004

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q136902



SUMMARY
The 3-D Surface graph is not available as one of the graph types in the Graph Wizard. However, you can select the default graph from within the Graph Wizard, and then change the graph type to the 3-D Surface graph once in Microsoft Graph. Or you can use OLE automation. This article shows by example how to do it.



Step-by-Step Example
  Issue the following commands in the Command Window: OPEN DATA C:\Vfp\Samples\Data\Testdata.dbc CREATE QUERY  Select the Orders table. On the Query menu, click Query Destination, and select the Graph option. Using the right mouse button, click the Query Designer, and choose Run Query to invoke the Graph Wizard. Drag two numeric fields to the Data Series list box and drag a character field to the Axis position. Choose the default graph style, and click Finish. After the graph is created, double-click the graph to invoke Microsoft Graph.</li> On the Format menu, click Chart Type, and select the 3-D Surface Graph.</li></ol>

OLE Automation Technique
To use the OLE Automation, issue the following commands in the Command window or a program file: PUBLIC x  x=CREATEOBJECT('Form') x.Show x.AddObject('graph1','olecontrol','msgraph.chart') * class excel.chart could also be used in the above command x.graph1.type=14       && this is the 3-D Surface Graph x.graph1.height=150 x.graph1.width=250 x.graph1.visible=.t.

Keywords: kbhowto kbcode KB136902

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.