7. Properties


  This chapter describes the properties in the Perspective.class Java Bean. Each property is described in the following format:
Description:
  This section describes the operation of the property.
Data Type:
  This section sets the data type of values that can be assigned to the property (i.e., Integer, Boolean, Real, String, etc.)
Valid Range:
  This section sets the range of values that can be assigned to the property.
Default Value:
  This section sets the property's default value.
Example:
  Where applicable, this section shows a visual example of property values.
Syntax:
  This section sets the property coding syntax. If you are not using a Java Bean editor, each property can be selected as a method using a "set" or "get" in front of the property name (e.g., Property = Autoshading, Method = setAutoshading). The getPropertyName() method returns the value of the property as a boolean, integer, real, or string. The setPropertyName() method assigns a value to the property.
Code Sample:
  This section shows example code where the property has been used to modify the characteristics of a chart. Most code samples show Java code created by a Java Development Environment. Some samples show HTML code.
Notes:
  This section provides additional information about using this property.
Also See:
  This section sets other properties that interact with this property.

Autoshading


Description:
  This property enables (true) / disables (false) automatic shading of risers in a chart. If a 3D-graph type is selected, it also enables and disables shading of the 3D cube that surrounds the chart. If this property is set to true, light source settings are used to automatically shade the faces of a 3D graph, simulating a cast light beam. If this property is set to false, all sides of 3D risers or the 3D cube is the same color. It is not possible to color each face separately.
Data Type:
  Boolean
Valid Range:
  true (enable autoshading) / false (disable autoshading)
Default Value:
  true (Autoshading Enabled)
Example:
setAutoshading ( true ); setAutoshading ( false );
Syntax:
  setAutoshading ( true | false );
boolean = getAutoshading();
Code Sample:
 

/* A basic extension of the java.applet.Applet class */
import java.awt.*;
import java.applet.*;
import TDG.Perspective;
public class Applet1 extends Applet
{
public void init()
{
setLayout(null);
perspective1 = new TDG.Perspective();
perspective1.setAutoshading(false);
add(perspective1);
}

TDG.Perspective perspective1;
}

BoundsX / Y / Height / Width


Description:
  These properties are used to define the location (X,Y) and size (Height/Width) of the chart in the applet window.
Data Type:
  Real
Valid Range:
  X/Y: -32768...32767
Height/Width: 1...32767
Default Value:
  None
Syntax:
  setBoundsX ( value );
value = getBoundsX();

setBoundsY ( value );
value = getBoundsY();

setBoundsHeight ( value );
value = getBoundsHeight();

setBoundsWidth ( value );
value = getBoundsWidth();

Code Sample:
 

/* A basic extension of the java.applet.Applet class */
import java.awt.*;
import java.applet.*;
import TDG.Perspective;
public class Applet1 extends Applet
{
public void init()
{
setLayout(null);
setSize(426,266);
perspective1 = new TDG.Perspective();
perspective1.setBounds(0,0,426,266);
add(perspective1);
}
TDG.Perspective perspective1;
}

ColorMode


Description:
  This method sets the color mode to be used in the chart (e.g., automatic, color by series, etc.). For 3D Surface charts, the automatic settting will cause the chart to be colored by height. For Bar, Line, and Area charts, the automatic setting will color the chart by series if there is more than one series, but will color it by groups if there is only one series.
Data Type:
  Integer
Valid Range:
  0...2  
 

Value

Description

 

0

Automatic (Use the group as the "series" if there is only 1 series. 3D Connected Series Ribbon and Areas are colored by series, 3D Group Ribbon and Areas are colored by group).

 

1

Color by Series

 

2

Color by Group

Default Value:
  0 (Automatic)
Example:
setColorMode ( 1 ); setColorMode ( 2 );
Syntax:
  setColorMode ( value );
value = getColorMode();
Notes:
 

1.

When color by group (setColorMode(2);), the legend is always automatically turned off.

 

2.

See the Default Values in Chapter 3 for the default color that is assigned to each series.

ConnectLineMarkers


Description:
  This property enables (true) / disables (false) the display of connecting markers in a line chart. Setting this to property to false will produce a "floating marker" effect with only markers and no connecting lines.
Data Type:
  Boolean
Valid Range:
  true (Enable Connecting Lines) /false (Disable Connecting Lines)
Default Value:
  true (Enable connecting lines)
Example:
setConnectLineMarkers ( true ); setConnectLineMarkers ( false );
Syntax:
  setConnectLineMarkers ( true | false );
boolean = getConnectLineMarkers();
Code Sample:
 

perspective1.setGraphType(41);
perspective1.setConnectLineMarkers(true);
perspective1.setMarkerSizeDefault(60);
perspective1.setUseSampleData(false);
perspective1.setDepthAngle(0);
perspective1.setDepthRadius(0);

Notes:
  A vertical or horizontal line chart must be selected and the DepthRadius property must be set to zero.
Also See:
  ConnectScatterMarkers

 

ConnectScatterMarkers


Description:
  This property enables (True) / disables (False) the display of connecting lines between markers in a scatter chart. Setting this property to true draws a line connecting all markers in the same series in the order the points are in the data matrix.
Data Type:
  Boolean
Valid Range:
  true (Enable connecting lines) /false (Disable connecting lines)
Default Value:
  false (Connecting lines disabled)
Example:
setConnectScatterMarkers( false ); setConnectScatterMarkers( true );
Syntax:
  setConnectScatterMarkers ( true | false );
boolean = getConnectScatterMarkers();
Code Sample:
 

