Bullet Graph
Stephen Few created a chart type called a Bullet Graph as a replacement for space-inefficient gauges.
In the Script Library that comes with the examples of 10.2 there is a function
createBulletGraph() that uses the chart API to generate this type of data display.
function createBulletGraph(measure, ranges, target, color, xdims, ydims, opts) {
}
-
measure -- the measure column in the dataset - string
-
ranges -- column names from the dataset to use as ranges -- array
-
target -- column name from the dataset to use as the target value -- string
-
color -- base color for the bullet graph measure bar and gradients. The actual gradient will be a shade of 'color' from light to dark. -- integer
-
xdims -- column(s) to use as additional x-axis dimensions -- array
-
ydims -- column(s) to use as additional y-axis dimensions -- array
-
opts -- additional options -- string
Example:
Worksheet table:
Viewsheet graph:
Chart script:
dataset = viewsheet['Query1']
graph = createBulletGraph('Total', ['range1', 'range2', 'range3'], 'target', null, null, ['FirstName'], 'vertical=false');
--
ByronIgoe - 11 Dec 2009