SharpPlot Reference > SharpPlot Methods > GetNextNote Method

SharpPlot.GetNextNote Method

This call returns the vertical position (baseline) for the following note after a note which has been wrapped.

public double GetNextNote(double vspace);

Returns the correct position for the next note text in points (absolute style) or chart co-ords (relative style). You can use this to position a set of notes (for example a subheading followed by one or more wrapped paragraphs) correctly on the chart.

vpos = sp.NextNote(6);  // add 6pt headspace
sp.DrawNote("Hi",50,vpos);  // follow on

This spaces vertically down by <vspace> (in points always) from the calculated baseline for the next text output. Call this with no argument to have the text flow naturally, or 12 to add a line of space between paragraphs. The resulting <vpos> is returned in chart co-ordinates if you positioned your note this way, or in absolute (points) co-ordinates relative to the lower left corner of the current frame if you placed your note with style ‘absolute’.


Send comments on this topic
© Dyalog Ltd 2021