Grid & Tick Methods

get/setDrawTicksPerpendicular()

In 2D charts where depth effect can be applied with DepthAngle and DepthRadius and independent tick marks are drawn, these methods get/set whether or not the tick marks must be drawn perpendicular to the axis.

SYNTAX:

boolean getDrawTicksPerpendicular (IdentObj id);
void setDrawTicksPerpendicular (IdentObj id, boolean newValue);

INPUT:

id; object ID returned by a getObject() method. It must be one of the tick mark objects (e.g., getY1MajorTick()).

newValue; true = draw ticks perpendicular to axis, false = draw ticks at an angle.

RETURN:

boolean; true = ticks are drawn perpendicular to axis, false = ticks are not drawn at an angle.

EXAMPLE:

setGraphType (41);
setY1MajorGridDisplay (false);
setY1MajorTickDisplay (true);
setTickLength (getY1MajorTick(), 2000);
setDrawTicksPerpendicular (getY1MajorTick(), false);

setDrawTicksPerpendicular (getY1MajorTick(), true);

get/setGridCount()

These methods get/set the number of minor grid lines on the primary ordinal (O1) axis.

SYNTAX:

int getGridCount();
int getGridCount (IdentObj id);
int getGridCount (int objectID);
void setGridCount (int newValue);
void setGridCount (IdentObj id, int newValue);

INPUT:

id; object ID returned by a getObject() method (e.g., getO1MinorGrid())

newValue; number of grid lines for the axis object

RETURN:

int; number of grid lines

EXAMPLE:

setDepthRadius (0);
setDisplay (getO1MinorGrid(), true);
setGridStyle (getO1MinorGrid(), 4);
setGridCount (getO1MinorGrid(), 5);

NOTES:

ALSO SEE:

O1MinorGridCount

get/setGridStep()

These methods get/set the number of grid steps assigned to a numeric axis.

SYNTAX:

double getGridStep();
double getGridStep (IdentObj id);
void setGridStep (double newValue);
void setGridStep (IdentObj id, double newValue);

INPUT:

id; object ID returned by a getObject() method (e.g., getY1MajorGrid())

newValue; the number of grid steps on an axis

RETURN:

double; the number of grid steps on an axis

EXAMPLE:

setGraphType (61);
setGridStep (getX1MajorGrid(), 20.0);
setGridStep (getY1MajorGrid(), 10.0);
setX1MinorGridStepAuto (true);
setX1MajorGridStepAuto (false);

NOTES:

ALSO SEE:

get/setGridStepAuto(), X1/Y1/Y2MajorGridStep, X1/Y1/Y2MajorGridStepAuto, X1/Y1/Y2MinorGridStep, X1/Y1/Y2MinorGridStepAuto

get/setGridStepAuto()

These methods get/set a boolean that indicates whether or not grid steps are automatically calculated for a numeric axis.

SYNTAX:

boolean getGridStepAuto();
boolean getGridStepAuto (IdentObj id);
void setGridStepAuto (boolean newValue);
void setGridStepAuto (IdentObj id, boolean newValue);

INPUT:

id; object ID returned by a getObject() method (e.g., getY1MajorGrid())

newValue; true = Grid steps are automatically calculated, false = Grid steps are not automatically calculated

RETURN:

boolean; true = Grid steps are automatically calculated, false = Grid steps are not automatically calculated

EXAMPLE:

setGraphType (61);
setX1MajorGridStep (20.0);
setY1MinorGridStep (5.0);
setY1MajorGridStep (10.0);
setGridStepAuto (getX1MinorGrid(), true);
setGridStepAuto (getY1MinorGrid(), false);
setGridStepAuto (getX1MajorGrid(), false);
setGridStepAuto (getY1MajorGrid(), true);

NOTES:

ALSO SEE:

get/setGridStep(), X1/Y1/Y2MajorGridStepAuto, X1/Y1/Y2MinorGridStepAuto

get/setGridStyle()

These methods get/set the style of grid lines of an axis.

SYNTAX:

int getGridStyle();
int getGridStyle (IdentObj id);
void setGridStyle (IdentObj id, int newValue);
void setGridStyle (int newValue);

