Changeset 10851 for branches/DataPreprocessing
- Timestamp:
- 05/14/14 14:54:41 (10 years ago)
- Location:
- branches/DataPreprocessing
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/PreprocessingDataTableView.cs
r10847 r10851 107 107 base.OnContentChanged(); 108 108 invisibleSeries.Clear(); 109 //chart.Titles[0].Text = string.Empty;110 109 chart.ChartAreas[0].AxisX.Title = string.Empty; 111 110 chart.ChartAreas[0].AxisY.Title = string.Empty; … … 113 112 chart.Series.Clear(); 114 113 if (Content != null) { 115 //chart.Titles[0].Text = Content.Name; 114 116 115 AddDataRows(Content.Rows); 117 116 AddSelectedDataRows(Content.SelectedRows); … … 150 149 151 150 protected virtual void AddSelectedDataRows(IEnumerable<DataRow> rows) { 151 152 // add dummy series for selction entry in legend 153 if (rows.Count() > 0 && chart.Series.FindByName("(Selection)") == null) 154 { 155 Series series = new Series("(Selection)"); 156 series.IsVisibleInLegend = true; 157 series.Color = Color.Green; 158 series.BorderWidth = 1; 159 series.BorderDashStyle = ChartDashStyle.Solid; 160 series.BorderColor = Color.Empty; 161 series.ChartType = SeriesChartType.FastLine; 162 chart.Series.Add(series); 163 164 } 165 152 166 foreach (var row in rows) { 153 167 if (row.VisualProperties.ChartType == DataRowVisualProperties.DataRowChartType.Line) { 154 168 row.VisualProperties.IsVisibleInLegend = false; 155 169 row.VisualProperties.Color = Color.Green; 156 170 //add selected to name in order to avoid naming conflict 157 171 var series = new Series(row.Name+"(Selected)"); … … 164 178 165 179 protected virtual void RemoveSelectedDataRows(IEnumerable<DataRow> rows) { 180 181 //remove selection entry in legend 182 if (Content.SelectedRows.Count == 0) { 183 Series series = chart.Series["(Selection)"]; 184 chart.Series.Remove(series); 185 } 186 166 187 foreach (var row in rows) { 167 188 Series series = chart.Series[row.Name + "(Selected)"]; -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/ChartLogic.cs
r10847 r10851 134 134 return null; 135 135 136 int end = selectedIndices[0]; // indices are provided in reverse order 137 int start = selectedIndices[selectedIndices.Count-1]; 136 selectedIndices.Sort(); 137 int start = selectedIndices[0]; 138 int end = selectedIndices[selectedIndices.Count-1]; 138 139 139 140 DataRow rowSelect = CreateDataRowRange(variableName, start, end, chartType); 140 rowSelect.VisualProperties.Color = Color.Green;141 141 return rowSelect; 142 142 }
Note: See TracChangeset
for help on using the changeset viewer.