Caption and SubCaption Styles
The Chart Canvas element's Caption and SubCaption attributes let you specify text that appears at the top (or elsewhere) on the canvas. Its Caption Style and SubCaption Style child elements can be used to format and position this text. For example:
The examples above show some variations in the format and positioning of Caption and SubCaption text.
Both elements have the following attributes, except as noted:
Sets the horizontal alignment of the text as Left, Center, or Right, within the canvas. The default value is Center.
Sets the vertical alignment of the text as Top, Middle, or Bottom, within the canvas. The default value is Top.
Sets the space between the caption and its subject, in pixels.
Sets the caption font color. Enter a color by name, decimal RGB value, or hex RGB value. Prefix hex values with the pound sign, e.g. #112233.
Specifies the names of one or more fonts. When multiple fonts are specified, with commas between each, the browser uses the first recognized font.
Sets the caption font size, in pixels.
Specifies the weight (thickness) of characters in the caption text. Options include Lighter, Normal, Bold, and Bolder. The default value is Normal.
|Inside Plot Area|
Specifies whether space in the canvas will be reserved for the caption (False) or whether it will overlap other content (True). The default value is False.
Sets the horizontal position offset of the caption relative to the horizontal alignment, in pixels.
Sets the vertical position offset of the caption relative to the vertical alignment, in pixels.
The Inside Plot Area attribute causes the Caption to be displayed inside the plot area, instead of between it and the edge of the canvas:
As shown in the example above, when Inside Plot Area is set to True, the plot area is scaled to create space for the Caption text.