ChartDirector Ver 3.1 (PHP Edition Edition)

Axis.setTitlePos


Usage

setTitlePos(alignment[, titleGap])

Description

Set the position of the axis title relative to the axis.

By default, the axis title will be drawn at the middle of the axis outside the plot area. You may change the location of the title. For example, instead of drawing the x-axis title at the middle of the axis, you may want draw it at the end of the axis.

The current version of ChartDirector supports the following alignment positions when drawing axis titles.

AxisDefaultSupported
Bottom x-axisBottomCenterTopLeft, TopRight, TopCenter, Left, Right, BottomLeft, BottomRight, BottomCenter
Top x-axisTopCenterTopLeft, TopRight, TopCenter, Left, Right, BottomLeft, BottomRight, BottomCenter
Left y-axisLeftLeft, TopLeft
Right y-axisRightRight, TopRight

Arguments

ArgumentDefaultDescription
alignment(Mandatory)The position of the title relative to the axis. Please refer to the table above for the valid values.
titleGap6The distance between the axis title and the axis in pixels.

Return Value

None