The example for 3D Bar Chart has the ability to rotate by clicking on the chart area and move the mouse.
I have tried to copy most parts of the Example chart xaml code and adapted in to my needs. I can get everything to work as expected, but I can't get it to react to mouse movement and rotate.
Is something else than what is shown by the example code needed to implement this?
I have tried to copy most parts of the Example chart xaml code and adapted in to my needs. I can get everything to work as expected, but I can't get it to react to mouse movement and rotate.
Is something else than what is shown by the example code needed to implement this?
3 Answers, 1 is accepted
0
Hi Gunnar,
I prepared a sample project that demonstrates how to implement 3D Bar RadChart control. You can find it in the attached file. In order to be able to rotate the chart, you need to use CameraExtension:
I hope that this helps.
All the best,
I prepared a sample project that demonstrates how to implement 3D Bar RadChart control. You can find it in the attached file. In order to be able to rotate the chart, you need to use CameraExtension:
<
telerik:RadChart
x:Name
=
"RadChart1"
>
<
telerik:RadChart.DefaultSeriesDefinition
>
<
telerik:Bar3DSeriesDefinition
/>
</
telerik:RadChart.DefaultSeriesDefinition
>
<
telerik:RadChart.DefaultView
>
<
telerik:ChartDefaultView
>
<
telerik:ChartDefaultView.ChartArea
>
<
telerik:ChartArea
>
<
telerik:ChartArea.Extensions
>
<
telerik:CameraExtension
/>
</
telerik:ChartArea.Extensions
>
</
telerik:ChartArea
>
</
telerik:ChartDefaultView.ChartArea
>
</
telerik:ChartDefaultView
>
</
telerik:RadChart.DefaultView
>
</
telerik:RadChart
>
I hope that this helps.
All the best,
Polina
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!
0
Gunnar
Top achievements
Rank 1
answered on 20 Jul 2011, 04:03 PM
Hi,
I copied the code from the Silverlight demo project letter by letter. It has a ChartLegend section but otherwise it is identical to the code you propose.
The CameraExtension section is present. When this code is run in the Silverlight example project it works. When the exact same code run in my project it doesn't work (no reaction whatsoever when I click/drag with the mouse on the chart).
One difference is that in the Silverlight sample code, the chart is the root control of a UserControl - in my code the same chart object is placed in a grid on a navigationpage. Does this matter?
I copied the code from the Silverlight demo project letter by letter. It has a ChartLegend section but otherwise it is identical to the code you propose.
<
telerik:RadChart
x:Name
=
"RadChart1"
ItemsSource
=
"{Binding ElementName=certificatesAndIncidentsPerTemplateDomainDataSource, Path=Data}"
>
<
telerik:RadChart.DefaultSeriesDefinition
>
<
telerik:Bar3DSeriesDefinition
/>
</
telerik:RadChart.DefaultSeriesDefinition
>
<
telerik:RadChart.DefaultView
>
<
telerik:ChartDefaultView
>
<
telerik:ChartDefaultView.ChartLegend
>
<
telerik:ChartLegend
Name
=
"legend"
/>
</
telerik:ChartDefaultView.ChartLegend
>
<
telerik:ChartDefaultView.ChartArea
>
<
telerik:ChartArea
LegendName
=
"legend"
>
<
telerik:ChartArea.Extensions
>
<
telerik:CameraExtension
/>
</
telerik:ChartArea.Extensions
>
</
telerik:ChartArea
>
</
telerik:ChartDefaultView.ChartArea
>
</
telerik:ChartDefaultView
>
</
telerik:RadChart.DefaultView
>
</
telerik:RadChart
>
The CameraExtension section is present. When this code is run in the Silverlight example project it works. When the exact same code run in my project it doesn't work (no reaction whatsoever when I click/drag with the mouse on the chart).
One difference is that in the Silverlight sample code, the chart is the root control of a UserControl - in my code the same chart object is placed in a grid on a navigationpage. Does this matter?
0
Hello Gunnar,
Please, take a look at the same edited project that I've attached. I've included the chart in a Navigation page and it works just fine.
Hope that helps in solving the issue.
Regards,
Peshito
the Telerik team
Please, take a look at the same edited project that I've attached. I've included the chart in a Navigation page and it works just fine.
Hope that helps in solving the issue.
Regards,
Peshito
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!