This is a migrated thread and some comments may be shown as answers.

RadCharts with many data points

5 Answers 140 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Sean
Top achievements
Rank 1
Sean asked on 18 Jun 2009, 09:18 PM
I have a RadChart that I'm adding data to over time.  Eventually this will be automatic, but for test purposes I'm just putting a few data values in whenever I click a button.  When I add the data a few points at a time, say 5 or 20, my entire application crashes when the ObservableCollection of points has over 60 elements.  When I try adding them 61 at a time, the app will sometimes crash after adding the second batch of 61 elements, and sometimes after the third.  The javascript error on the page after the crash is this:

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

Sort by
0
Velin
Telerik team
answered on 23 Jun 2009, 01:09 PM
Hi Sean,

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.
0
Adam
Top achievements
Rank 1
answered on 17 Jul 2009, 12:27 AM
I am having the same problem for a simulation I am building.  I tried clicking on the thread that you linked, but it does not work.  Is there an updated link to the work around?

Thanks,

Adam
0
Velin
Telerik team
answered on 21 Jul 2009, 10:21 AM
Hello 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.
0
andrea bellagamba
Top achievements
Rank 1
answered on 06 Oct 2009, 01:09 PM
HI , I am using the Q2 Sp1, but stiil having the probelm

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>


0
Velin
Telerik team
answered on 09 Oct 2009, 02:02 PM
Hi andrea,

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.
Tags
Chart
Asked by
Sean
Top achievements
Rank 1
Answers by
Velin
Telerik team
Adam
Top achievements
Rank 1
andrea bellagamba
Top achievements
Rank 1
Share this question
or