| ||
Introducing SharpPlot Your First Chart Recent Updates Sample Charts Tutorials General Tutorials Chart Tutorials SharpPlot Class Properties Structures Enumerations Style examples Glossaries Active Charts VectorMath Class DBUtil Class Get SharpPlot Download SharpPlot Buying SharpPlot SharpPlot Support Upgrading from GraPL Release notes |
Reference > Methods > SetKeyText Method SharpPlot.SetKeyText MethodSet Legends for key given a string array or a simple string. Examplesp.SetKeyText(new string[]{"Tonnes","Value"}); Overloads
Adding text for trend linesEvery 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 |