Category / Section
How to refresh UWP BulletGraph with dynamic data
1 min read
You can dynamically add the bullet graph ranges and feature measure values. Initially, the bullet graph and its ranges alone can be initialized and ranges value (RangeEnd) and FeatureMeasureValue can be set dynamically.
Initializing Qualitative ranges:
<syncfusion4:SfBulletGraph.QualitativeRanges> <syncfusion4:QualitativeRange x:Name="HorizontalRange1" RangeStroke="#61A301"></syncfusion4:QualitativeRange> <syncfusion4:QualitativeRange x:Name="HorizontalRange2" RangeStroke="#FCDA21"></syncfusion4:QualitativeRange> <syncfusion4:QualitativeRange x:Name="HorizontalRange3" RangeStroke="#D61E40" ></syncfusion4:QualitativeRange> </syncfusion4:SfBulletGraph.QualitativeRanges>
Dynamically (e.g., via Button click) adding values to the ranges:
HorizontalRange1.RangeEnd = range; HorizontalRange2.RangeEnd = Math.Round(range * 2); HorizontalRange3.RangeEnd = Math.Round(range * 3);
On initializing alone, the bullet graph will appear as shown in the following screenshot.
After adding ranges and feature measure value, the bullet graph will appear shown in the following screenshot:
Sample for updating the ranges and feature measure for bullet graph dynamically: https://www.syncfusion.com/downloads/support/directtrac/general/ze/BulletgraphUWP-996984154