When I run the code below it gives me completely wrong dates on my X axis the existing dates are today - 10 while the dates that apear are all 30/12/99 - this only hapens when i bind frome code behind. If i create my axes and series in XAML there is no issue. What am I missing?
var MyORMData = [ORM data source which normaly binds well with infragistics];
Series series = new Series();
series.ChartType = ChartType.Scatter;
series.DataPointColor = DataPointColor.Same;
Marker marker = new Marker();
marker.Type = MarkerType.Star5;
marker.MarkerSize = .5;
series.Marker = marker;
series.AxisX = "DATE_TIME_FIELD";
series.AxisY = "DOUBLE_FIELD";
series.DataSource = _Summary;
series.DataMapping = "ValueX = DATE_TIME_FIELD; ValueY = DOUBLE_FIELD; ValueZ = Z_FIELD";
_MyChart.Series.Add(series);
Axis x = new Axis();
x.AxisType = AxisType.PrimaryX;
Infragistics.Windows.Chart.Label labelX = new Infragistics.Windows.Chart.Label();
labelX.FontSize = 8;
Mark mark = new Mark();
mark.Stroke = Brushes.AliceBlue;
x.MajorGridline = mark;
x.AutoRange = true;
x.Label = labelX;
Axis y = new Axis();
y.AxisType = AxisType.PrimaryY;
Infragistics.Windows.Chart.Label labelY = new Infragistics.Windows.Chart.Label();
labelY.FontSize = 8;
y.MajorGridline = mark;
y.AutoRange = false;
y.Unit = 10;
y.Minimum = 50;
y.Maximum = 100;
y.Label = labelY;
Axis z = new Axis();
z.AxisType = AxisType.PrimaryZ;
Infragistics.Windows.Chart.Label labelZ = new Infragistics.Windows.Chart.Label();
z.MajorGridline = mark;
z.AutoRange = false;
z.Unit = 1;
z.Minimum = 0;
z.Maximum = 6;
z.Label = labelZ;
_TrendComboChart.Axes.Add(x);
_TrendComboChart.Axes.Add(y);
_TrendComboChart.Axes.Add(z);
the Series.AxisX and AxisY properties are supposed to correspond to the Axis.Name property setting, not a field in your datasource. try adding this code before adding the Axes to the chart:
x.Name = "DATE_TIME_FIELD"; y.Name = "DOUBLE_FIELD";