Bullet Graph: Performance at a Glance

A bullet graph effectively compares a primary performance measure against related measures and displays it within the context of qualitative ranges, such as poor, satisfactory, and good. It also includes a performance marker to provide immediate context and enable quick assessment of progress against a specific target or benchmark. This visualization offers a concise yet rich display of key performance indicators. Bullet graphs are particularly useful in business intelligence and performance management, where they can replace traditional gauges and meters. They are designed to be space-efficient, allowing for the display of multiple measures in a compact format. This makes them ideal for dashboards and reports where space is limited but clarity is essential.


Economist GGPlot Excel Paul Tol Black And White Solarized Stata Tableau Wall Street CanvasXpress
<html>

  <head>
    <!-- Include the CanvasXpress library in your HTML file -->
    <link rel="stylesheet" href="https://www.canvasxpress.org/dist/canvasXpress.css" type="text/css"/>
    <script src="https://www.canvasxpress.org/dist/canvasXpress.min.js"></script>
  </head>

  <body>

    <!-- Create a canvas element for the chart with the desired dimensions -->
    <div>
      <canvas id="canvasId" width="600" height="600"></canvas>
    </div>


    <!-- Create a script to initialize the chart -->
    <script>

      // Create the data for the graph
      var data = {
        "y": {
          "data": [
            [ 19, 25, 52, 57, 31, 42 ],
            [ 15, 15, 15, 20, 20, 20 ],
            [ 35, 35, 35, 40, 40, 40 ],
            [ 70, 70, 70, 70, 70, 70 ],
            [ 46, 52, 42, 63, 56, 51 ]
          ],
          "smps": [ "S1", "S2", "S3", "S4", "S5", "S6" ],
          "vars": [ "V1", "V2", "V3", "V4", "V5" ]
        }
      }

      // Create the configuration for the graph
      var config = {
        "bulletRangeColors": ["#777777", "#AAAAAA", "#DDDDDD"],
        "bulletRanges": ["V2", "V3", "V4"],
        "bulletTargetVar": "V5",
        "dataTextColor": "#000000",
        "dataValuesPosition": "inside",
        "graphOrientation": "horizontal",
        "graphType": "Bullet",
        "showDataValues": true,
        "showLegend": false,
        "xAxis": ["V1"]
      }

      // Event used to create graph (optional)
      var events = false


      // Call the CanvasXpress function to create the graph
      var cX = new CanvasXpress("canvasId", data, config, events);

      
    </script>

  </body>

</html>
library(canvasXpress)
y=read.table("https://www.canvasxpress.org/data/r/cX-bullet-dat.txt", header=TRUE, sep="\t", quote="", row.names=1, fill=TRUE, check.names=FALSE, stringsAsFactors=FALSE)
canvasXpress(
  data=y,
  bulletRangeColors=list("#777777", "#AAAAAA", "#DDDDDD"),
  bulletRanges=list("V2", "V3", "V4"),
  bulletTargetVar="V5",
  dataTextColor="#000000",
  dataValuesPosition="inside",
  graphOrientation="horizontal",
  graphType="Bullet",
  showDataValues=TRUE,
  showLegend=FALSE,
  xAxis=list("V1")
)