title: Microsoft .Net Chart Control not showing markers
body: <p>I'm using the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=130F7986-BF49-4FE5-9CA8-910AE6EA442C&amp;displaylang=en" rel="nofollow noreferrer">Microsoft Chart Controls for Microsoft .NET Framework 3.5</a> and am having a spot of trouble getting Data Markers to show on the image.</p>
  
  <p>I'm generating the chart at run-time, so can't just use the designer.</p>
  
  <pre><code>Sub New()
      MainChart = New Chart
      MainChart.Size = New Drawing.Size(500, 200)
  
      MainArea = New ChartArea()
      With MainArea
          .Name = "Default"
          .AxisX.LabelStyle.Format = "MMM"
          .AxisX.MajorGrid.Enabled = False
          .AxisX.IsLabelAutoFit = False
  
          .AxisY.MajorGrid.LineColor = Drawing.Color.Gainsboro
          .AxisY.IsLabelAutoFit = True
          .AxisY.Minimum = 0
          .AxisY.Maximum = 50
      End With
      MainChart.ChartAreas.Add(MainArea)
  
  
      MainSeries = New Series()
      With MainSeries
          .ChartArea = "Default"
          .Name = "MainSeries"
          .ChartType = SeriesChartType.Line ''# .FastLine would hide markers...
          .IsXValueIndexed = True
          .XValueType = ChartValueType.Date
          .MarkerSize = 9
          .MarkerStyle = MarkerStyle.Diamond
          .ToolTip = "#VALX: #VAL"
      End With
      MainChart.Series.Add(MainSeries)
  
  End Sub
  </code></pre>
  
  <p>I then add a bunch of data points using</p>
  
  <pre><code>Public Sub AddDataPoint(ByVal X As Date, ByVal Y As Double)
      MainSeries.Points.AddXY(X, Y)
  End Sub
  </code></pre>
  
  <p>After that, I can save the chart as an image</p>
  
  <pre><code>Public Sub SaveImage(ByVal Filename As String)
     MainChart.SaveImage(Filename, ChartImageFormat.Png)
  End Sub
  </code></pre>
  
  <p>Which all works lovely, and I get pretty charts.
  The only problem is that there are no markers on the datapoints.</p>
  
  <p>Can anyone shed any light on what I'm doing wrong?</p>