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

How to get grouping as i need ?

11 Answers 109 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Cedric
Top achievements
Rank 1
Cedric asked on 11 Oct 2010, 11:26 PM

Hi, i have this serie of data :

 

 

liste.Add(new Score() { Level = "L1", Name = "AAA", Status = Status.Success});
liste.Add(new Score() { Level = "L1", Name = "AAA", Status = Status.Unknown});
liste.Add(new Score() { Level = "L1", Name = "AAA", Status = Status.Missed});
liste.Add(new Score() { Level = "L1", Name = "BBB", Status = Status.Success});
liste.Add(new Score() { Level = "L1", Name = "BBB", Status = Status.Unknown});
liste.Add(new Score() { Level = "L1", Name = "BBB", Status = Status.Missed});
liste.Add(new Score() { Level = "L2", Name = "CCC", Status = Status.Success});
liste.Add(new Score() { Level = "L2", Name = "AAA", Status = Status.Unknown);

and i need to provide a stacked bar 100 where the data are first grouped by level, then by name and the
stacked value is the weigth of the status.
So i should get a first bar for AAA with (33%, 33%, 33%) then an other bar with the same values for the L1 group
then a bar for AAA with 100%, and a bar for CCC with 100%
i think it s possible but i can t manage to do it !
And is it possible to display the first two groups with a legend owning only 3 values (Success, Missed, Unknown)
and having only 3 colours in the stacked elements ?

Attached file is a sample of what i want to get
Thx in advance

 

11 Answers, 1 is accepted

Sort by
0
Cedric
Top achievements
Rank 1
answered on 12 Oct 2010, 12:51 PM
Can 't edit to attach file ?
0
Cedric
Top achievements
Rank 1
answered on 13 Oct 2010, 10:40 AM

Any help ?

Thx

0
Vladimir Milev
Telerik team
answered on 15 Oct 2010, 12:15 PM
Hi Cedric,

The closest RadChart can do for your case is the following:
SeriesMapping mapping1 = new SeriesMapping() { SeriesDefinition = new StackedBar100SeriesDefinition() };
mapping1.GroupingSettings.GroupDescriptors.Add(new ChartGroupDescriptor("Level"));
mapping1.GroupingSettings.GroupDescriptors.Add(new ChartGroupDescriptor("Status"));
mapping1.ItemMappings.Add(new ItemMapping("Name", DataPointMember.XCategory));
mapping1.ItemMappings.Add(new ItemMapping("Value", DataPointMember.YValue));
mapping1.ItemMappings.Add(new ItemMapping("Level", DataPointMember.Tooltip));
RadChart1.SeriesMappings.Add(mapping1);
 
RadChart1.ItemsSource = liste;

Also, you will need to formally declare an integer value to make RadChart work:
public class Score
{
    public string Level { get; set; }
    public string Name { get; set; }
    public Status Status { get; set; }
    public int Value { get { return 1; } }
}

Also, I am attaching my test page for your reference.

Regards,
Vladimir Milev
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
Cedric
Top achievements
Rank 1
answered on 15 Oct 2010, 12:55 PM

Hi, thanks for your help,

when i run your solution i got a hole in the first bar for the AAA and a flying square for the third bar.

Is it the expected design ?

In think you have not understood the graph i wan to display : if i add more datas the display means nothing

Ex:

liste.Add(new Score() { Level = "L1", Name = "AAA", Status = Status.Success }); //--> Just add this line
            liste.Add(new Score() { Level = "L1", Name = "AAA", Status = Status.Success });
            liste.Add(new Score() { Level = "L1", Name = "AAA", Status = Status.Unknown});
            liste.Add(new Score() { Level = "L1", Name = "AAA", Status = Status.Missed});
            liste.Add(new Score() { Level = "L1", Name = "BBB", Status = Status.Success});
            liste.Add(new Score() { Level = "L1", Name = "BBB", Status = Status.Unknown});
            liste.Add(new Score() { Level = "L1", Name = "BBB", Status = Status.Missed});
            liste.Add(new Score() { Level = "L2", Name = "CCC", Status = Status.Success});
            liste.Add(new Score() { Level = "L2", Name = "AAA", Status = Status.Unknown });

Now, the Status.Success represents 50% of the values for AAA in the Level1

0
Cedric
Top achievements
Rank 1
answered on 15 Oct 2010, 01:21 PM
attached capture
0
Vladimir Milev
Telerik team
answered on 19 Oct 2010, 11:39 AM
Hi Cedric,

It is not normal. This is because of a bug that is already fixed in RadChart. I have tested with our latest internal version and it is working well. We sincerely apologize for this inconvenience. Please try the latest internal build and this should be working as expected.

Regards,
Vladimir Milev
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
Cedric
Top achievements
Rank 1
answered on 21 Oct 2010, 10:22 AM

Hi,

Thanks for the information. Where can i find the internals build to  do a try ?

0
Hristo
Telerik team
answered on 25 Oct 2010, 01:41 PM
Hello Cedric,

In order to see the latest internal builds you need to download our latest official release - Q2 2010 SP2. Then you'll find the available latest internal builds here.

Regards,
Hristo
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
Cedric
Top achievements
Rank 1
answered on 04 Jul 2011, 02:35 PM
Hello beyond the grave :)

I reopen this subject because we have updated to the last version of telerik RadControl and i should want to know if it is now possible to get the chart i was trying to get last year as you can see in the first capture ?

- Cedric -
Nb: It not possible anymore to attach files to a post ? 
0
Accepted
Vladimir Milev
Telerik team
answered on 07 Jul 2011, 11:42 AM
Hi Cedric,

The chart axes still do not support such compound labels as shown in your capture. We sincerely apologize for the inconvenience.

Regards,
Vladimir Milev
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
Cedric
Top achievements
Rank 1
answered on 11 Jul 2011, 08:37 AM
Thanks for the answer

- Cedric -
Tags
Chart
Asked by
Cedric
Top achievements
Rank 1
Answers by
Cedric
Top achievements
Rank 1
Vladimir Milev
Telerik team
Hristo
Telerik team
Share this question
or