/* A basic extension of the java.applet.Applet class */
import java.awt.*;
import java.applet.*;
import TDG.Perspective;
public class Applet1 extends Applet
{
public void init()
{
setLayout(null);
perspective1 = new TDG.Perspective();
perspective1.setGraphType(61);
perspective1.setSubtitleDisplay(false);
perspective1.setConnectScatterMarkers(true);
add(perspective1);
}
TDG.Perspective perspective1;
}

Also See:
  ConnectLineMarkers

CubeFocusFactor


Description:
  This property sets the focus factor for setting perspective distortion in a 3D chart.
Data Type:
  Real
Valid Range:
  Any real number.
Default Value:
  1
Syntax:
  setCubeFocusFactor ( value );
value = getCubeFocusFactor();
Code Sample:
 

/* A basic extension of the java.applet.Applet class */
import java.awt.*;
import java.applet.*;
import TDG.Perspective;
public class Applet1 extends Applet
{
public void init()
{
setLayout(null);
setSize(426,266);
perspective1 = new TDG.Perspective();
perspective1.setGraphType(1);
perspective1.setCubeFocusFactor(0);
perspective1.setViewing3DAnglePreset(0);
perspective1.setBounds(0,0,426,266);
add(perspective1);
}
TDG.Perspective perspective1;
}

Note:

  CubeIsometricProjection must be set to false for this property to take effect.
Also See:
  CubeIsometricProjection

CubeIsometricProjection


Description:
  This property enables (true) / disables (false) isometric projection. When this property is set to true, perspective distortion (focus) factor is ignored and the graph cube is projected isometric-ly (i.e., no line of sight perspective distortion, but perfectly parallel lines, like a mechanical drawing).
Data Type:
  Boolean
Valid Range:
  true (Enable isometric projection) /false (Disable isometric projection)
Default Value:
  false (Disable isometric projection)
Syntax:
  setCubeIsometricProjection ( true | false );
boolean = getCubeIsometricProjection();
Code Sample:
 

/* A basic extension of the java.applet.Applet class */
import java.awt.*;
import java.applet.*;
import TDG.Perspective;
public class Applet1 extends Applet
{
public void init()
{
setLayout(null);
setSize(426,266);
perspective1 = new TDG.Perspective();
perspective1.setGraphType(1);
perspective1.setCubeIsometricProjection(true);
perspective1.setViewing3DAnglePreset(-1);
perspective1.setBounds(0,0,426,266);
add(perspective1);
}
TDG.Perspective perspective1;
}

Also See:
  CubeFocusFactor

CubeLightSourceX / Y / Z


Description:
  These properties set the cube light source for the X-, Y, and Z-coordinate (unit space).
Data Type:
  Real
Valid Range:
  Any real number
Default Value:
  CubeLightSourceX: 0
CubeLightSourceY: 0.4
CubeLightSourceZ: 1
Syntax:
  setCubeLightSourceX = ( value );
value = getCubeLightSourceX();

setCubeLightSourceY ( value );
value = getCubeLightSourceY();

setCubeLightSourceZ ( value );
value = getCubeLightSourceY();

Code Sample:
 

/* A basic extension of the java.applet.Applet class */
import java.awt.*;
import java.applet.*;
import TDG.Perspective;
public class Applet1 extends Applet
{
public void init()
{
setLayout(null);
setSize(426,266);
perspective1 = new TDG.Perspective();
perspective1.setGraphType(1);
perspective1.setCubeLightSourceZ(0.0);
perspective1.setCubeLightSourceY(5.0);
perspective1.setCubeLightSourceX(10.0);
perspective1.setCubeFocusFactor(0.0);
perspective1.setBounds(0,0,426,266);
add(perspective1);
}
TDG.Perspective perspective1;
}

CubePanX / CubePanY


Description:
 

The CubePanX property pans the chart (in 2D virtual coordinates) in the X direction.

The CubePanY property pans the chart (in 2D virtual coordinates) in the Y direction.

Before you use these properties, the GraphType property must select one of the 3D chart types (0...7, 9...10, 12...14) and the Viewing3DAnglePreset property must select a custom angle (-1).

Data Type:
 

Real

Valid Range:
 

Any real number

Default Value:
 

Zero

Example:

setCubePanX ( -5000 );

setCubePanX ( 0 );

setCubePanX ( 5000 );

Syntax:
 

setCubePanX ( value );
value = getCubePanX ();

setCubePanY ( value );
value = getCubePanY ();

Also See:
 

Viewing3DAnglePreset and GraphType to select a 3D chart

CubeSizeX / Y / Z


Description:
 

These properties can be used to set the size of the 3D cube in the (user) X-, Y-, and Z-directions. Before you use these properties, the GraphType property must select one of the 3D chart types (0...7, 9...10, 12...14) and the Viewing3DAnglePreset property must select a custom angle (-1). The dimensions are expressed in TDG Virtual Coordinates.

Data Type:
 

Real

Valid Range:
 

1000...25000

Default Value:
 

CubeSizeX: 8000
CubeSizeY: 7000
CubeSizeZ: 8000

Example:

setCubeSizeZ ( 4000 );

setCubeSizeZ ( 10000 );

Syntax:
 

setCubeSizeX ( value );
value = getCubeSizeX();

setCubeSizeY ( value );
value = getCubeSizeY ();

setCubeSizeZ ( value );
value = getCubeSizeZ ();

Notes
 

1.

The GraphType property must be set to one of the 3D chart types.

 

2.

