Reference > Methods > SetKeyText Method

SharpPlot.SetKeyText Method

Set Legends for key given a string array or a simple string.

Example

sp.SetKeyText(new string[]{"Tonnes","Value"});

Overloads

Adding text for trend lines

Every time SharpPlot draws a line (either a data line or a curve fit) it adds an entry to the table of keys and cycles through the list of line-styles and colours. This is to allow you (for example) to have a key reading:

Raw data ---- Trend Line ---- Cubic model

If you have 2 series each with a modelfit, you will get 4 key entries. If you only want to key your data, then set the key text to have 2 empty entries, for example

sp.SetKeyText (new string[] {"First series","","Second series",""});

The placeholder entries for the fitted lines will be skipped over in the legend.

See also ...

SharpPlot Members | ModelFitKey Property | TrendLineKey Property | Formatting text with simple HTML tags


Send comments on this topic
© Dyalog Ltd 2013