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

3d Charts examples?

2 Answers 181 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Fabrice
Top achievements
Rank 1
Fabrice asked on 26 Apr 2016, 02:00 PM

I can't seem to find 3d chart demos either in the xaml sdk repository (https://github.com/telerik/xaml-sdk) or in the wpf demo application, is this feature no longer supported? I was trying to make a doughnut3d to work, but I get a StackTrace-less stackoverflow exception in runtime

.

 

Xaml:

 

<p></p><p>        <telerik:RadChart x:Name="radChart"<br>                          UseDefaultLayout="False"<br>                          Height="300"<br>                        ItemsSource="{Binding}"><br>            <Grid Margin="10"><br>                <Grid.RowDefinitions><br>                    <RowDefinition Height="Auto" /><br>                    <RowDefinition Height="*" /><br>                </Grid.RowDefinitions><br>                <Grid.ColumnDefinitions><br>                    <ColumnDefinition Width="*" /><br>                    <!--<ColumnDefinition Width="*" />--><br>                </Grid.ColumnDefinitions><br>                <telerik:ChartTitle Margin="0,0,0,10"<br>                                    HorizontalAlignment="Center"<br>                                    Content="Year 2008"<br>                                 Grid.Row="0"<br>                                    Grid.Column="0" /><br>                <telerik:ChartArea x:Name="webBrowsersShare2008Chart"<br>                                  Grid.Row="1"<br>                                   Grid.Column="0" /><br>                <!--<telerik:ChartTitle HorizontalAlignment="Center"<br>                                 Content="Year 2009"<br>                                 Margin="0,0,0,10"<br>                                   Grid.Row="0"<br>                                    Grid.Column="1" /><br>                <telerik:ChartArea x:Name="webBrowsersShare2009Chart"<br>                                  Grid.Row="1"<br>                                   Grid.Column="1" />--><br>            </Grid><br><br>            <telerik:RadChart.SeriesMappings><br>                <telerik:SeriesMapping CollectionIndex="0"<br>                                       ChartAreaName="webBrowsersShare2008Chart"><br>                    <telerik:SeriesMapping.SeriesDefinition><br>                        <telerik:Doughnut3DSeriesDefinition /><br>                    </telerik:SeriesMapping.SeriesDefinition><br><br>                    <telerik:SeriesMapping.ItemMappings><br>                        <telerik:ItemMapping FieldName="Value"<br>                                          DataPointMember="YValue" /><br>                        <telerik:ItemMapping FieldName="Description"<br>                                           DataPointMember="Label" /><br>                    </telerik:SeriesMapping.ItemMappings><br>                </telerik:SeriesMapping><br>                <!--<telerik:SeriesMapping CollectionIndex="1"<br>                                      ChartAreaName="webBrowsersShare2009Chart"><br>                    <telerik:SeriesMapping.SeriesDefinition><br>                        <telerik:DoughnutSeriesDefinition /><br>                    </telerik:SeriesMapping.SeriesDefinition><br>                    <telerik:SeriesMapping.ItemMappings><br>                        <telerik:ItemMapping FieldName="Value"<br>                                            DataPointMember="YValue" /><br>                        <telerik:ItemMapping FieldName="Description"<br>                                           DataPointMember="Label" /><br>                    </telerik:SeriesMapping.ItemMappings><br>                </telerik:SeriesMapping>--><br>            </telerik:RadChart.SeriesMappings><br>        </telerik:RadChart></p><p> </p>

2 Answers, 1 is accepted

Sort by
0
Fabrice
Top achievements
Rank 1
answered on 26 Apr 2016, 02:02 PM

Sorry, better formatting:

 

<telerik:RadChart x:Name="radChart"
                  UseDefaultLayout="False"
                  Height="300"
                  ItemsSource="{Binding}">
    <Grid Margin="10">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <telerik:ChartTitle Margin="0,0,0,10"
                            HorizontalAlignment="Center"
                            Content="Year 2008"
                            Grid.Row="0"
                            Grid.Column="0" />
        <telerik:ChartArea x:Name="webBrowsersShare2008Chart"
                           Grid.Row="1"
                           Grid.Column="0" />
    </Grid>
 
    <telerik:RadChart.SeriesMappings>
        <telerik:SeriesMapping CollectionIndex="0"
                               ChartAreaName="webBrowsersShare2008Chart">
            <telerik:SeriesMapping.SeriesDefinition>
                <telerik:Doughnut3DSeriesDefinition />
            </telerik:SeriesMapping.SeriesDefinition>
 
            <telerik:SeriesMapping.ItemMappings>
                <telerik:ItemMapping FieldName="Value"
                                     DataPointMember="YValue" />
                <telerik:ItemMapping FieldName="Description"
                                     DataPointMember="Label" />
            </telerik:SeriesMapping.ItemMappings>
        </telerik:SeriesMapping>
    </telerik:RadChart.SeriesMappings>
</telerik:RadChart>

0
Martin
Telerik team
answered on 28 Apr 2016, 12:53 PM
Hi Fabrice,

RadChart supports 3D visualization. You can find its demos in the online Silverlight application. Regardless, the demos are in Silverlight they share their code with the WPF version and you can use them as a reference.

As for the exception, I do not get the same error. The only difference in my case is that I am using ItemsSource="{Binding Data}" where Data is a public property of the MainWindow's DataContext. Could you provide me with more information in order to reproduce the exception?

As a side note, we have a new RadChartView suite that is easier to set up and it has improved performance. But, currently it doesn't support 3D visualization. You can read more about the differences between the controls in the RadChart vs RadChartView help article.

Regards,
Martin
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
Chart
Asked by
Fabrice
Top achievements
Rank 1
Answers by
Fabrice
Top achievements
Rank 1
Martin
Telerik team
Share this question
or