CHART Create/Control Chart

CHART Properties

The Chart control is used to create illustrations for an application. A chart is usually designed to be a display only object that requires no user interaction.

This control can be created either by using either the CHART directive or by using the NOMADS Panel Designer to draw a Chart Control (including Plus Charts) and apply the desired attributes.

The *OBJ/CHART Plus Charting Utility can also be used as a simple means to display charts on the screens or print file.

(Plus Charts and the *OBJ/CHART utility were added in PxPlus 2019.)

Below is a list of properties used to define and manipulate Chart controls. Use the links in the Property column to access the PxPlus Help page for a selected property. The Help page may provide additional details, particularly if the property can be used to define other controls.

For a complete list of all the properties available, see Properties List.

Note:
Many of the properties below can also be used with Plus Charts. For a list of supported properties, see Properties and Methods.

 

Property

Description

AutoScale

Auto scaling for text elements: 0 = Off; 1 = On. (Default: 1)

When set to On, chart text elements (labels, legends) are automatically resized to fit the given area.

BackColor$
BackColour$

Background color. For information on valid color names and color specifications, see Color Properties. (Default: "DEFAULT")

Bitmap$

Bitmap to appear as the background for the chart when used with Plus Charts. See Chart Processing.

Example:

     !Stop (embedded bitmap)
     C:\windows\clouds.bmp (external bitmap)

BitmapPosition$

Bitmap position/appearance of chart: Predefined positions include TopLeft, Left, BottomLeft, TopRight, Right and BottomRight (Default: "TOPLEFT"). These preserve bitmap size and proportions.

Use the STRETCH parameter to force the bitmap to be stretched within the chart's window. The TILE parameter creates a "tile" effect multiplying the original bitmap to cover the entire chart's window.

A custom position may be defined using syntax: "x:y:column:line". With this syntax, the bitmap is positioned within the given rectangle. Proportions and the size of the bitmap are altered to fit the rectangle.

Border

Add border: 1 - Border; 0 - No border (Default: 1)

Note:
Applicable only when using Windows XP or Windows 7 style controls.

BringToTop

This property, when set to any value, will cause the control to be moved to the top of the display order. Once at the top of the display order, the control will appear visually on top of any other control on the window. (Default: Not Applicable - Always returns 0)

Col

Screen position (column) of control.

Cols

Width of control in column units.

CtlName$

Control type ("CHART"). See CHART directive.

CurrentPoint

Current data point. (Default: 1; 0 if no data)

CurrentSet

Current data set. (Default: 1; 0 if no data)

Enabled

Enabled indicator: 1 = True; 0 = False (Default: 1)

Eom$

Last change terminator. See CHART directive for specific eom$ character value.

FaceColorBack$
FaceColourBack$

