How to get grouping as i need ?

12 posts, 1 answers
  1. Cedric
    Cedric avatar
    64 posts
    Member since:
    Oct 2010

    Posted 11 Oct 2010 Link to this post

    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

     

  2. Cedric
    Cedric avatar
    64 posts
    Member since:
    Oct 2010

    Posted 12 Oct 2010 Link to this post

    Can 't edit to attach file ?
  3. UI for WPF is Visual Studio 2017 Ready
  4. Cedric
    Cedric avatar
    64 posts
    Member since:
    Oct 2010

    Posted 13 Oct 2010 Link to this post

    Any help ?

    Thx

  5. Vladimir Milev
    Admin
    Vladimir Milev avatar
    1061 posts

    Posted 15 Oct 2010 Link to this post

    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
  6. Cedric
    Cedric avatar
    64 posts
    Member since:
    Oct 2010

    Posted 15 Oct 2010 Link to this post

    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

  7. Cedric
    Cedric avatar
    64 posts
    Member since:
    Oct 2010

    Posted 15 Oct 2010 Link to this post

    attached capture
  8. Vladimir Milev
    Admin
    Vladimir Milev avatar
    1061 posts

    Posted 19 Oct 2010 Link to this post

    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
  9. Cedric
    Cedric avatar
    64 posts
    Member since:
    Oct 2010

    Posted 21 Oct 2010 Link to this post

    Hi,

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

  10. Hristo
    Admin
    Hristo avatar
    408 posts

    Posted 25 Oct 2010 Link to this post

    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
  11. Cedric
    Cedric avatar
    64 posts
    Member since:
    Oct 2010

    Posted 04 Jul 2011 Link to this post

    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 ? 
  12. Answer
    Vladimir Milev
    Admin
    Vladimir Milev avatar
    1061 posts

    Posted 07 Jul 2011 Link to this post

    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!

  13. Cedric
    Cedric avatar
    64 posts
    Member since:
    Oct 2010

    Posted 11 Jul 2011 Link to this post

    Thanks for the answer

    - Cedric -
Back to Top
UI for WPF is Visual Studio 2017 Ready