The Viewing3DAnglePreset property must be set to -1 (custom angle).

Also See:
 

Viewing3DAnglePreset and GraphType to select a 3D chart.

CubeSquareRisers


Description:
 

This property enables (true) / disables (false) square risers. If true, this property forces the aspect ratio of 3D risers to be perfectly square regardless of the dimensions of the cube. If this property is set to false, risers will be drawn using the RiserWidth property and the aspect ratio of the cube. For ribbons and floating graph types, the Riser3DThicknessY property determines the height of the risers.

Data Type:
 

Boolean

Valid Range:
 

true (Force risers to be square) / false (Do not force risers to be square)

Default Value:
 

false

Syntax:
 

setCubeSquareRisers ( true | false );
boolean = getCubeSquareRisers ();

Code Sample:
 

/* A basic extension of the java.applet.Applet class */
import java.awt.*;
import java.applet.*;
import TDG.Perspective;
public class Applet1 extends Applet
{
public void init()
{
setLayout(null);
setSize(426,266);
perspective1 = new TDG.Perspective();
perspective1.setCubeSizeX(800.0);
perspective1.setCubeSquareRisers(false);
perspective1.setRiser3DThicknessZ(10);
perspective1.setRiser3DThicknessY(10);
perspective1.setRiser3DThicknessX(10);
perspective1.setGraphType(2);
perspective1.setBounds(0,0,426,266);
add(perspective1);
}
TDG.Perspective perspective1;
}

Also See:
 

RiserWidth, Riser3DThicknessY

CubeTranslationX / Y / Z


Description:
 

These properties set the translation of a 3D cube (in 3D cube coordinates) in the X-, Y-, and Z-direction.

Data Type:
 

Real

Valid Range:
 

Any real number

Default Value:
 

Zero

Example:

setCubeTranslationX(-2000);

setCubeTranslationX ( 0 );

setCubeTranslationX ( 2000 );

Syntax:
 

setCubeTranslationX ( value );
value = getCubeTranslationX();

setCubeTranslationY ( value );
value = getCubeTranslationY ();

setCubeTranslationZ ( value );
value = getCubeTranslationZ ();

Notes
 

1.

These examples use the default values assigned to the CubeTranslationY(0) and CubeTranslationZ(0) properties.

 

2.

The GraphType property must be set to one of the 3D chart types.

 

3.

The Viewing3DAnglePreset property must be set to -1 (custom angle).

Also See:
 

Viewing3DAnglePreset and the translateCube() method in Chapter 8. See the GraphType property to select a 3D chart.

 

CubeViewerX / Y / Z


Description:
 

These properties set the viewer location (in 3D coordinates) in the X-, Y-, and Z-direction.

Data Type:
 

Real

Valid Range:
 

Any real number

Default Value:
 

CubeViewerX: 0
CubeViewerY: 5000
CubeViewerZ: 40000

Example:

setCubeViewerX ( -5000 );

setCubeViewerX ( 0 );

setCubeViewerX ( 5000 );

Syntax:
 

setCubeViewerX ( value );
value = getCubeViewerX();

setCubeViewerY ( value );
value = getCubeViewerY ();

setCubeViewerZ ( value );
value = getCubeViewerZ ();

Notes
 

1.

These examples use CubeViewerY and CubeViewerZ default values.

 

2.

The Viewing3DAnglePreset property must be set to -1 (custom angle) in order for this property to have any affect on the graph.

Also See:
 

Viewing3DAnglePreset and GraphType to select a 3D chart.

 

CubeWallThickX / Y / Z


Description:
 

These properties set the thickness of the 3D-cube wall in the (user) X-, Y-, and Z-direction.

Data Type:
 

Real

Valid Range:
 

Any positive real number

Default Value:
 

CubeWallThickX: 600
CubeWallThickY: 700
CubeWallThickZ: 600

Example:
setCubeWallThickX ( 2400 ); setCubeWallThickX ( 4800 );
Syntax:
 

setCubeWallThickX ( value );
value = getCubeWallThickX ();

setCubeWallThickY ( value );
value = getCubeWallThickY ();

setCubeWallThickZ ( value );
value = getCubeWallThickZ ();

Notes
 

1.

These examples use CubeWallThickY and CubeWallThickZ default values.

 

2.

The Viewing3DAnglePreset property must be set to -1 (custom angle) in order for this property to have any affect on the graph.

Also See:
 

Viewing3DAnglePreset and GraphType to select a 3D chart.

 

CubeZoomFactor


Description:
 

This property sets the global scaling factor for zooming in/out. Values greater than one, zoom in and produce a large display of the chart within the frame. Values between zero and one zoom out and produce a smaller display of the chart within the frame.

Data Type:
 

Real

Valid Range:
 

0.2...2.0

Default Value:
 

1

Example:
setCubeZoomFactor ( 1.15 ); setCubeZoomFactor ( 0.85 );
Syntax:
 

setCubeZoomFactor ( value );
value = getCubeZoomFactor ();

Code Sample:
  perspective1 = new TDG.Perspective();
perspective1.setCubeZoomFactor(0.85);
perspective1.setGraphType(4);
perspective1.setSubtitleDisplay(false);
perspective1.setCubeWallThickX(800.0);
perspective1.setViewing3DAnglePreset(-1);
perspective1.setBounds(0,0,300,200);
add(perspective1);
Notes
 

The Viewing3DAnglePreset property must be set to -1 (custom angle) in order for this property to have any affect on the graph.

Also See:
 

