20
Overlap column series
posted
Hi all,
I would build a chart with two AreaSeries and some multiple overlap ColumnSeries.
In order to receive a continuous representation of my data, I convert X-values to DateTime elements (a sort of "ScatterAreaSeries").
So, my DataModel is:
public class DataPoint
{
public double X { get; set; }
public double Y { get; set; }
public DateTime DateTime_X
{
get
{
DateTime date = DateTime.Today.AddDays(X);
return date;
}
}
}
AreaSeries are ok but I'm not able to plot multiple column series that use the same x-values and different y-values.
Datasource is an array list like this:
List<DataPoint>[ ] data;
so I have
data[1]
x = 5010 Y= 1,18
x = 5660 Y= 0,3
X = 12800 Y = 0,2
...
data[2]
x = 5010 Y= 0,4
x = 5660 Y= 0.5
X = 12800 Y = 1,4
...
etc...
NumericYAxis is set on XAML file. The follow method in code-behind doesn't work. 
private void AddOverlapColumnSeries(List<DataPoint>[] data)
{
for (int i = 0; i < data.Lenght; i++)
{
var categoryDateTimeXAxis = new CategoryDateTimeXAxis();
CenterProfileChart.Axes.Add(categoryDateTimeXAxis);
categoryDateTimeXAxis.ItemsSource = data[i];
categoryDateTimeXAxis.DateTimeMemberPath = "DateTime_X";
var series = new ColumnSeries
{
ValueMemberPath = "Y",
ItemsSource = data[i],
XAxis = categoryDateTimeXAxis,
YAxis = numericYAxis
};
CenterProfileChart.Series.Add(series);
}
}
To have an idea of the chart I would build, please see the attached file.
Could be it build with Infragistics? What wrong with my code? 
Thanks in advance.