public Chart_Patient(Dictionary <string, double> auc_descriptor, Dictionary <string, double> auc_descriptor_error, Dictionary <string, List <DataGridViewRow> > raw_data_dict, Dictionary <string, string> target, string descriptor_name, Color color, Patient_Tab f_patient, int number_charts, string graph) { chart = new Chart(); descriptor = descriptor_name; chart_number = number_charts; _form_patient = f_patient; chart_color = color; dict_auc_cpds = auc_descriptor; dict_auc_errors_cpds = auc_descriptor_error; raw_data = raw_data_dict; cpd_target = target; graph_type = graph; ChartArea chartArea = new ChartArea(); Series series1 = new Series(); Series serie_error_bars = new Series(); //chartArea.Position.Auto = false; Axis yAxis = new Axis(chartArea, AxisName.Y); Axis xAxis = new Axis(chartArea, AxisName.X); //chartArea.AxisY.IsLogarithmic = true; //chartArea.AxisY.LabelStyle.Format = "E2"; //chartArea.AxisX.MajorGrid.LineWidth = 0; //chartArea.AxisY.MajorGrid.LineWidth = 0; chartArea.AxisX.Title = "Compound"; if (graph_type == "auc") { chartArea.AxisY.Title = "AUC"; } else if (graph_type == "z-score") { chartArea.AxisY.Title = "AUC (Z-Score)"; } //if (max_y < 1.0) chartArea.AxisY.Maximum = 1.0; chartArea.Name = "AUC_" + descriptor; chart.ChartAreas.Add(chartArea); chart.Name = "AUC_" + descriptor; chart.Location = new System.Drawing.Point(250, 100); series1.ChartType = SeriesChartType.Point; series1.MarkerStyle = MarkerStyle.Circle; series1.Name = "Series1"; serie_error_bars.ChartType = SeriesChartType.ErrorBar; serie_error_bars.MarkerStyle = MarkerStyle.Circle; serie_error_bars.Name = "Error_Bars"; chart.Series.Add(series1); chart.Series.Add(serie_error_bars); chart.MouseDown += new System.Windows.Forms.MouseEventHandler(this.chart1_MouseDown); chart.MouseMove += new System.Windows.Forms.MouseEventHandler(this.chart1_MouseMove); chart.PostPaint += new EventHandler <ChartPaintEventArgs>(this.chart1_PostPaint); chart.Size = new System.Drawing.Size(1100, 500); chart.Titles.Add("AUC " + descriptor.ToString()); process_data(); draw_chart(); }
public PathwayTab(Patient_Tab form) { InitializeComponent(); _form_patient = form; }