INPUT:

id; object ID returned by a getObject() method (e.g., getY1MajorGrid())

newValue; 0...5 selects one of the following grid styles: 0 = No Grid, 1 = Normal Grid, 2 = Grids and Ticks, 3 = Inner Ticks, 4 = Outer Ticks, 5 = Spanned Ticks

RETURN:

int; 0...5 indicates one of the following grid styles: 0 = No Grid, 1 = Normal Grid, 2 = Grids and Ticks, 3 = Inner Ticks, 4 = Outer Ticks, 5 = Spanned Ticks

EXAMPLE:

setY1MinorGridDisplay (true);
setGraphType (61);
setX1MajorGridStep (20.0);
setY1MinorGridStep (5.0);
setY1MajorGridStep (10.0);
setY1MinorGridStepAuto (false);
setX1MajorGridStepAuto (false);
setGridStyle (getX1MinorGrid(), 0);
setGridStyle (getX1MajorGrid(), 1);
setGridStyle (getY1MinorGrid(), 2);
setGridStyle (getY1MajorGrid(), 4);

NOTES:

If a specific object is not identified with the input parameter id, these methods get/set the associated value (if any) for the first item in the selection list.

ALSO SEE:

O1MajorGridStyle, O1MinorGridStyle, X1/Y1/Y2MajorGridStyle, X1/Y1/Y2MinorGridStyle

get/setTickCount()

These methods get/set the number of minor tick marks that will appear between major tick marks on an ordinal axis.

SYNTAX:

int getTickCount();
int getTickCount (IdentObj id);
void setTickCount (int newValue);
void setTickCount (IdentObj id, int newValue);

INPUT:

id; object ID returned by a getObject() method. It must identify a tick mark object (e.g., getY1MajorTick())

newValue; number of minor tick marks between major tick marks

RETURN:

int; number of tick marks on the specified axis

EXAMPLE:

setDepthAngle (0);
setDepthRadius (0);
setGraphType (41);
setO1MajorGridDisplay (false);
setO1MajorTickDisplay (true);
setTickLength (getO1MajorTick(), 1000);
setO1MinorTickDisplay (true);
setO1MinorTickStepAuto (false);
setTickCount (getO1MinorTick(), 5);
setY1MajorGridDisplay (false);
setY1MinorTickDisplay (true);
setY1MajorTickDisplay (true);

NOTES:

If a specific object is not identified with the input parameter id, these methods get/set the associated value (if any) for the first item in the selection list.

get/setTickLength()

These methods get/set the length of tick marks to be drawn on a specified axis.

SYNTAX:

int getTickLength();
int getTickLength (IdentObj id);
void setTickLength (int newValue);
void setTickLength (IdentObj id, int newValue);

INPUT:

id; object ID returned by a getObject() method. It must identify a tick mark object (e.g., getY1MajorTick())

newValue; length of tick marks in virtual coordinates

RETURN:

int; length of tick marks in virtual coordinates

EXAMPLE:

see setTickCount()

NOTES:

If a specific object is not identified with the input parameter id, these methods get/set the associated value (if any) for the first item in the selection list.

get/setTickStep()

When automatic calculation of tick steps is disabled with setTickStepAuto (axis, false), these methods get/set the interval at which to draw tick marks on an axis.

SYNTAX:

double getTickStep();
double getTickStep (IdentObj id);
void setTickStep (double newValue);
void setTickStep (IdentObj id, double newValue);

INPUT:

id; object ID returned by a getObject() method. It must identify a tick mark object (e.g., getY1MajorTick())

newValue; Interval at which to draw ticks on an axis

RETURN:

double; tick steps on a specified axis

EXAMPLE:

see setTickStepAuto()

NOTES:

get/setTickStepAuto()

These methods get/set automatic calculation of tick steps on a specified axis.

SYNTAX:

boolean getTickStepAuto();
boolean getTickStepAuto (IdentObj id);
void setTickStepAuto (boolean newValue);
void setTickStepAuto (IdentObj id, boolean newValue);

INPUT:

