WFA_psychometric_chart.Form1_main.plot_on_graph_values_heat_map C# (CSharp) Method

plot_on_graph_values_heat_map() public method

public plot_on_graph_values_heat_map ( double dbt, double hr, double xval, double yval ) : void
dbt double
hr double
xval double
yval double
return void
        public void plot_on_graph_values_heat_map(double dbt, double hr, double xval, double yval)
        {
            //chart1.Series.Clear();
            //Series series1 = new Series("My Series" + index);
            //chart1.Series.Add(series1);
            try
            {


                series1_heat_map.ChartType = SeriesChartType.Point;
                int r, g, b;

                if (max_value != min_value)
                {

                    double value = dbt;
                    //decimal val = (Decimal)((value - min_value) / (max_value - min_value));
                    double val = (double)((value - min_value) / (max_value - min_value));
                    r = Convert.ToByte(255 * val);
                    g = Convert.ToByte(255 * (1 - val));
                    b = 0;

                    //MessageBox.Show("dbt =" + dbt + "\n xval =" + xval + "\n yval = " + yval+"\n rgb = "+r+","+g+",0");

                }
                else
                {
                    //make all the colors same value..
                    r = 0;
                    g = 255;
                    b = 0;
                }

                series1_heat_map.MarkerSize = 15;
                //string label = "DBT=" + dbt + ",HR=" + hr;
                //series1.Label = label;
                //chart1.Series["SeriesDBT_HR" + index].;
                series1_heat_map.Points.AddXY(xval, yval);
                series1_heat_map.Points[index_series_heat_map++].Color = Color.FromArgb(255, r, g, b);//blue
                                                                                    //series1.Enabled = true;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Form1_main