Changeset 4648
- Timestamp:
- 10/28/10 00:38:56 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Analysis.Views/3.3/DataTableView.Designer.cs
r4637 r4648 46 46 private void InitializeComponent() { 47 47 this.components = new System.ComponentModel.Container(); 48 System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1= new System.Windows.Forms.DataVisualization.Charting.ChartArea();49 System.Windows.Forms.DataVisualization.Charting.Legend legend1= new System.Windows.Forms.DataVisualization.Charting.Legend();50 System.Windows.Forms.DataVisualization.Charting.Series series1= new System.Windows.Forms.DataVisualization.Charting.Series();51 System.Windows.Forms.DataVisualization.Charting.Title title1= new System.Windows.Forms.DataVisualization.Charting.Title();48 System.Windows.Forms.DataVisualization.Charting.ChartArea defaultChartArea = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); 49 System.Windows.Forms.DataVisualization.Charting.Legend defaultLegend = new System.Windows.Forms.DataVisualization.Charting.Legend(); 50 System.Windows.Forms.DataVisualization.Charting.Series defaultSeries = new System.Windows.Forms.DataVisualization.Charting.Series(); 51 System.Windows.Forms.DataVisualization.Charting.Title defaultTitle = new System.Windows.Forms.DataVisualization.Charting.Title(); 52 52 this.chart = new HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart(); 53 53 this.contextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); … … 76 76 this.chart.BorderlineColor = System.Drawing.Color.Black; 77 77 this.chart.BorderlineDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Solid; 78 chartArea1.CursorX.IsUserEnabled = true;79 chartArea1.CursorX.IsUserSelectionEnabled = true;80 chartArea1.CursorY.IsUserEnabled = true;81 chartArea1.CursorY.IsUserSelectionEnabled = true;82 chartArea1.Name = "ChartArea1";83 this.chart.ChartAreas.Add( chartArea1);78 defaultChartArea.CursorX.IsUserEnabled = true; 79 defaultChartArea.CursorX.IsUserSelectionEnabled = true; 80 defaultChartArea.CursorY.IsUserEnabled = true; 81 defaultChartArea.CursorY.IsUserSelectionEnabled = true; 82 defaultChartArea.Name = "Default"; 83 this.chart.ChartAreas.Add(defaultChartArea); 84 84 this.chart.ContextMenuStrip = this.contextMenuStrip; 85 legend1.Alignment = System.Drawing.StringAlignment.Center;86 legend1.Docking = System.Windows.Forms.DataVisualization.Charting.Docking.Top;87 legend1.Name = "Legend1";88 this.chart.Legends.Add( legend1);85 defaultLegend.Alignment = System.Drawing.StringAlignment.Center; 86 defaultLegend.Docking = System.Windows.Forms.DataVisualization.Charting.Docking.Top; 87 defaultLegend.Name = "Default"; 88 this.chart.Legends.Add(defaultLegend); 89 89 this.chart.Location = new System.Drawing.Point(0, 52); 90 90 this.chart.Name = "chart"; 91 series1.ChartArea = "ChartArea1";92 series1.Legend = "Legend1";93 series1.Name = "Series1";94 this.chart.Series.Add( series1);91 defaultSeries.ChartArea = "Default"; 92 defaultSeries.Legend = "Default"; 93 defaultSeries.Name = "Default"; 94 this.chart.Series.Add(defaultSeries); 95 95 this.chart.Size = new System.Drawing.Size(359, 222); 96 96 this.chart.TabIndex = 4; 97 this.chart.Text = "chart 1";98 title1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));99 title1.Name = "Default";100 title1.Text = "Title";101 this.chart.Titles.Add( title1);97 this.chart.Text = "chart"; 98 defaultTitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 99 defaultTitle.Name = "Default"; 100 defaultTitle.Text = "Title"; 101 this.chart.Titles.Add(defaultTitle); 102 102 this.chart.CustomizeLegend += new System.EventHandler<System.Windows.Forms.DataVisualization.Charting.CustomizeLegendEventArgs>(this.chart_CustomizeLegend); 103 103 this.chart.MouseDown += new System.Windows.Forms.MouseEventHandler(this.chart_MouseDown); -
trunk/sources/HeuristicLab.Analysis.Views/3.3/DataTableView.cs
r4644 r4648 125 125 } 126 126 series.YAxisType = row.VisualProperties.SecondYAxis ? AxisType.Secondary : AxisType.Primary; 127 if (row.VisualProperties.Color != Color.Empty) series.Color = row.VisualProperties.Color; 127 128 series.ToolTip = row.Name + " X = #INDEX, Y = #VAL"; 128 129 FillSeriesWithRowValues(series, row); … … 256 257 } 257 258 chart.Series[row.Name].YAxisType = row.VisualProperties.SecondYAxis ? AxisType.Secondary : AxisType.Primary; 259 if (row.VisualProperties.Color != Color.Empty) chart.Series[row.Name].Color = row.VisualProperties.Color; 258 260 } 259 261 } -
trunk/sources/HeuristicLab.Analysis/3.3/AlleleFrequencyAnalyzer.cs
r4645 r4648 164 164 visualProperties.ChartType = DataRowVisualProperties.DataRowChartType.Line; 165 165 visualProperties.SecondYAxis = true; 166 visualProperties.StartIndexZero = true; 166 167 allelesTable.Rows.Add(new DataRow("Unique Alleles of Best Known Solution", null, visualProperties)); 167 168 allelesTable.Rows.Add(new DataRow("Fixed Alleles", null, visualProperties)); -
trunk/sources/HeuristicLab.Analysis/3.3/DataRowVisualProperties.cs
r4644 r4648 23 23 using HeuristicLab.Common; 24 24 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 25 using System.Drawing; 25 26 26 27 namespace HeuristicLab.Analysis { … … 39 40 #endregion 40 41 41 [Storable(DefaultValue = DataRowChartType.Line)]42 42 private DataRowChartType chartType; 43 43 public DataRowChartType ChartType { … … 50 50 } 51 51 } 52 [Storable(DefaultValue = false)]53 52 private bool secondYAxis; 54 53 public bool SecondYAxis { … … 61 60 } 62 61 } 62 private Color color; 63 public Color Color { 64 get { return color; } 65 set { 66 if (color != value) { 67 color = value; 68 OnPropertyChanged("Color"); 69 } 70 } 71 } 72 private bool startIndexZero; 73 public bool StartIndexZero { 74 get { return startIndexZero; } 75 set { 76 if (startIndexZero != value) { 77 startIndexZero = value; 78 OnPropertyChanged("StartIndexZero"); 79 } 80 } 81 } 82 83 #region Persistence Properties 84 [Storable(Name = "ChartType")] 85 private DataRowChartType StorableChartType { 86 get { return chartType; } 87 set { chartType = value; } 88 } 89 [Storable(Name = "SecondYAxis")] 90 private bool StorableSecondYAxis { 91 get { return secondYAxis; } 92 set { secondYAxis = value; } 93 } 94 [Storable(Name = "Color")] 95 private Color StorableColor { 96 get { return color; } 97 set { color = value; } 98 } 99 [Storable(Name = "StartIndexZero")] 100 private bool StorableStartIndexZero { 101 get { return startIndexZero; } 102 set { startIndexZero = value; } 103 } 104 #endregion 63 105 64 106 public DataRowVisualProperties() { 65 107 chartType = DataRowChartType.Line; 66 108 secondYAxis = false; 109 color = Color.Empty; 110 startIndexZero = false; 67 111 } 68 public DataRowVisualProperties(DataRowChartType chartType, bool secondYAxis ) {112 public DataRowVisualProperties(DataRowChartType chartType, bool secondYAxis, Color color, bool startIndexZero) { 69 113 this.chartType = chartType; 70 114 this.secondYAxis = secondYAxis; 115 this.color = color; 116 this.startIndexZero = startIndexZero; 71 117 } 72 118 [StorableConstructor] … … 77 123 clone.chartType = chartType; 78 124 clone.secondYAxis = secondYAxis; 125 clone.color = color; 126 clone.startIndexZero = startIndexZero; 79 127 return clone; 80 128 }
Note: See TracChangeset
for help on using the changeset viewer.