This question is locked. New answers and comments are not allowed.
I have a bulletgraph in Windows 8 XAML (store app) tracking a value against acceptable ranges with some qualitative red/yellow/green graphics. The user can go to app settings and choose the units for this value (such as kg vs lbs). Everything is data-bound - min, max, comparative value, qualitative range size, etc.
The problem I am having is that if the bulletgraph is being shown and the user goes and changes the units, the bulletgraph goes completely nuts.
Specifically:
- Qualitative Ranges disappear completely (sometimes)
- Comparative Measure does not update and ends up drawn in the wrong place.
- tick step doesn't update, so too many or too few ticks show up (often to the point that it is a white smear)
- labels end up in the wrong place
It appears that this is a similar problem to an issue I reported on the Windows 7 phone controls, where if the databound value went out of range of min\max all the bindings broke and nothing updated anymore. Based on that assumption, I added some code to do a little dance with the value in the binding such that I first extended the ranges to encompass both old and new values, then set the values, and then reset the ranges to their final new values (with synchronous PropertyChanged notifications to force each change to take effect before the next). This fixed some of the problems, but the qualitative ranges still vanish sometimes. I don't see why the change in units would matter since qualitativerange length values are documented as ratios and not absolute values against min/max, but somehow the change in units (numeric values of min/max) is causing things to fall apart.
Here is a stripped down version of the XAML:
Has anybody gotten comparative ranges to update correctly when min and max change?
- Chris
(Also, vertical bullet graphs are HORRIBLE to work with. It looks like it just slaps a rotation transform on the whole control. That means when writing your templates everything is rotated (top margin is right margin, etc), there are clipping issues with rotated text, and so on. My brain hurts trying to make them look right)
The problem I am having is that if the bulletgraph is being shown and the user goes and changes the units, the bulletgraph goes completely nuts.
Specifically:
- Qualitative Ranges disappear completely (sometimes)
- Comparative Measure does not update and ends up drawn in the wrong place.
- tick step doesn't update, so too many or too few ticks show up (often to the point that it is a white smear)
- labels end up in the wrong place
It appears that this is a similar problem to an issue I reported on the Windows 7 phone controls, where if the databound value went out of range of min\max all the bindings broke and nothing updated anymore. Based on that assumption, I added some code to do a little dance with the value in the binding such that I first extended the ranges to encompass both old and new values, then set the values, and then reset the ranges to their final new values (with synchronous PropertyChanged notifications to force each change to take effect before the next). This fixed some of the problems, but the qualitative ranges still vanish sometimes. I don't see why the change in units would matter since qualitativerange length values are documented as ratios and not absolute values against min/max, but somehow the change in units (numeric values of min/max) is causing things to fall apart.
Here is a stripped down version of the XAML:
<telerikDataVisualization:RadBulletGraph Orientation="Vertical" ComparativeMeasure="{Binding BulletDisplayValue, Mode=OneWay}" StartValue="{Binding MinBullet, Mode=OneWay}" EndValue="{Binding MaxBullet, Mode=OneWay}" TickStep="{Binding BulletTick, Mode=OneWay}" LabelStep="{Binding BulletTick, Mode=OneWay}"><telerikDataVisualization:RadBulletGraph.QualitativeRanges> <telerikDataVisualization:BarIndicatorSegment Length="{Binding BulletPreWidth}" Stroke="{StaticResource bulletBelowRangeVertical}" Thickness="50"> </telerikDataVisualization:BarIndicatorSegment> <telerikDataVisualization:BarIndicatorSegment Length="{Binding BulletOkWidth, Mode=OneWay}" Stroke="{StaticResource bulletInRange}"Thickness="50"/> <telerikDataVisualization:BarIndicatorSegment Length="{Binding BulletPostWidth, Mode=OneWay}" Stroke="{StaticResource bulletAboveRangeVertical}" Thickness="50"/></telerikDataVisualization:RadBulletGraph.QualitativeRanges> </telerikDataVisualization:RadBulletGraph>Has anybody gotten comparative ranges to update correctly when min and max change?
- Chris
(Also, vertical bullet graphs are HORRIBLE to work with. It looks like it just slaps a rotation transform on the whole control. That means when writing your templates everything is rotated (top margin is right margin, etc), there are clipping issues with rotated text, and so on. My brain hurts trying to make them look right)