millionchart
فارسی

Labels reference

The 19 functions and 1 value of label: signature, effects, phase, cost and tested examples.

Text labels drawn on the chart. A label is made with label.new, and the other functions read or change it.

Functions#

label.copy#

label.copy([label])

Makes a copy.

  • Effects: draws on the chart or writes an output; builds a new value whose size follows its arguments (counted in the memory ledger).
  • Phase: every bar.
  • Cost: allocates: the memory ledger counts what it builds; counts against the limits on drawn objects and outputs.

label.delete#

label.delete([label])

Removes the object from the chart.

  • Effects: draws on the chart or writes an output.
  • Phase: every bar.
  • Cost: counts against the limits on drawn objects and outputs.

label.get_text#

label.get_text([label])

Reads the text of the object.

  • Effects: none: the result depends on the arguments only.
  • Phase: every bar.
  • Cost: a fixed number of operations.

label.get_x#

label.get_x([label])

Reads the x of the object.

  • Effects: none: the result depends on the arguments only.
  • Phase: every bar.
  • Cost: a fixed number of operations.

label.get_y#

label.get_y([label])

Reads the y of the object.

  • Effects: none: the result depends on the arguments only.
  • Phase: every bar.
  • Cost: a fixed number of operations.

label.new#

label.new(x, [y], [text], [x_unit], [place], [color], [style], [text_color], [text_size], [text_align], [tooltip], [point])

Draws a text label at a point.

  • Effects: draws on the chart or writes an output; builds a new value whose size follows its arguments (counted in the memory ledger).
  • Phase: every bar.
  • Cost: allocates: the memory ledger counts what it builds; counts against the limits on drawn objects and outputs.
  • Returns: a label.
  • Examples: Swing pivots, Recent range drawing, Window of the day, Levels from text.

label.set_color#

label.set_color([label], [color])

Changes the color of the object.

  • Effects: draws on the chart or writes an output.
  • Phase: every bar.
  • Cost: counts against the limits on drawn objects and outputs.

label.set_place#

label.set_place([label], [place])

Changes the place of the object.

  • Effects: draws on the chart or writes an output.
  • Phase: every bar.
  • Cost: counts against the limits on drawn objects and outputs.

label.set_point#

label.set_point([label], [point])

Changes the point of the object.

  • Effects: draws on the chart or writes an output.
  • Phase: every bar.
  • Cost: counts against the limits on drawn objects and outputs.

label.set_style#

label.set_style([label], [style])

Changes the style of the object.

  • Effects: draws on the chart or writes an output.
  • Phase: every bar.
  • Cost: counts against the limits on drawn objects and outputs.

label.set_text#

label.set_text([label], [text])

Changes the text of the object.

  • Effects: draws on the chart or writes an output.
  • Phase: every bar.
  • Cost: counts against the limits on drawn objects and outputs.

label.set_text_align#

label.set_text_align([label], [text_align])

Changes the text align of the object.

  • Effects: draws on the chart or writes an output.
  • Phase: every bar.
  • Cost: counts against the limits on drawn objects and outputs.

label.set_text_color#

label.set_text_color([label], [text_color])

Changes the text color of the object.

  • Effects: draws on the chart or writes an output.
  • Phase: every bar.
  • Cost: counts against the limits on drawn objects and outputs.

label.set_text_size#

label.set_text_size([label], [size])

Changes the text size of the object.

  • Effects: draws on the chart or writes an output.
  • Phase: every bar.
  • Cost: counts against the limits on drawn objects and outputs.

label.set_tooltip#

label.set_tooltip([label], [tooltip])

Changes the tooltip of the object.

  • Effects: draws on the chart or writes an output.
  • Phase: every bar.
  • Cost: counts against the limits on drawn objects and outputs.

label.set_x#

label.set_x([label], [x])

Changes the x of the object.

  • Effects: draws on the chart or writes an output.
  • Phase: every bar.
  • Cost: counts against the limits on drawn objects and outputs.

label.set_x_unit#

label.set_x_unit([label], [x], [x_unit])

Changes the x unit of the object.

  • Effects: draws on the chart or writes an output.
  • Phase: every bar.
  • Cost: counts against the limits on drawn objects and outputs.

label.set_xy#

label.set_xy([label], [x], [y])

Changes the xy of the object.

  • Effects: draws on the chart or writes an output.
  • Phase: every bar.
  • Cost: counts against the limits on drawn objects and outputs.

label.set_y#

label.set_y([label], [y])

Changes the y of the object.

  • Effects: draws on the chart or writes an output.
  • Phase: every bar.
  • Cost: counts against the limits on drawn objects and outputs.

Values#

  • label.all