"xLines"

Defines how the x-lines are displayed.

Synopsis

setValue(string shape, "xLines", dyn_float DataX, dyn_float DataY1, dyn_float DataY2, dyn_string line, dyn_string color);

getValue(string shape, "xLines", dyn_float&DataX, dyn_float &DataY1, dyn_float &DataY2, dyn_string &line, dyn_string &color);

shape.xGrid(dyn_float DataX, dyn_float DataY1, dyn_float DataY2, dyn_string line, dyn_string color);

Parameters

Parameter Description
shape Name of the object
DataX X values
DataY1 Y start values
DataY2 Y end values
line Array containing the line types
color Array containing the colors

Description

This attribute can be used to define precisely how the x-lines are displayed with the X values of the lines specified in the array "DataX" and the y-coordinates in the arrays "DataY1" and "DataY2". An individual line type and color string is defined for each line via the arrays "line" and "color".

Example

main()
{
  shape bt=getShape("BAR_TREND1");
  dyn_float dx, y1, y2;
  dyn_string line, col;
  string s;
  // Coordinates
  dx=makeDynFloat(20, 40, 50);
  y1=makeDynFloat(10, 20, 30);
  y2=makeDynFloat(50, 60, 70);
  // Colors and lines
  col=makeDynString("Red", "Green", "Yellow");
  s="[solid,oneColor,JoinMiter,CapNotLast,10]";
  line=makeDynString(s, s, s);
  // Setting the values
  setValue(bt, "xLines", dx, y1, y2, line, col);
  bt.flush();// Update bar trend
}
Abbildung 1. XLines from the example above

Assignment

Bar trend