Welcome to TWiki... Users, Groups
Go

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:

bullet.jpg

Viewsheet graph:

bullet.jpg

Chart script:

dataset = viewsheet['Query1']
graph = createBulletGraph('Total', ['range1', 'range2', 'range3'], 'target', null, null, ['FirstName'], 'vertical=false');

-- ByronIgoe - 11 Dec 2009

  File Size Date By Actions
jpg bullet.jpg
 
12.7 K 17 Mar 2011 - 21:30 GregMallett props, move
jpg bulletWS.jpg
 
19.5 K 17 Mar 2011 - 21:31 GregMallett props, move
r2 - 17 Mar 2011 - 21:32:41 - GregMallett
Copyright © by the contributing authors.
Syndicate this site RSSATOM