RadCharts with many data points

6 posts, 0 answers
  1. Sean
    Sean avatar
    1 posts
    Member since:
    Jun 2009

    Posted 18 Jun 2009 Link to this post

    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?
  2. Velin
    Admin
    Velin avatar
    391 posts

    Posted 23 Jun 2009 Link to this post

    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.
  3. DevCraft banner
  4. Adam
    Adam avatar
    1 posts
    Member since:
    Apr 2009

    Posted 16 Jul 2009 Link to this post

    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
  5. Velin
    Admin
    Velin avatar
    391 posts

    Posted 21 Jul 2009 Link to this post

    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.
  6. andrea bellagamba
    andrea  bellagamba avatar
    43 posts
    Member since:
    Jul 2009

    Posted 06 Oct 2009 Link to this post

    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>


  7. Velin
    Admin
    Velin avatar
    391 posts

    Posted 09 Oct 2009 Link to this post

    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.
Back to Top
DevCraft banner