Viewing3DAnglePreset and GraphType to select a 3D chart

 

DataItemsAlongSeries


Description:
 

This property determines whether data items are aligned parallel to the series (both rows or both columns). This property will take effect only when used with a chart type that requires more than one value per series (such as Scatter, Polar, or Stock charts).

Data Type:
 

Boolean

Valid Range:
 

true (Align data items parallel to series) / false (Align data items vertically within series)

Default Value:
 

true

Example:
setDataItemsAlongSeries ( true ); setDataItemsAlongSeries ( false );
Syntax:
 

setDataItemsAlongSeries ( true | false );
boolean = getDataItemsAlongSeries();

Code Sample:
 

/* A basic extension of the java.applet.Applet class */
import java.awt.*;
import java.applet.*;
import TDG.Perspective;
public class Applet1 extends Applet
{
public void init()
{
setLayout(null);
setSize(426,266);
perspective1 = new TDG.Perspective();
perspective1.setGraphType(63);
perspective1.setDataItemsAlongSeries(true);
perspective1.setBounds(0,0,426,266);
add(perspective1);
}
TDG.Perspective perspective1;
}

DataLineThickness


Description:
  When a "2.5D effect" is applied to a vertical or horizontal line chart with DepthAngle and DepthRadius, the DataLineThickness property defines the width of the "fake 3D" lines in the chart. It is expressed as a value in the range 1 to 100. A value of one produces very thin lines, a value of 100 produces very thick 3D ribbons.
Data Type:
  Integer
Valid Range:
  1...100
Default Value:
  30
Syntax:
  setDataLineThickness ( value );
value = getDataLineThickness();
Example:
setDataLineThickness ( 10 ); setDataLineThickness ( 60 );
Code Sample:
 

/* A basic extension of the java.applet.Applet class */
import java.awt.*;
import java.applet.*;
import TDG.Perspective;
public class Applet1 extends Applet
{
public void init()
{
setLayout(null);
setSize(426,266);
perspective1 = new TDG.Perspective();
perspective1.setGraphType(53);
perspective1.setDataLineThickness(60);
perspective1.setBounds(0,0,426,266);
add(perspective1);
}
TDG.Perspective perspective1;
}

Also See:
 

setLineWidth() in Chapter 8

DataTextAngleDefault


Description:
 

This property sets an angle from center-point that all data text is drawn from. The setDataTextAngle() method can override this property by applying an angle to an individual series/group intersection.

Data Type:
 

Integer

Valid Range:
 

0...360

Default Value:
 

90

Syntax:
 

setDataTextAngleDefault ( value );
value = getDataTextAngleDefault();

Example:

setDataTextDisplay ( true );
setDataTextPosition ( 0 );
setDataTextAngleDefault ( 0 );

setDataTextDisplay ( true );
setDataTextPosition ( 0 );
setDataTextAngleDefault ( 180 );

Code Sample:
 

perspective1.setDataTextDisplay(true);
perspective1.setDataTextPosition(0);
perspective1.setDataTextAngleDefault(180);

Notes
 

The DataTextPosition property must be set to zero.

Also See:
 

DataTextPosition and the get/setDataTextAngle() methods in Chapter 8.

DataTextDisplay


Description:
 

This property enables (true) / disables (false) the display of data values next to risers or markers in a chart. The DataTextFormat property can be used to define the format (i.e., %, $, etc.) of values displayed on the risers. The DataTextPosition property can be used to define the location on or next to risers where the data text values are displayed.

Data Type:
 

Boolean

Valid Range:
 

true (Enable the display of data values) / false (Disable the display of data values)

Default Value:
 

false (Disable the display of data values)

Example:
setDataTextDisplay (true); setDataTextDisplay (false);
Syntax:
 

setDataTextDisplay ( true | false );
boolean = getDataTextDisplay();

Also See:
 

DataTextFormat, DataTextPosition

DataTextFormat / DataTextFormatPattern


Description:

  When the DataTextDisplay property is set to true and data values are displayed next to markers and risers in a chart, these properties can be used to select the format of the data values. DataTextFormat can be used to select one of the standard preset formats. DataTextFormatPatten can be used to specify a standard Java number format pattern.

Data Type:

 

DataTextFormat: Integer
DataTextFormatPattern: String

Valid Range:

 

DataTextFormat: -1...14 (-1 = Use format set by DataTextFormatPattern)

 

Value

Format

Example

Value

Format

Example

 

0

General

560

8

$0K

$56K

 

1

0

560

9

0M

56M

 

2

0%

56%

10

$0M

$56M

 

3

0.0%

56.6%

11

0B

56B

 

4

0.00%

56.66%

12

$0B

$56B

 

5

$0.00

$56.66

13

0T

56T

 

6

$0

$56

14

$0T

$56T

 

7

0K

56K

     
 

DataTextFormatPattern: A pattern string in the following format:
pattern:= subpattern{;subpattern}
subpattern:= {prefix}integer{.fraction}{suffix}
prefix:= '\\u0000'..'\\uFFFD' - specialCharacters
suffix:= '\\u0000'..'\\uFFFD' - specialCharacters
integer:= '#'* '0'* '0'
fraction:= '0'* '#'*
See Chapter 3 for more detailed information about this format pattern.

Default Value:

  DataTextFormat: 0 (General)
DataTextFormatPattern: "#.#"

Syntax:

  setDataTextFormat ( value );
value = getDataTextFormat ();

setDataTextFormatPattern ( pattern );
pattern = getDataTextFormatPattern();

