CHART

CHART

CREATES A SYSTEM OBJECT CHART AND ALLOCATES IT NUMBER N AS REFERENCE

  • Type: Command
  • Parameter: 1
  • Group: System Objects Creation

ACTION

The command CHART N creates a system object CHART, and allocates it a number N. The number N will be used to designate the CHART.

The created CHART can then be used through the appropriated commands.

The CHART is created at position (0,0) : that is TOP = 0 pixel and LEFT = 0 pixel, with dimensions WIDTH = 551 pixels and HEIGHT = 420 pixels.

A CHART is an area where the user can display graphic representations.

A CHART can generate the events : ON_CLICK, ON_DOUBLE_CLICK, ON_MOUSE_UP, ON_MOUSE_DOWN, ON_MOUSE_MOVE.

By default a CHART displays lines, but can also display bars or points by the commands CHART_BAR, CHART_POINT, CHART_LINE. To display a new element, use the command ITEM_ADD N,"X,Y' where X and Y are the coordinates of the new element.

Remark : by default, the CHART is created on the FORM number 0, but another FORM can be used. For that, create a FORM by FORM N, and send it all the commands by COMMAND_TARGET_IS N before creating the CHART.

SYNTAX: CHART N

  • N = system object number (integer or real). Must be greater than 0 and less than or equal to the allowed maximum number of system objects.

USE

  • A CHART is used as an area where the user can represent data in different graphical forms.

ERROR

  • If number N is not a correct expression.
  • If number N exceeds the allowed maximum number of system objects.
  • If number N is less than or equal to 0.
  • If number N is already used for a system object number.

EXAMPLE

rem create a CHART with default position and dimensions

chart 1

rem the chart will display bars

chart_bar 1

rem fill it with elements

item_add 1,"1,1"

item_add 1,"2,2"

item_add 1,"3,3"

item_add 1,"3.5,4"

item_add 1,"4,5"

item_add 1,"4.5,6"

SEE ALSO

TOP

LEFT

WIDTH

HEIGHT

HINT

HINT_HIDE

FULL_SPACE

COLOR

CHART_BAR

CHART_LINE

CHART_POINT