ChartDirector Ver 3.1 (PHP Edition Edition)

Axis.addMark


Usage

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

Description

Add 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.


able border="1" cellpadding="5" cellspacing="0" width="98%"> ArgumentDefaultDescription majorTickStep1The tick step. The default value of 1 means one tick per year. A value of n means one tick per n years.initialMargin5184000The margin for the first data point. The first data point will be selected if it is within initialMargin number of seconds from beginning of the year it represents. The default is 60 days (5184000 seconds).

Return Value

The current ArrayMath object.


HTML> d>selectStartOfHour(Self)Select the elements of the ArrayMath object that represents a different hour from the previous element.selectStartOfDay(Self)Select the elements of the ArrayMath object that represents a different day from the previous element.selectStartOfWeek(Self)Select the elements of the ArrayMath object that represents a different week from the previous element.selectStartOfMonth(Self)Select the elements of the ArrayMath object that represents a different month from the previous element.selectStartOfYear(Self)Select the elements of the ArrayMath object that represents a different year from the previous element.trim(Self)Trim the ArrayMath object by keeping only some elements in the middle.insert(Self)Insert the elements of an array to the ArrayMath object.insert2(Self)Insert some constant elements to the ArrayMath object.replace(Self)Find elements that are equal to a given value and replace it with another value.movAvg(Self)Replace each element of the ArrayMath object by its moving average.expAvg(Self)Replace each element of the ArrayMath object by its exponential average.movMed(Self)Replace each element of the ArrayMath object by its moving median.movPercentile(Self)Replace each element of the ArrayMath object by its moving percentile.movMax(Self)Replace each element of the ArrayMath object by its moving maximum.movMin(Self)Replace each element of the ArrayMath object by its moving minimum.movStdDev(Self)Replace each element of the ArrayMath object by its moving standard deviation.movCorr(Self)Replace each element of the ArrayMath object by the moving correlation with another array or with itself.lowess(Self)Fit a curve through the data points in the ArrayMath object using the LOWESS algorithm.lowess2(Self)Fit a curve through the data points in the ArrayMath object using the LOWESS algorithm, where the spacing of the data points is supplied by the given array.result(Self)Get the content of the ArrayMath object as a normal array to be used in other ChartDirector API.max(Self)Get the maximum value of the elements of the ArrayMath object.min(Self)Get the minimum value of the elements of the ArrayMath object.avg(Self)Get the average value of the elements of the ArrayMath object.sum(Self)Get the total value of the elements of the ArrayMath object.med(Self)Get the median value of the elements of the ArrayMath object.percentile(Self)Get the required percentile value of the elements of the ArrayMath object.maxIndex(Self)Get the index of the maximum value element of the ArrayMath object.minIndex(Self)Get the index of the minimum value element of the ArrayMath object.
(1059, '1999-03-01', '371', '635', '722');