Notes:

  The DataTextDisplay property must be set to true in order for these properties to have any effect on the graph.

Also See:

  DataTextDisplay. Also see PieFeelerTextFormat to format data text displayed in a pie chart.

DataTextPosition


Description:
 

This property can be used to define the position where data text is displayed in the chart when the DataTextDisplay property is enabled (true).

Data Type:
 

Integer

Valid Range:
 

0...5

 
 

Value

Description

 

0

custom, use angle and radius

 

1

above risers

 

2

center on riser top edge

 

3

below riser top edge

 

4

center of riser

 

5

base of riser

Default Value:
 

1 (above risers)

Example:
setDataTextPosition ( 1 ); setDataTextPosition ( 2 );
setDataTextPosition ( 3 ); setDataTextPosition ( 4 );
Syntax:
 

setDataTextPosition ( value );
value = getDataTextPosition();

Also See:
 

DataTextDisplay, DataTextRadiusDefault

DataTextRadiusDefault


Description:
 

This property sets the radius that a data text value will be drawn out from the center of a chart riser by default. The setDataTextRadius() method can override this value by setting a specific series/group intersection format for the default data text position.

Data Type:
 

Integer

Valid Range:
 

0...100

Default Value:
 

25

Example:
setDataTextRadiusDefault ( 50 ); setDataTextRadiusDefault ( 0 );
Syntax:
 

setDataTextRadiusDefault ( value );
value = getDataTextRadiusDefault ();

Code Sample:

 

perspective1.setDataTextDisplay(true);
perspective1.setDataTextPosition(0);
perspective1.setDataTextRadiusDefault(50);

Notes
 

The DataTextPosition property must be set to zero.

Also See:
 

DataTextAngleDefault, DataTextDisplay, DataTextPosition, and the get/setDataTextAngle() and get/setDataTextRadius() methods in Chapter 8.

 

DepthAngle


Description:
 

This property sets the angle of a line from the front of the chart frame to the back (in degrees).

Data Type:
 

Integer

Valid Range:
 

0-180 degrees

Default Value:
 

45 degrees

Example:
setDepthAngle ( 25 ); setDepthAngle ( 65 );
Syntax:
 

setDepthAngle ( value );
value = getDepthAngle();

Code Sample:
 

/* A basic extension of the java.applet.Applet class */
import java.awt.*;
import java.applet.*;
import TDG.Perspective;
public class Applet1 extends Applet
{
public void init()
{
setLayout(null);
setSize(300,200);
perspective1 = new TDG.Perspective();
perspective1.setDepthAngle(65);
perspective1.setBounds(0,0,300,200);
add(perspective1);
}
TDG.Perspective perspective1;
}

Notes:
 

1.

This property applies to Bar, Line, and Area charts only.

 

2.

The DepthRadius property must be greater than zero in order for this property to be properly applied to the graph.

Also See:
 

DepthRadius

DepthRadius


Description:
 

When charts are drawn with a 2.5D effect, this property sets how far out the extruded frame will be extended. Small values produce a very narrow chart, larger values produce a thicker chart.

Data Type:
 

Integer

Valid Range:
 

0...100

Default Value:
 

40

Example:
setDepthRadius ( 20 ); setDepthRadius ( 60);
Syntax:
 

setDepthRadius ( value );
value = getDepthRadius();

Code Sample:
 

/* A basic extension of the java.applet.Applet class */
import java.awt.*;
import java.applet.*;
import TDG.Perspective;
public class Applet1 extends Applet
{
public void init()
{
setLayout(null);
setSize(300,200);
perspective1 = new TDG.Perspective();
perspective1.setDepthRadius(60);
perspective1.setBounds(0,0,300,200);
add(perspective1);
}
TDG.Perspective perspective1;
}

Also See:
 

DepthAngle

Display3DFloor / RightWall / LeftWall


Description:
 

These properties enable (true) / disable (false) the display of the floor, right wall, and left wall of the cube in a 3D chart.

Data Type:
 

Boolean

Valid Range:
 

true (Display floor, right wall, or left wall) / false (Do not display)

Default Value:
 

true (Display floor, right wall, and left wall)

Example:
setDisplay3DFloor (true); setDisplay3DFloor (false);
Syntax:
 

setDisplay3DFloor ( true | false );
boolean = getDisplay3DFloor();

setDisplay3DLeftWall ( true | false );
boolean = getDisplay3DLeftWall();

setDisplay3DRightWall ( true | false );
boolean = getDisplay3DRightWall();

Notes
 

A 3D-graph type must be selected in order for this property to have any affect on the graph. See the GraphType property.

Also See:
 

GraphType

 

 

DisplayBarAsPictograph


Description:
 

This property enables (true) / disables (false) the display of bars as pictographs in a flat 2D chart. When this property is set to true, the picture (.GIF image) identified by the setTexture() method will be applied to the bar. The setTexture() method must be used to identified a valid .GIF image. If a texture has not been identified with setTexture(), this property may cause jagged lines to be displayed on the bars. The setFillType() method should also be set to identify textures (i.e., setFillType (3); ) as the fill type.

Data Type:
 

Boolean

Valid Range:
 

true (display bars as pictographs) / false (display bars normally)

Default Value:
 

false

Syntax:
 

setDisplayBarAsPictograph ( true | false );
boolean = getDisplayBarAsPictograph();

Code Sample:
 

