Q:

How does C# chart series connects the missing dots on the screen?

I have a C# Windows Forms application in which there is a screen designed to show a Graph using the DataVisualization.Charting.Chart class where the X axis are composed of DateTime and the Y Axis are composed of integers (the goal is to represent the memory usage in MB over time of some other processes). So, I want to display this in a format of a Continuous function. But when I set the DataVisualization.Charting.Series object type to SeriesChartType.Line the Form plots the graph in a very strange way, see image below:

and when I set the object series type to SeriesChartType.Point the displayed graph is:

Notice that there are a lot of points that are in blank and that's ok because there aren't any registry of memory usage between those time intervals. The only problem I'm complaining here is that in the Line mode the graph is being plotted in this strange way. The code for the generation of these graphs is:
private void CarregaSerieMemoria()
    {
        // this InvokeRequired is because it is called in a separeted Thread, the graph creation happens in the Else block
        if (this.InvokeRequired)
        {
            VoidVoidDelegate d = new VoidVoidDelegate(CarregaSerieMemoria);
            this.Invoke(d);
        }
        else
        {
            try {
                // Data table containing the Memory Usage history
                foreach (DataRow row in Dados.dsComponentes.Tables["MemoryHistory"].Rows)
                {
                    string proc = row["NomeProcesso"].ToString();
                    if (!string.IsNullOrEmpty(proc))
                    {
                        string dataStr = row["TimeStamp"].ToString();
                        string memoriaStr = row["Memoria"].ToString();
                        DateTime data;
                        int memoria;
                        try
                        {
                            data = DateTime.ParseExact(dataStr, "yyyyMMdd-HH:mm:ss", System.Globalization.CultureInfo.InvariantCulture);
                            memoria = int.Parse(memoriaStr) / 1000;
                        }
                        catch (FormatException)
                        {
                            continue;
                        }
                        if (TemSerieProc(proc))
                        { // if there is already a Series object with proc name
                            Series s = this.chartMemory.Series.Where(x => x.Name.Equals(proc)).FirstOrDefault();
                            s.Points.AddXY(data, memoria);
                        }
                        else
                        {   // else creates a new Series object and add this current point (data,memoria)
                            Series s = DefineNovaSerie(proc);
                            s.XValueType = ChartValueType.DateTime;
                            s.Points.AddXY(data, memoria);
                            this.chartMemory.Series.Add(s);
                        }
                    }
                }

                chartMemory.ChartAreas[0].AxisX.LabelStyle.Format = "dd/MM/yyyy HH:mm:ss";
                chartMemory.ChartAreas[0].AxisX.Interval = 30;
                chartMemory.ChartAreas[0].AxisX.IntervalType = DateTimeIntervalType.Minutes;
                chartMemory.ChartAreas[0].AxisX.IntervalOffset = 1;
                chartMemory.ChartAreas[0].AxisX.Minimum = graphDateBegin.ToOADate();
                chartMemory.ChartAreas[0].AxisX.Maximum = graphDateEnd.AddHours(24).ToOADate();

                chartMemory.ChartAreas[0].AxisX.MajorGrid.LineWidth = 0;
                chartMemory.ChartAreas[0].AxisY.MajorGrid.LineWidth = 0;
                chartMemory.ChartAreas[0].AxisX.ScaleView.Zoomable = true;
                chartMemory.ChartAreas[0].AxisY.ScaleView.Zoomable = true;

                chartMemory.ChartAreas[0].AxisX.Title = "Horário";
                chartMemory.ChartAreas[0].AxisY.Title = "Memória (MegaBytes)";

                chartMemory.MouseWheel += chartMemory_MouseWheel;
                chartMemory.MouseClick += chartMemory_MouseClick;
                chartMemory.Visible = true;
                labelLoad.Visible = false;
                btnReload.Visible = true;
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
        }
    }

    private Series DefineNovaSerie(string proc)
    {

        Series temp = new Series(proc);

        temp.ChartType = SeriesChartType.Line;
        //temp.MarkerSize = 10;
        temp.Color = GetNextColor(nextColorInt++);

        return temp;
    }

A:

You populating chart from not ordered data. Your x axis is date so your data should be ordered by date when adding point to chart.
Here is an example (not tested) how you might fix the issue by sorting your data from datatable on TimeStamp field.
var dataTable = Dados.dsComponentes.Tables["MemoryHistory"];
var orderedDataView = new DataView(dataTable);
orderedDataView.Sort = "TimeStamp";
foreach (DataRow row in orderedDataView.ToTable().Rows)
{
    //rest of code
}

