I am going to do a stacked bar chart with many series. I won't know the number of series until run time so I will need to create them dynamically. For example, my x-axis will be year (2008,2009,2010) and y-axis will be a double (i.e. $1200.00). Each series will be an insurance coverage (i.e. Auto, Liability...) and I will need the legend to tell the user what color matches each coverage. Since I won't know the available coverages at run time I am having trouble implementing this. Is there a way to bind the chart and series to a collection of objects like the one below to create a series for each different coverage that is in the list?
public class Data
{
public string Year {get;set;}
<-- x-axis public string Coverage {get;set;}
<-- series data (i.e. Auto, Liability, collision...) public string Amount {get;set;}
<-- y-axis}