Hi,
I am trying to implement the workaround stated in the help for creating an XamBulletGraph with multiple comparative markers by: The effect of displaying multiple performance bars or multiple comparative markers can be achieved by overlaying several instances of the control.
The reason I am doing this is so that I can show values for both the TargetValue as well as a StandardDeviation TargetValue. Ideally I want to only to display the TargetValue for the second XamBulletGraph and nothing else. I tried setting everything but the TargetValue to Transparent, but something must not be quite right in my xaml because if I try to add my second bullet graph on top of the original one it covers it but shows the Standard Deviation marker. If I reverse them then I cannot see my Standard Deviation marker.
Are there any existing samples available for this particular workaround?
Thanks,
Amanda
Here is the xaml:
VerticalAlignment="Center" MinimumValue="{Binding MinValue}" MaximumValue="{Binding MaxValue}" Interval="{Binding Interval}" MinorTickCount="{Binding MinorTickCount}" TickBrush="#F79646" TickStrokeThickness="3" TargetValue="{Binding TargetValue}" TargetValueBreadth="12" TargetValueName="{Binding TargetValueName}" TargetValueBrush="White" TargetValueOutline="Black" TargetValueStrokeThickness=".5" Value="{Binding Value}" ValueName="{Binding ValueName}" ValueBrush="White" ValueOutline="Black" ValueStrokeThickness=".5" LabelFormat="{}{0}" Title="{Binding Title}" TitleStyle="{DynamicResource titleStyle}" TitlesHorizontalRatio=".2" ShowToolTip="True" FontWeight="Bold"> Background="Transparent" VerticalAlignment="Center" MinimumValue="{Binding MinValue}" MaximumValue="{Binding MaxValue}" Interval="{Binding Interval}" MinorTickCount="{Binding MinorTickCount}" TickBrush="Transparent" TickStrokeThickness="3" TargetValue="{Binding StandardDeviation}" TargetValueBreadth="10" TargetValueName="{Binding StandardDeviationValueName}" TargetValueBrush="DimGray" TargetValueOutline="Black" TargetValueStrokeThickness=".5" Value="{Binding Value}" ValueName="{Binding ValueName}" ValueBrush="Transparent" ValueOutline="Transparent" ValueStrokeThickness=".5" LabelFormat="{}{0}" Title="{Binding Title}" TitleStyle="{DynamicResource titleStyle}" TitlesHorizontalRatio=".2" ShowToolTip="True" FontWeight="Bold">
Hello Amanda,
I tested this using a BulletGraph inside the DataTemplate for a ContentControl and this works as expected. I have attached the sample.
Please provide me with more information on what your data context looks like and where you are using the DataTemplate so that I can be of further assistance.
Sincerely,
Valerie
Software Developer
Infragistics
www.infragistics.com/support
Thank you for the sample, however it does not seem to work even when I drop the exact code you posted into my xaml.
Do you think the fact that my application, these xamBulletGraphs exist in a data template rather that just sitting in a window? Were you able to make this work where they are in a data template?
//Amanda
Since WPF will draw items on top of each based on the way they are defined in the XAML, you should put the bullet graph with the transparent linear ranges on top of the bullet graph displaying the linear ranges. Please see attached sample.
Let me know if you have any questions.
Just realized my xaml was missing some pieces after I hit post. Here it is again:
<DataTemplate x:Key="graphObjectItemTemplate"> <Grid> <igGauge:XamBulletGraph Height="80" Background="Transparent" VerticalAlignment="Center" MinimumValue="{Binding MinValue}" MaximumValue="{Binding MaxValue}" Interval="{Binding Interval}" MinorTickCount="{Binding MinorTickCount}" TickBrush="Transparent" TickStrokeThickness="3" TargetValue="{Binding StandardDeviation}" TargetValueBreadth="10" TargetValueName="{Binding StandardDeviationValueName}" TargetValueBrush="DimGray" TargetValueOutline="Black" TargetValueStrokeThickness=".5" Value="{Binding Value}" ValueName="{Binding ValueName}" ValueBrush="Transparent" ValueOutline="Transparent" ValueStrokeThickness=".5" LabelFormat="{}{0}" Title="{Binding Title}" TitleStyle="{DynamicResource titleStyle}" TitlesHorizontalRatio=".2" ShowToolTip="True" FontWeight="Bold"> <igGauge:XamBulletGraph.Ranges> <ig:XamLinearGraphRange StartValue="{Binding LowRangeMinValue}" EndValue="{Binding LowRangeMaxValue}" Brush="Transparent" Caption="{Binding LowRangeCaption}"/> <ig:XamLinearGraphRange StartValue="{Binding HighRangeMinValue}" EndValue="{Binding HighRangeMaxValue}" Brush="Transparent" Caption="{Binding HighRangeCaption}"/> </igGauge:XamBulletGraph.Ranges> </igGauge:XamBulletGraph> <igGauge:XamBulletGraph Height="80" VerticalAlignment="Center" MinimumValue="{Binding MinValue}" MaximumValue="{Binding MaxValue}" Interval="{Binding Interval}" MinorTickCount="{Binding MinorTickCount}" TickBrush="#F79646" TickStrokeThickness="3" TargetValue="{Binding TargetValue}" TargetValueBreadth="12" TargetValueName="{Binding TargetValueName}" TargetValueBrush="White" TargetValueOutline="Black" TargetValueStrokeThickness=".5" Value="{Binding Value}" ValueName="{Binding ValueName}" ValueBrush="White" ValueOutline="Black" ValueStrokeThickness=".5" LabelFormat="{}{0}" Title="{Binding Title}" TitleStyle="{DynamicResource titleStyle}" TitlesHorizontalRatio=".2" ShowToolTip="True" FontWeight="Bold"> <igGauge:XamBulletGraph.Ranges> <ig:XamLinearGraphRange StartValue="{Binding LowRangeMinValue}" EndValue="{Binding LowRangeMaxValue}" Brush="#FFDA30" Caption="{Binding LowRangeCaption}"/> <ig:XamLinearGraphRange StartValue="{Binding HighRangeMinValue}" EndValue="{Binding HighRangeMaxValue}" Brush="#F66656" Caption="{Binding HighRangeCaption}"/> </igGauge:XamBulletGraph.Ranges> </igGauge:XamBulletGraph> </Grid> </DataTemplate>