Bullet

The Bullet widget is useful when you need to compare a single measure to a target value. The widget comprises a horizontal bar indicating the measure and a vertical line indicating the target value.

Included in: dx.viz.js, dx.viz-web.js, dx.all.js
Module: viz/bullet
Bullet interactive configuration
Copy Code
Copy to Codepen
$("#bullet").dxBullet({
});

You can create the widget using one of the following approaches.

  • jQuery
    Use the dxBullet jQuery plug-in.

    HTML
    <div id="bulletContainer"></div>
    JavaScript
    $("#bulletContainer").dxBullet({
        startScaleValue: 0,
        endScaleValue: 35,
        value: 27,
        target: 24 
    });
  • Knockout
    Add a div element and apply the dxBullet binding to this element.

    HTML
    <div data-bind="dxBullet: {
        startScaleValue: 0,
        endScaleValue: 35,
        value: 27,
        target: 24 
    }"></div>
  • AngularJS
    Add a div element and apply the dx-bullet directive to this element.

    HTML
    <div dx-bullet="{
        startScaleValue: 0,
        endScaleValue: 35,
        value: 27,
        target: 24 
    }"></div>

Note that DevExtreme widgets require you to link the jQuery library to your application. If you use the Knockout or AngularJS approach, the Knockout or AngularJS library is also required. For detailed information on linking these libraries to your project, refer to the Installation article.

View Demo Watch Video

Configuration

An object that specifies configuration options for the Bullet widget.

Methods

This section describes the methods that can be used in code to manipulate objects related to the Bullet widget.

Events

This section describes events fired by this widget.