Sys.InvalidOperationException: Runtime error 4008 in control 'Xaml1', method : Layout cycle detected. Layout could not complete.
If I don't bind the ObservableCollection to the chart I can add as many items to it as I want. I bound it to a ListBox and dumped a few hundred elements into the collection and they all displayed fine.
Is there any way around this?
5 Answers, 1 is accepted
Indeed, this is a know issue with RadChart for Silverlight that our developers are already working on. There is another thread where further explanation and a workaround are provided.
Please, accept our apologies for the inconvenience.
Regards,
Velin
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Thanks,
Adam
A fix for this problem will be available in the Q2 SP1 version of the control expected till the end of the month. Here is a the correct link to the thread you requested.
Regards,
Velin
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
when dynamically biding many points to a chart I get Layout Cycle detected javascript error.
Any solution?
here is a simple example to reproduce the error
public partial class Page : UserControl
{
public Page()
{
InitializeComponent();
LoadData();
}
private void LoadData()
{
Random random = new Random();
RadChart chart = new RadChart();
ChartContainer.Children.Add(chart);
SeriesMapping seriesMapping = new SeriesMapping();
seriesMapping.SeriesDefinition = new SplineSeriesDefinition();
chart.SeriesMappings.Add(seriesMapping);
List<int> data = new List<int>();
for (int i = 0; i < 260; i++)
{
var value = random.Next(10, 1000);
data.Add(value);
}
chart.ItemsSource = data;
}
}
and the XAML:
<Grid x:Name="LayoutRoot" Background="White">
<ScrollViewer Height="600" Width="800" HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Visible">
<StackPanel x:Name="ChartContainer" Orientation="Horizontal" />
</ScrollViewer>
</Grid>
This issue has been already fixed. Our local tests did not confirm that this problem is present in the Q2 SP1 release of the control.
Please, prepare and send us a sample project(including the referenced Telerik dlls) which we could further examine and provide a solution.
Thanks.
Sincerely yours,
Velin
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.