Greetings
I need to set up a proportional series with only 3 value steps. 0-1.0 = green 1.1-1.5 = yellow > 1.5 = red
I'm a little confused how to do this. I have the following modified from the samples online
<ig:GeographicProportionalSymbolSeries x:Name="ProportionalSeries" MarkerType="Circle" LongitudeMemberPath="Longitude" LatitudeMemberPath="Latitude" ItemsSource="{Binding}" RadiusMemberPath="V" FillMemberPath="V"> <ig:GeographicProportionalSymbolSeries.RadiusScale> <ig:SizeScale MaximumValue="16" MinimumValue="16" IsLogarithmic="False" LogarithmBase="2"/> </ig:GeographicProportionalSymbolSeries.RadiusScale> <ig:GeographicProportionalSymbolSeries.FillScale> <ig:ValueBrushScale MaximumValue="1.6" MinimumValue="1.1" IsLogarithmic="False" LogarithmBase="10" > <ig:ValueBrushScale.Brushes> <ig:BrushCollection> <RadialGradientBrush> <GradientStop Color="DarkRed" Offset="1"/> <GradientStop Color="Tomato" Offset="0.130"/> </RadialGradientBrush> </ig:BrushCollection> </ig:ValueBrushScale.Brushes> </ig:ValueBrushScale> </ig:GeographicProportionalSymbolSeries.FillScale> <!-- custom marker template for GeographicProportionalSymbolSeries --> <ig:GeographicProportionalSymbolSeries.MarkerTemplate> <DataTemplate > <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" MinWidth="3" MinHeight="3"> <Ellipse Stretch="Fill" Fill="{Binding Path=ActualItemBrush}" Stroke="{Binding Path=ActualItemBrush}" StrokeThickness="0.5"> <Ellipse.Effect> <DropShadowEffect ShadowDepth="0" BlurRadius="5" Opacity="0.23" Color="Black" /> </Ellipse.Effect> </Ellipse> <Ellipse Stretch="Fill" Fill="{Binding Path=ActualItemBrush}" Stroke="{Binding Path=ActualItemBrush}" StrokeThickness="0.5"/> </Grid> </DataTemplate> </ig:GeographicProportionalSymbolSeries.MarkerTemplate>
Hello Matthew,
Thank you for your post. I have been looking into the question that you are having and I can adding three Brushes in the ValueBrushScale. When you are using ValueBrushScale, the color of the marker is based on the FillMemberPath and the color is proportional to the Brushes collection. For example if you have minimum 0 and maximum 1 and the Brushes contains green, yellow and red, and you have value of 0.2 the color of the marker will be between green and yellow. You can read more detailed information regarding the Fill Scales for that series here: http://help.infragistics.com/NetAdvantage/WPF/current/CLR4.0/?page=xamGeographicMap_Using_Geographic_Proportional_Symbol_Series.html
Also, if you wish the markers to be colored in those exact three colors, and to avoid the values between the green and yellow to appear as YellowGreen, I can suggest using a MarkerTempalte and bind the Background/Fill of your elements in the DataTemplate to the value of the marker and using a Converter to determine the color of the marker. I have created two sample applications for you, that demonstrates the approaches that I have described.
Please let me know if you need any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
Thank you for the response. This appears to be exactly what I needed. I will test it out today and hopefully all will be well.
Nevermind. It works like a charm now. thanks for the help
Thank you for your email. I am very glad that the approach I have suggested was helpful for you. Please let me know if you need any further assistance on the matter.