adding camera extension gives error...of object reference not set to an instance of object

15 posts, 0 answers
  1. Kapil
    Kapil avatar
    15 posts
    Member since:
    Jul 2010

    Posted 10 Sep 2010 Link to this post

    while adding camera extension in chart i get an error as "Object refrerence not set to an instance of object". ...even when i copied and paste your sample of bar chart in 3d galllery of wpf...first of all seriesextension comes undefined..and when i comment that code to run the project..i get an error in camera extension as "object reference....."..
    Please help me out with this...
     Private Sub UserControl_Loaded(ByVal sender As ObjectByVal e As RoutedEventArgs)
                Dim cameraExtension As New CameraExtension()
                RadChart1.DefaultView.ChartArea.Extensions.Add(cameraExtension)  'getting error over here...
            End Sub


     Private Sub FillSampleChartData()
                Dim d As New Bar3DSeriesDefinition()
                d.ItemStyle = DirectCast(Me.FindResource("MyStyle"), Style)
                RadChart1.DefaultSeriesDefinition = d

                ' RadChart1.ItemsSource = SeriesExtensions.GetUserData(5, 0)  'commented code for debugging
            End Sub


    Thanks,
    kapil Garg
  2. Nikolay
    Admin
    Nikolay avatar
    385 posts

    Posted 14 Sep 2010 Link to this post

    Hi Kapil,

    You can find the SeriesExtensions.cs ( or SeriesExtensions.vb ) file in your install folder under \Demos\Examples\Chart - it is a class that is used to generate data for our demo examples.

    The most likely reason for getting this error when adding the CameraExtension is because after commenting the RadChart1.ItemsSource line, the chart would have no data to display - you would get the standard No Data Series screen, however, with the CameraExtension added on UserControl_Loaded event, you need to have a 3D series chart in order for it to work. Simply add a few data points, so that you would have data in your chart when adding the CameraExtension.

    Hope this helps.

    Best wishes,
    Nikolay
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
  4. Kapil
    Kapil avatar
    15 posts
    Member since:
    Jul 2010

    Posted 17 Sep 2010 Link to this post

    i did it the way you told me....

    i had set itemssource property first
    like this way...
    ChartObj.ItemsSource = New Integer() {1, 2, 3}
    ChartObj.DefaultView.ChartArea.Extensions.Add(New CameraExtension)

    problems comes again ...."Object Reference not set to an instance of object"

    Thanks,
    Kapil Garg
  5. Kapil
    Kapil avatar
    15 posts
    Member since:
    Jul 2010

    Posted 17 Sep 2010 Link to this post

    can you upload any independent simple file with radchart on it uses any 3d series definition and camera extension added to it..

    Thanks,
    Kapil Garg
  6. Nikolay
    Admin
    Nikolay avatar
    385 posts

    Posted 21 Sep 2010 Link to this post

    Hi Kapil,

    Please, find attached a sample application, which makes use of the camera extension and a 3D Bar series. Hope this helps.

    All the best,
    Nikolay
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Kapil
    Kapil avatar
    15 posts
    Member since:
    Jul 2010

    Posted 30 Sep 2010 Link to this post

    i am still ...getting error...............please checkout the screenshot of problem mention in that...

    Thanks,
    Kapil Garg
  8. Nikolay
    Admin
    Nikolay avatar
    385 posts

    Posted 04 Oct 2010 Link to this post

    Hi Kapil,

    Please, find attached an updated example, which demonstrates how to work-around this issue, as it requires some time to initialize, thus the added time interval.

    Hope this helps.

    Sincerely yours,
    Nikolay
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  9. Huo
    Huo avatar
    5 posts
    Member since:
    Jan 2011

    Posted 04 Jan 2011 Link to this post

    i meet this Problem just like yours, have you at last solved it?
  10. Huo
    Huo avatar
    5 posts
    Member since:
    Jan 2011

    Posted 04 Jan 2011 Link to this post

    I downloaded the cameraextension-updated.zip,but still have the error"object reference not set to ...."
  11. Huo
    Huo avatar
    5 posts
    Member since:
    Jan 2011

    Posted 04 Jan 2011 Link to this post

    after i have changed the time interval to  timespan.FromSeconds(10),this error solved.however, if i want to uses two charts with 3D,each chart needs add cameraextension,so, how i can solve this error? 
  12. Nikolay
    Admin
    Nikolay avatar
    385 posts

    Posted 06 Jan 2011 Link to this post

    Hello,

    We have fixed a number of issues regarding adding a camera extension, so it is no longer needed to use the timer. Please, find attached an updated version of the sample application , which demonstrates how to achieve this. Please note that it uses the latest internal release ( LIB ) assemplies, so you would need to download them from your account.

    As for using more than one charts, you would need to add the cam extension for each of them.

    Greetings,
    Nikolay
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for WPF
  13. Richard Alvarez
    Richard Alvarez avatar
    11 posts
    Member since:
    May 2005

    Posted 27 Apr 2011 Link to this post

    Any chance of getting a version of this that uses the Silverlight controls?
  14. Bartholomeo Rocca
    Bartholomeo Rocca avatar
    247 posts
    Member since:
    May 2006

    Posted 29 Apr 2011 Link to this post

    Hello Richard,

    RadChart for Silverlight does support 3D series and camera extension -- check the demos here: http://demos.telerik.com/silverlight/#Chart/Gallery3D/Bar.


    Greetings,
    Bart.
  15. Janaki
    Janaki avatar
    5 posts
    Member since:
    Dec 2011

    Posted 10 Oct 2012 Link to this post

    Hi 

    i'm using Q2 2011 version rad controls for silverlight. i have added bar chart ,line chart,and 3d bar chart in a combo box.
    if i click on line and bar chart everything is working fine. But if i click on 3d bar chart it takes time to load and after that if i click on bar or line chart the chart page itself not coming. i have used zooming and scrolling for all charts.
  16. Petar Kirov
    Admin
    Petar Kirov avatar
    425 posts

    Posted 12 Oct 2012 Link to this post

    Hi Janaki,

    It is hard to say what may cause this unwanted behaviour based on the information provided. Could you please provide a runnable project, so that we can track-down the problem locally?
     
    Thanks,
    Petar Kirov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top
UI for WPF is Visual Studio 2017 Ready