createBulletGraph(measure, ranges, target, color, xdims, ydims, opts)
The createBulletGraph() function generates a bullet graph to display a specified measure along with a target and multiple value ranges. (All parameters are optional. To omit any parameter setting, pass null as the value.)
Parameter
measure Name of column to provide the measure values
ranges Array of column names to provide range values,
displayed as shaded regions
target Name of column to provide the target value,
displayed as vertical bar
color A single color or array of colors to be used
for bullets. See below.
xdims Array of column names to use as dimensions on
X-axis
ydims Array of column names to use as dimensions on
Y-axis
opts String containing additional options:
'vertical=false': force horizontal bars
'ylabel=false': hide y-dimension labels
'xlabel=false': hide x-dimension labels
'vlabel=false': hide the measure value labels
The color parameter can be either a scalar hex color value (e.g., 0x0000FF.), or an array of colors. The organization for the color array is as follows:
[measure, target, range 1, range 2, range 3, ...]
e.g., [0x0000FF, 0xFF0000, 0xDD0000, 0xBB0000, 0x990000]
Example
Consider the Worksheet Data Block called, 'Query1', shown below. (This Data Block is a mirror of the 'All Sales' query, with grouping on the 'Employee' and 'Company' fields, aggregation on the 'Total' field, and expression columns for 'Target', 'range1', 'range2', and 'range3'.)

Create a Viewsheet based on this Data Worksheet, add a Chart component, and insert the following Chart script:
dataset = viewsheet['Query1']
graph = createBulletGraph('Total', ['range1','range2','range3'],'Target',0x0000FF, ['Company'],['Employee'],'vertical=false');

See Also
DataSet, for information on specifying the chart data in script.
| << CR.12 Miscellaneous Chart Functions | © 1996-2013 InetSoft Technology Corporation (v11.4) | At End >> |