Configuration

An object that specifies configuration options for the dxBullet widget.

color

Specifies a color for the bullet bar.

Type: String
Default Value: '#e8c267'

This option supports the following colors.

  • hexadecimal colors
  • RGB colors
  • RGBA colors (not supported in Internet Explorer 8)
  • predefined/cross-browser color names
  • predefined SVG colors (not supported in Internet Explorer 8)

To specify a color for the target and zero level lines, use the targetColor option.

Show Example:
jQuery

In this example, the bullet bar color is changed to powderblue using the color option.


                                    

                                    

drawn

Specifies a callback function that is called when the widget has finished drawing itself.

Type: function(widget)
Function parameters:
widget: Object
The instance of the drawn widget.

If you need to perform specific actions when the widget has finished drawing itself, assign a callback function to the drawn option. When implementing this function, you can access the instance of the currently drawn widget using the function's parameter or the this object.

endScaleValue

Specifies an end value for the invisible scale.

Type: Number
Default Value: undefined

The primary, target and zero values of the dxBullet widget are held within a range. This range is represented by an invisible scale. To specify the boundary values of this scale, set the startScaleValue and endScaleValue options.

Specify the same start and end scale values for several bullets when you display them in a column so that they can be compared visually.

Show Example:
jQuery

In this example, the scale is defined using the startScaleValue and endScaleValue options.


                                    

                                    

incidentOccured

Specifies a callback function that is called when an error or warning appears.

Type: function(incidentInfo)
Function parameters:
incidentInfo: Object
Contains information about the occurred incident.

When an error or warning appears, the widget notifies you by passing a message to the browser console. This message contains the ID of the incident, a brief description, and a link to the Errors and Warnings section where further information about this incident can be found. However, you can handle errors and warnings in the way that you require. To do this, implement a callback function performing the required actions and assign it to the incidentOccured option. Within this function, you can use various information about the incident that occurred. This information can be accessed from the fields of the object passed to the callback function as a parameter. These fields are as follows.

  • id
    Contains the ID of the incident. The full list of IDs can be found in the Errors and Warnings section.
  • type
    Contains the type of the incident. This field equals 'error' for errors or 'warning' for warnings.
  • args
    Contains the argument of the incident's message. The content of this field varies greatly, depending on the incident. For example, it may contain the name of the data source field that was not specified correctly, or the name of the option that was not set properly.
  • text
    Contains the text passed to the browser console. This text includes the content of the args field, if there are any.
  • widget
    Contains the name of the widget that produced the error or warning.
  • version
    Contains the currently used version of the ChartJS library.

margin

Specifies the blank space between the widget's extreme elements and the boundaries of the area provided for the widget in pixels.

Type: Object

Set the required values for the left, right, top and bottom margins using the corresponding options of the margin object.

pathModified

Notifies a widget that it is embedded into an HTML page that uses a path modifier.

Type: Boolean
Default Value: false

If you place a widget on a page that uses a path modifier, notify the widget about it by setting the pathModified option to true. As an example of such modifiers, the base HTML tag can be considered. Also, we recommend you to enable this option if you place the widget inside the <iframe> tag.

rtlEnabled

Specifies whether or not the widget supports right-to-left representation.

Type: Boolean
Default Value: false

The most common scenario is switching all the widgets to a right-to-left reading order. In this instance, set the DevExpress.rtlEnabled field to true. If you need to switch the reading order in a particular widget, use the rtlEnabled configuration option of this widget.

showTarget

Specifies whether or not to show the target line.

Type: Boolean
Default Value: true
See Also

For an overview of the main target line features, refer to the Target Line topic.

Show Example:
jQuery

Toggle the check box below to show/hide the bullet target line.


                                    

                                    

showZeroLevel

Specifies whether or not to show the line indicating zero on the invisible scale.

Type: Boolean
Default Value: true
See Also

To get further information about configurable settings of the zero level line, refer to the Zero Level Line topic.

Show Example:
jQuery

Toggle the check box below to show/hide the bullet zero level line.


                                    

                                    

size

Specifies the size of the widget.

Type: Object

By default, the widget occupies the entire area of the parent container (division). If the container width or height is set to zero, the widget is not displayed.

If you need to set a particular size for the widget, different from the container's size, use the size configuration object. Assign a height and width in pixels to the height and width options of the size object.

NOTE: The size configuration object reserves space for the main widget elements, while displaying a tooltip may require extra space. Refer to the tooltip object description to find ways to resolve this issue.

Show Example:
jQuery

In this example, the size of the widget differs from the container size.


                                    

                                    

startScaleValue

Specifies a start value for the invisible scale.

Type: Number
Default Value: 0

The main, target and zero values of the dxBullet widget are contained within a range. This range is represented by an invisible scale. To specify the boundary values of this scale, set the startScaleValue and endScaleValue options.

Specify the same start and end scale values for several bullets when you display them in a column so that they can be comparable visually.

Show Example:
jQuery

In this example, the scale is defined using the startScaleValue and endScaleValue options.


                                    

                                    

target

Specifies the value indicated by the target line.

Type: Number
Default Value: 0
See Also

For an overview of the main target line features, refer to the Target Line topic.

Show Example:
jQuery

In this example, the target value is specified using the target option.


                                    

                                    

targetColor

Specifies a color for both the target and zero level lines.

Type: String
Default Value: '#666666'

This option supports the following colors.

  • hexadecimal colors
  • RGB colors
  • RGBA colors (not supported in Internet Explorer 8)
  • predefined/cross-browser color names
  • predefined SVG colors (not supported in Internet Explorer 8)

To specify a color for the bullet bar, use the color option.

Show Example:
jQuery

In this example, the color of the target and zero lines is changed to firebrick using the targetColor option.


                                    

                                    

targetWidth

Specifies the width of the target line.

Type: Number
Default Value: 4

Show Example:
jQuery

In this example, the target line width is changed using the targetWidth option.


                                    

                                    

theme

Specifies the name of the theme to be applied.

Type: String
Default Value: 'desktop'

Use this option to specify the name of the theme that should be applied to the widget. For information on customizing and implementing themes, refer to the Themes topic.

Show Example:
jQuery

In this example, a green theme is implemented on the base of the default theme. This theme is applied to the dxBullet widget using the theme option.


                                    

                                    

tooltip

Specifies tooltip options.

Type: Object

A tooltip is a small pop-up rectangle that displays information about a widget when it is hovered over. You can enable or disable a tooltip, change its default appearance and format or customize the displayed text using the options of the tooltip configuration object.

NOTE: A tooltip is displayed outside the widget's container. If you plan to use the tooltip, make sure there is enough space around your widget to display it. For example, you can apply a margin to the widget's container to reserve the area around the widget for the tooltip.

Show Example:
jQuery

In this example, several tooltip options are altered. The tooltip is colored in 'seashell' using the color option. The main and target values are displayed in the 'fixedPoint' format with a precision of 2. In addition, tooltip font options are changed.


                                    

                                    

value

Specifies the primary value indicated by the bullet bar.

Type: Number
Default Value: 0
See Also

For an overview of the main bullet bar features, see the Bullet Bar topic.

Show Example:
jQuery

In this example, you can change the value indicated by the bullet bar using the button below. If this value is greater than the target value, the bullet bar becomes red. Otherwise, it is colored in blue.