id; object ID returned by a getObject() method. It must identify a tick mark object (e.g., getY1MajorTick())

newValue; true = automatic calculation of tick steps is enabled, false = disabled

RETURN:

boolean; true = automatic calculation of tick steps is enabled, false = disabled

EXAMPLE:

setDepthAngle (0);
setDepthRadius (0);
setGraphType (41);
setTickLength (getY1MajorTick(), 1000);
setY1MajorGridDisplay (false);
setY1MinorTickDisplay (false);
setY1MajorTickDisplay (true);
setTickStep (getY1MajorTick(), 5);
setTickStepAuto (getY1MajorTick(), false);

NOTES:

get/setTickStyle()

These methods get/set the style of tick marks to be drawn on a specified axis..

SYNTAX:

int getTickStyle();
int getTickStyle (IdentObj id);
void setTickStyle (int newValue);
void setTickStyle (IdentObj id, int newValue);

INPUT:

id; object ID returned by a getObject() method. It must identify a tick mark object (e.g., getY1MajorTick())

newValue; 0...4. 0 = Small tick marks from frame edge outward, 1 = Small tick marks from frame edge outward, 2 = Small tick marks from frame edge inward, 3 = Small tick marks from frame edge outward, 4 = Small tick marks span across the frame edge

RETURN:

int; 0...4. 0 = Small tick marks from frame edge outward, 1 = Small tick marks from frame edge outward, 2 = Small tick marks from frame edge inward, 3 = Small tick marks from frame edge outward, 4 = Small tick marks span across the frame edge

NOTES:

If a specific object is not identified with the input parameter id, these methods get/set the associated value (if any) for the first item in the selection list.

get/setTickWidth()

These methods get/set the width of tick marks.

SYNTAX:

int getTickWidth();
int getTickWidth (IdentObj id);
void setTickWidth (int newValue);
void setTickWidth (IdentObj id, int newValue);

INPUT:

id; object ID returned by a getObject() method. It must identify a tick mark object (e.g., getY1MajorTick())

newValue; width of ticks in device coordinates

RETURN:

int; width of tick marks in device coordinates

NOTES:

If a specific object is not identified with the input parameter id, these methods get/set the associated value (if any) for the first item in the selection list.

getX1MajorGridStepAutoValue()

When the X1MajorGridStepAuto property is true (enabling automatic calculation of major grid steps on the X1 axis), this method returns a double value that identifies the interval between major grid steps on the X1 axis.

SYNTAX:

double getX1MajorGridStepAutoValue();

INPUT:

None

RETURN:

double; Interval between grid steps on the X1 axis.

EXAMPLE:

setGraphType (61);
setDepthRadius (0);
setX1MajorGridStepAuto (false);
setX1MajorGripStepAutoValue (10);
setX1MajorGridStep (getX1MajorGridStepAutoValue());
setMarkerSizeDefault (100);

ALSO SEE:

X1MajorGridStepAuto

getY1MajorGridStepAutoValue()

When the Y1MajorGridStepAuto property is true (enabling automatic calculation of major grid steps on the Y1 axis), this method returns a double value that identifies the interval between major grid steps on the Y1 axis.

SYNTAX:

double getY1MajorGridStepAutoValue();

INPUT:

None

RETURN:

double; Interval between grid steps on the Y1 axis.

EXAMPLE:

setDepthRadius (0);
setViewableGroups (2);
setDataScrollerPresenceGroups (0);
setGraphType (21);
setDataValue (getSeriesGroup (1, 0), getY1MajorGridStepAutoValue());
setDataTextDisplay (true);

ALSO SEE:

Y1MajorGridStepAuto

getY2MajorGridStepAutoValue()

When the Y2MajorGridStepAuto property is true (enabling automatic calculation of major grid steps on the Y2 axis), this method returns a double value that identifies the interval between major grid steps on the Y2 axis.

SYNTAX:

double getY2MajorGridStepAutoValue();

INPUT:

None

RETURN:

double; Interval between grid steps on the Y2 axis.

EXAMPLE:

