Class: annotation

STX.Drawing. annotation

new annotation()

Annotation drawing tool. An annotation is a simple text tool. It uses the class stx_annotation to determine the font style and color for the annotation. Class stx_annotation_highlight_bg is used to determine the background color when highlighted.

The controls controls.annotationSave and controls.annotationCancel are used to create HTMLElements for saving and canceling the annotation while editing. A textarea is created dynamically. The annotation tool attempts to draw the annotations at the same size and position as the textarea so that the effect is wysiwig.



reconstruct(stx [, obj])

Reconstruct an annotation

Name Type Argument Description
stx STXChart

The chart object

obj object <optional>

A drawing descriptor

Name Type Argument Description
col string <optional>

The text color for the annotation

pnl string <optional>

The panel name

d0 string <optional>

String form date or date time

v0 number <optional>

The value at which to position the annotation

text string <optional>

The annotation text (escaped using escape())

tzo0 number <optional>

Offset of UTC from d0 in minutes

bc string <optional>

Border color

bg string <optional>

Background color

lw string <optional>

Line width

ptrn string <optional>

Line pattern

fnt object <optional>


Name Type Argument Description
st object <optional>

Font style

sz object <optional>

Font size

wt object <optional>

Font weight

fl object <optional>

Font family