title: Chart without Axis Lines
body: <p>I'm trying to create chart programmatically. Here is code</p>
  
  <pre><code>    static void Main(string[] args)
      {
          var xvals = new[]
              {
                  new DateTime(2012, 4, 4), 
                  new DateTime(2012, 4, 5), 
                  new DateTime(2012, 4, 6), 
                  new DateTime(2012, 4, 7)
              };
          var yvals = new[] { 1, 3, 7, 12 };
  
          // create the chart
          var chart = new Chart();
          chart.Width = 600;
          chart.Height = 350;
  
          var chartArea = new ChartArea();
          chartArea.AxisX.IsMarginVisible = false;
          chartArea.AxisY.IsMarginVisible = false;
          chartArea.AxisX.LabelStyle.Format = "dd";
          chartArea.AxisX.MajorGrid.LineWidth = 0;
          chartArea.AxisY.MajorGrid.LineWidth = 0;
          chartArea.AxisY.LabelStyle.Font = new Font("Consolas", 8);
          chartArea.AxisX.LabelStyle.Font = new Font("Consolas", 8);
          chart.ChartAreas.Add(chartArea);
  
          var series = new Series();
          series.Name = "Series1";
          series.ChartType = SeriesChartType.Line;            
          chart.Series.Add(series);
          chart.Series["Series1"].Points.DataBindXY(xvals, yvals);
          chart.SaveImage("chart.png", ChartImageFormat.Png);
      }
  </code></pre>
  
  <p>I'm getting following output, 
  <img src="https://i.stack.imgur.com/F9WxD.png" alt="enter image description here"></p>
  
  <p>How can I remove Axis Lines both X and Y? So that my output will only the blue line.</p>