/* A basic extension of the java.applet.Applet class */
import java.awt.*;
import java.applet.*;
import TDG.Perspective;
public class Applet1 extends Applet
{
public void init()
{
setLayout(null);
setSize(426,266);
perspective1 = new TDG.Perspective();
perspective1.setDepthAngle(0);
perspective1.setTexture("MyPic.Gif");
perspective1.setDisplayBarAsPictograph(true);
perspective1.setDepthRadius(0);
perspective1.setBounds(0,0,632,332);
add(perspective1);
}
TDG.Perspective perspective1;
}

Also See:
 

get/setTexture() and get/setFillType() in Chapter 8

DualAxisLineDisplay


Description:
 

This property enables (true) / disables (false) the display of a line that separates the two halves of a dual axis chart. The chart type must be a bipolar type or a stock chart with volume to see the effect of this property.

Data Type:
 

Boolean

Valid Range:
 

true (display the dual axis line) / false (do not display the dual axis line)

Default Value:
 

true

Example:
setDualAxisLineDisplay ( true ); setDualAxisLineDisplay ( false );
Syntax:
  setDualAxisLineDisplay ( true | false );
boolean = getDualAxisLineDisplay();
Code Sample:
  perspective1.setUseSampleData(false);
perspective1.setGraphType(22);
perspective1.setDepthAngle(0);
perspective1.setDepthRadius(0);
perspective1.setData(0,0,10);
perspective1.setData(0,1,11);
perspective1.setData(0,2,12);
perspective1.setData(0,3,13);
perspective1.setData(1,0,20);
perspective1.setData(1,1,21);
perspective1.setData(1,2,22);
perspective1.setData(1,3,23);
perspective1.setDualAxisLineDisplay(true);
perspective1.setY1MajorGridDisplay(false);
perspective1.setY2MajorGridDisplay(false);
perspective1.setO1AxisLineDisplay(false);
perspective1.setLegendDisplay(false);
Notes:
 

For Bar, Line, and Area charts with DepthRadius set to any value greater than 0, a BiPolar plane will be displayed instead of a solid line.

Also See:
 

DualAxisSplitPosition

 

DualAxisSplitPosition


Description:
 

This property sets the position within the chart frame where the Dual-Y split position will be created. The default value of 50 is exactly in the middle. A lower number will move the split position closer to the bottom of the chart; a higher value will move it closer to the top of the chart.

Data Type:
 

Integer

Valid Range:
 

10...90

Default Value:
 

50

Example:
setDualAxisSplitPosition ( 50 ); setDualAxisSplitPosition ( 25 );
Syntax:
 

setDualAxisSplitPosition ( value );
value = getDualAxisSplitPosition();

Also See:
 

DualAxisLineDisplay

FootnoteAutofit / Display / String


Description:
 

These properties are used to autofit, display, and define the footnote object in a graph.

The FootnoteAutofit property enables/disables autofitting of footnote text. When this property is enabled, font settings for the footnote string are ignored.

The FootnoteDisplay property enables/disables drawing of the footnote string that is defined by the FootnoteString property.

The FootnoteString property is used to define the footnote text that is drawn when the FootnoteDisplay property is enabled. When a footnote string is defined with this property, the FootnoteDisplay property is automatically set to true.

Data Type:
 

FootnoteAutofit and FootnoteDisplay: Boolean
FootnoteString: String

Valid Range:
 

FootnoteAutofit: true (autofit footnote) / false (do not autofit footnote)
FootnoteDisplay: true (display footnote)/ false (do not display footnote)
FootnoteString: any printable characters

Default Value:
 

FootnoteAutofit and FootnoteDisplay: true
FootnoteString: "Footnote"

Example:

setFootnoteAutofit ( true );
setFootnoteString("THIS IS THE FOOTNOTE STRING");

setFootnoteAutofit ( false );
setFootnoteString("THIS IS THE FOOTNOTE STRING");

Syntax:
 

setFootnoteAutofit ( true | false ); / boolean = getFootnoteAutofit();

setFootnoteDisplay( true | false ); / boolean = getFootnoteDisplay();

setFootnoteString ( "FootnoteString" );
FootnoteString = getFootnoteString();

FrameDisplay


Description:
 

This property enables (true) /disables (false) drawing of the chart frame.

Data Type:
 

Boolean

Valid Range:
 

true (Draw Frame) / false (Do not draw frame)

Default Value:
 

true (Draw frame)

Example:

setFrameDisplay ( true );

setFrameDisplay ( false );

Syntax:
 

setFrameDisplay( true | false );
boolean = getFrameDisplay();

Also See:
   

GraphType


Description:
 

This property selects a graph type. Perspective for Java includes a wide variety of two- and three-dimensional graphs. They are listed and illustrated in Appendix A.

Data Type:
 

Integer

Valid Range:
 

0-89 (See Appendix A for an illustration of each graph type)

Default Value:
 

17 (Vertical Bar, Side-by-Side)

Example:

setGraphType ( 55 );

setGraphType ( 67 );

Syntax:
 

setGraphType ( value );
value = getGraphType()

Code Sample:
 

<!doctype html public "-//ietf//dtd html//en//3.0">
<html>
<head><title> put_your_title_here </title></head>
<body>
<CENTER>
<APPLET
ARCHIVE="javaCHART.jar"
CODE="TDGChartApplet.class"
WIDTH=1200 height=800>
<PARAM name=TDGSCRIPT value='
setGraphType(55); /* set graph type */
setLegendTextAutofit(true);
setTitleString("Sales Fact"); /* set title string */
'>
</APPLET>
</center>
</body>
</html>

Notes
 

