| ||
Introducing SharpPlot Your First Chart Recent Updates Sample Charts Tutorials General Tutorials Chart Tutorials SharpPlot Class Methods 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 > Properties > XCaption Property SharpPlot.XCaption PropertySets the X-axis caption or captions. A single caption is written below the end of the axis, spaced to allow room for labels (if any). public string XCaption {get; set;} Examplesp.XCaption = "Weeks (2005)"; You can control the positioning with the X-axis style to place the caption centred (below the axis) or at the right-hand end. The caption text will be split over more than one line if you include a ‘\n’ in the text, for example: sp.XCaption = "Elapsed days\nfrom start of project"; Use the CaptionLineSpacing property to control the vertical pitch here. Setting a pair of captionsIf you pass a pair of captions separated by the tab character, they are written at the left and right-hand ends of the axis. sp.XCaption = "Low end\tHigh end"; This is a useful technique when the Y-axis is horizontally 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 ...SharpPlot | CaptionLineSpacing | CaptionStyle | SetXCaptionFont | Formatting |