SharpPlot Reference > SharpPlot Methods > DrawNote Method

SharpPlot.DrawNote Method

Write text note at XY co-ordinate or absolute position with optional rotation and max width.

Example

sp.SetNoteFont("Arial",12);
sp.NoteStyle = NoteStyles.Boxed|NoteStyles.Shadowed;
sp.DrawNote("A simple wrapped note in a box",10,70,0,50);

Overloads

Description

Notes are used to write arbitrary text fragments anywhere on the completed chart. Typically, notes are written using the co-ordinates of the chart axes to locate them on the chart (to annotate particular data-points) so DrawNote is generally called after the chart has been drawn, and the axes established.

If only a Frame has been drawn, or if the chart is not a XY chart, then coordinates are within the frame margin, in percentage of the plotting region. If a note is drawn before anything, percentage of the whole chart area is used. The XY coordinates are those of the text itself, and not of the box (if any), which itself has a gutter of about half the interline space.

The note text may be angled, and may be wrapped into a given width (again given in terms of the chart axes) which allows reasonably complex paragraphs of text to be added to the completed chart. Various effects such as boxing and shadowing are also available using the Note Styles.

Simple HTML tagging (for effects such as bold and italic text) may be used in the notes, and the wrapping will take care of the current SoftHyphen setting.

See also ...

SharpPlot Members | SharpPlot.NoteStyle Property | SharpPlot.NextNote Method (Double)


Send comments on this topic
© Dyalog Ltd 2021