Changeset 14267
- Timestamp:
- 08/30/16 16:45:14 (8 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Controls/GradientChart.cs
r14158 r14267 283 283 284 284 if (ShowCursor) 285 chart.Titles[0].Text = FreeVariable + " : " + defaultValue.ToString(" N3", CultureInfo.CurrentCulture);285 chart.Titles[0].Text = FreeVariable + " : " + defaultValue.ToString("G5", CultureInfo.CurrentCulture); 286 286 287 287 ResizeAllSeriesData(); … … 640 640 641 641 if (ShowCursor) { 642 chart.Titles[0].Text = FreeVariable + " : " + x.ToString(" N3", CultureInfo.CurrentCulture);642 chart.Titles[0].Text = FreeVariable + " : " + x.ToString("G5", CultureInfo.CurrentCulture); 643 643 chart.Update(); 644 644 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionTargetResponseGradientView.cs
r14158 r14267 23 23 using System.Collections.Generic; 24 24 using System.Drawing; 25 using System.Globalization; 25 26 using System.Linq; 26 27 using System.Threading.Tasks; … … 37 38 private readonly Dictionary<string, DensityChart> densityCharts; 38 39 private readonly Dictionary<string, Panel> groupingPanels; 40 private ModifiableDataset sharedFixedVariables; 39 41 40 42 private const int Points = 200; … … 113 115 var allowedInputVariables = Content.ProblemData.AllowedInputVariables; 114 116 var variableValues = allowedInputVariables.Select(x => new List<double> { problemData.Dataset.GetDoubleValues(x, problemData.TrainingIndices).Median() }); 115 var sharedFixedVariables = new ModifiableDataset(allowedInputVariables, variableValues); 117 if (sharedFixedVariables != null) 118 sharedFixedVariables.ItemChanged += SharedFixedVariables_ItemChanged; 119 sharedFixedVariables = new ModifiableDataset(allowedInputVariables, variableValues); 120 // ItemChanged eventhandler is registered later, after creating the gradient charts 116 121 117 122 // create controls … … 170 175 variableListView.ItemChecked += variableListView_ItemChecked; 171 176 177 sharedFixedVariables.ItemChanged += SharedFixedVariables_ItemChanged; 178 172 179 RecalculateAndRelayoutCharts(); 180 } 181 182 private void SharedFixedVariables_ItemChanged(object sender, EventArgs<int, int> e) { 183 double yValue = Content.Model.GetEstimatedValues(sharedFixedVariables, new[] { 0 }).Single(); 184 string title = Content.ProblemData.TargetVariable + ": " + yValue.ToString("G5", CultureInfo.CurrentCulture); 185 foreach (var chart in gradientCharts.Values) { 186 if (!string.IsNullOrEmpty(chart.YAxisTitle)) { // only show title for first column in grid 187 chart.YAxisTitle = title; 188 } 189 } 173 190 } 174 191 … … 257 274 tl.Controls.Clear(); 258 275 int row = 0, column = 0; 276 double yValue = Content.Model.GetEstimatedValues(sharedFixedVariables, new[] { 0 }).Single(); 277 string title = Content.ProblemData.TargetVariable + ": " + yValue.ToString("G5", CultureInfo.CurrentCulture); 278 259 279 foreach (var v in VisibleVariables) { 260 280 var chartsPanel = groupingPanels[v]; … … 262 282 263 283 var chart = gradientCharts[v]; 264 chart.YAxisTitle = column == 0 ? Content.ProblemData.TargetVariable : string.Empty;284 chart.YAxisTitle = column == 0 ? title : string.Empty; 265 285 column++; 266 286
Note: See TracChangeset
for help on using the changeset viewer.