protected DefaultRenderer BuildCategoryRenderer(int[] colors)
 {
     DefaultRenderer renderer = new DefaultRenderer();
     renderer.LabelsTextSize = 15;
     renderer.LegendTextSize = 15;
     renderer.SetMargins(new[] { 20, 30, 15, 0 });
     foreach (int color in colors)
     {
         SimpleSeriesRenderer r = new SimpleSeriesRenderer();
         r.Color = color;
         renderer.AddSeriesRenderer(r);
     }
     return renderer;
 }
 protected override void OnRestoreInstanceState(Android.OS.Bundle savedInstanceState)
 {
     base.OnRestoreInstanceState(savedInstanceState);
     mSeries = (CategorySeries)savedInstanceState.GetSerializable("current_series");
     mRenderer = (DefaultRenderer)savedInstanceState.GetSerializable("current_renderer");
 }