addPercentageTarget(measure, colors, values, options)

Draws a set of horizontal or vertical lines on the chart to mark the specified percentage figures.

Parameter

measure Name of measure on which to draw percentage lines

colors Color (see valueColor) or array of colors to fill areas between percentage lines

values Percentage, or array of percentages, at which to draw lines

options Name-value pairs of options (see below, e.g., {fillAbove:0xff0000, fillBelow:0x00ff00})

Options

fillAbove Color (see valueColor) to fill the region above the upper percentage line

fillBelow Color (see valueColor) to fill the region below the lower percentage line

label String, or array of strings, to label the percentage line(s). The following codes can be inserted:
{0}: Target value

{1}: Target formula

{2}: Field name

lineColor Color (see valueColor) to apply to all percentage lines

lineStyle The line style (a Line Styles constant) to apply to all percentage lines

labelFont The font description (e.g., 'Lucida Sans Unicode-BOLD-14') to apply to all line labels

labelColor The color (see valueColor) to apply to all line labels

percentageAggregate The basis on which to compute the percentage: 'Average', 'Minimum', 'Maximim', 'Median', 'Sum'

Example (Single Percentage Line)

var options = {fillAbove:[225,225,225],fillBelow:[225,225,225],label:['{1}: {0,number,$#,##0}'],lineColor:'red',lineStyle:Chart.THICK_LINE,labelFont:'Lucida Sans Unicode-BOLD-11',labelColor:'black',percentageAggregate:'Average'}

addPercentageTarget('Sum(Product.Total)','null',125,options)

 

Example (Multiple Percentage Lines)

var options = {fillAbove:[225,225,225],fillBelow:[225,225,225],label:['{1}: {0,number,$#,##0}','{1}: {0,number,$#,##0}'],lineColor:'red',lineStyle:Chart.THICK_LINE,labelFont:'Lucida Sans Unicode-BOLD-11',labelColor:'black',percentageAggregate:'Maximum'}

addPercentageTarget('Sum(Product.Total)',[0xDDAAAA,0xDDCCCC],[30,60,90],options)

 

See Also

Adding a Statistical Measure, in Report Design, for more information about target lines.

Adding a Statistical Measure, in Dashboard Design, for more information about target lines.

<< addConfidenceIntervalTarget(measure, colors, values, options) © 1996-2013 InetSoft Technology Corporation (v11.5) addPercentileTarget(measure, colors, values, options) >>