millionchart
فارسی

Boxes reference

The 26 functions and 1 value of box: signature, effects, phase, cost and tested examples.

Rectangles drawn on the chart. A box is made with box.new, and the other functions read or change it.

Functions#

box.copy#

box.copy([box])

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.

box.delete#

box.delete([box])

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.

box.get_bottom#

box.get_bottom([box])

Reads the bottom of the object.

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

box.get_left#

box.get_left([box])

Reads the left of the object.

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

box.get_right#

box.get_right([box])

Reads the right of the object.

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

box.get_top#

box.get_top([box])

Reads the top of the object.

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

box.new#

box.new(left, top, [right], [bottom], [border_color], [border_width], [border_style], [extend], [x_unit], [background], [text], [text_size], [text_color], [h_align], [v_align], [top_left], [bottom_right])

Draws a rectangle between two corners.

  • 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 box.
  • Examples: Recent range drawing, Session range boxes, A session read by itself.

box.set_background#

box.set_background([box], [color])

Changes the background 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.

box.set_border_color#

box.set_border_color([box], [color])

Changes the border 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.

box.set_border_style#

box.set_border_style([box], [style])

Changes the border 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.

box.set_border_width#

box.set_border_width([box], [width])

Changes the border width 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.

box.set_bottom#

box.set_bottom([box], [bottom])

Changes the bottom 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.

box.set_bottom_right#

box.set_bottom_right([box], [right], [bottom])

Changes the bottom right 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.

box.set_bottom_right_point#

box.set_bottom_right_point([box], [point])

Changes the bottom right 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.

box.set_extend#

box.set_extend([box], [extend])

Changes the extend 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.

box.set_h_align#

box.set_h_align([box], [h_align])

Changes the h 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.

box.set_left#

box.set_left([box], [left])

Changes the left 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.

box.set_right#

box.set_right([box], [right])

Changes the right 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.

box.set_text#

box.set_text([box], [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.

box.set_text_color#

box.set_text_color([box], [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.

box.set_text_size#

box.set_text_size([box], [text_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.

box.set_top#

box.set_top([box], [top])

Changes the top 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.

box.set_top_left#

box.set_top_left([box], [left], [top])

Changes the top left 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.

box.set_top_left_point#

box.set_top_left_point([box], [point])

Changes the top left 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.

box.set_v_align#

box.set_v_align([box], [v_align])

Changes the v 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.

box.set_x_unit#

box.set_x_unit([box], [left], [right], [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.

Values#

  • box.all