3d Charts examples?

3 posts, 0 answers
  1. Fabrice
    Fabrice avatar
    22 posts
    Member since:
    Jan 2015

    Posted 26 Apr Link to this post

    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. Fabrice
    Fabrice avatar
    22 posts
    Member since:
    Jan 2015

    Posted 26 Apr in reply to Fabrice Link to this post

    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>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Martin
    Admin
    Martin avatar
    63 posts

    Posted 28 Apr Link to this post

    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.
Back to Top