BulletGauge

BulletGauge[value,reference,{min,max}]

draws a bullet gauge showing value and reference in a range of min to max.

BulletGauge[value,reference,{min,m1,m2,,max}]

draws a bullet gauge with performance regions split at the mi.

BulletGauge[{v1,v2,},]

draws a bullet gauge with multiple values v1, v2, .

BulletGauge[values,{r1,r2,},]

draws a bullet gauge with multiple references r1, r2, .

Details and Options

  • Values less than min or greater than max are clipped to the respective limits.
  • Undefined values or bad input are taken to be missing and typically display the min value.
  • Units may be assigned to value, min, and max by using Quantity.
  • The units do not need to be the same, but must be commensurate.
  • BulletGauge has the same options as Graphics, with the following additions and changes:
  • GaugeFaceElementFunctionAutomaticfunction to draw the face
    GaugeFaceStyleAutomaticstyle for the gauge face
    GaugeFrameElementFunctionAutomaticfunction to draw the frame
    GaugeFrameSizeAutomatichow large to make the gauge frame
    GaugeFrameStyleAutomaticstyle for the gauge frame
    GaugeLabelsNonelabels for the gauge
    GaugeMarkersAutomaticappearance for the marker
    GaugeStyleAutomaticstyle for gauge markers
    MethodAutomaticmethod to use
    PerformanceGoal$PerformanceGoalaspects of performance to try to optimize
    PlotTheme$PlotThemetheme to use for drawing the gauge
    ReferenceMarkersAutomaticappearance for the marker
    ReferenceMarkerStyleOpacity[0.5]style for gauge markers
    ScaleDivisionsAutomaticthe number and distribution of ticks
    ScaleOriginAutomaticwhere to position the scale in the gauge
    ScalePaddingAutomatichow to draw the space around the scale
    ScaleRangeStyleAutomatichow to draw the scale ranges
    ScalingFunctionsNonescaling functions for the gauge
    TargetUnitsAutomaticunits to display in the gauge
  • GaugeLabels can take the following forms:
  • Noneno gauge labels
    Automaticinclude units as labels
    Fullinclude units and a value as labels
    Allinclude all values as labels
    "Value"include values as labels
    "Unit"include units as labels
    labeluse label as a label
    Placed[label,pos]place label at position pos
    {label1,label2,}use multiple labels
  • GaugeLabels->Placed[label,pos] can use the positions pos:
  • Top,Bottom,Left,Right,Centerpositions within the gauge face
    bsposition along the scale
    Scaled[bs]scaled position along the scale
    {bx,by}scaled position {bx,by} in the gauge
    {pos,{lx,ly}}scaled position {lx,ly} in the label at a general position pos in the gauge
  • A list of built-in settings for GaugeMarkers, GaugeFaceElementFunction, and GaugeFrameElementFunction can be obtained from ChartElementData["BulletGauge"]. A visual gallery is available in the Chart Element Schemes palette.
  • GaugeMarkers by default uses a bar appearance when min0max, and a discrete marker otherwise.
  • ReferenceMarkers by default uses a rectangular appearance for the marker.
  • GaugeMarkers and ReferenceMarkers can take the following forms:
  • "name"named marker appearance
    Graphics[],Image[],graphic or image to be used for a marker
    ChartElementData["name",]chart element function
    Noneomit the marker for value
    fpure function for creating a gauge element
    {marker1,marker2,}use markeri for the i^(th) value
    Placed[spec,location]place the markers in spec at location
  • BulletGauge supports the following locations inside Placed for GaugeMarkers and ReferenceMarkers:
  • "DivisionCenter"cumulative markers centered on division marks
    "DivisionInterval"cumulative markers between division marks
    "Scale"within the scale region
    "Center"marker centered on the scale
    "OppositeScale"within the scale region on the side of the axis opposite the ticks
    "ScaleRange"cumulative marker within the scale region
    "Frame"within the dial frame
  • By default, the styles used for the gauge markers and reference markers are based on GaugeStyle.

Examples

open allclose all

Basic Examples  (3)

Generate a gauge for a particular value and reference value:

Generate a gauge for a list of values and a list of reference values:

Generate a gauge with specific background ranges:

Scope  (13)

Data and Layouts  (5)

Data values do not have to be within the range of the scale:

Nonreal data is taken to be missing and typically uses the min value of the gauge:

The min and max specified are sorted so that the smaller number of the list is always the min:

Specify the values with units:

Specify the units for the gauge:

Styling and Appearance  (5)

Use a theme to control the overall appearance:

Use explicit styles for the markers:

Change the type of markers used:

Change where the markers are placed:

Specify ranges of the scale to be colored by the index:

Labeling and Legending  (3)

Use GaugeLabels to add a label to the gauge face:

Use Placed to change the location of the label on the face of the gauge:

Use a list to specify more than one label:

Options  (43)

Background  (1)

Insert a background color behind the gauge:

GaugeLabels  (9)

Show the value as a label:

Specify a label:

Labels can be any expression:

Use Placed to control label placement:

Position labels at values along the scale:

Position labels using a scaled coordinate system along the scale:

Use a scaled coordinate system over the entire gauge:

Place all labels at the middle of the scale and vary the coordinates within the label:

Use a list to specify more than one label:

GaugeMarkers  (5)

Turn the markers on and off:

List built-in settings for GaugeMarkers:

For detailed settings, use Palettes Chart Element Schemes:

Use an image or graphic for a marker:

Use Placed to change the location of the marker:

Use cumulative markers:

GaugeStyle  (4)

Style the marker:

By default, different styles are chosen for multiple markers:

Specify a list of styles:

Specify the style for cumulative markers up to the gauge value:

Specify an additional style for markers beyond the gauge value:

LabelStyle  (1)

Style the labels:

PerformanceGoal  (2)

Generate a gauge with tooltips on the gauge markers:

Emphasize performance by disabling interactive behaviors:

PlotTheme  (4)

Create gauges using a variety of base themes:

Specify a theme with bright elements:

Change the gauge color:

The "Sparkline" theme fits gauges in the surrounding text:

ReferenceMarkers  (5)

Turn the markers on and off:

List built-in settings for ReferenceMarkers:

For detailed settings, use Palettes Chart Element Schemes:

Use an image or graphic for a marker:

Use Placed to change the location of the marker:

Use cumulative markers:

ReferenceMarkerStyle  (2)

Style the marker:

Specify a list of styles:

ScaleDivisions  (2)

Specify the total number of ticks:

Specify the number of major and minor ticks:

ScaleRangeStyle  (5)

Apply a style to all of the ranges:

Use a list of styles to draw the ranges:

Color the scale ranges with built-in color schemes:

Define a one-dimensional color function:

Apply a style to the background and foreground of all the ranges:

TargetUnits  (2)

By default, units are determined automatically:

Specify the displayed units:

TicksStyle  (1)

Specify overall ticks style:

Applications  (2)

Visualize business statistics:

Visualize current stock prices for several companies:

Introduced in 2012
 (9.0)
 |
Updated in 2014
 (10.0)