Changeset 14446 for branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.cs
- Timestamp:
- 12/02/16 15:37:51 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.cs
r14388 r14446 5 5 using System.Windows.Forms; 6 6 using HeuristicLab.Analysis; 7 using HeuristicLab.Analysis.Views; 7 8 using HeuristicLab.Collections; 8 9 using HeuristicLab.Common; 9 using HeuristicLab.Core.Views;10 10 using HeuristicLab.Data; 11 11 using HeuristicLab.MainForm; … … 18 18 private readonly IDictionary<string, Label> columnHeaderCache; 19 19 private readonly IDictionary<string, Label> rowHeaderCache; 20 private readonly IDictionary<Tuple<string/*col*/, string/*row*/>, ItemView> bodyCache;20 private readonly IDictionary<Tuple<string/*col*/, string/*row*/>, Control> bodyCache; 21 21 22 22 public ScatterPlotMultiView() { … … 43 43 columnHeaderCache = new Dictionary<string, Label>(); 44 44 rowHeaderCache = new Dictionary<string, Label>(); 45 bodyCache = new Dictionary<Tuple<string, string>, ItemView>();45 bodyCache = new Dictionary<Tuple<string, string>, Control>(); 46 46 47 47 bodyScrollPanel.MouseWheel += bodyScrollPanel_MouseWheel; … … 249 249 return rowHeaderCache[variable]; 250 250 } 251 private ItemViewGetBody(string colVariable, string rowVariable) {251 private Control GetBody(string colVariable, string rowVariable) { 252 252 var key = Tuple.Create(colVariable, rowVariable); 253 253 if (!bodyCache.ContainsKey(key)) { … … 266 266 bodyCache.Add(key, pcv); 267 267 } else { //scatter plot 268 ScatterPlot scatterPlot = Content.CreateScatterPlot(colVariable, rowVariable); 269 PreprocessingScatterPlotView pspv = new PreprocessingScatterPlotView { 268 var scatterPlot = Content.CreateScatterPlot(colVariable, rowVariable); 269 scatterPlot.VisualProperties.Title = string.Empty; 270 var scatterPlotControl = new /*Preprocessing*/ScatterPlotControl { 270 271 Name = key.ToString(), 271 272 Content = scatterPlot, 272 273 Dock = DockStyle.Fill, 273 ShowLegend = false,274 XAxisFormat = "G3"274 //ShowLegend = false, 275 //XAxisFormat = "G3" 275 276 }; 276 pspv.ChartDoubleClick += ScatterPlotDoubleClick;277 bodyCache.Add(key, pspv);277 scatterPlotControl.DoubleClick += ScatterPlotDoubleClick; // ToDo: not working; double click is already handled by the chart 278 bodyCache.Add(key, scatterPlotControl); 278 279 } 279 280 } … … 344 345 //Open scatter plot in new tab with new content when double clicked 345 346 private void ScatterPlotDoubleClick(object sender, EventArgs e) { 346 PreprocessingScatterPlotView pspv = (PreprocessingScatterPlotView)sender;347 var scatterPlotControl = (ScatterPlotControl)sender; 347 348 ScatterPlotContent scatterContent = new ScatterPlotContent(Content, new Cloner()); // create new content 348 ScatterPlot scatterPlot = pspv.Content;349 ScatterPlot scatterPlot = scatterPlotControl.Content; 349 350 350 351 //Extract variable names from scatter plot and set them in content
Note: See TracChangeset
for help on using the changeset viewer.