See Appendix A for an illustration of each graph type.

 

Grid3DFloorDisplayX / Z


Description:
 

These properties enable (true) / disable (false) the display of X-axis and Z-axis grid lines on the floor of the cube in a 3D chart.

Data Type:
 

Boolean

Valid Range:
 

true (Display grid lines) / false (Do not display grid lines)

Default Value:

false (Do not display grid lines)

Example:

setGrid3DFloorDisplayX ( true );

setGrid3DFloorDisplayX ( false );

Syntax:
 

setGrid3DFloorDisplayX( true | false );
boolean = get3DFloorDisplayX();

setGrid3DFloorDisplayZ( true | false );
boolean = getGrid3DFloorDisplayZ();

Notes
 

A 3D-graph type must be selected in order for this property to have any affect on the graph. See the GraphType property.

Also See:
 

Grid3DLeftWallDisplayY/Z, Grid3DRightWallDisplayX/Y, Grid3DRiserDisplayX/Y/Z

Grid3DLeftWallDisplayY / Z


Description:
 

These properties enable (true) /disable (false) the display of Y-axis and Z-axis grid lines on the left wall of a 3D chart.

Data Type:
 

Boolean

Valid Range:
 

true (Display grid lines) / false (Do not display grid lines)

Default Value:
 

false (Do not display grid lines)

Example:

setGrid3DLeftWallDisplayY ( false );

setGrid3DLeftWallDisplayY ( true );

Syntax:
 

setGrid3DLeftWallDisplayY ( true | false );
boolean = getGrid3DLeftWallDisplayY();

setGrid3DLeftWallDisplayZ ( true | false );
boolean = getGrid3DLeftWallDisplayZ();

Notes
 

A 3D-graph type must be selected in order for this property to have any affect on the graph. See the GraphType property.

Also See:
 

Grid3DFloorDisplayY/Z, Grid3DRightWallDisplayX/Y, Grid3DRiserDisplayX/Y/Z

Grid3DRightWallDisplayX / Y


Description:
 

These properties enable (true) / disable (false) the display of X-axis and Y-axis grid lines on the right wall of the cube in a 3D chart.

Data Type:
 

Boolean

Valid Range:
 

true (Display grid lines) / false (Do not display grid lines)

Default Value:
 

false (Do not display grid lines)

Example:

setGrid3DRightWallDisplayX ( false );

setGrid3DRightWallDisplayX ( true );

Syntax:
 

setGrid3DRightWallDisplayX ( true | false );
boolean = getGrid3DRightWallDisplayX();

setGrid3DRightWallDisplayY( true | false );
boolean = getGrid3DRightWallDisplayY();

Notes
 

A 3D-graph type must be selected in order for this property to have any affect on the graph. See the GraphType property.

Also See:
 

Grid3DFloorDisplay, Grid3DLeftWallDisplayY/Z, Grid3DRiserDisplayX/Y/Z

 

Grid3DRiserDisplayX / Y / Z


Description:
 

These properties enable (true) / disable (false) the display of X-axis, Y-axis, and Z-axis grid lines on the risers in a 3D chart.

Data Type:
 

Boolean

Valid Range:
 

true (Display grid lines )/ false (Do not display grid lines)

Default Value:
 

false (Do not display grid lines)

Example:

setGrid3DRiserDisplayY ( false );

setGrid3DRiserDisplayY ( true );

Syntax:
 

setGrid3DRiserDisplayX ( true | false );
boolean = getGrid3DRiserDisplayX();

setGrid3DRiserDisplayY( true | false );
boolean = getGrid3DRiserDisplayY();

setGrid3DRiserDisplayZ( true | false );
boolean = getGrid3DRiserDisplayZ();

Notes
 

1.

A 3D-graph type must be selected in order for this property to have any affect on the graph. See the GraphType property.

 

2.

X and Z riser gridlines enabled by Grid3DRiserDisplayX and Grid3DRiserDisplayZ are only visible/applied to 3D surface charts.

Also See:
 

Grid3DFloorDisplay, Grid3DLeftWallDisplayY/Z, Grid3DRightWallDisplayX/Y

LegendAutomatic


Description:
 

This property enables (true) / disables (false) automatic sizing and positioning of the legend box. When this property is set to true, the charting engine will automatically set the size of the legend box to half the height/width of the chart and position the legend box in the center of the chart frame.

Data Type:
 

Boolean

Valid Range:
 

true (Charting engine automatically calculates position and size of legends) / false (Do not automatically calculate position and size of legends)

Default Value:
 

false

Syntax:
 

setLegendAutomatic ( true | false );
boolean = getLegendAutomatic ();

Also See:
 

LegendDisplay, LegendMarkerPosition, LegendReverse, LegendTextAutofit, and get/setLegendRect() in Chapter 8

 

LegendDisplay


Description:
 

This property enables/disables drawing of the legend box. It also affects all legend box objects (legend text, legend marker, and legend line). When the legend box is not drawn, neither are its components. Legends are not displayed for histogram charts or any chart that is colored by group (ColorMode=2).

Data Type:
 

Boolean

Valid Range:
 

true (Show the legends) / false (Do not show the legends)

Default Value:
 

true (Display legend)

Example:

setLegendDisplay ( false );

setLegendDisplay ( true );

Syntax:
 

setLegendDisplay ( true | false );
boolean = getLegendDisplay();

Also See:
 

LegendAutomatic, LegendMarkerPosition, LegendReverse, LegendTextAutofit, UseSeriesShapes, and get/setLegendRect() in Chapter 8

 

