bulletGraph: Create a Bullet Graph

Description Usage Arguments Source Examples

Description

Create a Bullet Graph

Usage

1
2
3
4
bulletGraph(List, height = NULL, width = NULL, fontSizeTitle = 14,
  fontSize = 10, lineStroke = "#666", markerStroke = "#000",
  colRange = c("#eee", "#ddd", "#ccc"), colMeasure = c("lightsteelblue",
  "steelblue"))

Arguments

List

a list with the data. See example of the structure.

height

height for the graph's frame area in pixels (if NULL then height is automatically determined based on context)

width

numeric width for the graph's frame area in pixels (if NULL then width is automatically determined based on context)

fontSizeTitle

numeric font size in pixels for the title text labels.

fontSize

numeric font size in pixels for the text labels (subtitle and axis text).

lineStroke

character string specifying the colour you want the lines lines to be. Multiple formats supported (e.g. hexadecimal).

markerStroke

character string specifying the colour you want the marker to be. Multiple formats supported (e.g. hexadecimal).

colRange

character string vector specifying the colour you want the ranges to be

colMeasure

character string vector specifying the colour you want the measures to be

Source

http://www.perceptualedge.com/articles/misc/Bullet_Graph_Design_Spec.pdf

Mike Bostock: http://bl.ocks.org/mbostock/4061961.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## dontrun
## Create Example from http://bl.ocks.org/mbostock/4061961
ytd2005 <- list(
  title=list("Revenue", "Profit", "Order Size", "New Customers", "Satisfaction"),
  subtitle=list("US$, in thousands", "%", "US$, average", "count", "out of 5"),
  range=list(c(150, 225, 300),
             c(20, 25, 30),
             c(350, 500, 600),
             c(1400, 2000, 2500),
             c(3.5, 4.25, 5)),
  measures=list(c(220, 270),
                c(21, 23),
                c(100, 320),
                c(1000, 1650),
                c(3.2, 4.7)),
  markers=list(250, 26, 550, 2100, 4.2)
)

# Visualize the Bullte Graph
bulletGraph(List = ytd2005)

sipemu/d3Dashboard documentation built on May 29, 2019, 10:10 p.m.