Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1700
Bubble series : How to display squares ?
posted

Hello,

I read this issue : http://ko.infragistics.com/community/forums/t/86303.aspx

I have an issue to display square markers.

I took the original project, change max for int at 10, and change the xaml to :

<Window xmlns:ig="http://schemas.infragistics.com/xaml" x:Class="BubbleSeries_BubblesMissing.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">

<Window.Resources>
<ResourceDictionary>

<DataTemplate x:Key="SquareMarkerTemplate">
<Rectangle
Stretch="Fill" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Fill="Aqua"
StrokeThickness="0.5" MinWidth="10" MinHeight="10" />
</DataTemplate>

<ig:BrushCollection x:Key="BubbleFillBrushCollection">
<SolidColorBrush Color="#FF02B3FE" />
<SolidColorBrush Color="#FF008BC6" />
<SolidColorBrush Color="#FF016C9A" />
<SolidColorBrush Color="#FF00405B" />
</ig:BrushCollection>

</ResourceDictionary>

</Window.Resources>

<Grid x:Name="LayoutRoot" Background="White">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<!--#BEGIN SNIPPET#-->
<!-- ===================================================== -->
<ig:XamDataChart x:Name="DataChart" HorizontalAlignment="Stretch" Grid.Row="1"
HorizontalZoomable="True" VerticalZoomable="True" Margin="0,0,30,0"
HorizontalContentAlignment="Stretch"
SquareMarkerTemplate="{StaticResource SquareMarkerTemplate}">
<!-- ===================================================== -->
<!--#END SNIPPET#-->

<ig:XamDataChart.Axes>
<ig:NumericXAxis x:Name="XAxis"
MinimumValue="0" MaximumValue="100" IsLogarithmic="True">
</ig:NumericXAxis>
<ig:NumericYAxis x:Name="YAxis"
IsLogarithmic="True"
LogarithmBase="10"
Label="{}{:N0} %">
</ig:NumericYAxis>

</ig:XamDataChart.Axes>
<ig:XamDataChart.Series>
<ig:BubbleSeries BorderThickness="2"
XMemberPath="Population"
YMemberPath="PublicDebt"
RadiusMemberPath="GdpPerCapita"
FillMemberPath="GdpPerCapita"
XAxis="{Binding ElementName=XAxis}"
YAxis="{Binding ElementName=YAxis}"
ItemsSource="{Binding Path=Collection}">

<ig:BubbleSeries.RadiusScale>
<ig:SizeScale IsLogarithmic="False" MinimumValue="0" MaximumValue="100" />
</ig:BubbleSeries.RadiusScale>
<ig:BubbleSeries.FillScale>
<ig:ValueBrushScale
IsLogarithmic="False"
MaximumValue="100"
MinimumValue="0"
Brushes="{StaticResource BubbleFillBrushCollection}" />
</ig:BubbleSeries.FillScale>
</ig:BubbleSeries>
</ig:XamDataChart.Series>
</ig:XamDataChart>
</Grid>
</Window>

The series isn't displayed, so the graph is empty.

Could you help me ?

Regards

Parents
No Data
Reply
  • 34510
    Verified Answer
    Offline posted

    Hello teamtim,

    There are a number of things that could be causing the series to not show up.  Much of it depends on what is actually inside your Collection data.  It's possible your SizeScale MinimumValue is too small.  And if your XAxis data is less than 1 then it won't show since the IsLogarithmic property is true.  I won't know the exact reason why it doesn't work until I've seen your full sample.

    However, I took your code and dropped it into the sample from http://ko.infragistics.com/community/forums/t/86303.aspx and I was able to get the series to show.

    P.S. If you want your SquareMarkerTemplate to be used you need to set the MarkerType property on the BubbleSeries to Square.

    BubbleSeries_BubblesMissing.zip
Children
No Data