次の方法で共有


Graph Wizard

The Graph wizard creates a graph from a Visual FoxPro table using Microsoft Graph. You will want to use a graph of one kind or another to make it easier to visually display or evaluate data contained in large tables or reported in dense spreadsheets.

The larger your table is, the longer it will take the wizard to process your graph. You might consider limiting the scope of records in a large table by creating a view before you run the Graph wizard. For more information, see How to: Create Queries.

To access the Graph wizard

  1. From the Tools menu, choose Wizards, and click Query.

  2. In the Wizard Selection dialog box, choose Graph Wizard.

Step 1 – Select Fields

In this step, you can choose a free table or a table within a database as the source for your graph. This can normalize the input in data entry forms, and thereby, your data tables. You can select fields from only a single table or view. This selection must include at least one numeric field.

To select the fields for your graph

  1. Use the Databases and Tables controls to locate and select the table you want to use.

  2. In the Available fields window, select one or more fields you want to use from the selected table, and use the arrow buttons to move them to the Selected fields window.

    Note

    If you choose a general or automation field in this step, the field will not be available in the next step for defining the graph layout.

Step 2 – Define Layout

In this step, you specify which numeric field is graphed and which field provides the divisions along which those values are graphed. Drag one or more of the available numeric fields from the Available fields window to the Data series window. Drag another field from the Available fields window to the Axis box beneath the graph picture. For example, in a table containing salary amounts as a numeric field, you might choose the salary field and a name or a region field to chart against.

Step 3 - Select Graph Style

In this step, you select a style of graph that effectively presents the information. Each graph style plots the data in a different manner. Look at the pictures on the buttons to choose a style that meets your needs. The following list summarizes the available chart types:

  • Area and 3D area
    Indicates the relative importance of values over a period of time, and it emphasizes the amount of change rather than the rate of change.

  • Bar and 3D bar
    Indicates values of discrete elements relative to each other. This is similar to a column chart but arrayed vertically.

  • Column and 3D column
    Indicates variation over a period of time or draws comparisons between discrete items. The horizontal array of columns suggests time flow more than a bar chart.

  • Pie and 3D pie
    Indicates the relationships or proportions of parts to a whole. This type of graph always contains just one data series.

  • Line and ribbon (3D line)
    Indicates trends or changes in data over a period of time. This is similar to an area chart, but it emphasizes time flow and rate of change rather than amount of change.

  • Scatter (XY)
    Indicates the relationship or degree of relationship between numeric values in different groups of data. This type of chart is useful for determining patterns or trends and for determining whether variables are dependent upon or affect one another.

Step 4 - Finish

In this step, you specify the way the graph is output and whether it will display the name of the selected numeric field and null values. You can save the graph to a form, you can use the graph on a report by saving it to a table, or you can create a query that generates the graph.

Saving to a Form

If you choose to save the graph to a form, the wizard creates a form containing the graph, and optionally, a legend of the charted value(s).

Saving to a Table

If you choose to save the graph to a table, the wizard creates a table with a single record containing a General field that stores an Automation object for your graph. You then can include this field on a report. After the wizard is finished, it leaves your new table open. To view the graph, browse the new table and double-click the Olegraph field.

Creating a Query

If you choose to create a query, the wizard saves a query that sends its results to the graph you have specified. After the wizard saves the query, you can open and modify it like any other query in the Query designer.

  • Show null values check box
    Specifies that the graph represent any null values as well as all positive and negative values. For example, it might be important to your presentation to show that nothing happened on particular days or with particular clients.

  • Add a legend to the graph check box
    Specifies that the graph include a legend naming the graphed value. This helps make your graph and its data more readable.

  • Preview button
    Makes it possible for you to see the graph before saving it to a form, table, or query file.

See Also

Tasks

How to: Run Queries (Visual FoxPro)

How to: Create Queries (Visual FoxPro)

Reference

Cross-Tab Wizard

Local View Wizard

Query Wizard

Remote View Wizard

Other Resources

Wizards (Visual FoxPro)