[Bottom]

      Microsoft Graph and Visual FoxPro
      Tips and Tricks

      OLE Automation
      of Microsoft Graph (MSGRAPH) Version 5 with
      Visual FoxPro Verison 5

      In Association with Amazon.com
      In Affiliation with Beyond.com

      Notes, Tips, Tricks and Frustrations about OLE Automation of Microsoft Graph (MSGRAPH) Version 5 with Visual FoxPro Version 5.
      Note: OLE stands for Object Linking and Embedding

      S I G N I F I C A N T   L I M I T A T I O N S   O F   M S G R A P H
      within DISTRIBUTED Visual FoxPro Applications
      See Microsoft's Knowledge Base Article entitled
      INFO: Limitations of Run-Time MS Graph
      SUMMARY
        The Setup Wizard allows the Microsoft Graph run-time module to be included in distributed applications. However, the run-time module does not include the full functionality of the MS Graph application shipped with FoxPro.

      WORKAROUNDS
      • Although the license agreement for MS Graph prohibits the distribution of the full version of MS Graph with applications, if the workstation on which the executable file is installed has the full version of MS Graph installed through FoxPro or another software package, that workstation will be able to access full graph functionality through the distributed executable file.
      • You can use a third-party graphics package instead of MS Graph to create graphs in distributed executables.

      MORE INFORMATION
        The MS Graph run-time module can only be used to view existing graphs that have been created and saved through the FoxPro Graph Wizard. The existing graphs cannot be updated to include new data and formatting changes, except using UPDATEGRPH. The run-time module also prohibits new graphs from being created.

      S I G N I F I C A N T   L I M I T A T I O N S   O F   M S G R A P H
      within DISTRIBUTED Visual FoxPro Applications
      See Microsoft's Knowledge Base Article entitled
      INFO: Limitations of Run-Time MS Graph

      Added on 04/08/1999   Updated on 04/08/1999


      Alternative Graphing Controls to MSGRAPH


      Flipper Graphics Control by ProWorks
      Chart FX by Software FX
      Graphic Server by Pinnacle Publishing


      Alternative Graphing Controls to MSGRAPH

      Added on 05/11/1999   Updated on 05/11/1999

      Index...
      [Top][Bottom]

      Notes about Microsoft Graph and Visual FoxPro...
      Selected Knowledge Base Articles about Microsoft Graph and Visual FoxPro... (Updated!)
      Microsoft's FTP (Download) Software Library...
      Frustrations about Microsoft Graph and Visual FoxPro...

      Tips and Tricks...
      Where to find OLE Automation and Technical Information about Microsoft Graph (MSGRAPH)
      Setting the Minimum/Maximum value for the Value (Y) Axis
      Setting the Axis Title (and other attributes) of the Category (X) Axis or Value (Y) Axis
      Use Excel to Gernerate a Visual Basic for Applications (VBA) Macro to get you started
      Use ChartWizard() to set basic Graph Attributes

      How to turn off Minor (or Major) Ticks Marks
      Setting the Minimum value for the Category (X) Axis
      Use ScreenLock to reduce flicker
      View/Modify Setting and Data with a Right-Click on the Graph
      How do you want Microsoft Graph to handle missing data? Use DisplayBlanksAs to specify.

      What are the available Graph Types and SubTypes?
      Specifying Graph Types and SubTypes
      Setting the Maximum value for the Category (X) Axis
      Using MS Graph with MS Visual FoxPro, Article by Michael Darrin Chaney

      Future Tips and Tricks...

      • SCAN/ENDSCAN can be used to pass through the SQL/Cursor
      • Multiple SCANs/ENDSCANs can be used to pass through the SQL/Cursor
      • Explaination and sample(s) of how to format data to be passed to MSGraph. CRLFs between records and TABs between fields
      • Info about ByColumn data formatting. Info about ByRow data formatting.
      • Sample(s) of how to pass data to MSGraph
      • With the correct command [CREATE TABLE tablename (Graph G)] Graphs are stored in database files in a General Field
      • Printing a Graph using a REPORT FORM
      • Printing two Graphs on the same report
      • Cleaning up Graph database files


      [Index][Top][Bottom]
      Notes about Microsoft Graph and Visual FoxPro...

      One of the biggest problems that I've had with Microsoft Graph is the lack of definitive information about controlling the graph programatically. There is very little information about OLE Automation of Microsoft Graph and even less concerning its use with Visual FoxPro. As a result I have spent a lot of time search for help. I've looked for books, online articles, in help files, etc. I have found very little helpful definitive information.

      The on book that I have found particularly useful is...

      • Using Excel Visual Basic For Applications: Special Edition, by Jeff Webb [Buy It] [NOW Available!]
        (This is NOT a Visual FoxPro book, but I found it useful for developing applications that require the use of MSGRAPH. It contains two chapters and an appendix with Intrinsic Constants.)

      This book contains two chapters that will be helpful in working with Charts in Visual FoxPro. "Creating Charts", Chapter 13, and "Controlling Charts", Chapter 14, provides a lot of information and examples about programming your charts. The "Table of Intrinsic Constants", Appendix C, is valuable for creating the #DEFINEs that you will be using.

      This book is a reference for Excel and its Graphing/Charting software, so not everything applies nor is done in exactly the same way in Visual FoxPro and Microsoft Graph. (Excel does not use MSGraph, it has it's own graphing software.) It does supply examples and information that will help you understand how things work.

      The other books that I have found with information about Using MS GRAPH with Visual FoxPro are...
      • Visual FoxPro Expert Solutions/Book and CD-ROM, by Miriam Liskin [Buy It]
      • Hacker's Guide to Visual FoxPro 3.0 : An Irreverent Look at How FoxPro Really Works, by Tamar E. Granor, et al [Buy It]

      Both of these are good books, but don't buy them just for the section on MS GRAPH. Miriam has a little more information than Tamar does about MS GRAPH.

      There should be a Help file on you system called, VBA_GRP.HLP. Mine is located in...

         C:\Program Files\Common Files\Microsoft Shared\Msgraph5\VBA_GRP.HLP
      
      Yours may be someplace else. Use the find utility to find it. This Help file is also a good place to get information about Visual Basic for Applications and MSGraph.

      This help file briefly describes the Methods and Properties related to Microsoft Graph. There are short examples contained.

      If you're a Compuserve member, go to the VFOX forum and download a file named MSGRAPH5.H. This file is a header file that includes the Intrinsic Constants for MSGRAPH Version 5. (These are also listed in Jeff Webb's book, Using Excel VBA, in Appendix C, "Table of Intrinsic Constants". [Buy It])[NOW Available!]

      If you're not a member of Compuserve, you might want to consider joining. The VFOX Forum is a great forum.

      I have a web page Microsoft Graph (MSGRAPH) Version 5: Properties, Methods and Intrinsic Constants that is an edited copy of what was reported by the OLE/COM Object Viewer that is found in Visual C/C++. This report shows you all of the Properties and Methods that are in MSGRAPH/5. The report also contains a list of all the Intrinsic Contstants that you will need. I have another web page that is just a list of the Microsoft Graph (MSGRAPH) Version 5: Intrinsic Constants for Visual FoxPro. This page is a sorted list of the FoxPro #DEFINEs that you need.

      There is an article on the Microsoft Knowledge Base that lists these contants also. The article is INFO: Microsoft Graph Constants. Please note: There is at least one value that is wrong in this article. The article has xl3DArea defined as -409. It should be defined as -4098.

      On Compuserve, in the VFOX forum there is a file called FRMGRAPH.ZIP. This file is a sample of how to do OLE Automation of MS GRAPH. It reads a database, creates a cursor and passes that information to MSGRAPH. The program also sets some parameters related to how the graph is to be displayed.

      There is an article on the Microsoft Knowledge Base, PRB: Olegraph.scx Sample Fails if Graph 8 Is Installed, that discribes a problem with the provided OLE Automation of MS Graph example that comes with Visual FoxPro. This application is a simple example, but is worth looking at. It is found in ..\samples\solution\ole.


      [Index][Top][Bottom]
      Selected Microsoft Knowledge Base Articles...

      Microsoft Knowledge Base - Basic Search
      Microsoft Knowledge Base - Advanced Search

      There are limitations related to what capabilities are available to applications that distribute MSGRAPH. See the following Article.

      • INFO: Limitations of Run-Time MS Graph

      There are a couple of Microsoft articles that talk about MSGRAPH and OLE Automation.

      • Using Microsoft OLE Automation Servers to Develop Solutions by Ken Lassesen of Microsoft (49 Pages Printed)
      • Mapping the Microsoft Graph Object: Graph 5.0 (Include an MS Graph Object Map in several formats.) by Ken Lassesen of Microsoft
      • Your Unofficial Guide to Using OLE Automation with Microsoft Office and Microsoft BackOffice by Ken Lassesen of Microsoft

      The Microsoft Knowledge Base contains some articles about MSGRAPH and it's use in products like Access, Excel, etc...

      • ACC2: How to Create Fixed-Scale Charts in Reports/Forms
      • ACC97: Microsoft Access 97 Sample Graphs Available on MSL
      • ACC: How to Automate Changes to Properties of a Graph Axis
      • ACC: How to Create Fixed-Scale Charts in Reports/Forms 95/97
      • XL97: Changing Chart Type Changes X-Axis
      • XL98: Overview of the Built-In Chart Types
      • XL: An Overview of Built-in Chart Types
      • XL: Changing Chart Type Changes X Axis
      • XL: Glossary of Charting Terminology

      Microsoft Knowledge Base usage

      • How to Find Answers Online

      Microsoft Knowledge Base - Basic Search
      Microsoft Knowledge Base - Advanced Search

      The Microsoft Knowledge Base Articles related to Visual FoxPro and MSGRAPH are found at Richard Hendricks' Visual FoxPro Tips under the List of Selected Microsoft Knowledge Base Articles... Section


      [Index][Top][Bottom]
      Microsoft's FTP (Download) Software Library...

      Microsoft has an FTP (Download) Site that contains a lot of patches, examples and free utilities.

      Take a look at the Index.txt file for the /Softlib/MSLFILES subdirectory. Use this file to find the files that you need. The files are stored in /Softlib/MSLFILES. There are lots of files here. Look around...

      The following link, takes you to the Microsoft's Software Library Files FTP Directory (/Softlib/MSLFILES). You will be presented with a FTP list of files. You can click on the file(s) that you want or add the filename to the URL ("ftp://ftp.microsoft.com/Softlib/MSLFILES/") in the "Location:" text box.


      [Index][Top][Bottom]

      Frustrations...

      • Lack of good solid definitive documentation about Microsoft Graph (MSGRAPH) in any language.
      • Lack of good solid examples of programming Microsoft Graph (MSGRAPH) in any language. Most of the example are trivial.
      • The graphics package for Excel appears to be documented much better and many of the concepts can be carried over to MSGRAPH. But not all of the features.
      • I have been unable to get the PlotBy = xlColumns option in ChartWizard() to work.
      • I have been unable to specify the Minimum/Maximum values for the Category (X) Axis. You are supposed to be able to, for XYScatter Graphs, but I can't. Setting the Minimum/Maximum values for the Value (Y) Axis - is easy. If you know how to do this, please eMail me at 70302.144@compuserve.com

      Platform: Windows/95
      Products: Visual FoxPro/5 and Microsoft Graph/5
      Prepared: 07/14/1998 .. 07/23/1998
      Author: Richard Hendricks [eMail] [Homepage]
      [Copyright & Disclaimer]


      Tips and Tricks about Microsoft Graph and Visual FoxPro
      OLE Automation


      [Index][Next] 01 [Prev][Top][Bottom]
      Where to find OLE Automation and Technical Information about Microsoft Graph (MSGRAPH)

      The places that I have found information about OLE Automation of Microsoft Graph (MSGRAPH) are...

      • VBA_GRP.HLP, mine is in C:\Program Files\Common Files\Microsoft Shared\Msgraph5\VBA_GRP.HLP. Use the Find utility to find yours.
      • Under the List of Selected Microsoft Knowledge Base Articles... under MS Graph Section of Visual FoxPro Tips by Richard Hendricks
      • Selected Microsoft Knowledge Base Articles... found on this page
      • Visual FoxPro Tips by Richard Hendricks. These are my tips (and maybe some tricks) for Visual FoxPro Versions 3 and 5. Send me your Tips
      • Microsoft Graph (MSGRAPH) Version 5: Properties, Methods and Intrinsic Constants organized by Richard Hendricks
      • Intrinsic Constants for Visual FoxPro prepared by Richard Hendricks
      • Microsoft Knowledge Base - Basic Search
      • Microsoft Knowledge Base - Advanced Search
      • Using Excel Visual Basic For Applications: Special Edition, by Jeff Webb [Buy It][NOW Available!]

      Platform: Windows/95
      Products: Microsoft Graph/5 and Visual FoxPro/5
      Prepared: 07/26/1998
      Author: Richard Hendricks [eMail] [Homepage]
      [Copyright & Disclaimer]


      [Index][Next] 02 [Prev][Top][Bottom]
      Setting the Minimum/Maximum value for the Value (Y) Axis

      To set the Minimum and Maximum Value for the Value (Y) Axis, you must first set the MinimumScaleIsAuto and MaximumScaleIsAuto to .F.

        #DEFINE xlValue 2
        WITH this.oleGraph.Axes(xlValue) && Y Axis
          .MaximumScaleIsAuto = .F.
          .MinimumScaleIsAuto = .F.
          .MaximumScale = 50
          .MinimumScale = -50
        ENDWITH
      

      Note: this will not work on the Category (X) Axis. I have tried and tried and tried... It does not work. (This is one of my frustrations!)

      Platform: Windows/95
      Products: Microsoft Graph/5 and Visual FoxPro/5
      Prepared: 07/25/1998
      Author: Richard Hendricks [eMail] [Homepage]
      [Copyright & Disclaimer]


      [Index][Next] 03 [Prev][Top][Bottom]
      Setting the Axis Title (and other attributes) of the Category (X) Axis or Value (Y) Axis

      To set the Axis Title and other Axis Title attributes you must first set the HasTitle to .T.

        #DEFINE xlCategory 1
        #DEFINE xlValue 2
        #DEFINE xlVertical -4166
        WITH this.oleGraph.Axes(xlValue) && Y Axis
          .HasTitle = .T.
          .AxisTitle.Caption = "Title for Y Axis"  && .AxisTitle.Text is also OK
          .AxisTitle.Orientation = xlVertical
          .AxisTitle.Font.Italic = .T.
          .AxisTitle.Font.Bold = .T.
          .AxisTitle.Font.Size = 8
        ENDWITH
        WITH this.oleGraph.Axes(xlCategory) && X Axis
          .HasTitle = .T.
          .AxisTitle.Caption = "Title for X Axis"  && .AxisTitle.Text is also OK
          .AxisTitle.Font.Italic = .T.
          .AxisTitle.Font.Bold = .T.
          .AxisTitle.Font.Size = 8
        ENDWITH
      

      Platform: Windows/95
      Products: Microsoft Graph/5 and Visual FoxPro/5
      Recorded: 07/25/1998
      Author: Richard Hendricks [eMail] [Homepage]
      [Copyright & Disclaimer]


      [Index][Next] 04 [Prev][Top][Bottom]
      Use Excel to Gernerate a Visual Basic for Applications (VBA) Macro to get you started

      You can use Microsoft Excel (and maybe other Microsoft Apps) to generate Visual Basic for Applications (VBA) code to get you started with your graph.

      To do this...

      Start Excel, prepare the data you want to graph, Select "Tools" | "Record Macro" | "Record New Macro" | "Options" | "Language" set to "Visual Basic" | "OK"

      Set up the Chart the way that you want it. Stop the recording and use the generated macro to give you a start.

      Platform: Windows/95
      Products: Microsoft Graph/5 and Visual FoxPro/5
      Recorded: 07/25/1998
      Author: Richard Hendricks [eMail] [Homepage]
      [Copyright & Disclaimer]


      [Index][Next] 05 [Prev][Top][Bottom]
      Use ChartWizard() to set basic Graph Attributes

      Microsoft Graph Supports ChartWizard(). This allows you to set quite a few attributes about your graph in one call.

      chart.ChartWizard( Source, Gallery, Format, PlotBy, CategoryLabels,
                         SeriesLabels, HasLegend, Title, CategoryTitle,
                         ValueTitle, ExtraTitle )
      
         Source - where does the data come from, normally left blank and uses
                  the current cusor or database
         Gallery - type of graph, xlXYScatter, etc
         Format - subtype of graph
         PlotBy - is the data by rows or by columns, xlRows or xlColumns
         CategoryLabels - Are there labels in the data?
                          If so, what row or column?
         SeriesLabels - Are there labels in the data?
                        If so, what row or column?
         HasLegend - Does the graph have a Legend? .T./.F.
         Title - Title of the Chart
         CategoryTitle - Category (X) Axis Title
         ValueTitle - Value (Y) Axis Title
         ExtraTitle - Extra Title, I haven't gotten this to work.
      
      
         #DEFINE xlXYScatter   -4169
         #DEFINE xlRows      1
         this.oleGraph.ChartWizard( , xlXYScatter, 1, xlRows, 1, 1, .T.,;
                                   "Title of my chart", "X Axis Title",;
                                   "Y Axis Title", "" )
      

      Note: I have not been able to get the xlColumns option for PlotBy to work. Only xlRows, seems to work.

      Platform: Windows/95
      Products: Microsoft Graph/5 and Visual FoxPro/5
      Recorded: 07/25/1998
      Author: Richard Hendricks [eMail] [Homepage]
      [Copyright & Disclaimer]


      [Index][Next] 06 [Prev][Top][Bottom]
      How to turn off Minor (or Major) Ticks Marks

      Do not set MinorUnit to 0. This will cause an error. Set MinorUnit to 1 and MinorTickMark to xlNone.

        #DEFINE xlCategory 1
        #DEFINE xlValue 2
        #DEFINE xlNone -4142
        #DEFINE xlCross 4
        WITH this.oleGraph.Axes(xlValue) && works for xlCategory also
          .MinorUnit = 1                 && works for MajorUnit too
          .MinorTickMark = xlNone        && works for MajorTickMark too
        ENDWITH
      

      Platform: Windows/95
      Products: Microsoft Graph/5 and Visual FoxPro/5
      Prepared: 07/26/1998
      Author: Richard Hendricks [eMail] [Homepage]
      [Copyright & Disclaimer]


      [Index][Next] 07 [Prev][Top][Bottom]
      Setting the Minimum value for the Category (X) Axis

      You CAN NOT use the approach of setting the MinimumScale and MaximumScale values for the Category (X) Axis as you do with the Value (Y) Axis. See Setting the Minimum/Maximum value for the Value (Y) Axis

      You can set the Minimum Value of the Category (X) Axis, if it is the value that you want to cross the Value (Y) Axis.

      If lets say you want the minimum value on the Category (X) Axis to be 50, then you would use the following code...

        #DEFINE xlCategory 1
        #DEFINE xlCustom  -4114
        WITH this.oleGraph.Axes(xlCategory) && X axis
          .Crosses = xlCustom
          .CrossesAt = 50
        ENDWITH
      

      Frustration! I have been unable to specify the Minimum/Maximum values (with the MinimumScale and MaximumScale) for the Category (X) Axis. You are supposed to be able to, for XYScatter Graphs, but I can't. If you know how to do this, please eMail me at 70302.144@compuserve.com

      Platform: Windows/95
      Products: Microsoft Graph/5 and Visual FoxPro/5
      Prepared: 07/26/1998
      Author: Richard Hendricks [eMail] [Homepage]
      [Copyright & Disclaimer]


      [Index][Next] 08 [Prev][Top][Bottom]
      Use ScreenLock to reduce flicker

      During window Resizing and other situation, you will want to set ScreenLock to .T. This will reduce the amount of flickering and unwanted sets that the user will see. After the operation is complete, set ScreenLock to .F.

        thisform.ScreenLock = .T.
        <<resizing or other redrawing code>>
        thisform.ScreenLock = .F.
      

      Platform: Windows/95
      Products: Microsoft Graph/5 and Visual FoxPro/5
      Prepared: 07/26/1998
      Author: Richard Hendricks [eMail] [Homepage]
      [Copyright & Disclaimer]


      [Index][Next] 09 [Prev][Top][Bottom]
      View/Modify Setting and Data with a Right-Click on the Graph

      During development, you can Right-Click on the graph to see and set graph attributes and the data behind the graph.

      Right-Click on the Graph. You will be presented with a Popup Menu that contains Edit and Open. Click on Open. A Window titled, "Microsoft Graph - Graph in" with be added to your application. The window has a tool bar and a menu bar. From the menu bar you can...

      • View/Change the data behind the graph: View | Datasheet
      • Verify/Change the Format of the Graph: Format | Change Type or AutoFormat
      • View/Set other attributes of the Graph: Tools | Options
      • See what order the data is being read in "by Rows" or "by Columns". Change the order: Data | Series in Rows or Series in Columns

      There are lots of other things that you can do in this mode. Take some time to look around. It will help you debug your graphs.

      Platform: Windows/95
      Products: Microsoft Graph/5 and Visual FoxPro/5
      Prepared: 07/27/1998
      Author: Richard Hendricks [eMail] [Homepage]
      [Copyright & Disclaimer]


      [Index][Next] 10 [Prev][Top][Bottom]
      How do you want Microsoft Graph to handle missing data? Use DisplayBlanksAs to specify.

      You can specify how you want Microsoft Graph to handle blank or missing data. You do this through the DisplayBlanksAs

        #DEFINE xlNotPlotted 1  && Default
        #DEFINE xlZero 2
        #DEFINE xlInterpolated 3
        this.oleGraph.DisplayBlanksAs = xlZero
      

      Platform: Windows/95
      Products: Microsoft Graph/5 and Visual FoxPro/5
      Prepared: 07/27/1998
      Author: Richard Hendricks [eMail] [Homepage]
      [Copyright & Disclaimer]


      [Index][Next] 11 [Prev][Top][Bottom]
      What are the available Graph Types and SubTypes?

      The available Graph types are...

        #DEFINE xl3DArea -4098
        #DEFINE xl3DBar -4099
        #DEFINE xl3DColumn -4100
        #DEFINE xl3DLine -4101
        #DEFINE xl3DPie -4102
        #DEFINE xl3DSurface -4103
        #DEFINE xlCombination -4111
        #DEFINE xlDoughnut -4120
        #DEFINE xlRadar -4151
        #DEFINE xlXYScatter -4169
        #DEFINE xlArea 1
        #DEFINE xlBar 2
        #DEFINE xlColumn 3
        #DEFINE xlLine 4
        #DEFINE xlPie 5

      The SubType for the Graph vary depending on what Graph you selected. In Microsoft Excel or in Visual FoxPro under AutoFormat, you can see the possible SubTypes. The number on the sample is the number of the SubType.

      Visual FoxPro: Right-Click on the Graph. From the Popup Menu select Open. On the Window titled, "Microsoft Graph - Graph in" from the menu bar select Format | AutoFormat

      Microsoft Excel: Create some sample data, highlight it and click on the ChartWizard Icon or Insert | Chart | On this Sheet or As New Sheet. Walk through the Wizard and view the SubTypes.

      Platform: Windows/95
      Products: Microsoft Graph/5 and Visual FoxPro/5
      Prepared: 07/27/1998
      Author: Richard Hendricks [eMail] [Homepage]
      [Copyright & Disclaimer]


      [Index][Next] 12 [Prev][Top][Bottom]
      Specifying Graph Types and SubTypes

      There are at least two ways to specify the Graph Type (Scatter, Line, Pie, etc) and Sub Graph Type.

      ChartWizard(): the 2nd and 3rd argument of the ChartWizard() call is the Graph Type and Sub Type, respectively. ChartWizard() calles them Gallery and Format.

        #DEFINE xlXYScatter -4169
        #DEFINE xlRows      1
        this.oleGraph.ChartWizard( ,xlXYScatter, 1, xlRows, 1, 1, .T.,;
                                   "Chart Title", "X Axis Caption",;
                                   "Y Axis Caption", "" )
      

      AutoFormat(): the 1st argument, Gallery, is the Graph Type and the 2nd argument, Format, is the Sub Type.

        #DEFINE xl3DPie       -4102
        this.oleGraph.AutoFormat( xl3DPie, 1 )
      

      See What are the available Graph Types and SubTypes?

      Platform: Windows/95
      Products: Microsoft Graph/5 and Visual FoxPro/5
      Prepared: 07/28/1998
      Author: Richard Hendricks [eMail] [Homepage]
      [Copyright & Disclaimer]


      [Index][Next] 13 [Prev][Top][Bottom]
      Setting the Maximum value for the Category (X) Axis

      You CAN NOT use the approach of setting the MinimumScale and MaximumScale values for the Category (X) Axis as you do with the Value (Y) Axis. See Setting the Minimum/Maximum value for the Value (Y) Axis

      You can set the Maximum Value of the Category (X) Axis, with the the TickLabelSpacing attribute.

      The TickMarkSpacing attribute can be used to specify the Tick Marks.

      If lets say you want the maximum value on the Category (X) Axis to be 50 and the tick marks to be by 10s, then you would use the following code...

        #DEFINE xlCategory 1
        WITH this.oleGraph.Axes(xlCategory) && X axis
          .TickLabelSpacing = 50
          .TickMarkSpacing = 10
        ENDWITH
      

      Also see, Setting the Minimum value for the Category (X) Axis

      Frustration! I have been unable to specify the Minimum/Maximum values (with the MinimumScale and MaximumScale) for the Category (X) Axis. You are supposed to be able to, for XYScatter Graphs, but I can't. If you know how to do this, please eMail me at 70302.144@compuserve.com

      Platform: Windows/95
      Products: Microsoft Graph/5 and Visual FoxPro/5
      Prepared: 07/31/1998
      Author: Richard Hendricks [eMail] [Homepage]
      [Copyright & Disclaimer]


      [Index][Next] 14 [Prev][Top][Bottom]
      Using MS Graph with MS Visual FoxPro

      Article entitled Using MS Graph with MS Visual FoxPro by Michael Darrin Chaney

      Platform: Windows/95
      Products: Microsoft Graph/5 and Visual FoxPro/5
      Article by: Michael Darrin Chaney [eMail]
      Tip Prepared : 05/10/1999
      Tip Prepared by: Richard Hendricks [eMail] [Homepage]
      [Copyright & Disclaimer]


      [Top]

      Search:
      Keywords:
      In Association with Amazon.com

      Know what book or album you want?

      Enter the ISBN:
      (Leave out the dashes)




      Copyright and Disclaimer

      Copyright © 1998 by Richard Hendricks

      All Rights Reserved.

      Feel free to use these tips and tricks in your applications and feel free to share copies and the information to your friends and colleagues. You may not re-sell the original or the source code. If you redistribute it you must include the disclaimer and all original copyright notices.

      Do not remove the contributors names, copyright notices and disclaimer. Give credit where credit is due.

      The information given here is believed to be correct, but no legal liability can be accepted for its use.

      No warranty express or implied, is given as to the use of the information or source code. Use at your own risk.

      The information given on this site has been carefully checked and is believed to be correct, but no legal liability can be accepted for its use. Do not use code, components or techniques unless you are satisfied that they will work correctly in your applications.

      Microsoft Corporation holds the rights and copyrights for FoxPro, Visual FoxPro, Visual Basic, Excel, Access and Microsoft Graph

      [Index][Top][Bottom]