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

Need help with Grouping/ Filtering

2 Answers 40 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Michele
Top achievements
Rank 2
Michele asked on 13 Aug 2010, 02:56 PM
Hello,
I've spent a lot of time trying to succed in this but with no luck...
I've a gridview that's bind to items of type :

[DataContract]
public class MyClass
{

    [DataMember]
    public string CodiceRapporto { get; set; }
    [DataMember]
    public string Descr { get; set; }
    [DataMember]
    public int IDFarm{ get; set; }
    [DataMember]
    public decimal Total{ get; set; }
    [DataMember]
    public decimal Risk{ get; set; }
    [DataMember]
    public string Agent{ get; set; }
}

I've those data in a GridView on which I could group on Agent and IDFarm and can filter on Agent, Risk,Total,IDFarm

I just want to hame something that looks like http://demos.telerik.com/silverlight/#Chart/Aggregates and that shows (nomatter of what grouping/filtering the data ) Total and Risk ( as http://demos.telerik.com/silverlight/#Chart/MultipleYAxes, the blue and red bar)

I've tried to understand how to use the grouping in the first example but it has a different approach respect to the MultipleYAxes ... what should I use?
Thanks
Paolo

2 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 17 Aug 2010, 03:27 PM
Hi Paolo,

 You can try to use grouping in RadChart. I have made one example for you. Please check if this is the result you seek.

<Grid x:Name="LayoutRoot" Background="White">
    <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
        <telerik:RadChart x:Name="RadChart1">
            <telerik:RadChart.SeriesMappings>
                <telerik:SeriesMapping>
                    <telerik:SeriesMapping.SeriesDefinition>
                        <telerik:BarSeriesDefinition />
                    </telerik:SeriesMapping.SeriesDefinition>
                     
                    <telerik:SeriesMapping.ItemMappings>
                        <telerik:ItemMapping DataPointMember="XValue" FieldName="Risk" />
                        <telerik:ItemMapping DataPointMember="YValue" FieldName="Total" />
                    </telerik:SeriesMapping.ItemMappings>
                     
                    <telerik:SeriesMapping.GroupingSettings>
                        <telerik:GroupingSettings ShouldCreateSeriesForLastGroup="True">
                            <telerik:ChartGroupDescriptor Member="Agent" />
                            <telerik:ChartGroupDescriptor Member="IDFarm" />
                        </telerik:GroupingSettings>
                    </telerik:SeriesMapping.GroupingSettings>
                </telerik:SeriesMapping>
            </telerik:RadChart.SeriesMappings>
        </telerik:RadChart>
    </ScrollViewer>
</Grid>

Kind regards,
yivanov
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
Michele
Top achievements
Rank 2
answered on 18 Aug 2010, 08:23 AM
Hello yivanov ,
thanks for your reply... I try it and let you know,
thanks again
Tags
Chart
Asked by
Michele
Top achievements
Rank 2
Answers by
Yavor
Telerik team
Michele
Top achievements
Rank 2
Share this question
or