Changeset 10868 for branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/PreprocessingDataTableView.cs
- Timestamp:
- 05/21/14 11:43:10 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/PreprocessingDataTableView.cs
r10867 r10868 177 177 protected virtual void AddSelectedDataRows(IEnumerable<DataRow> rows) { 178 178 179 // add dummy series for selction entry in legend180 if (rows.Count() > 0 && chart.Series.FindByName("(Selection)") == null)181 { 182 Series series = new Series("(Selection)");183 series.IsVisibleInLegend = true;184 series.Color = Color.Green;185 series.BorderWidth = 1;186 series.BorderDashStyle = ChartDashStyle.Solid;187 series.BorderColor = Color.Empty;188 series.ChartType = SeriesChartType.FastLine;189 chart.Series.Add(series);190 191 }192 193 foreach (var row in rows) { 194 if (row.VisualProperties.ChartType == DataRowVisualProperties.DataRowChartType.Line) {179 // only paint selection for line chart 180 if (rows.Count() > 0 && rows.ElementAt(0).VisualProperties.ChartType == DataRowVisualProperties.DataRowChartType.Line) 181 { 182 // add dummy series for selction entry in legend 183 if (rows.Count() > 0 && chart.Series.FindByName("(Selection)") == null) { 184 Series series = new Series("(Selection)"); 185 series.IsVisibleInLegend = true; 186 series.Color = Color.Green; 187 series.BorderWidth = 1; 188 series.BorderDashStyle = ChartDashStyle.Solid; 189 series.BorderColor = Color.Empty; 190 series.ChartType = SeriesChartType.FastLine; 191 chart.Series.Add(series); 192 } 193 194 foreach (var row in rows) { 195 195 row.VisualProperties.IsVisibleInLegend = false; 196 196 row.VisualProperties.Color = Color.Green; 197 197 //add selected to name in order to avoid naming conflict 198 var series = new Series(row.Name +"(Selected)");198 var series = new Series(row.Name + "(Selected)"); 199 199 ConfigureSeries(series, row); 200 200 FillSeriesWithRowValues(series, row); 201 201 202 if (classification == null) 203 { 202 if (classification == null) { 204 203 chart.Series.Add(series); 205 204 } 206 207 205 } 208 206 } … … 211 209 protected virtual void RemoveSelectedDataRows(IEnumerable<DataRow> rows) { 212 210 213 //remove selection entry in legend 214 if (Content.SelectedRows.Count == 0) { 215 Series series = chart.Series["(Selection)"]; 216 chart.Series.Remove(series); 217 } 218 219 foreach (var row in rows) { 220 Series series = chart.Series[row.Name + "(Selected)"]; 221 chart.Series.Remove(series); 211 // only remove selection for line chart 212 if (rows.Count() > 0 && rows.ElementAt(0).VisualProperties.ChartType == DataRowVisualProperties.DataRowChartType.Line) 213 { 214 //remove selection entry in legend 215 if (Content.SelectedRows.Count == 0) { 216 Series series = chart.Series["(Selection)"]; 217 chart.Series.Remove(series); 218 } 219 220 foreach (var row in rows) { 221 Series series = chart.Series[row.Name + "(Selected)"]; 222 chart.Series.Remove(series); 223 } 222 224 } 223 225 }
Note: See TracChangeset
for help on using the changeset viewer.