C# line chart not showing dates
chart1.Series.Clear(); chart1.ChartAreas.Clear(); chart1.ChartAreas.Add(new ChartArea(“MainArea”)); // Set background color to white chart1.BackColor = System.Drawing.Color.White; chart1.ChartAreas[0].BackColor = System.Drawing.Color.White; Series weightSeries = new Series(“Weight”); weightSeries.ChartType = SeriesChartType.Line; weightSeries.XValueType = ChartValueType.Date; weightSeries.BorderWidth = 3; List<DataPoint> weightPoints = new List<DataPoint>(); foreach (DataRow row in weightData.Rows) { DateTime date = Convert.ToDateTime(row[“date”]); if (row[“weight”] != DBNull.Value) { double weight = Convert.ToDouble(row[“weight”]); DataPoint […]