| ||
SharpPlot Tutorials General Tutorials Chart Samples Style Examples SharpLeaf Tutorials Document Layout Tutorials Text Flow Tutorials Table Tutorials Visual Glossaries SharpPlot Class 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 Reference > SharpPlot Properties > YCaption Property SharpPlot.YCaption PropertySets the Y caption or a pair of captions. The Y-axis caption is written by default vertically alongside the axis. public string YCaption {get; set;} Examplesp.YCaption = "Tonnes"; It may also be placed above the top of the axis: sp.YAxisStyle = YAxisStyles.AtEnd; This is a better placement for short captions such as ‘mm’ or ‘kg’. Captions written at the top of the axis will be split into multiple lines if you include ‘\n’ in the text, for example ‘Height\n(cm)’ will give a two-line caption. The Caption style controls the alignment of the text for captions placed ‘atend’. For centred ‘atend’ captions the centred text is wrapped into an effective width of twice the appropriate margin, and left or right aligned text is wrapped into the margin width. Setting a pair of captionsIf you pass a pair of captions separated by the tab character, they are written at the lower and upper ends of the axis. sp.YCaption = "Cooler\tHotter"; This is a useful technique when the X-axis is vertically centered. sp.XAxisStyle = XAxisStyles.ArrowedAxis|XAxisStyles.BalancedAxis|XAxisStyles.AtEndCaption; sp.YCaption = "Cooler\tHotter"; sp.XCaption = "Drier\tMuch\nWetter"; sp.YAxisStyle = YAxisStyles.ArrowedAxis|YAxisStyles.BalancedAxis|YAxisStyles.AtEndCaption; See also ...Formatting text with simple HTML tags | SharpPlot Members | SharpPlot.CaptionStyle Property | SharpPlot.YCaptionFormat Property |