public override void DrawRect(CGRect dirtyRect) { var g = Graphics.FromCurrentContext(); g.Clear(backColor); // Re-define TotalChartArea for resiz-redraw: sc.TotalChartArea = this.ClientRectangle; // Add data for all sub-charts: AddData(g); // Create sub-chart layout: Rectangle[,] subchart = sc.SetSubChart(g); // Create sub-chart 1: cs1.ChartArea = subchart[0, 0]; cs1.AddChartStyle(g); dc1.AddLines(g, cs1); // Create sub-chart 2: cs2.ChartArea = subchart[0, 1]; cs2.AddChartStyle(g); dc2.AddLines(g, cs2); // Create sub-chart 3: cs3.ChartArea = subchart[1, 0]; cs3.AddChartStyle(g); dc3.AddLines(g, cs3); // Create sub-chart 4: cs4.ChartArea = subchart[1, 1]; cs4.AddChartStyle(g); dc4.AddLines(g, cs4); lg.AddLegend(g, dc4, cs4); g.Dispose(); }