Browse Components

Bullet

Compare actual results against targets.

Basic

Hover, tap or focus a mark to inspect exact values. Arrow keys move between observations.

Quarterly targets
Quarterly targets — example data
ObservationActualTargetMaximum
Revenue7280100
Retention8690100
Activation6165100
View Code
HTML
<figure class="chart" data-chart="bullet">
  <figcaption>
    Quarterly targets
  </figcaption>
  <div class="chart-data">
    <table>
      <caption>
        Quarterly targets — example data
      </caption>
      <thead>
        <tr>
          <th scope="col">
            Observation
          </th>
          <th scope="col">
            Actual
          </th>
          <th scope="col">
            Target
          </th>
          <th scope="col">
            Maximum
          </th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <th scope="row">
            Revenue
          </th>
          <td>
            72
          </td>
          <td>
            80
          </td>
          <td>
            100
          </td>
        </tr>
        <tr>
          <th scope="row">
            Retention
          </th>
          <td>
            86
          </td>
          <td>
            90
          </td>
          <td>
            100
          </td>
        </tr>
        <tr>
          <th scope="row">
            Activation
          </th>
          <td>
            61
          </td>
          <td>
            65
          </td>
          <td>
            100
          </td>
        </tr>
      </tbody>
    </table>
  </div>
</figure>

Right-to-left

Labels follow the reading direction. Numeric and radial axes keep their established orientation.

Quarterly targets
Quarterly targets — example data
ObservationActualTargetMaximum
Revenue7280100
Retention8690100
Activation6165100
View Code
HTML
<figure class="chart" dir="rtl" data-chart="bullet">
  <figcaption>
    Quarterly targets
  </figcaption>
  <div class="chart-data">
    <table>
      <caption>
        Quarterly targets — example data
      </caption>
      <thead>
        <tr>
          <th scope="col">
            Observation
          </th>
          <th scope="col">
            Actual
          </th>
          <th scope="col">
            Target
          </th>
          <th scope="col">
            Maximum
          </th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <th scope="row">
            Revenue
          </th>
          <td>
            72
          </td>
          <td>
            80
          </td>
          <td>
            100
          </td>
        </tr>
        <tr>
          <th scope="row">
            Retention
          </th>
          <td>
            86
          </td>
          <td>
            90
          </td>
          <td>
            100
          </td>
        </tr>
        <tr>
          <th scope="row">
            Activation
          </th>
          <td>
            61
          </td>
          <td>
            65
          </td>
          <td>
            100
          </td>
        </tr>
      </tbody>
    </table>
  </div>
</figure>

Empty data

The chart keeps its reserved space without inventing observations.

Quarterly targets
Quarterly targets — example data
ObservationActualTargetMaximum
View Code
HTML
<figure
  class="chart"
  data-chart-labels="[&quot;Revenue&quot;, &quot;Retention&quot;, &quot;Activation&quot;]"
  data-chart="bullet"
>
  <figcaption>
    Quarterly targets
  </figcaption>
  <div class="chart-data">
    <table>
      <caption>
        Quarterly targets — example data
      </caption>
      <thead>
        <tr>
          <th scope="col">
            Observation
          </th>
          <th scope="col">
            Actual
          </th>
          <th scope="col">
            Target
          </th>
          <th scope="col">
            Maximum
          </th>
        </tr>
      </thead>
      <tbody>
      </tbody>
    </table>
  </div>
</figure>

Installation

Download these files into the matching paths in your project, or use Create to assemble a kit. Include each dependency once. Do not also load app.css.

Add to your page
<link rel="stylesheet" href="/library/assets/base.css">
<link rel="stylesheet" href="/library/assets/chart-core.css">
<link rel="stylesheet" href="/library/assets/chart-plots.css">
<link rel="stylesheet" href="/library/assets/bullet-chart.css">
<script defer src="/library/assets/chart-core.js"></script>
<script defer src="/library/assets/chart-plots.js"></script>
<script defer src="/library/assets/bullet-chart.js"></script>

12,194 bytes CSS including base · 16,383 bytes runtime JavaScript

Usage

Data format

Three columns: Actual, Target, Maximum. Maximum must be positive and both values within zero and maximum. The bar shows Actual and the perpendicular line shows Target. Rows have independent maximums; use equal maximums to compare lengths.

Shared interactions

Hover, tap or focus a mark to inspect its exact value. Arrow keys, Home and End move between marks; Escape dismisses the tooltip. The source table remains available without JavaScript. Enhanced charts expose exact values through accessible marks and tooltips.

Lifecycle and themes

Load Chart Core, Chart Plots and this component module. Theme tokens supply colors in light and dark modes. Use layoutCharts.refresh(root) after changing the table and destroy(root) before unmounting. Wide charts scroll within their frame.

Building with AI? The AI Manifest has these notes and the full contract. See the AI Guide.