title: How to Create Box Plot Chart Using ASP.net, C# or Javascript
body: <p>does anyone know how could I create Box Plot Chart using either ASP.net, C# or JavaScript?</p>
  
  <p>This is what I found online but I am not sure on how to apply it to my case:</p>
  
  <p>Code:</p>
  
  <pre><code>List&lt;String&gt; xValue = new List&lt;String&gt; { "Ala (A)", "Arg (R)", "Asn (N)", "Asp (D)", "Cys (C)", "Gln (Q)", "Glu (E)", "Gly (G)", "His (H)", "Ile (I)", "Leu (L)", "Lys (K)", "Met (M)", "Phe (F)", "Pro (P)", "Ser (S)", "Thr (T)", "Trp (W)", "Tyr (Y)", "Val (V)", "Pyl (O)", "Sec (U)" };
      Chart Chart = new Chart();
      Chart.chart_main.Series.Clear();
      Chart.chart_main.Series.Add("BoxPlotSeries");
      for (Int32 i = 0; i &lt; xValue.Count; i++)
      {
          Chart.chart_main.Series.Add(xValue[i]); 
      }
  
      for (Int32 i = 0; i &lt; DYL; i++)
      {
          if (Data[i, 0] == null) break;
          Chart.chart_main.Series[xValue[0]].Points.AddY(boxplot_helper(i, Dataslots[0]));
          Chart.chart_main.Series[xValue[1]].Points.AddY(boxplot_helper(i, Dataslots[1]));
          Chart.chart_main.Series[xValue[2]].Points.AddY(boxplot_helper(i, Dataslots[2]));
          Chart.chart_main.Series[xValue[3]].Points.AddY(boxplot_helper(i, Dataslots[3]));
          Chart.chart_main.Series[xValue[4]].Points.AddY(boxplot_helper(i, Dataslots[4]));
          Chart.chart_main.Series[xValue[5]].Points.AddY(boxplot_helper(i, Dataslots[5]));
          Chart.chart_main.Series[xValue[6]].Points.AddY(boxplot_helper(i, Dataslots[6]));
          Chart.chart_main.Series[xValue[7]].Points.AddY(boxplot_helper(i, Dataslots[7]));
          Chart.chart_main.Series[xValue[8]].Points.AddY(boxplot_helper(i, Dataslots[8]));
          Chart.chart_main.Series[xValue[9]].Points.AddY(boxplot_helper(i, Dataslots[9]));
          Chart.chart_main.Series[xValue[10]].Points.AddY(boxplot_helper(i, Dataslots[10]));
          Chart.chart_main.Series[xValue[11]].Points.AddY(boxplot_helper(i, Dataslots[11]));
          Chart.chart_main.Series[xValue[12]].Points.AddY(boxplot_helper(i, Dataslots[12]));
          Chart.chart_main.Series[xValue[13]].Points.AddY(boxplot_helper(i, Dataslots[13]));
          Chart.chart_main.Series[xValue[14]].Points.AddY(boxplot_helper(i, Dataslots[14]));
          Chart.chart_main.Series[xValue[15]].Points.AddY(boxplot_helper(i, Dataslots[15]));
          Chart.chart_main.Series[xValue[16]].Points.AddY(boxplot_helper(i, Dataslots[16]));
          Chart.chart_main.Series[xValue[17]].Points.AddY(boxplot_helper(i, Dataslots[17]));
          Chart.chart_main.Series[xValue[18]].Points.AddY(boxplot_helper(i, Dataslots[18]));
          Chart.chart_main.Series[xValue[19]].Points.AddY(boxplot_helper(i, Dataslots[19]));
          Chart.chart_main.Series[xValue[20]].Points.AddY(boxplot_helper(i, Dataslots[20]));
          Chart.chart_main.Series[xValue[21]].Points.AddY(boxplot_helper(i, Dataslots[21]));     
      }
  
      Chart.chart_main.Series["BoxPlotSeries"].ChartType = SeriesChartType.BoxPlot;
      Chart.chart_main.Series["BoxPlotSeries"]["BoxPlotSeries"] = xValue[0];
  
      Chart.chart_main.ChartAreas.Add("BoxPlot");
      Chart.chart_main.Series["BoxPlotSeries"].ChartArea = "BoxPlot";
  
      Chart.chart_main.Series["BoxPlotSeries"]["BoxPlotWhiskerPercentile"] = "0";
      Chart.chart_main.Series["BoxPlotSeries"]["BoxPlotPercentile"] = "25";
      Chart.chart_main.Series["BoxPlotSeries"]["BoxPlotShowAverage"] = "true";
      Chart.chart_main.Series["BoxPlotSeries"]["BoxPlotShowMedian"] = "true";
      Chart.chart_main.Series["BoxPlotSeries"]["BoxPlotShowUnusualValues"] = "true";
      Chart.chart_main.Series["BoxPlotSeries"]["MaxPixelPointWidth"] = "15";
      Chart.chart_main.Series["BoxPlotSeries"].BorderWidth = 2;
      Chart.Show();
  
  }
  
  private Double boxplot_helper(Int32 i, Int32 slot)
  {
      String Santas = Data[i, slot].Replace('.', ',').TrimEnd('%').Trim();
      Double LittleHelper = Convert.ToDouble(Santas);
      return LittleHelper;
  </code></pre>
  
  <p>Appreciate if anyone could help me on this, thank you!</p>