原文:
Configure Caption Alignment# Use the following attributes to configure
caption alignment:Specify the horizontal alignment of the caption using the
captionAlignment attribute, which accepts the values of left, center
(default), and right.Display the caption at the top of the chart by setting the value of
the captionOnTop attribute to 1.Align the caption with the canvas area instead of the chart area, by
setting the value of the alignCaptionWithCanvas attribute to 1.Configure the padding (in pixels) from either edge when the caption is
not center aligned, using the captionHorizontalPadding attribute.
译文:
配置标题对齐#
使用以下属性配置标题对齐:
使用captionAlignment属性指定标题的水平对齐方式,该属性接受左、中(默认)和右的值。
通过将captionOnTop属性的值设置为1,在图表的顶部显示标题。
通过将alignCaptionWithCanvas属性的值设置为1,使标题与画布区域而不是图表区域对齐。
当标题不是居中对齐时,使用captionHorizontalPadding属性从任一边缘配置padding(以像素为单位)。
{
"chart": {
"alignCaptionWithCanvas": "1",
"captionHorizontalPadding": "2",
"captionOnTop": "0",
"captionAlignment": "right"
}
}