ChartDirector 7.0 (Perl Edition)

Axis.addMark


Usage

addMark(value, lineColor [, text [, font [, fontSize ]]])

Description

Adds a mark line to the chart.

A mark line is a line drawn on the plot area. This line is usually used to indicate some special values, such as a "target value", "threshold value", "target date", etc.

A mark line attached to the horizontal axis will be vertical across the plot area. A mark line drawn using the vertical axis will be horizontal across the plot area. In either case, the mark line label will be added to the axis at the mark line position.

The location of the mark line label can be changed by using TextBox.setAlignment. For example, by setting the alignment to TopCenter, the mark line label will be drawn on the top center of the mark line.

By default, the mark line is drawn at the front of the chart layers. You may change it to draw at the back of the plot area (that is, like grid lines) using Mark.setDrawOnTop.

Arguments

ArgumentDefaultDescription
value(Mandatory)The value on the axis to draw the mark line.
lineColor(Mandatory)The color of the mark line.
text""The text label for the mark line. An empty string means there is no text label. By default, the text label and the tick on the axis will be drawn using the same color as the mark line. You can modify the colors by using the Mark.setMarkColor method.
font""The font used to draw the text label.
fontSize8The font size used to draw the text label in points.

Return Value

A Mark object representing the mark line added. You may use this object to fine- tune the appearance of the mark.