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

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

14 Answers 199 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Kapil
Top achievements
Rank 1
Kapil asked on 10 Sep 2010, 08:41 AM
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

14 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 14 Sep 2010, 10:30 AM
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
0
Kapil
Top achievements
Rank 1
answered on 17 Sep 2010, 12:30 PM
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
0
Kapil
Top achievements
Rank 1
answered on 17 Sep 2010, 12:32 PM
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
0
Nikolay
Telerik team
answered on 21 Sep 2010, 07:36 AM
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
0
Kapil
Top achievements
Rank 1
answered on 30 Sep 2010, 12:19 PM
i am still ...getting error...............please checkout the screenshot of problem mention in that...

Thanks,
Kapil Garg
0
Nikolay
Telerik team
answered on 04 Oct 2010, 09:29 AM
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
0
Huo
Top achievements
Rank 1
answered on 04 Jan 2011, 10:31 AM
i meet this Problem just like yours, have you at last solved it?
0
Huo
Top achievements
Rank 1
answered on 04 Jan 2011, 10:33 AM
I downloaded the cameraextension-updated.zip,but still have the error"object reference not set to ...."
0
Huo
Top achievements
Rank 1
answered on 05 Jan 2011, 02:46 AM
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? 
0
Nikolay
Telerik team
answered on 06 Jan 2011, 09:28 AM
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
0
Richard Alvarez
Top achievements
Rank 1
answered on 27 Apr 2011, 06:02 PM
Any chance of getting a version of this that uses the Silverlight controls?
0
Bartholomeo Rocca
Top achievements
Rank 1
answered on 29 Apr 2011, 09:16 AM
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.
0
Janaki
Top achievements
Rank 1
answered on 10 Oct 2012, 12:43 PM
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.
0
Petar Kirov
Telerik team
answered on 12 Oct 2012, 03:13 PM
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.

Tags
Chart
Asked by
Kapil
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Kapil
Top achievements
Rank 1
Huo
Top achievements
Rank 1
Richard Alvarez
Top achievements
Rank 1
Bartholomeo Rocca
Top achievements
Rank 1
Janaki
Top achievements
Rank 1
Petar Kirov
Telerik team
Share this question
or