public int plot_by_DBT_Enthalpy(double dbt, double enthalpy)
{
//this is DBT
double x_axis = dbt;
double h = enthalpy;
// MessageBox.Show("h = " + h+" T = "+dbt);
//lets fit this value in the curve...
double x1 = (h - 12.5) / 3.5;
// MessageBox.Show("X1= " + x1);
double y1 = x1 + 5;//this is given temp..
// MessageBox.Show("y1= " + y1);
double x2 = h;
double y2 = 0;
//MessageBox.Show("x2= " + x2+" y2 = "+y2);
double x = dbt;
double y = y1 + (((y2 - y1) * (x - x1) / (x2 - x1)));
double y_axis = y;
//MessageBox.Show("y = " + y);
chart1.Series.Add("SeriesDBT_enthalpy" + index);//this is already delceared in chart control so we dont need it
chart1.Series["SeriesDBT_enthalpy" + index].ChartType = SeriesChartType.Point;
chart1.Series["SeriesDBT_enthalpy" + index].Color = Color.Blue;
chart1.Series["SeriesDBT_enthalpy" + index].MarkerSize = 15;
chart1.Series["SeriesDBT_enthalpy" + index].Label = "DBT = " + dbt + "degC ,enthalpy = " + enthalpy;
//chart1.Series["SeriesDBT_HR" + index].;
chart1.Series["SeriesDBT_enthalpy" + index].Points.AddXY(x_axis, y_axis);
index++;
return 0;
}