private void OnRenderUserChart(ZedGraph.Web.ZedGraphWeb z, System.Drawing.Graphics g, ZedGraph.MasterPane masterPane) { GraphPane graphPane = masterPane[0]; graphPane.Title.Text = Resource.MemberGraphTitle; graphPane.XAxis.Title.Text = Resource.MemberGraphXAxisLabel; graphPane.YAxis.Title.Text = Resource.MemberGraphYAxisLabel; PointPairList pointList = new PointPairList(); using (IDataReader reader = SiteUser.GetUserCountByYearMonth(siteSettings.SiteId)) { while (reader.Read()) { double x = new XDate(Convert.ToInt32(reader["Y"]), Convert.ToInt32(reader["M"]), 1); double y = Convert.ToDouble(reader["Users"]); pointList.Add(x, y); } } LineItem myCurve2 = graphPane.AddCurve(Resource.MemberGraphYAxisLabel, pointList, Color.Blue, SymbolType.Circle); // Fill the area under the curve with a white-red gradient at 45 degrees myCurve2.Line.Fill = new Fill(Color.White, Color.Green, 45F); // Make the symbols opaque by filling them with white myCurve2.Symbol.Fill = new Fill(Color.White); // Set the XAxis to date type graphPane.XAxis.Type = AxisType.Date; graphPane.XAxis.CrossAuto = true; // Fill the axis background with a color gradient graphPane.Chart.Fill = new Fill(Color.White, Color.LightGoldenrodYellow, 45F); masterPane.AxisChange(g); }