Newbie chart question

2 posts, 1 answers
  1. Ernstjan
    Ernstjan avatar
    8 posts
    Member since:
    Nov 2010

    Posted 13 Jun 2011 Link to this post

    Hi All,

    I'm struggeling for some time now with a radchart (piechart) I'm using in my application, the series are not displayed (probably), see attachment.
    My XAML looks like this :

                <telerik:RadChart x:Name="RadChart1" Grid.Row="2" ItemsSource="{Binding}">
                    <telerik:RadChart.DefaultView>
                        <telerik:ChartDefaultView ChartLegendPosition="{Binding LegendPosition, Mode=TwoWay}">
                            <telerik:ChartDefaultView.ChartTitle>
                                <telerik:ChartTitle>
                                    Employee Actions
                                </telerik:ChartTitle>
                            </telerik:ChartDefaultView.ChartTitle>
                            <telerik:ChartDefaultView.ChartArea>
                                <telerik:ChartArea LabelFormatBehavior="None" LegendName="ChartLegend">
                                </telerik:ChartArea>
                            </telerik:ChartDefaultView.ChartArea>
                            <telerik:ChartDefaultView.ChartLegend>
                                <telerik:ChartLegend Name="ChartLegend"
                                                     LegendItemMarkerShape="{Binding ChartLegendItemMarkerShape, Mode=TwoWay}" />
                            </telerik:ChartDefaultView.ChartLegend>
                        </telerik:ChartDefaultView>
                    </telerik:RadChart.DefaultView>
                    <telerik:RadChart.SeriesMappings>
                        <telerik:SeriesMapping LegendLabel="Test" >
                            <telerik:SeriesMapping.SeriesDefinition>
                                <telerik:PieSeriesDefinition />
                            </telerik:SeriesMapping.SeriesDefinition>
                            <telerik:SeriesMapping.GroupingSettings>
                                <telerik:GroupingSettings>
                                    <telerik:GroupingSettings.GroupDescriptors>
                                        <telerik:ChartGroupDescriptor Member="Type" />
                                    </telerik:GroupingSettings.GroupDescriptors>
                                </telerik:GroupingSettings>
                            </telerik:SeriesMapping.GroupingSettings>
                            <telerik:SeriesMapping.ItemMappings>
                                <telerik:ItemMapping FieldName="Type"
                                                DataPointMember="XCategory" />
                                <telerik:ItemMapping FieldName="Type"
                                                DataPointMember="YValue"
                                                AggregateFunction="Count" />
                            </telerik:SeriesMapping.ItemMappings>
                        </telerik:SeriesMapping>
                    </telerik:RadChart.SeriesMappings>
                </telerik:RadChart>


    I would like to see a real pie chart with slices in different colors :)

    Thanks in advance!



  2. Answer
    Evgenia
    Admin
    Evgenia avatar
    1437 posts

    Posted 16 Jun 2011 Link to this post

    Hello Ernstjan,

    To show a Pie Chart where each slice has different color you can follow our demo with sample code.
    If you want to Populate the Chart with Manual Series Mappings, you can take a look at the sample project attached.

    Greetings,
    Evgenia
    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
Back to Top