Index: /branches/dataset-ids-2695/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionLineChartViewBase.cs
===================================================================
--- /branches/dataset-ids-2695/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionLineChartViewBase.cs	(revision 15296)
+++ /branches/dataset-ids-2695/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionLineChartViewBase.cs	(revision 15297)
@@ -20,9 +20,12 @@
 #endregion
 using System;
+using System.Collections;
 using System.Collections.Generic;
 using System.Drawing;
+using System.Globalization;
 using System.Linq;
 using System.Windows.Forms;
 using System.Windows.Forms.DataVisualization.Charting;
+using HeuristicLab.Common;
 using HeuristicLab.MainForm;
 using HeuristicLab.Visualization.ChartControlsExtensions;
@@ -59,19 +62,28 @@
     protected abstract void GetTrainingSeries(out int[] idx, out double[] y);
 
-    protected abstract void GetTestSeries(out int[] x, out double[] y);
-
-    protected abstract void GetAllValuesSeries(out int[] x, out double[] y);
+    protected abstract void GetTestSeries(out int[] idx, out double[] y);
+
+    protected abstract void GetAllValuesSeries(out int[] idx, out double[] y);
 
     protected virtual void RedrawChart() {
       this.chart.Series.Clear();
       if (Content != null) {
+        var allIds = Content.ProblemData.AllIds;
         this.chart.ChartAreas[0].AxisX.Minimum = 0;
-        this.chart.ChartAreas[0].AxisX.Maximum = Content.ProblemData.Dataset.Rows - 1;
+        this.chart.ChartAreas[0].AxisX.Maximum = Content.ProblemData.AllIndices.Last();
 
         this.chart.Series.Add(TARGETVARIABLE_SERIES_NAME);
         this.chart.Series[TARGETVARIABLE_SERIES_NAME].LegendText = TARGETVARIABLE_SERIES_NAME;
         this.chart.Series[TARGETVARIABLE_SERIES_NAME].ChartType = SeriesChartType.FastLine;
-        this.chart.Series[TARGETVARIABLE_SERIES_NAME].Points.DataBindXY(Enumerable.Range(0, Content.ProblemData.Dataset.Rows).ToArray(),
-          Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable).ToArray());
+        var ids = Content.ProblemData.AllIds.OfType<object>().Select(o => o.ToString()).ToArray();
+        var vals = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable).ToArray();
+
+        for (int i = 0; i < ids.Length; i++) {
+          chart.Series[TARGETVARIABLE_SERIES_NAME].Points.Add(new DataPoint() { AxisLabel = ids[i], XValue = i, YValues = new double[] { vals[i] } });
+        }
+        // this.chart.Series[TARGETVARIABLE_SERIES_NAME].Points.DataBindXY(Content.ProblemData.AllIndices.ToArray(),
+        //   Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable).ToArray());
+        // chart.Series[TARGETVARIABLE_SERIES_NAME].Points.DataBindXY(Content.ProblemData.AllIndices.ToArray(),
+        //   "AxisLabel", Content.ProblemData.AllIds.OfType<object>().Select(o => o.ToString()).ToArray(), string.Empty);
         // training series
         this.chart.Series.Add(ESTIMATEDVALUES_TRAINING_SERIES_NAME);
@@ -133,5 +145,5 @@
 
         UpdateCursorInterval();
-        this.UpdateStripLines();
+        UpdateStripLines();
       }
     }
Index: /branches/dataset-ids-2695/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs
===================================================================
--- /branches/dataset-ids-2695/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs	(revision 15296)
+++ /branches/dataset-ids-2695/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs	(revision 15297)
@@ -21,4 +21,5 @@
 
 using System;
+using System.Collections;
 using System.Collections.Generic;
 using System.Linq;
@@ -39,5 +40,6 @@
     protected const string TestPartitionParameterName = "TestPartition";
     protected const string TransformationsParameterName = "Transformations";
-
+    protected const string IdVariableParameterName = "Id Variable";
+    protected const string EmptyIdVariableName = "-";
     #region parameter properites
     //mkommend: inserted parameter caching due to performance reasons
@@ -58,4 +60,12 @@
     }
 
