MicroBulletGraph Class
Represents a bullet graph control that has a primary featured measure and optionally compares that measure to another measure to enrich its meaning, while also displaying this information in the context of qualitative ranges of performance (poor, satisfactory, good, etc.).
[TemplatePart(Name = "PART_Canvas", Type = typeof(Canvas))]
public class MicroBulletGraph : Control
- Inheritance:
- object Visual UIElement FrameworkElement Control object
Constructors
MicroBulletGraph()
Initializes an instance of the class.
public MicroBulletGraph()
Properties
ComparativeMeasureAscent
A Unit indicating the ascent of the comparative measure bar.
public Unit ComparativeMeasureAscent { get; set; }
Property Value
- Unit:
The default value is
66.7%.
Remarks
Ascent is height when in a horizontal graph, and width when in a vertical graph.
ComparativeMeasureBrush
The Brush used to render the comparative measure bar.
public Brush? ComparativeMeasureBrush { get; set; }
Property Value
Remarks
When this value is null, a brush will be auto-generated from the ThemeBaseColor.
ComparativeMeasureExtent
A Unit indicating the extent of the comparative measure bar.
public Unit ComparativeMeasureExtent { get; set; }
Property Value
- Unit:
The default value is
2.
Remarks
Extent is width when in a horizontal graph, and height when in a vertical graph.
ComparativeMeasureValue
The value represented by the comparative measure bar.
public double ComparativeMeasureValue { get; set; }
Property Value
- double:
The default value is
NaN, meaning don't show a comparative measure.
FeaturedMeasureAscent
A Unit indicating the ascent of the featured measure bar.
public Unit FeaturedMeasureAscent { get; set; }
Property Value
- Unit:
The default value is
33.3%.
Remarks
Ascent is height when in a horizontal graph, and width when in a vertical graph.
FeaturedMeasureBrush
The Brush used to render the featured measure bar.
public Brush? FeaturedMeasureBrush { get; set; }
Property Value
Remarks
When this value is null, a brush will be auto-generated from the ThemeBaseColor.
FeaturedMeasureValue
The value represented by the featured measure bar.
LegendStringFormat
The format that the MicroBulletGraph control will display in a tool tip.
public string? LegendStringFormat { get; set; }
Property Value
Remarks
The format string will be passed the following parameters:
- {0} - The featured measure value.
- {1} - The projected measure value.
- {2} - The comparative measure value.
- {3} - The minimum value.
- {4} - The maximum value.
- {5} - The value of the first qualitative range.
- {6} - The value of the second qualitative range.
- {7} - The value of the third qualitative range.
- {8} - The value of the fourth qualitative range.
- {9} - The value of the fifth qualitative range.
Maximum
The maximum value displayed by the control.
public double Maximum { get; set; }
Property Value
- double:
The default value is
NaN, meaning auto-calculate.
Minimum
The minimum value displayed by the control.
public double Minimum { get; set; }
Property Value
- double:
The default value is
NaN, meaning auto-calculate.
Orientation
The orientation of the MicroBulletGraph.
public Orientation Orientation { get; set; }
Property Value
- Orientation:
The default value is Horizontal.
ProjectedMeasureBrush
The Brush used to render the projected measure bar.
public Brush? ProjectedMeasureBrush { get; set; }
Property Value
Remarks
When this value is null, a brush will be auto-generated from the ThemeBaseColor.
ProjectedMeasureValue
The value represented by the projected measure bar.
public double ProjectedMeasureValue { get; set; }
Property Value
- double:
The default value is
NaN, meaning don't display a projected measure.
QualitativeRanges
The chart's collection of qualitative ranges.
public MicroQualitativeRangeCollection QualitativeRanges { get; }
Property Value
ThemeBaseColor
The base Color to use when auto-generating brushes for rendering the graph.
Methods
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate().
public override void OnApplyTemplate()
OnCreateAutomationPeer()
Returns class-specific AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.
protected override AutomationPeer OnCreateAutomationPeer()
Returns
- AutomationPeer:
The type-specific AutomationPeer implementation.
OnSizeChanged(object, SizeChangedEventArgs)
Handles the SizeChanged event of the control.
protected virtual void OnSizeChanged(object sender, SizeChangedEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| sender | object | The source of the event. |
| e | SizeChangedEventArgs | The event data. |
Refresh()
Updates the chart based on the current state.
public void Refresh()
Fields
ComparativeMeasureAscentProperty
Defines the ComparativeMeasureBrush property.
public static readonly DependencyProperty ComparativeMeasureAscentProperty
ComparativeMeasureBrushProperty
Defines the ComparativeMeasureBrush property.
public static readonly DependencyProperty ComparativeMeasureBrushProperty
ComparativeMeasureExtentProperty
Defines the ComparativeMeasureExtent property.
public static readonly DependencyProperty ComparativeMeasureExtentProperty
ComparativeMeasureValueProperty
Defines the ComparativeMeasureValue property.
public static readonly DependencyProperty ComparativeMeasureValueProperty
FeaturedMeasureAscentProperty
Defines the FeaturedMeasureAscent property.
public static readonly DependencyProperty FeaturedMeasureAscentProperty
FeaturedMeasureBrushProperty
Defines the FeaturedMeasureBrush property.
public static readonly DependencyProperty FeaturedMeasureBrushProperty
FeaturedMeasureValueProperty
Defines the FeaturedMeasureValue property.
public static readonly DependencyProperty FeaturedMeasureValueProperty
LegendStringFormatProperty
Defines the LegendStringFormat property.
public static readonly DependencyProperty LegendStringFormatProperty
MaximumProperty
Defines the Maximum property.
public static readonly DependencyProperty MaximumProperty
MinimumProperty
Defines the Minimum property.
public static readonly DependencyProperty MinimumProperty
OrientationProperty
Defines the Orientation property.
public static readonly DependencyProperty OrientationProperty
ProjectedMeasureBrushProperty
Defines the ProjectedMeasureBrush property.
public static readonly DependencyProperty ProjectedMeasureBrushProperty
ProjectedMeasureValueProperty
Defines the ProjectedMeasureValue property.
public static readonly DependencyProperty ProjectedMeasureValueProperty
ThemeBaseColorProperty
Defines the ThemeBaseColor property.
public static readonly DependencyProperty ThemeBaseColorProperty