Categorical Chart with DateTime on x-axis

2 posts, 0 answers
  1. NS
    NS avatar
    189 posts
    Member since:
    Jan 2007

    Posted 21 Jan 2010 Link to this post

    Hello,

    Is it possible to use Categorical charts in combination with DateTime support ?

    Consider the following objectmodel:
    public class countrySummary
        {
            public string description { get; set; }

            public PlanningWeek Week1 { get; set; }
            public PlanningWeek Week2 { get; set; }
    }

    public class PlanningWeek
        {
            public DateTime startDate { get; set; }
            public double days { get; set; }

        }

    List<countrySummary> _countrySummary = new List<countrySummary>();
    _countrySummary.Add(description = "Total for US", Week1 = new PlanningWeek(startDate = new DateTime(2010, 1, 1), days = 5), Week2 = new PlanningWeek(startDate = new DateTime(2010, 1, 8), days = 7))
    _countrySummary.Add(description = "Total for MX", Week1 = new PlanningWeek(startDate = new DateTime(2010, 1, 1), days = 10), Week2 = new PlanningWeek(startDate = new DateTime(2010, 1, 8), days = 20))

    On the x-axis there should be 1/1/2010 and 1/8/2010
    Next I want to see the totals for that date for each country. I've found how to display a date on the x-axis, but I'm unable to add each item from the collection seperately to the chart.

    Please find a screenshot from Excel on how I visualise it :-) Can this be achieved with RadChart based on the format of my Custom Object ?

  2. NS
    NS avatar
    189 posts
    Member since:
    Jan 2007

    Posted 21 Jan 2010 Link to this post

    How typical ... I just found the solution myself:

    The key is to use the Grouping andAggregation feature :-)
Back to Top