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

Categorical Chart with DateTime on x-axis

1 Answer 66 Views
Chart
This is a migrated thread and some comments may be shown as answers.
NS
Top achievements
Rank 1
NS asked on 21 Jan 2010, 01:26 PM

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 ?

1 Answer, 1 is accepted

Sort by
0
NS
Top achievements
Rank 1
answered on 21 Jan 2010, 01:33 PM
How typical ... I just found the solution myself:

The key is to use the Grouping andAggregation feature :-)
Tags
Chart
Asked by
NS
Top achievements
Rank 1
Answers by
NS
Top achievements
Rank 1
Share this question
or