I have a BubbleSeries with a binding to a collection of equally spaced items. When I resize my dialog I clearly see that there are bubbles missing.
I beleave this is a bug in the XamDataChart.
Here is my code to reproduce.
MainWindow.xaml:
<Window x:Class="TestUmgebungBubbles.MainWindow"
xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation
xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml
xmlns:ig=http://schemas.infragistics.com/xaml
Title="MainWindow" Height="350" Width="1200">
<Grid>
<ig:XamDataChart x:Name="xamdatachart" >
<ig:XamDataChart.Axes>
<ig:NumericXAxis x:Name="xAxis" Title="AxisX" />
<ig:NumericYAxis x:Name="yAxis" Title="AxisY"/>
</ig:XamDataChart.Axes>
<ig:XamDataChart.Series>
<ig:BubbleSeries XAxis="{Binding ElementName=xAxis}"
YAxis="{Binding ElementName=yAxis}"
XMemberPath="ValueX"
YMemberPath="ValueY"
ItemsSource="{Binding Collection}" >
</ig:BubbleSeries>
</ig:XamDataChart.Series>
</ig:XamDataChart>
<Label Content="Please resize the Window a few times to get the bubbles non-equally spaced " Margin="80,0,0,0"/>
</Grid>
</Window>
And in MainWindow.xaml.cs:
public partial class MainWindow : Window
{
public ObservableCollection<ChartData> Collection
get { return (ObservableCollection<ChartData>)GetValue(CollectionProperty); }
set { SetValue(CollectionProperty, value); }
}
public static readonly DependencyProperty CollectionProperty =
DependencyProperty.Register("Collection", typeof(ObservableCollection<ChartData>), typeof(MainWindow), new PropertyMetadata(null));
public MainWindow()
Collection =new ObservableCollection<ChartData>();
for (int i = 0; i < 1000; i++)
ChartData data =new ChartData()
ValueX = (double)i * 0.1,
ValueY = 20
};
Collection.Add(data);
this.DataContext = this;
InitializeComponent();
public class ChartData
public double ValueX { get; set; }
public double ValueY{ get; set; }
Hello Michael,
Thank you for your post. I have been looking into the question that you are having and the reason for some of the markers to not be drawn is that the XamDataChart is not drawing all markers in order to provide better performance. If you zoom the XamDataChart, so there are not markers that overlap, you can see that all markers are rendered correctly.
If you wish to be able to draw all markers when the XamDataChart is not zoomed, you can use the MaximumMarkers property of the BubbleSeries, which allows you to control the amount of markers that will be shows in the chart. You can set this property to 1000 to force the XamDataChart to draw all of your markers.
I am attaching a sample application, based on your code snippet, that shows how you can use this property.
Please let me know if you need any further assistance on the matter.
Sincerely,
Krasimir, MCPD
Developer Support Supervisor - XAML
Infragistics
www.infragistics.com/support