| ||
Chart Samples Style Examples SharpLeaf Tutorials Document Layout Tutorials Text Flow Tutorials Table Tutorials Visual Glossaries SharpPlot Reference SharpPlot Class SharpPlot Properties SharpPlot Methods SharpPlot Structures SharpPlot Enumerations PageMap Class SharpLeaf Reference SharpLeaf Class SharpLeaf Properties SharpLeaf Methods Table Class Table Properties Table Methods SharpLeaf Structures FontType Structure ParagraphStyle Structure BoxStyle Structure SharpLeaf Enumerations DocumentLayout Classes DocumentLayout Class PageLayout Class PageElement Abstract Class Frame : PageElement Class TextBlock : PageElement Class ImageBlock : PageElement Class Box : PageElement Class Rule : PageElement Class Common Reference Document Class VectorMath Class DbUtil Class Download Release Notes Licensing |
SharpPlot Tutorials > General Tutorials > Formatting text with simple HTML tags Formatting text with simple HTML tagsSharpPlot allows a limited subset of HTML tags to be included in all text elements, typically headings or axis labels. The tags which may be used in all output formats are: <b> – to bold a section of text For example: sp.Heading = "Data for Current Year<sup>1</sup> for <b>all</b> Products"; This will format the text in the main chart heading, which may refer to Note-1 elsewhere in the output. Note that you can use these HTML tags in text formatting strings, for example: sp.XDateFormat = "MMM\n<b>yyyy</b>"; This can be used with Spanned labelling to generate monthly labels and a bolded year centred under the available months. Charts saved as VMLIn this one case, you can use any HTML tags in your text, as they are simply passed directly into the output. However please be aware that SharpPlot will not measure text correctly if you use the <font> tag to change the text size, and as a result captions and Y-Labels may not wrap correctly. For output saved as VML, SVG PDF or XAML, you may include hyperlink references in the text. For PDF and the various raster formats, superscripts and subscripts will not be underlined even if an underlined font is used in the main text. This improves the appearance of footnote references. |