"yOrigin"

Defines the origin of the Y scale.

Synopsis

setValue(string shape, "yOrigin", int orig);

getValue(string shape, "yOrigin", int &orig);

shape.yOrigin(int orig);

Parameters

Parameter Description
shape Name of the object
orig

Constant: takes either

BAR_BOTTOM

BAR_TOP

BAR_CENTER

Description

The origin of the y-scale on the y-axis can be specified or read with this attribute. Possible values that are defined using constants are: bottom (BAR_BOTTOM), top (BAR_TOP) or in the centre (BAR_CENTER).

Example

In this example, the Y-axis is scaled as follows: The scale starts at the bottom end ("yOrigin") with the value 0 ("yCenter") and ends with the value 100 ("yRange"). The range is divided into steps of 10 ("yStep") with one decimal place ("yPrec") without grid ("yGrid").

main()
{
  shape bt=getShape("BAR_TREND1");
  bt.yOrigin=BAR_BOTTOM;
  bt.yCenter=0;
  bt.yRange=100;
  bt.yStep=10;
  bt.yPrec=1;
  bt.yGrid=FALSE;
  bt.flush(); // Update bar trend
}

Assignment

Bar trend