Color for background face. For information on valid color names and color specifications, see Color Properties. (Default: "DEFAULT)

FaceColorBottom$
FaceColourBottom$

Color for bottom face (3D chart). For information on valid color names and color specifications, see Color Properties. (Default: "DEFAULT)

FaceColorLeft$
FaceColourLeft$

Color for left face (3D chart). For information on valid color names and color specifications, see Color Properties. (Default: "DEFAULT)

Fmt$

Control format definition. Refer to the FMT= option as described in the CHART directive.

Font$

This property is used to reference the font for a control. It will contain (or can be set to) a string containing three comma-separated fields of the font name, size and attributes. See 'FONT' mnemonic.

Example:

To set the font to Arial, 1.5 times normal size, and Bold, the format would be xxx'Font$="Arial,1.5,B".

Footer$

Chart footer.

Height

Height of control in pixels.

hWnd

Windows handle for control.

IndexMode

Set Index mode: This allows additional views of existing chart types to be opened; e.g. for a 2D column chart, setting IndexMode to 1 creates a clustered column chart.

1

Natural number (1 .. n) indexing

2

Integer (0 .. i) indexing

3

Arbitrary x value indexing

LabelLocation$

Custom positioning of chart labels. Use syntax "column:line" or "AUTOMATIC" (to set label locations to the default mode).

Example:

     x'LabelLocation$="10:15"

Left

Left margin for control in pixels.

LegendLocation$

Location of chart legend. Values include TopLeft, Left, BottomLeft, TopRight, Right and BottomRight.

LegendText$

Legend text for a data set.

Line

Screen position of control.

Lines

Height of control in number of lines.

LookAndFeel

Defines how a control will look. Possible values are:

2

Old Windows 3.1 2D look.

3

Windows 95/98 3D look.

4

Windows XP/Vista/Windows 7 look.

MarginBottom

Set line number for bottom chart margin.

MarginLeft

Set column number for left chart margin.

MarginRight

Set column number for right chart margin.

MarginTop

Set line number for top chart margin.

Margins$

Set all chart margins. Use syntax "top:bottom:left:right" or "AUTOMATIC" to set margins to the automatic (Default) mode.

Example:

     X'MARGINS$="10:10:20:10"

MenuCtl

This property reports/sets the CTL value to generate when an object is selected on a right-click of the mouse.

NumPoints

Largest number of data points within data set.

NumSets

Total number of data sets.

ObjectID

User object method. (Default: 0 - No object specified)

The 'ObjectID property allows applications to intercept property values and add methods to controls. When set to a valid Object ID by the application, you can add methods and add/override property logic for any control in the system. When set in the system, it allows the application to logically request methods against the control that, in turn, will be performed by the related Object ID. It will also first check the object for any property requests and, if the property is defined in the object, set or get that property instead of the controls.

To allow the specified object to get true access to the control, while executing within the object identified by the 'ObjectID property, the system will direct any property requests directly to the control.

Note:
When a control is deleted from the system, any object identified by an 'ObjectID property will be automatically dropped.

OnTipCtl

This property controls the CTL event that will be fired prior to the system displaying the Tip for any control. If the value of this property is non-zero, the system will use its value of a CTL event to fire and will defer the display of the tip until the application changes the value in 'Tip$. If the value in 'Tip$ is not changed, no tip will be displayed.

Setting this to zero (Default) disables the event from being sent and the current 'Tip$ will be displayed.

Parent

Parent window handle.

PointText$

Single string of point label values where the last character is the delimiter.

ProportionDW

Sets percentage of chart depth to chart width for altering depth proportions of three-dimensional charts. Assigning a 0 (zero) forces default values according to chart type. (Default: ProportionDW=100 for Pie charts; ProportionDW=50 for other chart types)

ProportionHW

Sets percentage of chart height to chart width for altering proportions of two-dimensional charts. Assigning a 0 (zero) forces default values according to chart type. (Default: ProportionHW=5 for Pie charts; ProportionHW=100 for other chart types)

Proportions2M

Proportions to margins: 0 = Off; 1 = On. (Default: 0) Sets the chart to the variable-proportion mode, which means that it is proportional to the current height-to-width ratio of the chart window that contains the chart.

RangeMax

Set ceiling value of the Y-axis. The chart view will be adjusted according to RangeMin and RangeMax values.

RangeMin

Set floor value of the Y-axis. The chart view will be adjusted according to RangeMin and RangeMax values.

RangeText$

Text of custom label for Stack Chart (one point per data set). Labels are placed on the right side. Labels must be added sequentially, starting from 1, up to the number of sets.

Example:

     X'CURRENTSET =1, X'CURRENTPOINT=1, X'RANGETEXT$="Label One"

SelectIndex

Index to 'SelectItem: Set this property to point to a selected element; e.g. 1 points to the first item selected, 2 points to the second item selected, etc.

Sep$

Separator character between each field, column or data point.

SepLoad$

Separator character for each row or data set.

TextColor$
TextColour$

Foreground text color. For information on valid color names and color specifications, see Color Properties. (Default: "DEFAULT")

Tip$

Tip message for control.

Title1$

Primary chart title.

Title2$

Secondary chart title.

Top

Top of control in pixels.

Value$

Current item or grid cell value.

Visible

Control visible flag: 1 = Yes; 0 = No (Default: 1)

Width

Width of control in pixels.

XAxisLocation$

X-Axis location: Back or Bottom (Default: "Bottom")

XAxisTitle$

X-Axis title.

YAxisLocation$

Y-Axis location: Back or Left (Default: "Left")

YAxisMax$

Y-Axis maximum value.

YAxisMin$

Y-Axis minimum value.

YAxisTitle$

Y-Axis title.

ZAxisLocation$

Z-Axis location:  Bottom or Left (Default: "Left")

ZAxisTitle$

Z-Axis title.

_PropList$

Controls the list of properties to be returned in '_PropValues$. Each value is separated by the value in '_PropSep$.

This property can be used to speed up the processing of multiple property accesses but reducing the number of interactions with the control. See Multi-Property Access.

_PropSep$

Controls the separator used between each of the values of the properties returned in '_PropValues$ as defined by '_PropList$.

This property can be used to speed up the processing of multiple property accesses but reducing the number of interactions with the control. See Multi-Property Access.

_PropValues$

Accesses the values of the properties defined in '_PropList$. Each value is separated by the value in '_PropSep$.

This property can be used to speed up the processing of multiple property accesses but reducing the number of interactions with the control. See Multi-Property Access.

See Also

NOMADS Chart Control
Charting Alternatives in PxPlus

*OBJ/CHART Plus Charting Utility
CHART Directive
Color Properties
'COLOUR' & '_COLOUR' Mnemonic
Using Property Names
Compound Properties