NullReferenceException at GetAnimationSettings()

2 posts, 0 answers
  1. Yoni Dagan
    Yoni Dagan avatar
    45 posts
    Member since:
    Sep 2009

    Posted 27 Sep 2009 Link to this post

    [Newbie question]


    I'm trying to set up a simple line chart.
    My code is very simple:


    DataSeries ds1 = new DataSeries();  
    ds1.LegendLabel = "Random";  
    ds1.Definition = new Telerik.Windows.Controls.Charting.LineSeriesDefinition();   
    FillDataSeries(ds1); // Fills series data points with XValue and YValue   

    When the code runs, a NullReferenceException is thrown.


    System.NullReferenceException: Object reference not set to an instance of an object.

       at Telerik.Windows.Controls.Charting.BaseAnimationConverter.GetAnimationSettings() in c:\Builds\WPF_Scrum\Chart_WPF_2009_Q2_SP1\Sources\Development\Controls\Chart\Chart\Animations\BaseAnimationConverter.cs:line 163

    what am I missing?




  2. Velin
    Velin avatar
    391 posts

    Posted 30 Sep 2009 Link to this post

    Hi Yoni Dagan,

    I see from your post that you have tried to use the ChartArea as a standalone control and populate manually its data series collection. This control was designed to be placed within a RadChart control and should  not be used separately. You can find more information on how to set up the chart control here.

    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