Chapter 5.
The File Menu


 

When the File menu is selected in the chart editor window, a pull-down menu is displayed in the following format:

 

 

Select the "Load a Chart Text File" option to load a text file that you previously saved with "Save a Chart to Text File".

 

Select the "Load and Merge" option if you want to merge the contents of a previously saved text file with the current chart settings.

 

Select the "Save a Chart to Text File" option to save the methods and properties that define the current chart in a text (.TXT) file.

 

Select the "Load an External Data File" option to load the chart with data from an external data file.

 

Select the "Save Chart as GIF Image" option to create a .GIF image file that contains the chart currently displayed in the chart editing window.

 

Select the "Save ImageMap of Chart" options to save the chart as an imagemap. The imagemap coordinates are saved as an HTML file and can be viewed with an internet browser.

 

Select the "Restore Default Properties" option to restore all properties and methods that define a chart to their factory-default settings.

 

Select the "Input Param Strings from Message Window" option to load any properties/methods that you type in the message area of the window into the chart.

 

Select the "Output Properties as Different from Defaults " option to display chart properties and methods that are different from the default values in the message area of the editor window.

 

The "Create GIFs Server Style" option is for internal TDG use only.

 

Use the Zoom... options to perform zoom in and out on the data in the chart. See the Perspective for Java Programmer's Manual for information about how to use these options.

 

Select the "Exit" option to terminate the editor and return to the DOS prompt window.

 

These File Menu functions are described in the following paragraphs

LOAD A CHART TEXT FILE

 

When the "Load a Chart Text File" option is selected from the File menu, a standard file open dialog is displayed. Select a .TXT file that you previously saved with the "Save a Chart as Text File" option. When you select a file, the format of the displayed chart and the methods and properties that define the chart will be updated to reflect the contents of the selected file.

 

The following illustration shows the default chart that is displayed when you start up the Perspective Editor.

 

 

As an example, assume the "Load a Chart..." option is used to load "3DCHART.TXT" that contains the following information:

 

setGraphType(0);
setGridStep(getY1MajorGrid(),20.0);
setScaleMax(getY1Axis(),100.0);
setScaleMaxAuto(getY1Axis(),false);
setScaleMin(getY1Axis(),10.0);
setScaleMinAuto(getY1Axis(),false);
setScaleMustIncludeZero(getY1Axis(),true);

 

Using this example data, the format of the display will be updated as shown in the following illustration:

 

LOAD AND MERGE CHART TEXT FILE

 

When the "Load and Merge Chart Text File" option is selected from the File menu, a standard file open dialog is displayed. Select a .TXT file that you previously saved with the "Save a Chart as Text File" option. When you select a text file, the contents of the file will be merged with the current methods and properties that define the chart and the format of the displayed chart will be updated to reflect the merged properties and methods.

 

As an example, assume the following methods and properties currently define a chart:

 

setGraphType(0);
setGridStep(getY1MajorGrid(),20.0);
setScaleMax(getY1Axis(),100.0);
setScaleMaxAuto(getY1Axis(),false);
setScaleMin(getY1Axis(),10.0);
setScaleMinAuto(getY1Axis(),false);
setScaleMustIncludeZero(getY1Axis(),true);

 

This example data produces a chart as shown in the following illustration:

 

 

Assume the "Load and Merge..." option is used to select a .TXT file with the following parameters:

 

setDisplay(getO1Label(),false);
setDisplay(getO2Label(),false);
setGraphType(0);
setLogScale(getY1Axis(),true);
setScaleMustIncludeZero(getY1Axis(),false);
setScaleMax(getY1Axis(),100.0);
setScaleMin(getY1Axis(),10.0);

 

This example merged data produces a chart as shown in the following illustration:

 

SAVE A CHART TO TEXT FILE

 

When the "Save a Chart To Text File" option is selected from the File menu, this dialog is displayed:

 

 

Select one of the radio buttons to identify the format (HTML or Java) in which you want chart properties and methods to be displayed.

 

If you select the "Save for Java Development" option, specify a name in the Chart Object Name field. The default value is "Perspective1".

 

The "Save difference from default settings" check box enables/disables saving of all properties and methods that define the chart or only methods and properties that are different from the default values.

 

When you select the "Save" button, a standard file open dialog is displayed. Select a .TXT file where you want to save chart parameters.

LOAD AN EXTERNAL DATA FILE

 

When the "Load an External Data File" option is selected from the File menu, a standard file open dialog is displayed. Select the data file from which data is to be loaded into the chart. The displayed chart and the methods that describe it will be updated to reflect the new data.

 

Values and text in the data file can be separated by commas or tabs. A place holder can be specified in the column zero, row zero position to indicate whether or not the data includes column and row headers. Use numeric values only in the external data file if you do not want to define column and row headers. Any alpha character or text string can be specified in the first row/column to indicate the data includes column and row headers. You may specify the character string "DOWN" in the first row/column to reverse data orientation. When "DOWN" is used as the place holder, this property is added to the code that defines the chart: setSeriesAreRows(false);.

 

Note that the number of values required for each series/group will be different depending on the chart type that is selected. See the Perspective for Java Programmer's Manual for detailed information about values that are required for each chart type.

 

As an example of loading external data from a file, assume the following data file is loaded into the default bar chart that.

 

x,January,February,March
Blocks,2,4,6
Crates,8,10,12
Widgets,1,3,5
Super-Widgets,9,11,13

 

This data will produce a bar chart in the following format:

 

SAVE CHART AS GIF IMAGE

 

When the "Save Chart As GIF Image" option is selected from the File menu, a standard file open dialog is displayed. Select a .GIF file where you want to save the chart image. The resulting .GIF file can be read by a browser and/or changed using any standard graphics package that reads GIF format images.

ý NOTE:

Only the chart is saved in the .GIF file, the surrounding editor message area, menus, etc. are not saved.

SAVE IMAGE MAP OF CHART

 

This option can be used to create an HTML files that contains the coordinates of all the selectable objects in a chart.

RESTORE DEFAULT PROPERTIES

 

When the "Restore Default Properties" option is selected from the File menu, all properties and methods that define the chart in the editing window will be returned to their factory-default settings. This includes the default graph type (17, a bar chart).

INPUT PARAM STRINGS FROM MESSAGE WINDOW

 

When the "Input Param Strings from Message Window" option is selected from the File menu, the editor will load any properties/methods that you type in the message are of the window into the chart. For example, assume setColorMode(2); is entered in the message window. When the "Input Param Strings from Message Window" is selected, the chart will be changed to color-by-group as shown in the following illustration:

 

OUTPUT PROPERTIES AS DIFFERENT FROM DEFAULTS

 

When the "Output Properties as Different From Defaults" option is selected from the File menu, the message area of the editor window will display all chart properties and methods that have been changed from their default values. As an example, the following information is displayed in the message window when the 3D effect is disabled in a bar chart and the location of the Y1 Axis is changed:

 

setAxisSide ( getY1Axis(), 1);
setDepthRadius (0);