setDepthRadius (0);
setViewableGroups (2);
setDataScrollerPresenceGroups (0);
setGraphType (21);
setDataValue (getSeriesGroup (1, 0), getY2MajorGridStepAutoValue());
setDataTextDisplay (true);

ALSO SEE:

Y2MajorGridStepAuto

setGridAttributes()

This method can be used to define the style, color, width, and stroke of major and minor gridlines on an axis. The object ID identifies the axis and major or minor gridlines (e.g., getY1MajorGrid()).

SYNTAX:

void setGridAttributes (IdentObj id, int style, Color color, int width, int stroke);

INPUT:

id; object ID returned by a getObject() method. It must identify a tick mark object (e.g., getY1MajorGrid()).

style; 0...5 selects one of the following grid styles: 0 = No Grid, 1 = Normal Grid, 2 = Grids and Ticks, 3 = Inner Ticks, 4 = Outer Ticks, 5 = Spanned Ticks

color; color specification (e.g., new Color (255, 0, 0) = red)

width; width of gridlines

stroke; 1 = solid, 5 = dashed

RETURN:

void

EXAMPLE:

setGraphType(61);
setGridAttributes(getY1MajorGrid(), 0, new Color (255,0,0), 1, 5);
setMajorTickAttributes(getX1MajorTick(), 3, new Color (0,255,0), 320, 1, 1,false, true, true);
setTickAttributes(getX1MinorTick(),2,new Color(0,0,255),240,1,1,false);

setMajorTickAttributes()

This method sets attributes for drawing major tick marks on an axis.

SYNTAX:

void setMajorTickAttributes (
     IdentObj id,
     int style,
     Color color,
     int len,
     int width,
     int stroke,
     boolean forcePerpendicular,
     boolean excludeMinTick,
     boolean excludeMaxTick
);

INPUT:

id; object ID returned by a getObject() method. It must identify a tick mark object (e.g., getY1MajorTick()).

style; 0...4. 0/1/3 = Small tick marks from frame edge outward, 2 = Small tick marks from frame edge inward, 4 = Small tick marks span across the frame edge

color; color specification (e.g., new Color (255, 0, 0) = red)

len; length of tick marks

width; width of ticks in device coordinates

stroke; 1 = solid, 5 = dashed

forcePerpendicular; true = draw ticks perpendicular to axis, false = draw ticks at an angle.

excludeMinTick; true = exclude minimum tick, false = include minimum tick mark.

excludeMaxTick; true = exclude maximum tick, false = include maximum tick mark.

RETURN:

void

EXAMPLE:

setDepthRadius (0);
setGraphType (61);
setX1MajorGridDisplay (false);
setY1MajorGridDisplay (false);
setMajorTickAttributes (getX1MajorTick(), 2, new Color (255, 0, 0), 5, 1, false, true, true);
setTickAttributes (getX1MinorTick(), 2, new Color (0, 255, 0), 5, 1, false);

setTickAttributes

This method sets attributes for drawing tick marks on an axis.

SYNTAX:

void setTickAttributes (
     IdentObj id, 
     int style, 
     Color color, 
     int len, 
     int width, 
     int stroke, 
     boolean forcePerpendicular
);

INPUT:

id; object ID returned by a getObject() method. It must identify a tick mark object (e.g., getY1MajorTick()).

style; 0...4. 0 = Small tick marks from frame edge outward, 1 = Small tick marks from frame edge outward, 2 = Small tick marks from frame edge inward, 3 = Small tick marks from frame edge outward, 4 = Small tick marks span across the frame edge

color; color specification (e.g., new Color (255, 0, 0) = red)

len; length of tick marks

width; width of ticks in device coordinates

stroke; 1 = solid, 5 = dashed

forcePerpendicular; true = draw ticks perpendicular to axis, false = draw ticks at an angle.

RETURN:

void

EXAMPLE:

setDepthRadius (0);
setGraphType (61);
setX1MajorGridDisplay (false);
setY1MajorGridDisplay (false);
setTickAttributes (getX1MajorTick(), 2, new Color (255, 0, 0), 5, 1, false);
setTickAttributes (getX1MinorTick(), 2, new Color (0, 255, 0), 5, 1, false);