LegendMarkerPosition


Description:
 

This property sets the location and format of the chart legends.

Data Type:
 

Integer

Valid Range:
 

0...4

 
 

Value

Description

 

0

Legend box to the left of legend text (e.g., o Legend )

 

1

Legend text to the left of legend box (e.g., Legend o )

 

2

Legend text below legend box (e.g.,
o
Legend )

 

3

Legend text above legend box (e.g.,
Legend
o )

 

4

Legend text inside legend box

Default Value:
 

0 (Legend box to the left of legend text)

Example:

setLegendMarkerPosition ( 3 );

setLegendMarkerPostion ( 4 );

Syntax:
 

setLegendMarkerPosition ( value );
value = getLegendMarkerPosition();

Also See:
 

LegendAutomatic, LegendDisplay, LegendReverse, LegendTextAutofit, UseSeriesShapes, and get/setLegendRect() in Chapter 8

LegendReverse


Description:
 

This property enables (true) / disables (false) drawing of legends in reverse order.

Data Type:
 

Boolean

Valid Range:
 

true/false

Default Value:
 

false

Example:

setLegendReverse ( true );

setLegendReverse ( false );

Syntax:
 

setLegendReverse ( true | false );
boolean = getLegendReverse ();

Also See:
 

LegendAutomatic, LegendDisplay, LegendMarkerPosition, LegendTextAutofit, UseSeriesShapes, and get/setLegendRect() in Chapter 8

LegendTextAutofit


Description:
 

This property enables (true) / disables (false) autofitting of the legend text.

Data Type:
 

Boolean

Valid Range:
 

true (Autofit legend text) / false (Do not autofit legend text)

Default Value:
 

true (autofit legend text)

Example:

setLegendTextAutofit ( false );

setLegendTextAutofit ( true );

Syntax:
 

setLegendTextAutofit ( true | false);
boolean = getLegendTextAutofit();

Also See:
 

LegendAutomatic, LegendDisplay, LegendMarkerPosition, LegendReverse, and get/setLegendRect() in Chapter 8

LocaleCountry / LocaleLanguage


Description:

 

These properties describe how to interpret number formats in different countries and different languages. These properties are only used when a format pattern has been specified with the TextFormatPattern() method or one of the following properties: DataTextFormatPattern, PieFeelerTextFormatPattern, PieRingTotalFormatPattern, X1LabelFormatPattern, Y1LabelFormatPattern, or Y2LabelFormatPattern.

Data Type:

 

LocaleCountry: String
LocaleLanguage: String

Valid Range:

 

LocaleCountry: 2-character country code (See ISO 3166 Specification)
LocaleLanguage: 3-character language code (See ISO 3166 Specification)

Default Value:

 

LocaleCountry: "US"
LocaleLanguage: "en"

Syntax:

 

setLocaleCountry ( CountryCode );
CountryCode = getLocaleCountry ();

setLocaleLanguage (LanguageCode );
LanguageCode = getLocaleLanguage();

Also See:

 

TextFormatPattern() method and the following properties: DataTextFormatPattern, PieFeelerTextFormatPattern, PieRingTotalFormatPattern, X1LabelFormatPattern, Y1LabelFormatPattern, or Y2LabelFormatPattern

ManualRedraw


Description:
 

This property enables (true) / disables (false) manual redrawing of the chart when the chart properties/attributes are changed.

Data Type:
 

Boolean

Valid Range:
 

true ( do not automatically redraw the chart when attributes are changed / false ( automatically redraw the chart when attributes are changed)

Default Value:
 

false

Syntax:
 

setManualRedraw ( true | false );
boolean = getManualRedraw();

Code Sample:
 

/* A basic extension of the java.applet.Applet class */
import java.awt.*;
import java.applet.*;
import TDG.Perspective;
public class Applet1 extends Applet
{
public void init()
{
setLayout(null);
setSize(426,266);
perspective1 = new TDG.Perspective();
perspective1.setGraphType(44);
perspective1.setDualAxisLine(false);
perspective1.setManualRedraw(true);
perspective1.setBounds(0,0,426,266);
add(perspective1);
}
TDG.Perspective perspective1;
}

MarkerDisplay


Description:
 

This property enables (true) / disables (false) the display of markers in a 2D chart. The DepthRadius property must be set to zero in order for this property to be properly applied to the chart. Use this property to turn off marker (false) in a Line Chart when you only want to see the lines themselves and not the markers.

Data Type:
 

Boolean

Valid Range:
 

true (Display markers) / false (Do not display markers)

Default Value:
 

true (Display markers)

Example:

setMarkerDisplay ( false );

setMarkerDisplay ( true );

Syntax:
 

setMarkerDisplay ( true | false ); / boolean = getMarkerDisplay();

Code Sample:
 

public class Applet1 extends Applet
{
public void init()
{
setLayout(null);
setSize(300,200);
perspective1 = new TDG.Perspective();
perspective1.setDepthAngle(0);
perspective1.setGraphType(49);
perspective1.setMarkerSizeDefault(90);
perspective1.setMarkerDisplay(true);
perspective1.setDepthRadius(0);
perspective1.setBounds(0,0,300,200);
add(perspective1);
}
TDG.Perspective perspective1;
}

Also See:
 

ConnectLineMarkers, ConnectScatterMarkers, MarkerSizeDefault, and the following methods in Chapter 8: get/setMarkerShape(), get/setMarkerSize(), get/setMarkerTemplate(), get/setMarkerTemplateIndex()