+    private IConstrainedValueParameter<StringValue> idVariableParameter;
+    public IConstrainedValueParameter<StringValue> IdVariableParameter {
+      get {
+        if (idVariableParameter == null) idVariableParameter = (IConstrainedValueParameter<StringValue>)Parameters[IdVariableParameterName];
+        return idVariableParameter;
+      }
+    }
+
     private IFixedValueParameter<IntRange> trainingPartitionParameter;
     public IFixedValueParameter<IntRange> TrainingPartitionParameter {
@@ -92,4 +102,38 @@
     public IEnumerable<string> AllowedInputVariables {
       get { return InputVariables.CheckedItems.Select(x => x.Value.Value); }
+    }
+    public string IdVariable {
+      get { return IdVariableParameter.Value.Value; }
+      // set only possible via parameter
+    }
+    public IEnumerable AllIds {
+      get {
+        var idVar = IdVariable;
+        if (idVar == EmptyIdVariableName) return Enumerable.Range(0, Dataset.Rows);
+        else if (Dataset.VariableHasType<double>(idVar)) return Dataset.GetDoubleValues(idVar);
+        else if (Dataset.VariableHasType<DateTime>(idVar)) return Dataset.GetDateTimeValues(idVar);
+        else if (Dataset.VariableHasType<string>(idVar)) return Dataset.GetStringValues(idVar);
+        else throw new NotSupportedException("The data type of the id variable is not supported");
+      }
+    }
+    public IEnumerable TrainingIds {
+      get {
+        var idVar = IdVariable;
+        if (idVar == EmptyIdVariableName) return TrainingIndices;
+        else if (Dataset.VariableHasType<double>(idVar)) return Dataset.GetDoubleValues(idVar, TrainingIndices);
+        else if (Dataset.VariableHasType<DateTime>(idVar)) return Dataset.GetDateTimeValues(idVar, TrainingIndices);
+        else if (Dataset.VariableHasType<string>(idVar)) return Dataset.GetStringValues(idVar, TrainingIndices);
+        else throw new NotSupportedException("The data type of the id variable is not supported");
+      }
+    }
+    public IEnumerable TestIds {
+      get {
+        var idVar = IdVariable;
+        if (idVar == EmptyIdVariableName) return TestIndices;
+        else if (Dataset.VariableHasType<double>(idVar)) return Dataset.GetDoubleValues(idVar, TestIndices);
+        else if (Dataset.VariableHasType<DateTime>(idVar)) return Dataset.GetDateTimeValues(idVar, TestIndices);
+        else if (Dataset.VariableHasType<string>(idVar)) return Dataset.GetStringValues(idVar, TestIndices);
+        else throw new NotSupportedException("The data type of the id variable is not supported");
+      }
     }
 
@@ -152,5 +196,31 @@
         TransformationsParameter.Hidden = true;
       }
+      if (!Parameters.ContainsKey(IdVariableParameterName)) {
+        var allIdVars = new ItemSet<StringValue>(GetIdVariableNames());
+        var idVar = allIdVars.First();
+        Parameters.Add(new ConstrainedValueParameter<StringValue>(IdVariableParameterName, "", allIdVars, idVar));
+        TransformationsParameter.Hidden = true;
+      }
       RegisterEventHandlers();
+    }
+
+    private IEnumerable<StringValue> GetIdVariableNames() {
+      // all variables with number of different values == number of rows
+      // + a separate entry for row id
+      // select separate entry for row id as default
+      // use event to update when the dataset is changed
+      var nRows = Dataset.Rows;
+      var potentialDoubleIdVars = Dataset.DoubleVariables
+        .Where(vn => Dataset.GetReadOnlyDoubleValues(vn).Distinct().Count() == nRows).ToArray();
+      var potentialStringIdVars = Dataset.StringVariables
+        .Where(vn => Dataset.GetReadOnlyStringValues(vn).Distinct().Count() == nRows).ToArray();
+      var potentialDateTimeIdVars = Dataset.DateTimeVariables
+        .Where(vn => Dataset.GetReadOnlyDateTimeValues(vn).Distinct().Count() == nRows).ToArray();
+      return
+        new string[] { EmptyIdVariableName }
+        .Concat(potentialStringIdVars)
+        .Concat(potentialDateTimeIdVars)
+        .Concat(potentialDoubleIdVars)
+        .Select(s => new StringValue(s));
     }
 
@@ -179,6 +249,7 @@
       Parameters.Add(new FixedValueParameter<IntRange>(TestPartitionParameterName, "", new IntRange(testPartitionStart, testPartitionEnd)));
       Parameters.Add(new FixedValueParameter<ReadOnlyItemList<ITransformation>>(TransformationsParameterName, "", transformationsList.AsReadOnly()));
-
       TransformationsParameter.Hidden = true;
+      var allIdVars = new ItemSet<StringValue>(GetIdVariableNames());
+      Parameters.Add(new ConstrainedValueParameter<StringValue>(IdVariableParameterName, "The variable to use as an ID column", allIdVars, allIdVars.First()));
 
       ((ValueParameter<Dataset>)DatasetParameter).ReactOnValueToStringChangedAndValueItemImageChanged = false;
@@ -199,4 +270,14 @@
 
     private void Parameter_ValueChanged(object sender, EventArgs e) {
+      // update list of possible id variables and set currently set id variable if possible
+      var curId = IdVariable;
+      var newIdVars = GetIdVariableNames().ToArray();
+      var matchingIdVar = newIdVars.FirstOrDefault(var => var.Value == curId);
+      if (matchingIdVar == null) matchingIdVar = newIdVars.First();
+      IdVariableParameter.ValidValues.Clear();
+      var validValues = IdVariableParameter.ValidValues;
+      foreach(var entry in newIdVars) validValues.Add(entry);
+      IdVariableParameter.Value = matchingIdVar;
+
       OnChanged();
     }
Index: /branches/dataset-ids-2695/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/IDataAnalysisProblemData.cs
===================================================================
--- /branches/dataset-ids-2695/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/IDataAnalysisProblemData.cs	(revision 15296)
+++ /branches/dataset-ids-2695/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/IDataAnalysisProblemData.cs	(revision 15297)
@@ -21,4 +21,5 @@
 
 using System;
+using System.Collections;
 using System.Collections.Generic;
 using HeuristicLab.Core;
@@ -32,4 +33,5 @@
     ICheckedItemList<StringValue> InputVariables { get; }
     IEnumerable<string> AllowedInputVariables { get; }
+    string IdVariable { get; }
 
     double[,] AllowedInputsTrainingValues { get; }
@@ -39,4 +41,7 @@
     IntRange TestPartition { get; }
 
+    IEnumerable AllIds { get; }
+    IEnumerable TrainingIds { get; }
+    IEnumerable TestIds { get; }
     IEnumerable<int> AllIndices { get; }
     IEnumerable<int> TrainingIndices { get; }
