Exemple #1
0
        public ActionResult GetEqualizerChart(int?w, int?h)
        {
            lock (s_renderLock)
            {
                var width  = (w > 0) ? (int)w : 400;
                var height = (h > 0) ? (int)h : 300;

                var wChart2 = new Steema.TeeChart.Chart();

                Steema.TeeChart.Utils.UseCaches = false;
                wChart2.Header.Text             = "Equalizer Gauge";

                var rpTheme = new Steema.TeeChart.Themes.BlackIsBackTheme(wChart2);
                rpTheme.Apply();

                wChart2.Aspect.View3D = false;
                wChart2.Series.Add(new Steema.TeeChart.Styles.Equalizer());
                wChart2.Series[0].FillSampleValues(40);

                wChart2.Panel.Bevel.Inner = Steema.TeeChart.Drawing.BevelStyles.None;
                wChart2.Panel.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None;

                _tempStream2 = new System.IO.MemoryStream();
                wChart2.Export.Image.PNG.Width  = width;
                wChart2.Export.Image.PNG.Height = height;

                wChart2.Export.Image.PNG.Save(_tempStream2);

                _tempStream2.Position = 0;

                return(base.File(_tempStream2, "image/png"));
            }
        }
        public void fillGraphs()
        {
            Steema.TeeChart.TChart          tChart1   = new Steema.TeeChart.TChart(this);
            Steema.TeeChart.Styles.Calendar calendar1 = new Steema.TeeChart.Styles.Calendar();
            tChart1.Series.Add(calendar1);
            //calendar1.Add(DateTime.Today, Color.Green);

            Steema.TeeChart.Themes.BlackIsBackTheme theme = new Steema.TeeChart.Themes.BlackIsBackTheme(tChart1.Chart);
            theme.Apply();
            SetContentView(tChart1);
        }
 public void fillGraphs()
 {
     Steema.TeeChart.TChart          tChart1 = new Steema.TeeChart.TChart(this);
     Steema.TeeChart.Styles.Circular bar1    = new Steema.TeeChart.Styles.Circular();
     tChart1.Series.Add(bar1);
     bar1.Add(3, "Pears", Color.Red);
     bar1.Add(4, "Apples", Color.Blue);
     bar1.Add(2, "Oranges", Color.Green);
     Steema.TeeChart.Themes.BlackIsBackTheme theme = new Steema.TeeChart.Themes.BlackIsBackTheme(tChart1.Chart);
     theme.Apply();
     SetContentView(tChart1);
 }
 public void fillGraphs()
 {
     Steema.TeeChart.TChart     tChart1 = new Steema.TeeChart.TChart(this);
     Steema.TeeChart.Styles.Bar bar1    = new Steema.TeeChart.Styles.Bar();
     tChart1.Series.Add(bar1);
     bar1.Add(68, "Montag", Color.Red);
     bar1.Add(46, "Dienstag", Color.Blue);
     bar1.Add(98, "Mittwoch", Color.Green);
     bar1.Add(66, "Donnerstag", Color.Blue);
     bar1.Add(20, "Freitag", Color.Green);
     bar1.Add(70, "Samstag", Color.Blue);
     bar1.Add(0, "Sonntag", Color.Green);
     Steema.TeeChart.Themes.BlackIsBackTheme theme = new Steema.TeeChart.Themes.BlackIsBackTheme(tChart1.Chart);
     theme.Apply();
     SetContentView(tChart1);
 }
Exemple #5
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            chart = new Steema.TeeChart.TChart(this.ApplicationContext);

            chart.Zoom.Style = Steema.TeeChart.ZoomStyles.FullChart;
            Steema.TeeChart.Themes.BlackIsBackTheme myTheme = new Steema.TeeChart.Themes.BlackIsBackTheme(chart.Chart);
            myTheme.Apply();

            Bundle extras     = Intent.Extras;
            int    seriesType = extras.GetInt("SeriesPosition");

            Type tmp = (Type)Steema.TeeChart.Utils.SeriesTypesOf[seriesType];

            Steema.TeeChart.Styles.Series series;

            //Some series can not work without a parent chart due to internal structure.
            if (tmp.Name == "TreeMap")
            {
                series = new Steema.TeeChart.Styles.TreeMap(chart.Chart);
            }
            else if (tmp.Name == "PolarGrid")
            {
                series = new Steema.TeeChart.Styles.PolarGrid(chart.Chart);
            }
            else
            {
                series = chart.Series.Add(tmp);
            }

            series.FillSampleValues();

            chart.Aspect.View3D = Needs3D(chart[0]);
            //chart.Panel.Transparent = true;
            if (chart[0] is Steema.TeeChart.Styles.Pie)
            {
                Steema.TeeChart.Styles.Pie pie = (Steema.TeeChart.Styles.Pie)chart[0];
                pie.EdgeStyle    = Steema.TeeChart.Drawing.EdgeStyles.Flat;
                pie.BevelPercent = 30;

                chart.Legend.Visible   = false;
                chart.Aspect.Elevation = 300;
            }

            SetContentView(chart);
        }
Exemple #6
0
        void InitializeChart()
        {
            var tChart1 = new Steema.TeeChart.TChart(ApplicationContext);

            tChart1.Aspect.View3D = false;
            tChart1.Header.Text   = "Zoom the chart!";
            //tChart1.Zoom.Style = Steema.TeeChart.ZoomStyles.InChart;
            tChart1.ContentDescription = "Classic";

            var myTheme = new Steema.TeeChart.Themes.BlackIsBackTheme(tChart1.Chart);

            myTheme.Apply();

            tChart1.Series.Add(new Steema.TeeChart.Styles.Area()).FillSampleValues();

            SetContentView(tChart1);
        }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

              chart = new Steema.TeeChart.TChart(this.ApplicationContext);

              chart.Zoom.Style = Steema.TeeChart.ZoomStyles.FullChart;
              Steema.TeeChart.Themes.BlackIsBackTheme myTheme = new Steema.TeeChart.Themes.BlackIsBackTheme(chart.Chart);
              myTheme.Apply();

              Bundle extras = Intent.Extras;
              int seriesType = extras.GetInt("SeriesPosition");

              Type tmp = (Type)Steema.TeeChart.Utils.SeriesTypesOf[seriesType];
              Steema.TeeChart.Styles.Series series;

              //Some series can not work without a parent chart due to internal structure.
              if (tmp.Name == "TreeMap")
              {
            series = new Steema.TeeChart.Styles.TreeMap(chart.Chart);
              }
              else if (tmp.Name == "PolarGrid")
              {
            series = new Steema.TeeChart.Styles.PolarGrid(chart.Chart);
              }
              else
              {
            series = chart.Series.Add(tmp);
              }

              series.FillSampleValues();

              chart.Aspect.View3D = Needs3D(chart[0]);
              //chart.Panel.Transparent = true;
              if (chart[0] is Steema.TeeChart.Styles.Pie)
              {
            Steema.TeeChart.Styles.Pie pie = (Steema.TeeChart.Styles.Pie)chart[0];
            pie.EdgeStyle = Steema.TeeChart.Drawing.EdgeStyles.Flat;
            pie.BevelPercent = 30;

            chart.Legend.Visible = false;
            chart.Aspect.Elevation = 300;
              }

              SetContentView(chart);
        }
Exemple #8
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            var tChart1 = new Steema.TeeChart.TChart(ApplicationContext);

            tChart1.Panel.Transparent  = true;
            tChart1.Header.Text        = "Multiple series made with Xamarin.Android";
            tChart1.Zoom.Style         = Steema.TeeChart.ZoomStyles.FullChart;
            tChart1.Axes.Top.Visible   = false;
            tChart1.ContentDescription = "MultiChart";

            var myTheme = new Steema.TeeChart.Themes.BlackIsBackTheme(tChart1.Chart);

            myTheme.Apply();

            var area1 = new Steema.TeeChart.Styles.Area(tChart1.Chart);

            area1.FillSampleValues();
            area1.Gradient.Visible      = true;
            area1.Gradient.StartColor   = area1.Color;
            area1.Gradient.Transparency = 40;
            area1.Transparency          = area1.Gradient.Transparency;

            var bar1 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);

            bar1.FillSampleValues();
            bar1.Brush.Transparency = 30;
            bar1.Marks.Visible      = false;
            bar1.Color     = Steema.TeeChart.Themes.Theme.OnBlackPalette[1];
            bar1.HorizAxis = Steema.TeeChart.Styles.HorizontalAxis.Top;

            var line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);

            line1.FillSampleValues();
            line1.Color = Steema.TeeChart.Themes.Theme.OnBlackPalette[3];

            SetContentView(tChart1);
        }
Exemple #9
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            var view = inflater.Inflate(Resource.Layout.ExchangeFragment, container, false);

            context = view.Context;

            LinearLayout layout = view.FindViewById <LinearLayout>(Resource.Id.exchange);

            Steema.TeeChart.TChart chart = new Steema.TeeChart.TChart(context);
            chart.Header.Text = "Exchange-rate variation";

            Steema.TeeChart.Styles.Line euro   = new Steema.TeeChart.Styles.Line();
            Steema.TeeChart.Styles.Line dollar = new Steema.TeeChart.Styles.Line();
            chart.Series.Add(euro);
            chart.Series.Add(dollar);

            euro.Title   = "Euro";
            dollar.Title = "Dollar";

            euro.Add(3, "Monday");
            euro.Add(5, "Tuesday");
            euro.Add(6, "Wednesday");
            dollar.Add(6, "Today");
            dollar.Add(12, "Monday");

            Steema.TeeChart.Themes.BlackIsBackTheme theme = new Steema.TeeChart.Themes.BlackIsBackTheme(chart.Chart);
            theme.Apply();

            euro.Color   = Color.Orange;
            dollar.Color = Color.OrangeRed;

            //chart.Header.Color = Color.OrangeRed;
            chart.Header.Font.Color = Color.OrangeRed;
            layout.AddView(chart, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, 600));
            return(view);
        }
Exemple #10
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            chart = new Steema.TeeChart.TChart(ApplicationContext);

            chart.Zoom.Style = Steema.TeeChart.ZoomStyles.Classic;
            var myTheme = new Steema.TeeChart.Themes.BlackIsBackTheme(chart.Chart);

            myTheme.Apply();

            Bundle extras     = Intent.Extras;
            int    seriesType = extras.GetInt("SeriesPosition");

            var tmp = Steema.TeeChart.Utils.SeriesTypesOf [seriesType];

            Steema.TeeChart.Styles.Series series;

            this.Title = tmp.ToString().Replace("Steema.TeeChart.Styles.", "");

            //Some series can not work without a parent chart due to internal structure.
            if (tmp.Name == "TreeMap")
            {
                series = new Steema.TeeChart.Styles.TreeMap(chart.Chart);
            }
            else if (tmp.Name == "PolarGrid")
            {
                series = new Steema.TeeChart.Styles.PolarGrid(chart.Chart);
            }
            else
            {
                series = chart.Series.Add(tmp);
            }

            series.FillSampleValues();

            chart.Aspect.View3D = Needs3D(chart[0]);
            //chart.Panel.Transparent = true;

            if (chart[0] is Steema.TeeChart.Styles.Circular)
            {
                (chart[0] as Steema.TeeChart.Styles.Circular).Circled = true;
            }

            if (chart[0] is Steema.TeeChart.Styles.Pie)
            {
                var pie = (Steema.TeeChart.Styles.Pie)chart[0];

                pie.Marks.Visible = false;
                pie.BevelPercent  = 25;
                pie.Pen.Visible   = false;
                pie.EdgeStyle     = Steema.TeeChart.Drawing.EdgeStyles.Flat;
                pie.Circled       = true;
                pie.FillSampleValues(6);
                chart.Legend.Visible      = true;
                chart.Legend.Font.Size    = 15;
                chart.Legend.Transparency = 30;
                chart.Legend.Alignment    = Steema.TeeChart.LegendAlignments.Bottom;
                chart.Aspect.View3D       = true;
                chart.Aspect.VertOffset   = -20;
                chart.Aspect.Elevation    = 300;

                if (!(pie is Steema.TeeChart.Styles.Donut))
                {
                    chart.Aspect.Chart3DPercent = 30;
                    pie.BevelPercent            = 15;
                    chart.Legend.Transparent    = true;
                    chart.Legend.Font.Size      = 16;
                }

                chart.Header.Text    = "Touch a slice to explode it";
                chart.Legend.Visible = false;
            }

            if (chart[0] is Steema.TeeChart.Styles.Gantt || chart[0] is Steema.TeeChart.Styles.Funnel)
            {
                chart.Legend.Alignment = Steema.TeeChart.LegendAlignments.Bottom;
            }

            if (chart[0] is Steema.TeeChart.Styles.Custom3DPalette)
            {
                if (!(chart[0] is Steema.TeeChart.Styles.Contour) &&
                    !(chart[0] is Steema.TeeChart.Styles.ColorGrid) &&
                    !(chart[0] is Steema.TeeChart.Styles.Ternary) &&
                    !(chart[0] is Steema.TeeChart.Styles.BubbleCloud))
                {
                    chart.Legend.Alignment = Steema.TeeChart.LegendAlignments.Bottom;
                    chart.Legend.Font.Size = 30;
                    chart.Legend.Visible   = false;
                    chart.Header.Text      = "Drag to rotate";
                    chart.Header.Font.Size = 30;
                    chart.Walls.Visible    = false;

                    if (chart[0] is Steema.TeeChart.Styles.TriSurface)
                    {
                        chart.Aspect.Chart3DPercent = 30;
                    }
                    else
                    {
                        chart.Axes.Bottom.Increment = 1;

                        chart.Aspect.Orthogonal     = false;
                        chart.Aspect.Chart3DPercent = 70;
                        chart.Aspect.Rotation       = 310;
                        chart.Aspect.Zoom           = 70;
                        chart.Aspect.Perspective    = 100;
                    }

                    chart.Tools.Add(new Steema.TeeChart.Tools.Rotate());
                }
                else if (chart[0] is Steema.TeeChart.Styles.Contour)
                {
                    ((Steema.TeeChart.Styles.Custom3DPalette)chart[0]).Pen.Width = 3;
                    ((Steema.TeeChart.Styles.Contour)chart[0]).FillLevels        = true;
                }
                else if (chart[0] is Steema.TeeChart.Styles.BubbleCloud)
                {
                    chart.Legend.Alignment = Steema.TeeChart.LegendAlignments.Bottom;
                }

                ((Steema.TeeChart.Styles.Custom3DPalette)chart[0]).UseColorRange = false;
                ((Steema.TeeChart.Styles.Custom3DPalette)chart[0]).UsePalette    = true;
                ((Steema.TeeChart.Styles.Custom3DPalette)chart[0]).PaletteStyle  = Steema.TeeChart.Styles.PaletteStyles.Strong;
            }

            if ((chart[0] is Steema.TeeChart.Styles.Pie) ||
                (chart[0] is Steema.TeeChart.Styles.CircularGauge) ||
                (chart[0] is Steema.TeeChart.Styles.CustomGauge))
            {
                chart.ClickSeries += chart_ClickSeries;
            }
            else
            {
                chart.ClickSeries -= chart_ClickSeries;
            }

            //if (((chart[0] is Steema.TeeChart.Styles.Line) || (chart[0] is Steema.TeeChart.Styles.Points))
            //    && !(chart[0] is Steema.TeeChart.Styles.Bubble))
            //{
            //  chart.Header.Text = "Touch series for tool tip";
            //  chart.ClickSeries += chart_ClickSeries;
            //}
            //else
            //{
            //  chart.ClickSeries -= chart_ClickSeries;
            //}

            SetContentView(chart);
        }
Exemple #11
0
        public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
        {
            // Clear Views if World demo has been clicked
            if (_controller.chartController.View.Subviews.Length > 1)
            {
                _controller.chartController.View.Subviews[1].RemoveFromSuperview();
                _controller.chart.Frame = _controller.chartController.mainChartFrame;
            }
            // Uncheck the previous row
            //if (_previousRow != null)
            //	tableView.CellAt(_previousRow).Accessory = UITableViewCellAccessory.None;

            // Do something with the row
            var row = indexPath.Row;

            Settings.SelectedIndex = row;
            //tableView.CellAt(indexPath).Accessory = UITableViewCellAccessory.Checkmark;

            // Changes Series type
            _controller.chart.Series.Clear();

            // Set some chart options to improve speed
            _controller.chart.Clear();

            Steema.TeeChart.Themes.BlackIsBackTheme theme = new Steema.TeeChart.Themes.BlackIsBackTheme(_controller.chart.Chart);
            theme.Apply();
            Steema.TeeChart.Themes.ColorPalettes.ApplyPalette(_controller.chart.Chart, Steema.TeeChart.Themes.Theme.OnBlackPalette);

            _controller.chart.Axes.Bottom.Grid.Visible       = false;
            _controller.chart.Axes.Left.Grid.DrawEvery       = 3;
            _controller.chart.Axes.Left.MinorTicks.Visible   = false;
            _controller.chart.Axes.Bottom.MinorTicks.Visible = false;
            _controller.chart.Header.Visible = false;
            _controller.chart.Legend.Visible = false;
            _controller.chart.Aspect.View3D  = true;
            //_controller.chart.ClickBackground += new UITouchEventArgs(chart_clickBackGround);

            switch (row)
            {
            case 0:
                Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line();
                _controller.chart.Series.Add(line1);
                _controller.chart.Aspect.View3D = false;
                _controller.chart.Chart.Invalidate();
                Random Rnd = new Random();
                _controller.chart.Aspect.View3D = false;
                for (int t = 0; t <= 20; ++t)
                {
                    line1.Add(t, ((Rnd.Next(100)) + 1) - ((Rnd.Next(70)) + 1), UIColor.Yellow.CGColor);
                }

                _controller.chart.Axes.Left.AxisPen.Color   = UIColor.White.CGColor;
                _controller.chart.Axes.Bottom.AxisPen.Color = UIColor.White.CGColor;
                _controller.chart.Axes.Left.AxisPen.Width   = 1;
                _controller.chart.Axes.Bottom.AxisPen.Width = 1;
                //line1.BeforeDrawValues += new Steema.TeeChart.Styles.Series.PaintChartEventHandler(line1_BeforeDrawValues);
                break;

            case 1:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Points());
                _controller.chart.Series[0].FillSampleValues(100);
                break;

            case 2:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Area());
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Area());
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Area());
                _controller.chart.Series[0].FillSampleValues(5);
                _controller.chart.Series[1].FillSampleValues(5);
                _controller.chart.Series[2].FillSampleValues(5);
                _controller.chart.Aspect.View3D = false;
                Steema.TeeChart.Styles.Area area1 = _controller.chart.Series[0] as Steema.TeeChart.Styles.Area;
                Steema.TeeChart.Styles.Area area2 = _controller.chart.Series[1] as Steema.TeeChart.Styles.Area;
                Steema.TeeChart.Styles.Area area3 = _controller.chart.Series[2] as Steema.TeeChart.Styles.Area;
                area1.Transparency = 40;
                area2.Transparency = 40;
                area3.Transparency = 40;
                break;

            case 3:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.FastLine());
                _controller.chart.Aspect.View3D = false;
                _controller.chart.Series[0].FillSampleValues(400);
                break;

            case 4:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.HorizLine());
                _controller.chart.Series[0].FillSampleValues(8);
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.HorizLine());
                _controller.chart.Series[1].FillSampleValues(8);
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.HorizLine());
                _controller.chart.Series[2].FillSampleValues(8);
                break;

            case 5:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Bar());

                _controller.chart.Series[0].Add(3, "Pears");
                _controller.chart.Series[0].Add(4, "Apples");
                _controller.chart.Series[0].Add(2, "Oranges");
                _controller.chart.Series[0].Add(7, "Banana");

                //	_controller.chart.Series[0].Add(5,"Pineapple");
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Bar).Pen.Visible          = false;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Bar).ColorEach            = true;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Bar).Marks.Shadow.Visible = false;
                _controller.chart.AfterDraw += new Steema.TeeChart.PaintChartEventHandler(chart_AfterDraw);

                //_controller.chart.GetAxisLabel += new Steema.TeeChart.GetAxisLabelEventHandler(_controller_GetAxisLabel);
                _controller.chart.Header.Font.Name         = "Arial";
                _controller.chart.Header.Font.Size         = 20;
                _controller.chart.Axes.Bottom.Labels.Angle = 45;

                _controller.chart.ClickSeries += new Steema.TeeChart.TChart.SeriesEventHandler(series_clicked);
                break;

            case 6:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.HorizBar());
                _controller.chart.Series[0].FillSampleValues(10);
                _controller.chart.Aspect.View3D = false;
                Steema.TeeChart.Styles.HorizBar hbar1 = _controller.chart.Series[0] as Steema.TeeChart.Styles.HorizBar;
                hbar1.MarksOnBar        = true;
                hbar1.Marks.Transparent = true;
                hbar1.Color             = UIColor.LightGray.CGColor;
                hbar1.Gradient.Visible  = true;
                hbar1.CustomBarWidth    = 20;
                _controller.chart.Axes.Left.MinimumOffset = 20;
                _controller.chart.Axes.Left.MaximumOffset = 20;
                _controller.chart.Aspect.ZoomScrollStyle  = Steema.TeeChart.Drawing.Aspect.ZoomScrollStyles.Manual;
                break;

            case 7:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Pie());
                _controller.chart.Series[0].Add(30);
                _controller.chart.Series[0].Add(30);
                _controller.chart.Series[0].Add(40);
                _controller.chart.Series[0].Add(70);

                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Pie).Circled          = true;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Pie).EdgeStyle        = Steema.TeeChart.Drawing.EdgeStyles.Flat;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Pie).BevelPercent     = 15;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Pie).Marks.Font.Color = UIColor.FromRGB(255, 255, 255).CGColor;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Pie).Marks.Font.Size  = 10;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Pie).ExplodeBiggest   = 20;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Pie).RotationAngle    = 25;
                _controller.chart.Series[0].Marks.Visible     = true;
                _controller.chart.Series[0].Marks.Transparent = true;
                _controller.chart.Legend.Visible     = true;
                _controller.chart.Legend.Alignment   = Steema.TeeChart.LegendAlignments.Bottom;
                _controller.chart.Legend.Transparent = true;
                _controller.chart.Legend.Font.Size   = 10;

                _controller.chart.Aspect.Chart3DPercent = 40;
                break;

            case 8:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Shape());
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Shape).Gradient.Visible  = true;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Shape).Style             = Steema.TeeChart.Styles.ShapeStyles.Circle;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Shape).Gradient.Visible  = true;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Shape).Gradient.EndColor = UIColor.FromRGB(255, 0, 0).CGColor;

                _controller.chart.Series[0].FillSampleValues();
                break;

            case 9:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Arrow());
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Arrow).ColorEachPoint = true;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 10:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Bubble());
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Bubble).Pointer.Gradient.Visible  = true;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Bubble).Pointer.Gradient.EndColor = UIColor.FromRGB(255, 255, 255).CGColor;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 11:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Gantt());
                _controller.chart.Legend.Visible     = true;
                _controller.chart.Legend.Alignment   = Steema.TeeChart.LegendAlignments.Bottom;
                _controller.chart.Legend.Transparent = true;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 12:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Candle());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 13:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Donut());
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Donut).Circled        = true;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Donut).Pen.Visible    = true;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Donut).Pen.Width      = 8;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Donut).ExplodeBiggest = 15;
                _controller.chart.Series[0].Marks.Visible   = false;
                _controller.chart.Legend.Visible            = true;
                _controller.chart.Legend.VertSpacing        = 10;
                _controller.chart.Legend.Title.Text         = "Donut Chart";
                _controller.chart.Legend.Transparent        = true;
                _controller.chart.Legend.Alignment          = Steema.TeeChart.LegendAlignments.Right;
                _controller.chart.Legend.Symbol.Pen.Visible = false;
                _controller.chart.Legend.Font.Size          = 12;
                _controller.chart.Series[0].FillSampleValues(4);
                _controller.chart.Aspect.View3D          = false;
                _controller.chart.Panel.Color            = UIColor.White.CGColor;
                _controller.chart.Panel.Gradient.Visible = false;
                _controller.chart.Legend.Font.Color      = UIColor.Black.CGColor;
                _controller.chart.Panel.MarginTop        = 10;
                _controller.chart.Panel.MarginBottom     = 10;
                break;

            case 14:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Volume());
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Volume).LinePen.Width = 2;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 15:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Bar3D());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 16:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Points3D());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 17:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Polar());
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Polar).Circled = true;
                //(_controller.chart.Series[0] as Steema.TeeChart.Styles.Polar).Transparency = 10;
                _controller.chart.Aspect.View3D = false;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 18:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.PolarBar());
                _controller.chart.Aspect.View3D = false;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 19:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Radar());
                _controller.chart.Aspect.View3D = false;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 20:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Clock());
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Clock).Circled = true;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 21:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.WindRose());
                _controller.chart.Aspect.View3D = false;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 22:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Pyramid());
                _controller.chart.Series[0].FillSampleValues(4);
                break;

            case 23:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Surface());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 24:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.LinePoint());
                _controller.chart.Aspect.View3D = false;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 25:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.BarJoin());
                _controller.chart.Aspect.View3D = false;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 26:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.ColorGrid());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 27:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Waterfall());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 28:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Histogram());
                _controller.chart.Aspect.View3D = false;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Histogram).LinesPen.Visible = false;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 29:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Error());
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Error).ColorEachPoint = true;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Error).ErrorPen.Width = 5;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 30:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.ErrorBar());
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.ErrorBar).ColorEachPoint = true;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 31:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Contour());
                _controller.chart.Aspect.View3D = false;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 32:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Smith());
                _controller.chart.Aspect.View3D = false;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Smith).Circled = true;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 33:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Bezier());
                _controller.chart.Aspect.View3D = false;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Bezier).Pointer.Style       = Steema.TeeChart.Styles.PointerStyles.Circle;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Bezier).Pointer.Pen.Visible = false;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Bezier).LinePen.Width       = 2;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Bezier).LinePen.Color       = UIColor.Red.CGColor;
                _controller.chart.Series[0].FillSampleValues(4);
                break;

            case 34:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Calendar());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 35:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.HighLow());
                _controller.chart.Aspect.View3D = false;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 36:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.TriSurface());
                _controller.chart.Aspect.View3D = true;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 37:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Funnel());
                _controller.chart.Aspect.View3D = false;
                _controller.chart.Series[0].FillSampleValues(20);
                break;

            case 38:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Box());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 39:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.HorizBox());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 40:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.HorizArea());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 41:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Tower());
                _controller.chart.Aspect.View3D = true;
                _controller.chart.Series[0].FillSampleValues(5);
                _controller.chart.Walls.Visible                  = false;
                _controller.chart.Axes.Bottom.Ticks.Visible      = false;
                _controller.chart.Axes.Bottom.MinorTicks.Visible = false;
                _controller.chart.Axes.Left.Ticks.Visible        = false;
                _controller.chart.Axes.Left.MinorTicks.Visible   = false;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Tower).Pen.Visible = false;
                _controller.chart.Tools.Add(new Steema.TeeChart.Tools.Rotate());
                _controller.chart.Aspect.Orthogonal     = false;
                _controller.chart.Aspect.Rotation       = -25;
                _controller.chart.Aspect.Zoom           = 70;
                _controller.chart.Aspect.Chart3DPercent = 75;
                _controller.chart.Header.Text           = "Drag to Rotate the Chart";
                _controller.chart.Header.Visible        = true;
                break;

            case 42:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.PointFigure());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 43:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Gauges());
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Gauges).GetVertAxis.Ticks.Length  = 15;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Gauges).GetVertAxis.AxisPen.Color = UIColor.LightGray.CGColor;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 44:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Vector3D());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 45:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.HorizHistogram());
                _controller.chart.Aspect.View3D = false;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.HorizHistogram).LinesPen.Visible = false;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 46:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Map());
                _controller.chart.Aspect.View3D = false;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 47:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.ImageBar());
                _controller.chart.Series[0].FillSampleValues();
                UIImage img = UIImage.FromFile("bulb_on.png");
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.ImageBar).Image = img.CGImage;
                break;

            case 48:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Kagi());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 49:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Renko());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 50:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.IsoSurface());
                _controller.chart.Aspect.View3D = true;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 51:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Darvas());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 52:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.VolumePipe());
                _controller.chart.Aspect.View3D             = false;
                _controller.chart.Legend.Visible            = true;
                _controller.chart.Legend.Transparent        = true;
                _controller.chart.Legend.Alignment          = Steema.TeeChart.LegendAlignments.Bottom;
                _controller.chart.Legend.Symbol.Pen.Visible = false;
                _controller.chart.Legend.Font.Size          = 14;
                _controller.chart.Series[0].FillSampleValues(4);
                break;

            case 53:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.ImagePoint());
                _controller.chart.Series[0].FillSampleValues(5);
                _controller.chart.Aspect.View3D = false;
                UIImage img2 = UIImage.FromFile("bulb_off.png");
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.ImagePoint).Pointer.HorizSize = 30;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.ImagePoint).Pointer.VertSize  = 30;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.ImagePoint).PointImage        = img2.CGImage;
                break;

            case 54:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.CircularGauge());
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.CircularGauge).Value = 65;
                break;

            case 55:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.LinearGauge());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 56:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.VerticalLinearGauge());
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.VerticalLinearGauge).Axis.Ticks.Visible      = true;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.VerticalLinearGauge).Axis.MinorTicks.Visible = true;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 57:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.NumericGauge());
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.NumericGauge).Value = 123;
                break;

            case 58:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.OrgSeries());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 59:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.TagCloud());
                _controller.chart.Series[0].FillSampleValues(50);
                break;

            case 60:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.PolarGrid());
                _controller.chart.Aspect.View3D = false;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 61:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Ternary());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 62:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.KnobGauge());
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.KnobGauge).ActiveCenter = true;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.KnobGauge).Value        = 50;
                break;

            case 63:
                _controller.chart.Aspect.ZoomScrollStyle = Steema.TeeChart.Drawing.Aspect.ZoomScrollStyles.Manual;
                Steema.TeeChart.Styles.World world1;
                _controller.chart.Series.Add(world1 = new Steema.TeeChart.Styles.World());

                Steema.TeeChart.Styles.CustomBar wbar;
                TChart tChart2 = new TChart(this);
                tChart2.Aspect.View3D  = false;
                tChart2.Legend.Visible = false;
                tChart2.Walls.Visible  = false;

                if ((UIDevice.CurrentDevice.Orientation == UIDeviceOrientation.LandscapeLeft) ||
                    (UIDevice.CurrentDevice.Orientation == UIDeviceOrientation.LandscapeRight))
                {
                    System.Drawing.RectangleF midFrame = new System.Drawing.RectangleF(0, 0, UIScreen.MainScreen.ApplicationFrame.Height / 2, UIScreen.MainScreen.ApplicationFrame.Width - 20);
                    _controller.chart.Frame = midFrame;

                    System.Drawing.RectangleF midFrame2 = new System.Drawing.RectangleF(UIScreen.MainScreen.ApplicationFrame.Height / 2, 0, UIScreen.MainScreen.ApplicationFrame.Height / 2, UIScreen.MainScreen.ApplicationFrame.Width - 20);
                    tChart2.Frame = midFrame2;

                    wbar = new Steema.TeeChart.Styles.HorizBar(tChart2.Chart);

                    tChart2.Axes.Left.Labels.Separation = 1;
                    _controller.chart.Footer.TextAlign  = MonoTouch.CoreText.CTTextAlignment.Right;            //map
                    tChart2.Footer.Text       = "to market cost index";
                    tChart2.Footer.Font.Color = UIColor.FromRGB(255, 255, 255).CGColor;
                    tChart2.Footer.TextAlign  = MonoTouch.CoreText.CTTextAlignment.Left;
                    tChart2.Footer.Font.Size  = 8;
                    tChart2.Footer.Visible    = true;
                    tChart2.Header.Visible    = false;
                }
                else
                {
                    System.Drawing.RectangleF midFrame = new System.Drawing.RectangleF(0, 0, UIScreen.MainScreen.ApplicationFrame.Width, _controller.chartController.chart.Bounds.Height / 2);
                    _controller.chart.Frame = midFrame;

                    System.Drawing.RectangleF midFrame2 = new System.Drawing.RectangleF(0, _controller.chartController.chart.Bounds.Height, UIScreen.MainScreen.ApplicationFrame.Width, _controller.chartController.chart.Bounds.Height);
                    tChart2.Frame = midFrame2;

                    wbar = new Steema.TeeChart.Styles.Bar(tChart2.Chart);

                    tChart2.Axes.Bottom.Labels.Angle      = 90;
                    tChart2.Axes.Bottom.Labels.Separation = 1;
                    _controller.chart.Footer.TextAlign    = MonoTouch.CoreText.CTTextAlignment.Left;           //map
                    tChart2.Header.Text                 = "to market cost index";
                    tChart2.Header.Font.Color           = UIColor.FromRGB(255, 255, 255).CGColor;
                    tChart2.Header.TextAlign            = MonoTouch.CoreText.CTTextAlignment.Left;
                    tChart2.Header.Font.Size            = 8;
                    tChart2.Header.Visible              = true;
                    _controller.chart.Panel.MarginLeft  = 15;
                    _controller.chart.Panel.MarginRight = 15;
                }

                wbar.Marks.Visible = false;

                Steema.TeeChart.Themes.BlackIsBackTheme theme2 = new Steema.TeeChart.Themes.BlackIsBackTheme(tChart2.Chart);
                theme2.Apply();
                Steema.TeeChart.Themes.ColorPalettes.ApplyPalette(tChart2.Chart, Steema.TeeChart.Themes.OperaTheme.OperaPalette);
                tChart2.Aspect.ZoomScrollStyle = Steema.TeeChart.Drawing.Aspect.ZoomScrollStyles.Manual;

                tChart2.Panel.Gradient.Visible   = false;
                tChart2.Panel.Color              = UIColor.FromRGB(0, 0, 0).CGColor;
                tChart2.Axes.Bottom.Grid.Visible = false;

                world1.Map = Steema.TeeChart.Styles.WorldMapType.Europe15;

                _controller.chart.Walls.Visible          = false;
                _controller.chart.Panel.Gradient.Visible = false;
                _controller.chart.Panel.Color            = UIColor.FromRGB(0, 0, 0).CGColor;

                _controller.chart.Legend.Visible   = true;
                _controller.chart.Legend.Font.Size = 8;

                _controller.chart.Legend.Symbol.Position = LegendSymbolPosition.Right;
                world1.ValueFormat = "0.0";

                _controller.chart.Axes.Visible = false;

                _controller.chart.Footer.Font.Color = UIColor.FromRGB(255, 255, 255).CGColor;
                _controller.chart.Footer.Text       = "index of eu15" + Utils.NewLine + "organic food consumption 2009";
                _controller.chart.Footer.Font.Size  = 8;
                _controller.chart.Footer.Visible    = true;

                wbar.Color          = UIColor.FromRGB(69, 69, 255).CGColor;
                wbar.CustomBarWidth = 10;
                int[] territories = new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
                for (int i = 0; i < world1.Shapes.Count; i++)
                {
                    if (((String)(world1.Labels[i])) == "Austria")
                    {
                        world1.ZValues[i] = 89;
                        if (territories[0] == 0)
                        {
                            wbar.Add(4.5, (String)(world1.Labels[i]));
                            territories[0] = 1;
                        }
                    }
                    else if (((String)(world1.Labels[i])) == "Denmark")
                    {
                        world1.ZValues[i] = 107;
                        if (territories[1] == 0)
                        {
                            wbar.Add(4, (String)(world1.Labels[i]));
                            territories[1] = 1;
                        }
                    }
                    else if (((String)(world1.Labels[i])) == ("Finland"))
                    {
                        world1.ZValues[i] = 78;
                        if (territories[2] == 0)
                        {
                            wbar.Add(7.5, (String)(world1.Labels[i]));
                            territories[2] = 1;
                        }
                    }
                    else if (((String)(world1.Labels[i])) == ("Luxembourg"))
                    {
                        world1.ZValues[i] = 86;
                        if (territories[3] == 0)
                        {
                            wbar.Add(4.2, (String)(world1.Labels[i]));
                            territories[3] = 1;
                        }
                    }
                    else if (((String)(world1.Labels[i])) == ("Belgium"))
                    {
                        world1.ZValues[i] = 71;
                        if (territories[4] == 0)
                        {
                            wbar.Add(9.1, (String)(world1.Labels[i]));
                            territories[4] = 1;
                        }
                    }
                    else if (((String)(world1.Labels[i])) == ("Netherlands"))
                    {
                        world1.ZValues[i] = 78;
                        if (territories[5] == 0)
                        {
                            wbar.Add(3.9, (String)(world1.Labels[i]));
                            territories[5] = 1;
                        }
                    }
                    else if (((String)(world1.Labels[i])) == ("Germany"))
                    {
                        world1.ZValues[i] = 64;
                        if (territories[6] == 0)
                        {
                            wbar.Add(1.2, (String)(world1.Labels[i]));
                            territories[6] = 1;
                        }
                    }
                    else if (((String)(world1.Labels[i])) == ("Sweden"))
                    {
                        world1.ZValues[i] = 53;
                        if (territories[7] == 0)
                        {
                            wbar.Add(6.0, (String)(world1.Labels[i]));
                            territories[7] = 1;
                        }
                    }
                    else if (((String)(world1.Labels[i])) == ("UK"))
                    {
                        world1.ZValues[i] = 42;
                        if (territories[8] == 0)
                        {
                            wbar.Add(4.7, (String)(world1.Labels[i]));
                            territories[8] = 1;
                        }
                    }
                    else if (((String)(world1.Labels[i])) == ("Ireland"))
                    {
                        world1.ZValues[i] = 24;
                        if (territories[9] == 0)
                        {
                            wbar.Add(-0.2, (String)(world1.Labels[i]));
                            territories[9] = 1;
                        }
                    }
                    else if (((String)(world1.Labels[i])) == ("Italy"))
                    {
                        world1.ZValues[i] = 32;
                        if (territories[10] == 0)
                        {
                            wbar.Add(6.1, (String)(world1.Labels[i]));
                            territories[10] = 1;
                        }
                    }
                    else if (((String)(world1.Labels[i])) == ("France"))
                    {
                        world1.ZValues[i] = 30;
                        if (territories[11] == 0)
                        {
                            wbar.Add(7.9, (String)(world1.Labels[i]));
                            territories[11] = 1;
                        }
                    }
                    else if (((String)(world1.Labels[i])) == ("Spain"))
                    {
                        world1.ZValues[i] = 13;
                        if (territories[12] == 0)
                        {
                            wbar.Add(3.9, (String)(world1.Labels[i]));
                            territories[12] = 1;
                        }
                    }
                    else if (((String)(world1.Labels[i])) == ("Greece"))
                    {
                        world1.ZValues[i] = 7;
                        if (territories[13] == 0)
                        {
                            wbar.Add(2.1, (String)(world1.Labels[i]));
                            territories[13] = 1;
                        }
                    }
                    else if (((String)(world1.Labels[i])) == ("Portugal"))
                    {
                        world1.ZValues[i] = 11;
                        if (territories[14] == 0)
                        {
                            wbar.Add(0.5, (String)(world1.Labels[i]));
                            territories[14] = 1;
                        }
                    }
                    else if (((String)(world1.Labels[i])) == ("Poland"))
                    {
                        world1.ZValues[i] = 1;
                        if (territories[15] == 0)
                        {
                            wbar.Add(1.9, (String)(world1.Labels[i]));
                            territories[15] = 1;
                        }
                    }
                }

                world1.Pen.Color   = UIColor.Black.CGColor;
                world1.Pen.Width   = 1;
                world1.Pen.Visible = true;

                _controller.chartController.View.AddSubview(tChart2);
                break;

            default:
                break;
            }

            // This is what the Settings does under Settings>Mail>Show on an iPhone
            tableView.DeselectRow(indexPath, false);
            _controller.NavigationController.PushViewController(_controller.chartController, true);
        }
        public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
        {
            // Uncheck the previous row
            //if (_previousRow != null)
            //	tableView.CellAt(_previousRow).Accessory = UITableViewCellAccessory.None;

            // Do something with the row
            var row = indexPath.Row;

            Settings.SelectedIndex = row;
            //tableView.CellAt(indexPath).Accessory = UITableViewCellAccessory.Checkmark;

            // Changes Series type
            _controller.chart.Series.Clear();

            // Set some chart options to improve speed
            _controller.chart.Clear();

            Steema.TeeChart.Themes.BlackIsBackTheme theme = new Steema.TeeChart.Themes.BlackIsBackTheme(_controller.chart.Chart);
            theme.Apply();
            Steema.TeeChart.Themes.ColorPalettes.ApplyPalette(_controller.chart.Chart, Steema.TeeChart.Themes.Theme.OnBlackPalette);

            _controller.chart.Axes.Bottom.Grid.Visible       = false;
            _controller.chart.Axes.Left.Grid.DrawEvery       = 3;
            _controller.chart.Axes.Left.MinorTicks.Visible   = false;
            _controller.chart.Axes.Bottom.MinorTicks.Visible = false;
            _controller.chart.Header.Visible = false;
            _controller.chart.Legend.Visible = false;
            _controller.chart.Aspect.View3D  = true;

            switch (row)
            {
            case 0:
                Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line();
                _controller.chart.Series.Add(line1);
                _controller.chart.Aspect.View3D = false;
                _controller.chart.Chart.Invalidate();

                /*Random Rnd = new Random();
                 * _controller.chart.Aspect.View3D = false;
                 * for(int t = 0; t <= 20; ++t)
                 *      line1.Add(t, ((Rnd.Next(100)) + 1) - ((Rnd.Next(70)) + 1), UIColor.Yellow.CGColor);
                 *
                 * _controller.chart.Axes.Left.AxisPen.Color = UIColor.White.CGColor;
                 * _controller.chart.Axes.Bottom.AxisPen.Color = UIColor.White.CGColor;
                 * _controller.chart.Axes.Left.AxisPen.Width = 1;
                 * _controller.chart.Axes.Bottom.AxisPen.Width = 1;
                 * line1.BeforeDrawValues += new Steema.TeeChart.Styles.Series.PaintChartEventHandler(line1_BeforeDrawValues);
                 */
                _controller.chart.Series[0].FillSampleValues(50);

                /*		_controller.chart.Header.Visible = true;
                 *              _controller.chart.Header.Text = "My Header Text";
                 *              _controller.chart.Header.Alignment = MonoTouch.CoreText.CTTextAlignment.Left;
                 *              _controller.chart.Header.Font.Size=20;
                 *              _controller.chart.Legend.Visible = true;
                 *              _controller.chart.Legend.Gradient.Visible=false;
                 *              _controller.chart.Legend.Transparency = 50;*/
                /*
                 * _controller.chart.Legend.Alignment = Steema.TeeChart.LegendAlignments.Bottom;
                 * _controller.chart.Legend.Font.Color = UIColor.Black.CGColor;
                 * _controller.chart.Legend.Shadow.Visible=false;
                 *      _controller.chart.Panel.MarginTop = 10;
                 * _controller.chart.SubHeader.Visible = true;
                 * _controller.chart.SubHeader.Alignment = MonoTouch.CoreText.CTTextAlignment.Right;
                 *      _controller.chart.SubHeader.Text = "SubHeader";
                 * _controller.chart.SubHeader.Font.Color = UIColor.Yellow.CGColor;
                 * _controller.chart.SubHeader.Font.Size = 12;*/
                break;

            case 1:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Points());
                _controller.chart.Series[0].FillSampleValues(100);
                break;

            case 2:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Area());
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Area());
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Area());
                _controller.chart.Series[0].FillSampleValues(5);
                _controller.chart.Series[1].FillSampleValues(5);
                _controller.chart.Series[2].FillSampleValues(5);
                _controller.chart.Aspect.View3D = false;
                Steema.TeeChart.Styles.Area area1 = _controller.chart.Series[0] as Steema.TeeChart.Styles.Area;
                Steema.TeeChart.Styles.Area area2 = _controller.chart.Series[1] as Steema.TeeChart.Styles.Area;
                Steema.TeeChart.Styles.Area area3 = _controller.chart.Series[2] as Steema.TeeChart.Styles.Area;
                area1.Transparency = 40;
                area2.Transparency = 40;
                area3.Transparency = 40;

                break;

            case 3:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.FastLine());
                _controller.chart.Aspect.View3D = false;
                _controller.chart.Series[0].FillSampleValues(400);
                break;

            case 4:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.HorizLine());
                _controller.chart.Series[0].FillSampleValues(25);
                break;

            case 5:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Bar());

                _controller.chart.Series[0].Add(3, "Pears", UIColor.Red.CGColor);
                _controller.chart.Series[0].Add(4, "Apples", UIColor.Blue.CGColor);
                _controller.chart.Series[0].Add(2, "Oranges", UIColor.Green.CGColor);
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Bar).Pen.Visible          = false;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Bar).Marks.Shadow.Visible = false;
                _controller.chart.AfterDraw += new Steema.TeeChart.PaintChartEventHandler(chart_AfterDraw);
                //_controller.chart.GetAxisLabel += new Steema.TeeChart.GetAxisLabelEventHandler(_controller_GetAxisLabel);
                _controller.chart.Header.Font.Name = "Arial";
                _controller.chart.Header.Font.Size = 20;

                /*_controller.chart.Series[0].FillSampleValues(5);
                 * _controller.chart.Series[0].FillSampleValues(5);
                 * _controller.chart.Series[0].FillSampleValues(5);
                 * _controller.chart.Series[0].FillSampleValues(5);
                 * Steema.TeeChart.Styles.Bar bar1 = _controller.chart.Series[0] as Steema.TeeChart.Styles.Bar;
                 * bar1.ColorEachPoint = true;
                 * bar1.Marks.Visible = true;
                 * bar1.Marks.Transparent = true;
                 * bar1.Marks.ArrowLength = -15;
                 * bar1.Marks.Arrow.Visible = false;*/

                break;

            case 6:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.HorizBar());
                _controller.chart.Series[0].FillSampleValues(5);
                _controller.chart.Aspect.View3D = false;
                Steema.TeeChart.Styles.HorizBar hbar1 = _controller.chart.Series[0] as Steema.TeeChart.Styles.HorizBar;
                hbar1.MarksOnBar = true;
                break;

            case 7:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Pie());
                _controller.chart.Series[0].Add(30);
                _controller.chart.Series[0].Add(30);
                _controller.chart.Series[0].Add(40);
                _controller.chart.Series[0].Add(70);

                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Pie).Circled          = true;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Pie).EdgeStyle        = Steema.TeeChart.Drawing.EdgeStyles.Flat;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Pie).BevelPercent     = 15;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Pie).Marks.Font.Color = UIColor.FromRGB(255, 255, 255).CGColor;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Pie).Marks.Font.Size  = 10;
                _controller.chart.Series[0].Marks.Visible     = true;
                _controller.chart.Series[0].Marks.Transparent = true;
                _controller.chart.Legend.Visible     = true;
                _controller.chart.Legend.Alignment   = Steema.TeeChart.LegendAlignments.Bottom;
                _controller.chart.Legend.Transparent = true;
                _controller.chart.Legend.Font.Size   = 10;

                _controller.chart.Aspect.Chart3DPercent = 40;
                break;

            case 8:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Shape());
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Shape).Gradient.Visible  = true;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Shape).Style             = Steema.TeeChart.Styles.ShapeStyles.Circle;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Shape).Gradient.Visible  = true;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Shape).Gradient.EndColor = UIColor.FromRGB(255, 0, 0).CGColor;

                _controller.chart.Series[0].FillSampleValues();
                break;

            case 9:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Arrow());
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Arrow).ColorEachPoint = true;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 10:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Bubble());
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Bubble).Pointer.Gradient.Visible  = true;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Bubble).Pointer.Gradient.EndColor = UIColor.FromRGB(255, 255, 255).CGColor;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 11:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Gantt());
                _controller.chart.Legend.Visible     = true;
                _controller.chart.Legend.Alignment   = Steema.TeeChart.LegendAlignments.Bottom;
                _controller.chart.Legend.Transparent = true;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 12:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Candle());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 13:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Donut());
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Donut).Circled     = true;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Donut).Pen.Visible = false;
                _controller.chart.Series[0].Marks.Visible   = false;
                _controller.chart.Legend.Visible            = true;
                _controller.chart.Legend.Transparent        = true;
                _controller.chart.Legend.Alignment          = Steema.TeeChart.LegendAlignments.Top;
                _controller.chart.Legend.Symbol.Pen.Visible = false;
                _controller.chart.Legend.Font.Size          = 12;
                _controller.chart.Series[0].FillSampleValues(4);
                _controller.chart.Aspect.View3D = true;
                break;

            case 14:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Volume());
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Volume).LinePen.Width = 2;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 15:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Bar3D());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 16:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Points3D());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 17:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Polar());
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Polar).Circled = true;
                _controller.chart.Aspect.View3D = false;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 18:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.PolarBar());
                _controller.chart.Aspect.View3D = false;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 19:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Radar());
                _controller.chart.Aspect.View3D = false;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 20:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Clock());
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Clock).Circled = true;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 21:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.WindRose());
                _controller.chart.Aspect.View3D = false;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 22:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Pyramid());
                _controller.chart.Series[0].FillSampleValues(4);
                break;

            case 23:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Surface());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 24:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.LinePoint());
                _controller.chart.Aspect.View3D = false;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 25:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.BarJoin());
                _controller.chart.Aspect.View3D = false;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 26:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.ColorGrid());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 27:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Waterfall());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 28:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Histogram());
                _controller.chart.Aspect.View3D = false;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Histogram).LinesPen.Visible = false;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 29:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Error());
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Error).ColorEachPoint = true;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Error).ErrorPen.Width = 5;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 30:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.ErrorBar());
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.ErrorBar).ColorEachPoint = true;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 31:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Contour());
                _controller.chart.Aspect.View3D = false;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 32:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Smith());
                _controller.chart.Aspect.View3D = false;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Smith).Circled = true;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 33:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Bezier());
                _controller.chart.Aspect.View3D = false;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Bezier).Pointer.Style       = Steema.TeeChart.Styles.PointerStyles.Circle;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Bezier).Pointer.Pen.Visible = false;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Bezier).LinePen.Width       = 2;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Bezier).LinePen.Color       = UIColor.Red.CGColor;
                _controller.chart.Series[0].FillSampleValues(4);
                break;

            case 34:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Calendar());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 35:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.HighLow());
                _controller.chart.Aspect.View3D = false;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 36:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.TriSurface());
                _controller.chart.Aspect.View3D = true;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 37:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Funnel());
                _controller.chart.Aspect.View3D = false;
                _controller.chart.Series[0].FillSampleValues(20);
                break;

            case 38:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Box());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 39:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.HorizBox());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 40:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.HorizArea());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 41:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Tower());
                _controller.chart.Aspect.View3D = true;
                _controller.chart.Series[0].FillSampleValues(5);
                _controller.chart.Walls.Visible                  = false;
                _controller.chart.Axes.Bottom.Ticks.Visible      = false;
                _controller.chart.Axes.Bottom.MinorTicks.Visible = false;
                _controller.chart.Axes.Left.Ticks.Visible        = false;
                _controller.chart.Axes.Left.MinorTicks.Visible   = false;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.Tower).Pen.Visible = false;
                _controller.chart.Tools.Add(new Steema.TeeChart.Tools.Rotate());
                _controller.chart.Aspect.Orthogonal     = false;
                _controller.chart.Aspect.Rotation       = -25;
                _controller.chart.Aspect.Zoom           = 70;
                _controller.chart.Aspect.Chart3DPercent = 75;
                _controller.chart.Header.Text           = "Drag to Rotate the Chart";
                _controller.chart.Header.Visible        = true;
                break;

            case 42:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.PointFigure());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 43:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Gauges());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 44:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Vector3D());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 45:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.HorizHistogram());
                _controller.chart.Aspect.View3D = false;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.HorizHistogram).LinesPen.Visible = false;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 46:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Map());
                _controller.chart.Aspect.View3D = false;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 47:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.ImageBar());
                _controller.chart.Series[0].FillSampleValues();
                UIImage img = UIImage.FromFile("bulb_on.png");
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.ImageBar).Image = img.CGImage;
                break;

            case 48:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Kagi());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 49:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Renko());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 50:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.IsoSurface());
                _controller.chart.Aspect.View3D = true;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 51:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Darvas());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 52:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.VolumePipe());
                _controller.chart.Aspect.View3D             = false;
                _controller.chart.Legend.Visible            = true;
                _controller.chart.Legend.Transparent        = true;
                _controller.chart.Legend.Alignment          = Steema.TeeChart.LegendAlignments.Bottom;
                _controller.chart.Legend.Symbol.Pen.Visible = false;
                _controller.chart.Legend.Font.Size          = 14;
                _controller.chart.Series[0].FillSampleValues(4);
                break;

            case 53:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.ImagePoint());
                _controller.chart.Series[0].FillSampleValues(5);
                _controller.chart.Aspect.View3D = false;
                UIImage img2 = UIImage.FromFile("bulb_off.png");
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.ImagePoint).Pointer.HorizSize = 30;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.ImagePoint).Pointer.VertSize  = 30;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.ImagePoint).PointImage        = img2.CGImage;
                break;

            case 54:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.CircularGauge());
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.CircularGauge).Value = 65;
                break;

            case 55:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.LinearGauge());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 56:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.VerticalLinearGauge());
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.VerticalLinearGauge).Axis.Ticks.Visible      = true;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.VerticalLinearGauge).Axis.MinorTicks.Visible = true;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 57:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.NumericGauge());
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.NumericGauge).Value = 123;
                break;

            case 58:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.OrgSeries());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 59:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.TagCloud());
                _controller.chart.Series[0].FillSampleValues(50);
                break;

            case 60:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.PolarGrid());
                _controller.chart.Aspect.View3D = false;
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 61:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.Ternary());
                _controller.chart.Series[0].FillSampleValues();
                break;

            case 62:
                _controller.chart.Series.Add(new Steema.TeeChart.Styles.KnobGauge());
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.KnobGauge).ActiveCenter = true;
                (_controller.chart.Series[0] as Steema.TeeChart.Styles.KnobGauge).Value        = 50;
                break;

            default:
                break;
            }

            /*
             * _controller.chart.Series[0].Add(100);
             * _controller.chart.Series[0].Add(150);
             * _controller.chart.Series[0].Add(75);
             * _controller.chart.Series[0].Add(30);
             */
            //_controller.chart.Series[0].FillSampleValues(150);

            Console.WriteLine("{0} selected", _controller.Items[row]);
            //_previousRow = indexPath;

            // This is what the Settings does under Settings>Mail>Show on an iPhone
            tableView.DeselectRow(indexPath, false);
            _controller.NavigationController.PushViewController(_controller.chartController, true);
        }
		public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
		{			
			// Uncheck the previous row
			//if (_previousRow != null)
			//	tableView.CellAt(_previousRow).Accessory = UITableViewCellAccessory.None;
			
			// Do something with the row
			var row = indexPath.Row;
			Settings.SelectedIndex = row;
			//tableView.CellAt(indexPath).Accessory = UITableViewCellAccessory.Checkmark;
			
			// Changes Series type
			_controller.chart.Series.Clear();
			
			// Set some chart options to improve speed
			_controller.chart.Clear();
	
			Steema.TeeChart.Themes.BlackIsBackTheme theme = new Steema.TeeChart.Themes.BlackIsBackTheme(_controller.chart.Chart);
			theme.Apply();
			Steema.TeeChart.Themes.ColorPalettes.ApplyPalette(_controller.chart.Chart,Steema.TeeChart.Themes.Theme.OnBlackPalette);	
			
			_controller.chart.Axes.Bottom.Grid.Visible = false;
			_controller.chart.Axes.Left.Grid.DrawEvery = 3;
			_controller.chart.Axes.Left.MinorTicks.Visible = false;
			_controller.chart.Axes.Bottom.MinorTicks.Visible = false;
			_controller.chart.Header.Visible = false;			
			_controller.chart.Legend.Visible = false;
			_controller.chart.Aspect.View3D = true;			
			
			switch (row)
			{
				case 0:
				Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line();
				_controller.chart.Series.Add(line1);
				_controller.chart.Aspect.View3D = false;
				_controller.chart.Chart.Invalidate();
				/*Random Rnd = new Random();
				_controller.chart.Aspect.View3D = false;
				for(int t = 0; t <= 20; ++t)
					line1.Add(t, ((Rnd.Next(100)) + 1) - ((Rnd.Next(70)) + 1), UIColor.Yellow.CGColor);
				
				_controller.chart.Axes.Left.AxisPen.Color = UIColor.White.CGColor;
				_controller.chart.Axes.Bottom.AxisPen.Color = UIColor.White.CGColor;
				_controller.chart.Axes.Left.AxisPen.Width = 1;
				_controller.chart.Axes.Bottom.AxisPen.Width = 1;
				line1.BeforeDrawValues += new Steema.TeeChart.Styles.Series.PaintChartEventHandler(line1_BeforeDrawValues);
				*/
				    _controller.chart.Series[0].FillSampleValues(50);
			/*		_controller.chart.Header.Visible = true;
					_controller.chart.Header.Text = "My Header Text";
					_controller.chart.Header.Alignment = MonoTouch.CoreText.CTTextAlignment.Left;
					_controller.chart.Header.Font.Size=20;
					_controller.chart.Legend.Visible = true;
					_controller.chart.Legend.Gradient.Visible=false;
					_controller.chart.Legend.Transparency = 50;*/				
				/*
				_controller.chart.Legend.Alignment = Steema.TeeChart.LegendAlignments.Bottom;
				_controller.chart.Legend.Font.Color = UIColor.Black.CGColor;
				_controller.chart.Legend.Shadow.Visible=false;
					_controller.chart.Panel.MarginTop = 10;
				_controller.chart.SubHeader.Visible = true;
				_controller.chart.SubHeader.Alignment = MonoTouch.CoreText.CTTextAlignment.Right;
					_controller.chart.SubHeader.Text = "SubHeader";
				_controller.chart.SubHeader.Font.Color = UIColor.Yellow.CGColor;
				_controller.chart.SubHeader.Font.Size = 12;*/
					break;
				case 1:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Points());
				    _controller.chart.Series[0].FillSampleValues(100);
					break;
				case 2:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Area());	
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Area());	
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Area());	
					_controller.chart.Series[0].FillSampleValues(5);
					_controller.chart.Series[1].FillSampleValues(5);
					_controller.chart.Series[2].FillSampleValues(5);
					_controller.chart.Aspect.View3D = false;
				    Steema.TeeChart.Styles.Area area1 = _controller.chart.Series[0] as Steema.TeeChart.Styles.Area;
				    Steema.TeeChart.Styles.Area area2 = _controller.chart.Series[1] as Steema.TeeChart.Styles.Area;
				    Steema.TeeChart.Styles.Area area3 = _controller.chart.Series[2] as Steema.TeeChart.Styles.Area;
				    area1.Transparency = 40;
				    area2.Transparency = 40;
					area3.Transparency = 40;
	
					break;
				case 3:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.FastLine());
					_controller.chart.Aspect.View3D = false;
					_controller.chart.Series[0].FillSampleValues(400);
					break;
				case 4:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.HorizLine());
					_controller.chart.Series[0].FillSampleValues(25);
					break;
				case 5:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Bar());
				  
					_controller.chart.Series[0].Add(3,"Pears",UIColor.Red.CGColor);
					_controller.chart.Series[0].Add(4,"Apples",UIColor.Blue.CGColor);
					_controller.chart.Series[0].Add(2,"Oranges",UIColor.Green.CGColor);
				(_controller.chart.Series[0] as Steema.TeeChart.Styles.Bar).Pen.Visible =false;
				(_controller.chart.Series[0] as Steema.TeeChart.Styles.Bar).Marks.Shadow.Visible=false;
								_controller.chart.AfterDraw += new Steema.TeeChart.PaintChartEventHandler(chart_AfterDraw);
				//_controller.chart.GetAxisLabel += new Steema.TeeChart.GetAxisLabelEventHandler(_controller_GetAxisLabel);
				_controller.chart.Header.Font.Name = "Arial";
				_controller.chart.Header.Font.Size = 20;
				
					/*_controller.chart.Series[0].FillSampleValues(5);
					_controller.chart.Series[0].FillSampleValues(5);
					_controller.chart.Series[0].FillSampleValues(5);
					_controller.chart.Series[0].FillSampleValues(5);
				    Steema.TeeChart.Styles.Bar bar1 = _controller.chart.Series[0] as Steema.TeeChart.Styles.Bar;
					bar1.ColorEachPoint = true;
					bar1.Marks.Visible = true;
				    bar1.Marks.Transparent = true;
					bar1.Marks.ArrowLength = -15;
				    bar1.Marks.Arrow.Visible = false;*/
								
					break;
				case 6:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.HorizBar());
					_controller.chart.Series[0].FillSampleValues(5);
					_controller.chart.Aspect.View3D=false;
				    Steema.TeeChart.Styles.HorizBar hbar1 = _controller.chart.Series[0] as Steema.TeeChart.Styles.HorizBar;				    
				    hbar1.MarksOnBar = true;
					break;
				case 7:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Pie());
					_controller.chart.Series[0].Add(30);
					_controller.chart.Series[0].Add(30);
					_controller.chart.Series[0].Add(40);
					_controller.chart.Series[0].Add(70);
				
					(_controller.chart.Series[0] as Steema.TeeChart.Styles.Pie).Circled = true;
					(_controller.chart.Series[0] as Steema.TeeChart.Styles.Pie).EdgeStyle = Steema.TeeChart.Drawing.EdgeStyles.Flat;
					(_controller.chart.Series[0] as Steema.TeeChart.Styles.Pie).BevelPercent=15;
					(_controller.chart.Series[0] as Steema.TeeChart.Styles.Pie).Marks.Font.Color = UIColor.FromRGB(255,255,255).CGColor;
					(_controller.chart.Series[0] as Steema.TeeChart.Styles.Pie).Marks.Font.Size = 10;			
					_controller.chart.Series[0].Marks.Visible=true;
					_controller.chart.Series[0].Marks.Transparent=true;				 
					_controller.chart.Legend.Visible = true;
					_controller.chart.Legend.Alignment = Steema.TeeChart.LegendAlignments.Bottom;
					_controller.chart.Legend.Transparent = true;
					_controller.chart.Legend.Font.Size = 10;
				   
					_controller.chart.Aspect.Chart3DPercent=40;
					break;
				case 8:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Shape());
					(_controller.chart.Series[0] as Steema.TeeChart.Styles.Shape).Gradient.Visible =true;
					(_controller.chart.Series[0] as Steema.TeeChart.Styles.Shape).Style = Steema.TeeChart.Styles.ShapeStyles.Circle;
					(_controller.chart.Series[0] as Steema.TeeChart.Styles.Shape).Gradient.Visible = true;
					(_controller.chart.Series[0] as Steema.TeeChart.Styles.Shape).Gradient.EndColor = UIColor.FromRGB(255,0,0).CGColor;
				
					_controller.chart.Series[0].FillSampleValues();
					break;
				case 9:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Arrow());
					(_controller.chart.Series[0] as Steema.TeeChart.Styles.Arrow).ColorEachPoint=true;
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 10:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Bubble());
					(_controller.chart.Series[0] as Steema.TeeChart.Styles.Bubble).Pointer.Gradient.Visible = true;
					(_controller.chart.Series[0] as Steema.TeeChart.Styles.Bubble).Pointer.Gradient.EndColor=UIColor.FromRGB(255,255,255).CGColor;	
					_controller.chart.Series[0].FillSampleValues();								
					break;
				case 11:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Gantt());
					_controller.chart.Legend.Visible = true;
					_controller.chart.Legend.Alignment = Steema.TeeChart.LegendAlignments.Bottom;
					_controller.chart.Legend.Transparent = true;
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 12:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Candle());
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 13:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Donut());
					(_controller.chart.Series[0] as Steema.TeeChart.Styles.Donut).Circled = true;
					(_controller.chart.Series[0] as Steema.TeeChart.Styles.Donut).Pen.Visible = false;
					_controller.chart.Series[0].Marks.Visible=false;
					_controller.chart.Legend.Visible = true;
				    _controller.chart.Legend.Transparent = true;
				    _controller.chart.Legend.Alignment = Steema.TeeChart.LegendAlignments.Top;
				    _controller.chart.Legend.Symbol.Pen.Visible = false;
				    _controller.chart.Legend.Font.Size = 12;				  
					_controller.chart.Series[0].FillSampleValues(4);				
					_controller.chart.Aspect.View3D=true;
					break;
				case 14:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Volume());
					(_controller.chart.Series[0] as Steema.TeeChart.Styles.Volume).LinePen.Width = 2;
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 15:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Bar3D());
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 16:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Points3D());
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 17:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Polar());
					(_controller.chart.Series[0] as Steema.TeeChart.Styles.Polar).Circled = true;
					_controller.chart.Aspect.View3D = false;
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 18:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.PolarBar());
					_controller.chart.Aspect.View3D = false;
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 19:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Radar());
					_controller.chart.Aspect.View3D = false;
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 20:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Clock());
					(_controller.chart.Series[0] as Steema.TeeChart.Styles.Clock).Circled = true;
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 21:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.WindRose());
					_controller.chart.Aspect.View3D = false;
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 22:			
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Pyramid());
					_controller.chart.Series[0].FillSampleValues(4);	
					break;
				case 23:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Surface());
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 24:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.LinePoint());
					_controller.chart.Aspect.View3D = false;
				    _controller.chart.Series[0].FillSampleValues();				
					break;
				case 25:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.BarJoin());
					_controller.chart.Aspect.View3D = false;
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 26:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.ColorGrid());
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 27:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Waterfall());
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 28:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Histogram());
					_controller.chart.Aspect.View3D = false;
					(_controller.chart.Series[0] as Steema.TeeChart.Styles.Histogram).LinesPen.Visible=false;
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 29:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Error());
					(_controller.chart.Series[0] as Steema.TeeChart.Styles.Error).ColorEachPoint=true;
					(_controller.chart.Series[0] as Steema.TeeChart.Styles.Error).ErrorPen.Width = 5;
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 30:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.ErrorBar());
					(_controller.chart.Series[0] as Steema.TeeChart.Styles.ErrorBar).ColorEachPoint=true;
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 31:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Contour());
					_controller.chart.Aspect.View3D = false;
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 32:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Smith());
					_controller.chart.Aspect.View3D = false;
					(_controller.chart.Series[0] as Steema.TeeChart.Styles.Smith).Circled=true;
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 33:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Bezier());
					_controller.chart.Aspect.View3D=false;
					(_controller.chart.Series[0] as Steema.TeeChart.Styles.Bezier).Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Circle;
					(_controller.chart.Series[0] as Steema.TeeChart.Styles.Bezier).Pointer.Pen.Visible=false;
					(_controller.chart.Series[0] as Steema.TeeChart.Styles.Bezier).LinePen.Width = 2;				
					(_controller.chart.Series[0] as Steema.TeeChart.Styles.Bezier).LinePen.Color = UIColor.Red.CGColor;
					_controller.chart.Series[0].FillSampleValues(4);				
					break;
				case 34:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Calendar());
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 35:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.HighLow());
					_controller.chart.Aspect.View3D=false;
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 36:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.TriSurface());
					_controller.chart.Aspect.View3D=true;
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 37:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Funnel());
					_controller.chart.Aspect.View3D	= false;
					_controller.chart.Series[0].FillSampleValues(20);				
					break;
				case 38:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Box());
					_controller.chart.Series[0].FillSampleValues();		
					break;
				case 39:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.HorizBox());
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 40:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.HorizArea());
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 41:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Tower());
					_controller.chart.Aspect.View3D=true;
					_controller.chart.Series[0].FillSampleValues(5);		
					_controller.chart.Walls.Visible = false;				   
					_controller.chart.Axes.Bottom.Ticks.Visible = false;
					_controller.chart.Axes.Bottom.MinorTicks.Visible =false;	
					_controller.chart.Axes.Left.Ticks.Visible = false;
					_controller.chart.Axes.Left.MinorTicks.Visible =false;	
					(_controller.chart.Series[0] as Steema.TeeChart.Styles.Tower).Pen.Visible=false;	
					_controller.chart.Tools.Add(new Steema.TeeChart.Tools.Rotate());
					_controller.chart.Aspect.Orthogonal = false;
					_controller.chart.Aspect.Rotation = -25;			
					_controller.chart.Aspect.Zoom = 70;	
					_controller.chart.Aspect.Chart3DPercent = 75;
				    _controller.chart.Header.Text = "Drag to Rotate the Chart";
				    _controller.chart.Header.Visible = true;
					break;
				case 42:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.PointFigure());
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 43:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Gauges());
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 44:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Vector3D());
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 45:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.HorizHistogram());
					_controller.chart.Aspect.View3D = false;
					(_controller.chart.Series[0] as Steema.TeeChart.Styles.HorizHistogram).LinesPen.Visible=false;				
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 46:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Map());
					_controller.chart.Aspect.View3D = false;
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 47:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.ImageBar());
					_controller.chart.Series[0].FillSampleValues();		
				    UIImage img = UIImage.FromFile("bulb_on.png");
				    (_controller.chart.Series[0] as Steema.TeeChart.Styles.ImageBar).Image = img.CGImage;
					break;
				case 48:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Kagi());
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 49:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Renko());
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 50:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.IsoSurface());
					_controller.chart.Aspect.View3D=true;
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 51:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Darvas());
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 52:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.VolumePipe());
					_controller.chart.Aspect.View3D = false;
					_controller.chart.Legend.Visible = true;
				    _controller.chart.Legend.Transparent = true;
				    _controller.chart.Legend.Alignment = Steema.TeeChart.LegendAlignments.Bottom;
				    _controller.chart.Legend.Symbol.Pen.Visible = false;
				    _controller.chart.Legend.Font.Size = 14;
					_controller.chart.Series[0].FillSampleValues(4);				
					break;
				case 53:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.ImagePoint());
					_controller.chart.Series[0].FillSampleValues(5);			
				    _controller.chart.Aspect.View3D	= false;
				    UIImage img2 = UIImage.FromFile("bulb_off.png");
				    (_controller.chart.Series[0] as Steema.TeeChart.Styles.ImagePoint).Pointer.HorizSize = 30;				
				    (_controller.chart.Series[0] as Steema.TeeChart.Styles.ImagePoint).Pointer.VertSize = 30;				
				    (_controller.chart.Series[0] as Steema.TeeChart.Styles.ImagePoint).PointImage = img2.CGImage;
					break;
				case 54:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.CircularGauge());
					(_controller.chart.Series[0] as Steema.TeeChart.Styles.CircularGauge).Value = 65;			
					break;
				case 55:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.LinearGauge());
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 56:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.VerticalLinearGauge());		
				 	(_controller.chart.Series[0] as Steema.TeeChart.Styles.VerticalLinearGauge).Axis.Ticks.Visible = true;
				 	(_controller.chart.Series[0] as Steema.TeeChart.Styles.VerticalLinearGauge).Axis.MinorTicks.Visible = true;				
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 57:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.NumericGauge());
				    (_controller.chart.Series[0] as Steema.TeeChart.Styles.NumericGauge).Value = 123;
					break;
				case 58:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.OrgSeries());
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 59:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.TagCloud());
					_controller.chart.Series[0].FillSampleValues(50);				
					break;
				case 60:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.PolarGrid());
					_controller.chart.Aspect.View3D = false;
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 61:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.Ternary());
					_controller.chart.Series[0].FillSampleValues();				
					break;
				case 62:
					_controller.chart.Series.Add(new Steema.TeeChart.Styles.KnobGauge());
					(_controller.chart.Series[0] as Steema.TeeChart.Styles.KnobGauge).ActiveCenter=true;
					(_controller.chart.Series[0] as Steema.TeeChart.Styles.KnobGauge).Value = 50;
					break;
				default:
					break;				
			}
			/*
			_controller.chart.Series[0].Add(100);
			_controller.chart.Series[0].Add(150);
			_controller.chart.Series[0].Add(75);
			_controller.chart.Series[0].Add(30);
			*/
			//_controller.chart.Series[0].FillSampleValues(150);
			
			Console.WriteLine("{0} selected",_controller.Items[row]);
			//_previousRow = indexPath;
			
			// This is what the Settings does under Settings>Mail>Show on an iPhone
			tableView.DeselectRow(indexPath,false);
            _controller.NavigationController.PushViewController(_controller.chartController,true);			
		}
        public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
        {
            // Do something with the row
            var row = indexPath.Row;
            Settings.SelectedIndex = row;
            tableView.CellAt(indexPath).Accessory = UITableViewCellAccessory.Checkmark;

            // Applies the selected theme
                switch (row)
                {
                    case 0:
                        Steema.TeeChart.Themes.BlackIsBackTheme theme = new Steema.TeeChart.Themes.BlackIsBackTheme(_controller.chart.Chart);
                        theme.Apply();
                        break;
                    case 1:
                        Steema.TeeChart.Themes.OperaTheme theme1 = new Steema.TeeChart.Themes.OperaTheme(_controller.chart.Chart);
                        theme1.Apply();
                        break;
                    case 2:
                        Steema.TeeChart.Themes.TeeChartTheme theme2 = new Steema.TeeChart.Themes.TeeChartTheme(_controller.chart.Chart);
                        theme2.Apply();
                        break;
                    case 3:
                        Steema.TeeChart.Themes.ExcelTheme theme3 = new Steema.TeeChart.Themes.ExcelTheme(_controller.chart.Chart);
                        theme3.Apply();
                        break;
                    case 4:
                        Steema.TeeChart.Themes.ClassicTheme theme4 = new Steema.TeeChart.Themes.ClassicTheme(_controller.chart.Chart);
                        theme4.Apply();
                        break;
                    case 5:
                        Steema.TeeChart.Themes.XPTheme theme5 = new Steema.TeeChart.Themes.XPTheme(_controller.chart.Chart);
                        theme5.Apply();
                        break;
                    case 6:
                        Steema.TeeChart.Themes.WebTheme theme6 = new Steema.TeeChart.Themes.WebTheme(_controller.chart.Chart);
                        theme6.Apply();
                        break;
                    case 7:
                        Steema.TeeChart.Themes.BusinessTheme theme7 = new Steema.TeeChart.Themes.BusinessTheme(_controller.chart.Chart);
                        theme7.Apply();
                        break;
                    case 8:
                        Steema.TeeChart.Themes.BlueSkyTheme theme8 = new Steema.TeeChart.Themes.BlueSkyTheme(_controller.chart.Chart);
                        theme8.Apply();
                        break;
                    case 9:
                        Steema.TeeChart.Themes.GrayscaleTheme theme9 = new Steema.TeeChart.Themes.GrayscaleTheme(_controller.chart.Chart);
                        theme9.Apply();
                        break;
                    case 10:
                        Steema.TeeChart.Themes.RandomTheme theme10 = new Steema.TeeChart.Themes.RandomTheme(_controller.chart.Chart);
                        theme10.Apply();
                        break;
                    default:
                        break;
                }

            // This is what the Settings does under Settings>Mail>Show on an iPhone
            tableView.DeselectRow(indexPath,false);
            _controller.NavigationController.PopToViewController(_controller.chartController,true);
        }
        public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
        {
            // Clear Views if World demo has been clicked
            if (_controller.chartController.View.Subviews.Length > 1)
            {
                //if (_controller.View.Subviews.Length>1)
                //  _controller.chartController.View.Subviews[1].RemoveFromSuperview();
                _controller.chart.Frame = new CoreGraphics.CGRect(0, 0, _controller.chartController.View.Frame.Width, _controller.chartController.View.Frame.Height - 44);
            }
            // Do something with the row
            var row = indexPath.Row;

            Settings.SelectedIndex = row;

            // Changes Series typea
            _controller.chart.Series.Clear();

            // Set some chart options to improve speed
            _controller.chart.Clear();

            // Apply theme is desired
            Steema.TeeChart.Themes.AndrosTheme theme = new Steema.TeeChart.Themes.AndrosTheme(_controller.chart.Chart);
            theme.Apply();
            Steema.TeeChart.Themes.ColorPalettes.ApplyPalette(_controller.chart.Chart, Steema.TeeChart.Themes.Theme.OnBlackPalette);

            _controller.chart.Axes.Bottom.Grid.Visible       = false;
            _controller.chart.Axes.Left.Grid.DrawEvery       = 3;
            _controller.chart.Axes.Left.MinorTicks.Visible   = false;
            _controller.chart.Axes.Bottom.MinorTicks.Visible = false;
            _controller.chart.Header.Visible            = false;
            _controller.chart.Legend.Visible            = false;
            _controller.chart.Aspect.View3D             = true;
            _controller.chart.Panning.Active            = true;
            _controller.chart.Panning.Allow             = ScrollModes.Both;
            _controller.chart.Zoom.Active               = true;
            _controller.chart.Axes.Left.AxisPen.Width   = 1;
            _controller.chart.Axes.Bottom.AxisPen.Width = 1;

            // Using the ClickBackground event
            //_controller.chart.ClickBackground += new UITouchEventArgs(chart_clickBackGround);

            string ss = tableView.CellAt(indexPath).TextLabel.Text;

            Console.WriteLine(tableView.CellAt(indexPath).TextLabel.Text);

            _controller.chart.Series.Add(Utils.getSeriesStyle(row));
            _controller.chart.Series [0].Marks.Font.Color = Color.Black;
            _controller.chart.Series [0].Clear();

            if (_controller.newChart)
            {
                tableView.DeselectRow(indexPath, false);
                _controller.NavigationController.PushViewController(_controller.chartController, true);
            }
            else
            {
                switch (row)
                {
                case 0:                  // Line
                    _controller.chart.Aspect.View3D = false;
                    Random Rnd = new Random();
                    for (int t = 0; t <= 5; ++t)
                    {
                        (_controller.chart [0] as Line).Add(t, ((Rnd.Next(100)) + 1) - ((Rnd.Next(70)) + 1));
                    }

                    _controller.chart.Axes.Left.AxisPen.Color   = Color.White;
                    _controller.chart.Axes.Bottom.AxisPen.Color = Color.White;

                    _controller.chart.Panel.Gradient.Visible = false;
                    //_controller.chart.Panel.Gradient.EndColor = Color.DimGray;

                    (_controller.chart[0] as Line).LinePen.Width = 3;
                    (_controller.chart[0] as Line).Color         = Color.DarkBlue;
                    // Using the OnBeforeDrawValues event
                    //line1.BeforeDrawValues += new Steema.TeeChart.Styles.Series.PaintChartEventHandler(line1_BeforeDrawValues);
                    break;

                case 1:                  // Points
                    _controller.chart.Series [0].FillSampleValues(100);
                    break;

                case 2:                 // Area
                    _controller.chart.Aspect.View3D = false;
                    _controller.chart.Series [0].FillSampleValues(5);
                    for (int i = 1; i < 3; i++)
                    {
                        _controller.chart.Series.Add(new Steema.TeeChart.Styles.Area());
                        _controller.chart.Series [i].FillSampleValues(5);
                        (_controller.chart.Series [i] as Steema.TeeChart.Styles.Area).Transparency = 40;
                    }
                    break;

                case 3:                 // FastLine
                    _controller.chart.Aspect.View3D = false;
                    _controller.chart.Series [0].FillSampleValues(400);
                    break;

                case 4:                 // HorizLine
                    _controller.chart.Series[0].FillSampleValues(8);
                    for (int i = 1; i < 3; i++)
                    {
                        _controller.chart.Series.Add(new Steema.TeeChart.Styles.HorizLine());
                        _controller.chart.Series [i].FillSampleValues(8);
                    }
                    break;

                case 5:                 // Bar
                    _controller.chart.Series [0].Add(3, "Pears");
                    _controller.chart.Series [0].Add(4, "Apples");
                    _controller.chart.Series [0].Add(2, "Oranges");
                    _controller.chart.Series [0].Add(7, "Banana");

                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.Bar).Pen.Visible          = false;
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.Bar).ColorEach            = true;
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.Bar).Marks.Shadow.Visible = false;
                    _controller.chart.AfterDraw += new Steema.TeeChart.PaintChartEventHandler(chart_AfterDraw);

                    _controller.chart.Header.Font.Name         = "Arial";
                    _controller.chart.Header.Font.Size         = 20;
                    _controller.chart.Axes.Bottom.Labels.Angle = 45;

                    // Here using the Chart events
                    //_controller.chart.GetAxisLabel += new Steema.TeeChart.GetAxisLabelEventHandler(_controller_GetAxisLabel);
                    //_controller.chart.ClickSeries += new Steema.TeeChart.TChart.SeriesEventHandler (series_clicked);
                    break;

                case 6:                 // HorizBar
                    _controller.chart.Series [0].FillSampleValues(10);
                    _controller.chart.Aspect.View3D = false;
                    Steema.TeeChart.Styles.HorizBar hbar1 = _controller.chart.Series [0] as Steema.TeeChart.Styles.HorizBar;
                    hbar1.MarksOnBar        = true;
                    hbar1.Marks.Transparent = true;
                    hbar1.Color             = Color.LightGray;
                    hbar1.CustomBarWidth    = 20;
                    _controller.chart.Axes.Left.MinimumOffset = 20;
                    _controller.chart.Axes.Left.MaximumOffset = 20;
                    break;

                case 7:                  // Pie
                    _controller.chart.Series [0].Add(30);
                    _controller.chart.Series [0].Add(30);
                    _controller.chart.Series [0].Add(40);
                    _controller.chart.Series [0].Add(70);

                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.Pie).Circled         = true;
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.Pie).EdgeStyle       = Steema.TeeChart.Drawing.EdgeStyles.Flat;
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.Pie).BevelPercent    = 15;
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.Pie).Marks.Font.Size = 10;
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.Pie).ExplodeBiggest  = 20;
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.Pie).RotationAngle   = 25;
                    _controller.chart.Series [0].Marks.Visible     = true;
                    _controller.chart.Series [0].Marks.Transparent = true;
                    _controller.chart.Legend.Visible     = true;
                    _controller.chart.Legend.Alignment   = Steema.TeeChart.LegendAlignments.Bottom;
                    _controller.chart.Legend.Transparent = true;
                    _controller.chart.Legend.Font.Size   = 10;

                    _controller.chart.Aspect.Chart3DPercent = 40;
                    break;

                case 8:                 // Shape
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Shape).Gradient.Visible  = true;
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Shape).Style             = Steema.TeeChart.Styles.ShapeStyles.Circle;
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Shape).Gradient.Visible  = true;
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Shape).Gradient.EndColor = Color.FromArgb(255, 0, 0);
                    break;

                case 9:                 // Arrow
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.Arrow).ColorEachPoint = true;
                    break;

                case 10:                 // Bubble
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.Bubble).Pointer.Gradient.Visible   = true;
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Bubble).Pointer.Gradient.StartColor = Color.FromArgb(255, 0, 0);
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Bubble).Pointer.Gradient.EndColor   = Color.FromArgb(255, 255, 255);
                    break;

                case 11:                 // Gantt
                    Gantt progressSeries = _controller.chart.Series[0] as Steema.TeeChart.Styles.Gantt;
                    progressSeries.Add(DateTime.Today, DateTime.Today.AddDays(10.0), 1, "");

                    progressSeries.Pointer.VertSize = 10;
                    _controller.chart.Series.Add(progressSeries);
                    _controller.chart.Aspect.View3D                = false;
                    _controller.chart.Header.Visible               = false;
                    _controller.chart.Legend.Visible               = false;
                    _controller.chart.Panel.Gradient.Visible       = false;
                    _controller.chart.Panel.Color                  = Color.FromArgb(247, 247, 247);
                    _controller.chart.Axes.Left.Increment          = 10;
                    _controller.chart.Axes.Left.Ticks.Visible      = false;
                    _controller.chart.Axes.Left.MinorTicks.Visible = false;
                    _controller.chart.Axes.Left.Visible            = false;
                    break;

                case 12:                 // Candle
                    break;

                case 13:                 // Donut
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.Donut).Circled        = true;
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.Donut).Pen.Visible    = true;
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.Donut).Pen.Width      = 8;
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.Donut).ExplodeBiggest = 15;
                    _controller.chart.Series [0].Marks.Visible  = false;
                    _controller.chart.Legend.Visible            = true;
                    _controller.chart.Legend.VertSpacing        = 10;
                    _controller.chart.Legend.Title.Text         = "Donut Chart";
                    _controller.chart.Legend.Transparent        = true;
                    _controller.chart.Legend.Alignment          = Steema.TeeChart.LegendAlignments.Right;
                    _controller.chart.Legend.Symbol.Pen.Visible = false;
                    _controller.chart.Legend.Font.Size          = 12;
                    _controller.chart.Series [0].FillSampleValues(4);
                    _controller.chart.Aspect.View3D          = false;
                    _controller.chart.Panel.Color            = Color.White;
                    _controller.chart.Panel.Gradient.Visible = false;
                    _controller.chart.Legend.Font.Color      = Color.Black;
                    _controller.chart.Panel.MarginTop        = 10;
                    _controller.chart.Panel.MarginBottom     = 10;
                    break;

                case 14:                 // Volume
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.Volume).LinePen.Width = 2;
                    break;

                case 15:                 // Bar3D
                    break;

                case 16:                 // Points3D
                    break;

                case 17:                 // Polar
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.Polar).Circled = true;
                    _controller.chart.Aspect.View3D = false;
                    break;

                case 18:                 // PolarBar
                    _controller.chart.Aspect.View3D = false;
                    break;

                case 19:                 // Radar
                    _controller.chart.Aspect.View3D = false;
                    break;

                case 20:                 // Clock
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.Clock).Circled = true;
                    break;

                case 21:                 // WindRose
                    _controller.chart.Aspect.View3D = false;
                    break;

                case 22:                 // Pyramid
                    _controller.chart.Series [0].FillSampleValues(4);
                    break;

                case 23:                 // Surface
                    break;

                case 24:                 // LinePoint
                    _controller.chart.Aspect.View3D = false;
                    break;

                case 25:                 // BarJoin
                    _controller.chart.Aspect.View3D = false;
                    break;

                case 26:                 // ColorGrid
                    break;

                case 27:                 // WaterFall
                    break;

                case 28:                 // Histogram
                    _controller.chart.Aspect.View3D = false;
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.Histogram).LinesPen.Visible = false;
                    break;

                case 29:                 // Error
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.Error).ColorEachPoint = true;
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.Error).ErrorPen.Width = 5;
                    break;

                case 30:                 // ErrorBar
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.ErrorBar).ColorEachPoint = true;
                    break;

                case 31:                 // Contour
                    _controller.chart.Aspect.View3D = false;
                    break;

                case 32:                 // Smith
                    _controller.chart.Aspect.View3D = false;
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.Smith).Circled = true;
                    break;

                case 33:                 // Bezier
                    _controller.chart.Aspect.View3D = false;
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.Bezier).Pointer.Style       = Steema.TeeChart.Styles.PointerStyles.Circle;
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.Bezier).Pointer.Pen.Visible = false;
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.Bezier).LinePen.Width       = 2;
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.Bezier).LinePen.Color       = Color.Red;
                    _controller.chart.Series [0].FillSampleValues(4);
                    break;

                case 34:                 // Calendar
                    break;

                case 35:                 // HighLow
                    _controller.chart.Aspect.View3D = false;
                    break;

                case 36:                 // TriSurface
                    break;

                case 37:                 // Funnel
                    _controller.chart.Aspect.View3D = false;
                    _controller.chart.Series [0].FillSampleValues(20);
                    break;

                case 38:                 // Box
                    break;

                case 39:                 // HorizBox
                    break;

                case 40:                 // HorizArea
                    break;

                case 41:                 // Tower
                    _controller.chart.Series [0].FillSampleValues(5);
                    _controller.chart.Walls.Visible                  = false;
                    _controller.chart.Axes.Bottom.Ticks.Visible      = false;
                    _controller.chart.Axes.Bottom.MinorTicks.Visible = false;
                    _controller.chart.Axes.Left.Ticks.Visible        = false;
                    _controller.chart.Axes.Left.MinorTicks.Visible   = false;
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.Tower).Pen.Visible = false;
                    _controller.chart.Tools.Add(new Steema.TeeChart.Tools.Rotate());
                    _controller.chart.Aspect.Orthogonal     = false;
                    _controller.chart.Aspect.Rotation       = -25;
                    _controller.chart.Aspect.Zoom           = 70;
                    _controller.chart.Aspect.Chart3DPercent = 75;
                    _controller.chart.Header.Text           = "Drag to Rotate the Chart";
                    _controller.chart.Header.Visible        = true;
                    break;

                case 42:                 // PointFigure
                    break;

                case 43:                 // Gauges
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.Gauges).GetVertAxis.Ticks.Length  = 15;
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.Gauges).GetVertAxis.AxisPen.Color = Color.LightGray;
                    break;

                case 44:                 // Vector3D
                    break;

                case 45:                 // HorizHistogram
                    _controller.chart.Aspect.View3D = false;
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.HorizHistogram).LinesPen.Visible = false;
                    break;

                case 46:                 // Map
                    _controller.chart.Aspect.View3D = false;
                    break;

                case 47:                 // ImageBar
                    UIImage img = UIImage.FromFile("images/TeeChartNETForIPhone111x80.png");
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.ImageBar).Image = img.CGImage;
                    break;

                case 48:                 // Kagi
                    break;

                case 49:                 // Renko
                    break;

                case 50:                 // IsoSurface
                    break;

                case 51:                 // Darvas
                    break;

                case 52:                 // VolumePipe
                    _controller.chart.Aspect.View3D             = false;
                    _controller.chart.Legend.Visible            = true;
                    _controller.chart.Legend.Transparent        = true;
                    _controller.chart.Legend.Alignment          = Steema.TeeChart.LegendAlignments.Bottom;
                    _controller.chart.Legend.Symbol.Pen.Visible = false;
                    _controller.chart.Legend.Font.Size          = 14;
                    _controller.chart.Series [0].FillSampleValues(4);
                    break;

                case 53:                 // ImagePoint
                    _controller.chart.Series [0].FillSampleValues(5);
                    _controller.chart.Aspect.View3D = false;
                    UIImage img2 = UIImage.FromFile("images/TeeChartNETForIPhone111x80.png");
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.ImagePoint).Pointer.HorizSize = 30;
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.ImagePoint).Pointer.VertSize  = 30;
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.ImagePoint).PointImage        = img2.CGImage;
                    break;

                case 54:                 // CircularGauge
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.CircularGauge).Value = 65;
                    break;

                case 55:                 // LinearGauge
                    break;

                case 56:                 // VerticalLinearGauge
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.VerticalLinearGauge).Axis.Ticks.Visible      = true;
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.VerticalLinearGauge).Axis.MinorTicks.Visible = true;
                    break;

                case 57:                 //NumericGauge
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.NumericGauge).Value = 123;
                    break;

                case 58:                 // OrgSeries
                    break;

                case 59:                 // TagCloud
                    _controller.chart.Series [0].FillSampleValues(50);
                    break;

                case 60:                 // PolarGrid
                    _controller.chart.Aspect.View3D = false;
                    break;

                case 61:                 // Ternary
                    break;

                case 62:                 // KnobGauge
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.KnobGauge).ActiveCenter = true;
                    (_controller.chart.Series [0] as Steema.TeeChart.Styles.KnobGauge).Value        = 50;
                    break;

                case 63:                 // Worldaa
                    _controller.chart.Aspect.ZoomScrollStyle = Steema.TeeChart.Drawing.Aspect.ZoomScrollStyles.Manual;

                    World world1 = _controller.chart[0] as World;
                    Steema.TeeChart.Styles.CustomBar wbar;
                    TChart tChart2 = new TChart(this);
                    tChart2.Aspect.View3D  = false;
                    tChart2.Legend.Visible = false;
                    tChart2.Walls.Visible  = false;

                    if ((UIDevice.CurrentDevice.Orientation == UIDeviceOrientation.LandscapeLeft) ||
                        (UIDevice.CurrentDevice.Orientation == UIDeviceOrientation.LandscapeRight))
                    {
                        CoreGraphics.CGRect midFrame  = new CoreGraphics.CGRect(0, 0, UIScreen.MainScreen.ApplicationFrame.Height / 2, UIScreen.MainScreen.ApplicationFrame.Width - 20);
                        CoreGraphics.CGRect midFrame2 = new CoreGraphics.CGRect(UIScreen.MainScreen.ApplicationFrame.Height / 2, 0, UIScreen.MainScreen.ApplicationFrame.Height / 2, UIScreen.MainScreen.ApplicationFrame.Width - 20);
                        tChart2.Frame           = midFrame2;
                        _controller.chart.Frame = midFrame;

                        wbar = new Steema.TeeChart.Styles.HorizBar(tChart2.Chart);

                        tChart2.Axes.Left.Labels.Separation = 1;
                        _controller.chart.Footer.TextAlign  = CoreText.CTTextAlignment.Right;                        //map
                        tChart2.Footer.Text       = "to market cost index";
                        tChart2.Footer.Font.Color = Color.FromArgb(255, 255, 255);
                        tChart2.Footer.TextAlign  = CoreText.CTTextAlignment.Left;
                        tChart2.Footer.Font.Size  = 8;
                        tChart2.Footer.Visible    = true;
                        tChart2.Header.Visible    = false;
                    }
                    else
                    {
                        CoreGraphics.CGRect midFrame  = new CoreGraphics.CGRect(0, 0, UIScreen.MainScreen.ApplicationFrame.Width, _controller.chartController.chart.Bounds.Height / 2);
                        CoreGraphics.CGRect midFrame2 = new CoreGraphics.CGRect(0, _controller.chartController.chart.Bounds.Height / 2, UIScreen.MainScreen.ApplicationFrame.Width, _controller.chartController.chart.Bounds.Height / 2);

                        _controller.chart.Frame = midFrame;
                        tChart2.Frame           = midFrame2;

                        wbar = new Steema.TeeChart.Styles.Bar(tChart2.Chart);

                        tChart2.Axes.Bottom.Labels.Angle      = 90;
                        tChart2.Axes.Bottom.Labels.Separation = 1;
                        _controller.chart.Footer.TextAlign    = CoreText.CTTextAlignment.Left;                       //map
                        tChart2.Header.Text                 = "to market cost index";
                        tChart2.Header.Font.Color           = Color.FromArgb(255, 255, 255);
                        tChart2.Header.TextAlign            = CoreText.CTTextAlignment.Left;
                        tChart2.Header.Font.Size            = 8;
                        tChart2.Header.Visible              = true;
                        _controller.chart.Panel.MarginLeft  = 15;
                        _controller.chart.Panel.MarginRight = 15;
                    }

                    wbar.Marks.Visible = false;

                    Steema.TeeChart.Themes.BlackIsBackTheme theme2 = new Steema.TeeChart.Themes.BlackIsBackTheme(tChart2.Chart);
                    theme2.Apply();
                    Steema.TeeChart.Themes.ColorPalettes.ApplyPalette(tChart2.Chart, Steema.TeeChart.Themes.OperaTheme.OperaPalette);
                    tChart2.Aspect.ZoomScrollStyle = Steema.TeeChart.Drawing.Aspect.ZoomScrollStyles.Manual;

                    tChart2.Panel.Gradient.Visible   = false;
                    tChart2.Panel.Color              = Color.FromArgb(0, 0, 0);
                    tChart2.Axes.Bottom.Grid.Visible = false;

                    world1.Map = Steema.TeeChart.Styles.WorldMapType.Europe15;

                    _controller.chart.Walls.Visible          = false;
                    _controller.chart.Panel.Gradient.Visible = false;
                    _controller.chart.Panel.Color            = Color.FromArgb(0, 0, 0);

                    _controller.chart.Legend.Visible   = true;
                    _controller.chart.Legend.Font.Size = 8;

                    _controller.chart.Legend.Symbol.Position = LegendSymbolPosition.Right;
                    world1.ValueFormat = "0.0";

                    _controller.chart.Axes.Visible      = false;
                    _controller.chart.Footer.Font.Color = Color.FromArgb(255, 255, 255);
                    _controller.chart.Footer.Text       = "index of eu15" + Steema.TeeChart.Utils.NewLine + "organic food consumption 2009";
                    _controller.chart.Footer.Font.Size  = 8;
                    _controller.chart.Footer.Visible    = true;

                    wbar.Color          = Color.FromArgb(69, 69, 255);
                    wbar.CustomBarWidth = 10;
                    int[] territories = new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
                    for (int i = 0; i < world1.Shapes.Count; i++)
                    {
                        if (((String)(world1.Labels [i])) == "Austria")
                        {
                            world1.ZValues [i] = 89;
                            if (territories [0] == 0)
                            {
                                wbar.Add(4.5, (String)(world1.Labels [i]));
                                territories [0] = 1;
                            }
                        }
                        else if (((String)(world1.Labels [i])) == "Denmark")
                        {
                            world1.ZValues [i] = 107;
                            if (territories [1] == 0)
                            {
                                wbar.Add(4, (String)(world1.Labels [i]));
                                territories [1] = 1;
                            }
                        }
                        else if (((String)(world1.Labels [i])) == ("Finland"))
                        {
                            world1.ZValues [i] = 78;
                            if (territories [2] == 0)
                            {
                                wbar.Add(7.5, (String)(world1.Labels [i]));
                                territories [2] = 1;
                            }
                        }
                        else if (((String)(world1.Labels [i])) == ("Luxembourg"))
                        {
                            world1.ZValues [i] = 86;
                            if (territories [3] == 0)
                            {
                                wbar.Add(4.2, (String)(world1.Labels [i]));
                                territories [3] = 1;
                            }
                        }
                        else if (((String)(world1.Labels [i])) == ("Belgium"))
                        {
                            world1.ZValues [i] = 71;
                            if (territories [4] == 0)
                            {
                                wbar.Add(9.1, (String)(world1.Labels [i]));
                                territories [4] = 1;
                            }
                        }
                        else if (((String)(world1.Labels [i])) == ("Netherlands"))
                        {
                            world1.ZValues [i] = 78;
                            if (territories [5] == 0)
                            {
                                wbar.Add(3.9, (String)(world1.Labels [i]));
                                territories [5] = 1;
                            }
                        }
                        else if (((String)(world1.Labels [i])) == ("Germany"))
                        {
                            world1.ZValues [i] = 64;
                            if (territories [6] == 0)
                            {
                                wbar.Add(1.2, (String)(world1.Labels [i]));
                                territories [6] = 1;
                            }
                        }
                        else if (((String)(world1.Labels [i])) == ("Sweden"))
                        {
                            world1.ZValues [i] = 53;
                            if (territories [7] == 0)
                            {
                                wbar.Add(6.0, (String)(world1.Labels [i]));
                                territories [7] = 1;
                            }
                        }
                        else if (((String)(world1.Labels [i])) == ("UK"))
                        {
                            world1.ZValues [i] = 42;
                            if (territories [8] == 0)
                            {
                                wbar.Add(4.7, (String)(world1.Labels [i]));
                                territories [8] = 1;
                            }
                        }
                        else if (((String)(world1.Labels [i])) == ("Ireland"))
                        {
                            world1.ZValues [i] = 24;
                            if (territories [9] == 0)
                            {
                                wbar.Add(-0.2, (String)(world1.Labels [i]));
                                territories [9] = 1;
                            }
                        }
                        else if (((String)(world1.Labels [i])) == ("Italy"))
                        {
                            world1.ZValues [i] = 32;
                            if (territories [10] == 0)
                            {
                                wbar.Add(6.1, (String)(world1.Labels [i]));
                                territories [10] = 1;
                            }
                        }
                        else if (((String)(world1.Labels [i])) == ("France"))
                        {
                            world1.ZValues [i] = 30;
                            if (territories [11] == 0)
                            {
                                wbar.Add(7.9, (String)(world1.Labels [i]));
                                territories [11] = 1;
                            }
                        }
                        else if (((String)(world1.Labels [i])) == ("Spain"))
                        {
                            world1.ZValues [i] = 13;
                            if (territories [12] == 0)
                            {
                                wbar.Add(3.9, (String)(world1.Labels [i]));
                                territories [12] = 1;
                            }
                        }
                        else if (((String)(world1.Labels [i])) == ("Greece"))
                        {
                            world1.ZValues [i] = 7;
                            if (territories [13] == 0)
                            {
                                wbar.Add(2.1, (String)(world1.Labels [i]));
                                territories [13] = 1;
                            }
                        }
                        else if (((String)(world1.Labels [i])) == ("Portugal"))
                        {
                            world1.ZValues [i] = 11;
                            if (territories [14] == 0)
                            {
                                wbar.Add(0.5, (String)(world1.Labels [i]));
                                territories [14] = 1;
                            }
                        }
                        else if (((String)(world1.Labels [i])) == ("Poland"))
                        {
                            world1.ZValues [i] = 1;
                            if (territories [15] == 0)
                            {
                                wbar.Add(1.9, (String)(world1.Labels [i]));
                                territories [15] = 1;
                            }
                        }
                    }

                    world1.Pen.Color   = Color.Black;
                    world1.Pen.Width   = 1;
                    world1.Pen.Visible = true;

                    _controller.chartController.View.AddSubview(tChart2);
                    break;

                default:
                    break;
                }

                if (_controller.chart.Series [0].Count == 0)
                {
                    _controller.chart.Series [0].FillSampleValues();
                }

                // This is what the Settings does under Settings>Mail>Show on an iPhone
                tableView.DeselectRow(indexPath, false);
                _controller.NavigationController.PushViewController(_controller.chartController, true);
            }
        }
        public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
        {
            // Do something with the row
            var row = indexPath.Row;

            Settings.SelectedIndex = row;
            tableView.CellAt(indexPath).Accessory = UITableViewCellAccessory.Checkmark;

            // Applies the selected theme
            switch (row)
            {
            case 0:
                Steema.TeeChart.Themes.BlackIsBackTheme theme = new Steema.TeeChart.Themes.BlackIsBackTheme(_controller.chart.Chart);
                theme.Apply();
                break;

            case 1:
                Steema.TeeChart.Themes.OperaTheme theme1 = new Steema.TeeChart.Themes.OperaTheme(_controller.chart.Chart);
                theme1.Apply();
                break;

            case 2:
                Steema.TeeChart.Themes.TeeChartTheme theme2 = new Steema.TeeChart.Themes.TeeChartTheme(_controller.chart.Chart);
                theme2.Apply();
                break;

            case 3:
                Steema.TeeChart.Themes.ExcelTheme theme3 = new Steema.TeeChart.Themes.ExcelTheme(_controller.chart.Chart);
                theme3.Apply();
                break;

            case 4:
                Steema.TeeChart.Themes.ClassicTheme theme4 = new Steema.TeeChart.Themes.ClassicTheme(_controller.chart.Chart);
                theme4.Apply();
                break;

            case 5:
                Steema.TeeChart.Themes.XPTheme theme5 = new Steema.TeeChart.Themes.XPTheme(_controller.chart.Chart);
                theme5.Apply();
                break;

            case 6:
                Steema.TeeChart.Themes.WebTheme theme6 = new Steema.TeeChart.Themes.WebTheme(_controller.chart.Chart);
                theme6.Apply();
                break;

            case 7:
                Steema.TeeChart.Themes.BusinessTheme theme7 = new Steema.TeeChart.Themes.BusinessTheme(_controller.chart.Chart);
                theme7.Apply();
                break;

            case 8:
                Steema.TeeChart.Themes.BlueSkyTheme theme8 = new Steema.TeeChart.Themes.BlueSkyTheme(_controller.chart.Chart);
                theme8.Apply();
                break;

            case 9:
                Steema.TeeChart.Themes.GrayscaleTheme theme9 = new Steema.TeeChart.Themes.GrayscaleTheme(_controller.chart.Chart);
                theme9.Apply();
                break;

            case 10:
                Steema.TeeChart.Themes.RandomTheme theme10 = new Steema.TeeChart.Themes.RandomTheme(_controller.chart.Chart);
                theme10.Apply();
                break;

            default:
                break;
            }

            // This is what the Settings does under Settings>Mail>Show on an iPhone
            tableView.DeselectRow(indexPath, false);
            _controller.NavigationController.PopToViewController(_controller.chartController, true);
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            //any additional setup after loading the view, typically from a nib.
            r1 = new System.Drawing.RectangleF(0, 0, (float)this.View.Bounds.Width / 2, (float)this.View.Bounds.Height / 2);
            r2 = new System.Drawing.RectangleF((float)this.View.Bounds.Width / 2, 0, (float)this.View.Bounds.Width / 2, (float)this.View.Bounds.Height / 2);
            r3 = new System.Drawing.RectangleF(0, (float)this.View.Bounds.Height / 2, (float)this.View.Bounds.Width, (float)this.View.Bounds.Height / 2);

            chart1.Frame = r1;
            chart2.Frame = r2;
            chart3.Frame = r3;

            chart1.Header.Visible = false;
            chart1.Legend.Visible = false;
            chart2.Header.Visible = false;
            chart3.Header.Visible = false;

            this.View.AddSubview(chart1);
            this.View.AddSubview(chart2);
            this.View.AddSubview(chart3);

            Steema.TeeChart.Themes.BlackIsBackTheme theme1 = new Steema.TeeChart.Themes.BlackIsBackTheme(chart1.Chart);
            Steema.TeeChart.Themes.BlackIsBackTheme theme2 = new Steema.TeeChart.Themes.BlackIsBackTheme(chart2.Chart);
            Steema.TeeChart.Themes.BlackIsBackTheme theme3 = new Steema.TeeChart.Themes.BlackIsBackTheme(chart3.Chart);


            Steema.TeeChart.Themes.ColorPalettes.ApplyPalette(chart1.Chart, Steema.TeeChart.Themes.Theme.OnBlackPalette);
            Steema.TeeChart.Themes.ColorPalettes.ApplyPalette(chart2.Chart, Steema.TeeChart.Themes.Theme.OnBlackPalette);
            Steema.TeeChart.Themes.ColorPalettes.ApplyPalette(chart3.Chart, Steema.TeeChart.Themes.Theme.OnBlackPalette);

            // Chart 1
            chart1.Panel.Gradient.Visible = false;
            chart1.Panel.Color            = Color.Black;
            Steema.TeeChart.Styles.Donut series1 = new Steema.TeeChart.Styles.Donut();
            chart1.Aspect.View3D = false;
            series1.FillSampleValues(4);
            series1.Circled           = true;
            series1.Pen.Width         = 5;
            series1.ExplodeBiggest    = 20;
            series1.Marks.Transparent = true;
            series1.Marks.Font.Color  = Color.FromArgb(144, 255, 255, 255);
            series1.Marks.Font.Size   = 20;
            chart1.Series.Add(series1);

            // Chart 2

            chart2.Aspect.View3D = false;
            chart2.Chart.Aspect.ZoomScrollStyle = Steema.TeeChart.Drawing.Aspect.ZoomScrollStyles.Manual;
            chart2.Panel.Gradient.Visible       = false;
            chart2.Panel.Color = Color.Black;
            chart2.Walls.Back.Gradient.Visible    = true;
            chart2.Walls.Back.Gradient.StartColor = Color.FromArgb(255, 0, 0, 0);
            chart2.Walls.Back.Gradient.EndColor   = Color.DarkGray;
            chart2.Axes.Bottom.Grid.Visible       = false;
            chart2.Axes.Left.Increment            = 15;
            chart2.Axes.Bottom.Labels.Font.Size   = 15;
            chart2.Legend.Alignment   = LegendAlignments.Bottom;
            chart2.Legend.Transparent = true;
            Steema.TeeChart.Styles.Line series2 = new Steema.TeeChart.Styles.Line();
            series2.Add(15);
            series2.Add(25);
            series2.Add(16);
            series2.Add(30);
            series2.Add(40);
            series2.Add(35);
            series2.Add(25);
            series2.Add(50);
            series2.Pointer.Visible     = true;
            series2.Pointer.Style       = Steema.TeeChart.Styles.PointerStyles.Circle;
            series2.LinePen.Width       = 3;
            series2.Pointer.Pen.Visible = false;
            Steema.TeeChart.Styles.Area series3 = new Steema.TeeChart.Styles.Area();
            series3.Add(10);
            series3.Add(15);
            series3.Add(6);
            series3.Add(15);
            series3.Add(10);
            series3.Add(25);
            series3.Add(20);
            series3.Add(24);
            series3.AreaLinesPen.Visible        = true;
            series3.AreaLinesPen.Width          = 3;
            series3.AreaLinesPen.Color          = series3.Color;
            series3.LinePen.Visible             = true;
            series3.LinePen.Width               = 5;
            series3.AreaLines.Visible           = false;
            series3.AreaBrush.Gradient.Visible  = true;
            series3.AreaBrush.Gradient.EndColor = Color.DarkGray;
            chart2.Series.Add(series2);
            chart2.Series.Add(series3);

            // Chart 3

            chart3.Aspect.View3D  = false;
            chart3.Legend.Visible = false;
            chart3.Chart.Aspect.ZoomScrollStyle = Steema.TeeChart.Drawing.Aspect.ZoomScrollStyles.Manual;
            chart3.Panel.Gradient.Visible       = false;
            chart3.Panel.Color = Color.Black;
            chart3.Walls.Back.Gradient.Visible    = true;
            chart3.Walls.Back.Gradient.StartColor = Color.Black;
            chart3.Walls.Back.Gradient.EndColor   = Color.FromArgb(255, 79, 79, 79);
            chart3.Axes.Left.Labels.Separation    = 100;
            chart3.Axes.Left.Grid.Visible         = true;
            chart3.Axes.Left.Grid.Color           = Color.FromArgb(255, 79, 79, 79);
            chart3.Axes.Bottom.Grid.Color         = Color.FromArgb(255, 79, 79, 79);
            chart3.Axes.Left.AxisPen.Visible      = false;

            Steema.TeeChart.Styles.Candle candle = new Steema.TeeChart.Styles.Candle();
            Steema.TeeChart.Styles.Volume volume = new Steema.TeeChart.Styles.Volume();

            chart3.Series.Add(candle);
            chart3.Series.Add(volume);

            candle.FillSampleValues(70);
            candle.Pen.Visible = false;

            volume.FillSampleValues(70);
            volume.Color = Color.Yellow;

            Steema.TeeChart.Axis axis = chart3.Axes.Left;

            axis.StartPosition    = 0;
            axis.EndPosition      = 72;
            axis.Labels.Font.Size = 12;

            Steema.TeeChart.Axis customAxis = new Steema.TeeChart.Axis(chart3.Chart);
            customAxis.OtherSide = true;
            chart3.Axes.Custom.Add(customAxis);

            customAxis.StartPosition     = 74;
            customAxis.EndPosition       = 100;
            customAxis.Labels.Font.Color = Color.FromArgb(255, 255, 255, 240);
            customAxis.Labels.Font.Size  = 12;
            customAxis.Grid.Visible      = false;
            customAxis.AxisPen.Visible   = false;

            volume.CustomVertAxis = customAxis;

            chart3.Legend.Alignment   = LegendAlignments.Bottom;
            chart3.Legend.Transparent = true;
            chart3.Legend.Font.Size   = 12;
            chart3.Legend.TopLeftPos  = 0;

            chart3.Axes.Bottom.Labels.Font.Size = 12;


            /* Chart 4
             *
             * chart4.Aspect.View3D = false;
             * chart4.Chart.Aspect.ZoomScrollStyle = Steema.TeeChart.Drawing.Aspect.ZoomScrollStyles.Manual;
             * chart4.Panel.Gradient.Visible = false;
             * chart4.Panel.Color = UIColor.Black.CGColor;
             * chart4.Walls.Back.Transparent=true;
             * Steema.TeeChart.Styles.HorizBar series5 = new Steema.TeeChart.Styles.HorizBar();
             * series5.Add(10);
             * series5.Add(50);
             * series5.Add(30);
             * series5.Add(70);
             * //series5.BarHeightPercent=100;
             * //series5.CustomBarWidth= 80;
             * series5.ColorEach = true;
             * //series5.Pen.Width = 3;
             * //series5.Gradient.Visible = true;
             * chart4.Series.Add(series5);
             * chart4.Axes.Bottom.Visible = false;
             */
        }
        void Initialize()
        {
            mainChartFrame = new System.Drawing.RectangleF(0,0,this.View.Bounds.Width,this.View.Bounds.Height-42);
            chart.Frame = mainChartFrame;

            /* AdressBook and Call Center
            ABAddressBook adressBook = new ABAddressBook();
            ABPerson[] contacts = adressBook.GetPeople();
            foreach (ABPerson item in contacts) {
                ABMultiValue<NSDictionary> contact = item.GetPhones();
                foreach (ABMultiValueEntry<NSDictionary> cont in contact) {
                }
            }

            CTCallCenter callCenter = new CTCallCenter();
            CTCall[] calls = callCenter.CurrentCalls;
            foreach (CTCall call in calls) {
            }
            */

            UIDevice.CurrentDevice.BatteryMonitoringEnabled=true;
            float bLevel = UIDevice.CurrentDevice.BatteryLevel;

            Steema.TeeChart.Styles.NumericGauge series1 = new Steema.TeeChart.Styles.NumericGauge();
            series1.Value = bLevel*100;
            chart.Series.Add(series1);
            series1.Markers[2].AllowEdit=true;
            series1.Markers[2].Text= "Battery Level";
            series1.Markers[1].AllowEdit=true;
            series1.Markers[1].Text= "Percentage";

            Steema.TeeChart.Themes.BlackIsBackTheme theme = new Steema.TeeChart.Themes.BlackIsBackTheme(chart.Chart);
            theme.Apply();
            Steema.TeeChart.Themes.ColorPalettes.ApplyPalette(chart.Chart,Steema.TeeChart.Themes.Theme.OnBlackPalette);
            chart.Aspect.ClipPoints=true;
            chart.Panning.Allow = Steema.TeeChart.ScrollModes.Horizontal;

            this.View.AddSubview(chart);
            UIDevice.CurrentDevice.BatteryMonitoringEnabled=false;

            /*
            // Grab The Context
            UIGraphics.BeginImageContext ( this.View.Frame.Size);
            var ctx = UIGraphics.GetCurrentContext ();

            // Render in the context
            this.View.Layer.RenderInContext(ctx);

            // Lets grab a UIImage of the current graphics context
            UIImage i = UIGraphics.GetImageFromCurrentImageContext();

            // Set this to your desktop, ie change the martinbowling part
            string png = "/Users/steema/Desktop/chartxx.png";
            // Get the Image as a PNG
            NSData imgData = i.AsPNG();
            NSError err = null;
            if (imgData.Save(png, false, out err))
            {
                // Console.WriteLine("saved as " + png);
            }
            else
            {
             	// Console.WriteLine("NOT saved as" + png +
                //                " because" + err.LocalizedDescription);
            }

            UIGraphics.EndImageContext ();
            */
        }
        void Initialize()
        {
            mainChartFrame = new System.Drawing.RectangleF(0, 0, this.View.Bounds.Width, this.View.Bounds.Height - 42);
            chart.Frame    = mainChartFrame;

            /* AdressBook and Call Center
             * ABAddressBook adressBook = new ABAddressBook();
             * ABPerson[] contacts = adressBook.GetPeople();
             * foreach (ABPerson item in contacts) {
             *      ABMultiValue<NSDictionary> contact = item.GetPhones();
             *      foreach (ABMultiValueEntry<NSDictionary> cont in contact) {
             *      }
             * }
             *
             * CTCallCenter callCenter = new CTCallCenter();
             * CTCall[] calls = callCenter.CurrentCalls;
             * foreach (CTCall call in calls) {
             * }
             */

            UIDevice.CurrentDevice.BatteryMonitoringEnabled = true;
            float bLevel = UIDevice.CurrentDevice.BatteryLevel;

            Steema.TeeChart.Styles.NumericGauge series1 = new Steema.TeeChart.Styles.NumericGauge();
            series1.Value = bLevel * 100;
            chart.Series.Add(series1);
            series1.Markers[2].AllowEdit = true;
            series1.Markers[2].Text      = "Battery Level";
            series1.Markers[1].AllowEdit = true;
            series1.Markers[1].Text      = "Percentage";

            Steema.TeeChart.Themes.BlackIsBackTheme theme = new Steema.TeeChart.Themes.BlackIsBackTheme(chart.Chart);
            theme.Apply();
            Steema.TeeChart.Themes.ColorPalettes.ApplyPalette(chart.Chart, Steema.TeeChart.Themes.Theme.OnBlackPalette);
            chart.Aspect.ClipPoints = true;
            chart.Panning.Allow     = Steema.TeeChart.ScrollModes.Horizontal;

            this.View.AddSubview(chart);
            UIDevice.CurrentDevice.BatteryMonitoringEnabled = false;

            /*
             * // Grab The Context
             * UIGraphics.BeginImageContext ( this.View.Frame.Size);
             * var ctx = UIGraphics.GetCurrentContext ();
             *
             * // Render in the context
             * this.View.Layer.RenderInContext(ctx);
             *
             * // Lets grab a UIImage of the current graphics context
             * UIImage i = UIGraphics.GetImageFromCurrentImageContext();
             *
             * // Set this to your desktop, ie change the martinbowling part
             * string png = "/Users/steema/Desktop/chartxx.png";
             * // Get the Image as a PNG
             * NSData imgData = i.AsPNG();
             * NSError err = null;
             * if (imgData.Save(png, false, out err))
             * {
             *      // Console.WriteLine("saved as " + png);
             * }
             * else
             * {
             *      // Console.WriteLine("NOT saved as" + png +
             *  //                " because" + err.LocalizedDescription);
             * }
             *
             * UIGraphics.EndImageContext ();
             */
        }
        public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
        {
            // Clear Views if World demo has been clicked
            if (_controller.chartController.View.Subviews.Length>1)
            {
              _controller.chartController.View.Subviews[1].RemoveFromSuperview();
              _controller.chart.Frame = _controller.chartController.mainChartFrame;
            }
            // Uncheck the previous row
            //if (_previousRow != null)
            //	tableView.CellAt(_previousRow).Accessory = UITableViewCellAccessory.None;

            // Do something with the row
            var row = indexPath.Row;
            Settings.SelectedIndex = row;
            //tableView.CellAt(indexPath).Accessory = UITableViewCellAccessory.Checkmark;

            // Changes Series type
            _controller.chart.Series.Clear();

            // Set some chart options to improve speed
            _controller.chart.Clear();

            Steema.TeeChart.Themes.BlackIsBackTheme theme = new Steema.TeeChart.Themes.BlackIsBackTheme(_controller.chart.Chart);
            theme.Apply();
            Steema.TeeChart.Themes.ColorPalettes.ApplyPalette(_controller.chart.Chart,Steema.TeeChart.Themes.Theme.OnBlackPalette);

            _controller.chart.Axes.Bottom.Grid.Visible = false;
            _controller.chart.Axes.Left.Grid.DrawEvery = 3;
            _controller.chart.Axes.Left.MinorTicks.Visible = false;
            _controller.chart.Axes.Bottom.MinorTicks.Visible = false;
            _controller.chart.Header.Visible = false;
            _controller.chart.Legend.Visible = false;
            _controller.chart.Aspect.View3D = true;
            //_controller.chart.ClickBackground += new UITouchEventArgs(chart_clickBackGround);

            switch (row)
            {
                case 0:
                Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line();
                _controller.chart.Series.Add(line1);
                _controller.chart.Aspect.View3D = false;
                _controller.chart.Chart.Invalidate();
                Random Rnd = new Random();
                _controller.chart.Aspect.View3D = false;
                for(int t = 0; t <= 20; ++t)
                    line1.Add(t, ((Rnd.Next(100)) + 1) - ((Rnd.Next(70)) + 1), UIColor.Yellow.CGColor);

                _controller.chart.Axes.Left.AxisPen.Color = UIColor.White.CGColor;
                _controller.chart.Axes.Bottom.AxisPen.Color = UIColor.White.CGColor;
                _controller.chart.Axes.Left.AxisPen.Width = 1;
                _controller.chart.Axes.Bottom.AxisPen.Width = 1;
                //line1.BeforeDrawValues += new Steema.TeeChart.Styles.Series.PaintChartEventHandler(line1_BeforeDrawValues);
                break;
                case 1:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Points());
                    _controller.chart.Series[0].FillSampleValues(100);
                    break;
                case 2:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Area());
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Area());
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Area());
                    _controller.chart.Series[0].FillSampleValues(5);
                    _controller.chart.Series[1].FillSampleValues(5);
                    _controller.chart.Series[2].FillSampleValues(5);
                    _controller.chart.Aspect.View3D = false;
                    Steema.TeeChart.Styles.Area area1 = _controller.chart.Series[0] as Steema.TeeChart.Styles.Area;
                    Steema.TeeChart.Styles.Area area2 = _controller.chart.Series[1] as Steema.TeeChart.Styles.Area;
                    Steema.TeeChart.Styles.Area area3 = _controller.chart.Series[2] as Steema.TeeChart.Styles.Area;
                    area1.Transparency = 40;
                    area2.Transparency = 40;
                    area3.Transparency = 40;
                    break;
                case 3:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.FastLine());
                    _controller.chart.Aspect.View3D = false;
                    _controller.chart.Series[0].FillSampleValues(400);
                    break;
                case 4:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.HorizLine());
                    _controller.chart.Series[0].FillSampleValues(8);
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.HorizLine());
                    _controller.chart.Series[1].FillSampleValues(8);
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.HorizLine());
                    _controller.chart.Series[2].FillSampleValues(8);
                    break;
                case 5:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Bar());

                    _controller.chart.Series[0].Add(3,"Pears");
                    _controller.chart.Series[0].Add(4,"Apples");
                    _controller.chart.Series[0].Add(2,"Oranges");
                    _controller.chart.Series[0].Add(7,"Banana");

                    //	_controller.chart.Series[0].Add(5,"Pineapple");
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Bar).Pen.Visible =false;
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Bar).ColorEach=true;
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Bar).Marks.Shadow.Visible=false;
                    _controller.chart.AfterDraw += new Steema.TeeChart.PaintChartEventHandler(chart_AfterDraw);

                    //_controller.chart.GetAxisLabel += new Steema.TeeChart.GetAxisLabelEventHandler(_controller_GetAxisLabel);
                    _controller.chart.Header.Font.Name = "Arial";
                    _controller.chart.Header.Font.Size = 20;
                    _controller.chart.Axes.Bottom.Labels.Angle = 45;

                    _controller.chart.ClickSeries += new Steema.TeeChart.TChart.SeriesEventHandler(series_clicked);
                    break;
                case 6:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.HorizBar());
                    _controller.chart.Series[0].FillSampleValues(10);
                    _controller.chart.Aspect.View3D=false;
                    Steema.TeeChart.Styles.HorizBar hbar1 = _controller.chart.Series[0] as Steema.TeeChart.Styles.HorizBar;
                    hbar1.MarksOnBar = true;
                    hbar1.Marks.Transparent=true;
                    hbar1.Color = UIColor.LightGray.CGColor;
                    hbar1.Gradient.Visible = true;
                    hbar1.CustomBarWidth= 20;
                    _controller.chart.Axes.Left.MinimumOffset=20;
                    _controller.chart.Axes.Left.MaximumOffset=20;
                    _controller.chart.Aspect.ZoomScrollStyle=Steema.TeeChart.Drawing.Aspect.ZoomScrollStyles.Manual;
                    break;
                case 7:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Pie());
                    _controller.chart.Series[0].Add(30);
                    _controller.chart.Series[0].Add(30);
                    _controller.chart.Series[0].Add(40);
                    _controller.chart.Series[0].Add(70);

                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Pie).Circled = true;
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Pie).EdgeStyle = Steema.TeeChart.Drawing.EdgeStyles.Flat;
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Pie).BevelPercent=15;
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Pie).Marks.Font.Color = UIColor.FromRGB(255,255,255).CGColor;
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Pie).Marks.Font.Size = 10;
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Pie).ExplodeBiggest=20;
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Pie).RotationAngle=25;
                    _controller.chart.Series[0].Marks.Visible=true;
                    _controller.chart.Series[0].Marks.Transparent=true;
                    _controller.chart.Legend.Visible = true;
                    _controller.chart.Legend.Alignment = Steema.TeeChart.LegendAlignments.Bottom;
                    _controller.chart.Legend.Transparent = true;
                    _controller.chart.Legend.Font.Size = 10;

                    _controller.chart.Aspect.Chart3DPercent=40;
                    break;
                case 8:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Shape());
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Shape).Gradient.Visible =true;
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Shape).Style = Steema.TeeChart.Styles.ShapeStyles.Circle;
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Shape).Gradient.Visible = true;
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Shape).Gradient.EndColor = UIColor.FromRGB(255,0,0).CGColor;

                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 9:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Arrow());
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Arrow).ColorEachPoint=true;
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 10:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Bubble());
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Bubble).Pointer.Gradient.Visible = true;
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Bubble).Pointer.Gradient.EndColor=UIColor.FromRGB(255,255,255).CGColor;
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 11:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Gantt());
                    _controller.chart.Legend.Visible = true;
                    _controller.chart.Legend.Alignment = Steema.TeeChart.LegendAlignments.Bottom;
                    _controller.chart.Legend.Transparent = true;
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 12:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Candle());
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 13:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Donut());
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Donut).Circled = true;
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Donut).Pen.Visible = true;
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Donut).Pen.Width = 8;
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Donut).ExplodeBiggest = 15;
                    _controller.chart.Series[0].Marks.Visible=false;
                    _controller.chart.Legend.Visible = true;
                    _controller.chart.Legend.VertSpacing = 10;
                    _controller.chart.Legend.Title.Text = "Donut Chart";
                    _controller.chart.Legend.Transparent = true;
                    _controller.chart.Legend.Alignment = Steema.TeeChart.LegendAlignments.Right;
                    _controller.chart.Legend.Symbol.Pen.Visible = false;
                    _controller.chart.Legend.Font.Size = 12;
                    _controller.chart.Series[0].FillSampleValues(4);
                    _controller.chart.Aspect.View3D=false;
                    _controller.chart.Panel.Color = UIColor.White.CGColor;
                    _controller.chart.Panel.Gradient.Visible = false;
                    _controller.chart.Legend.Font.Color = UIColor.Black.CGColor;
                    _controller.chart.Panel.MarginTop = 10;
                    _controller.chart.Panel.MarginBottom = 10;
                    break;
                case 14:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Volume());
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Volume).LinePen.Width = 2;
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 15:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Bar3D());
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 16:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Points3D());
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 17:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Polar());
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Polar).Circled = true;
                    //(_controller.chart.Series[0] as Steema.TeeChart.Styles.Polar).Transparency = 10;
                    _controller.chart.Aspect.View3D = false;
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 18:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.PolarBar());
                    _controller.chart.Aspect.View3D = false;
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 19:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Radar());
                    _controller.chart.Aspect.View3D = false;
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 20:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Clock());
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Clock).Circled = true;
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 21:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.WindRose());
                    _controller.chart.Aspect.View3D = false;
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 22:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Pyramid());
                    _controller.chart.Series[0].FillSampleValues(4);
                    break;
                case 23:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Surface());
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 24:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.LinePoint());
                    _controller.chart.Aspect.View3D = false;
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 25:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.BarJoin());
                    _controller.chart.Aspect.View3D = false;
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 26:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.ColorGrid());
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 27:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Waterfall());
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 28:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Histogram());
                    _controller.chart.Aspect.View3D = false;
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Histogram).LinesPen.Visible=false;
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 29:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Error());
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Error).ColorEachPoint=true;
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Error).ErrorPen.Width = 5;
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 30:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.ErrorBar());
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.ErrorBar).ColorEachPoint=true;
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 31:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Contour());
                    _controller.chart.Aspect.View3D = false;
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 32:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Smith());
                    _controller.chart.Aspect.View3D = false;
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Smith).Circled=true;
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 33:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Bezier());
                    _controller.chart.Aspect.View3D=false;
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Bezier).Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Circle;
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Bezier).Pointer.Pen.Visible=false;
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Bezier).LinePen.Width = 2;
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Bezier).LinePen.Color = UIColor.Red.CGColor;
                    _controller.chart.Series[0].FillSampleValues(4);
                    break;
                case 34:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Calendar());
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 35:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.HighLow());
                    _controller.chart.Aspect.View3D=false;
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 36:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.TriSurface());
                    _controller.chart.Aspect.View3D=true;
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 37:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Funnel());
                    _controller.chart.Aspect.View3D	= false;
                    _controller.chart.Series[0].FillSampleValues(20);
                    break;
                case 38:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Box());
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 39:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.HorizBox());
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 40:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.HorizArea());
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 41:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Tower());
                    _controller.chart.Aspect.View3D=true;
                    _controller.chart.Series[0].FillSampleValues(5);
                    _controller.chart.Walls.Visible = false;
                    _controller.chart.Axes.Bottom.Ticks.Visible = false;
                    _controller.chart.Axes.Bottom.MinorTicks.Visible =false;
                    _controller.chart.Axes.Left.Ticks.Visible = false;
                    _controller.chart.Axes.Left.MinorTicks.Visible =false;
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Tower).Pen.Visible=false;
                    _controller.chart.Tools.Add(new Steema.TeeChart.Tools.Rotate());
                    _controller.chart.Aspect.Orthogonal = false;
                    _controller.chart.Aspect.Rotation = -25;
                    _controller.chart.Aspect.Zoom = 70;
                    _controller.chart.Aspect.Chart3DPercent = 75;
                    _controller.chart.Header.Text = "Drag to Rotate the Chart";
                    _controller.chart.Header.Visible = true;
                    break;
                case 42:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.PointFigure());
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 43:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Gauges());
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Gauges).GetVertAxis.Ticks.Length = 15;
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.Gauges).GetVertAxis.AxisPen.Color = UIColor.LightGray.CGColor;
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 44:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Vector3D());
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 45:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.HorizHistogram());
                    _controller.chart.Aspect.View3D = false;
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.HorizHistogram).LinesPen.Visible=false;
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 46:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Map());
                    _controller.chart.Aspect.View3D = false;
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 47:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.ImageBar());
                    _controller.chart.Series[0].FillSampleValues();
                    UIImage img = UIImage.FromFile("bulb_on.png");
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.ImageBar).Image = img.CGImage;
                    break;
                case 48:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Kagi());
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 49:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Renko());
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 50:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.IsoSurface());
                    _controller.chart.Aspect.View3D=true;
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 51:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Darvas());
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 52:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.VolumePipe());
                    _controller.chart.Aspect.View3D = false;
                    _controller.chart.Legend.Visible = true;
                    _controller.chart.Legend.Transparent = true;
                    _controller.chart.Legend.Alignment = Steema.TeeChart.LegendAlignments.Bottom;
                    _controller.chart.Legend.Symbol.Pen.Visible = false;
                    _controller.chart.Legend.Font.Size = 14;
                    _controller.chart.Series[0].FillSampleValues(4);
                    break;
                case 53:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.ImagePoint());
                    _controller.chart.Series[0].FillSampleValues(5);
                    _controller.chart.Aspect.View3D	= false;
                    UIImage img2 = UIImage.FromFile("bulb_off.png");
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.ImagePoint).Pointer.HorizSize = 30;
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.ImagePoint).Pointer.VertSize = 30;
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.ImagePoint).PointImage = img2.CGImage;
                    break;
                case 54:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.CircularGauge());
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.CircularGauge).Value = 65;
                    break;
                case 55:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.LinearGauge());
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 56:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.VerticalLinearGauge());
                 	(_controller.chart.Series[0] as Steema.TeeChart.Styles.VerticalLinearGauge).Axis.Ticks.Visible = true;
                 	(_controller.chart.Series[0] as Steema.TeeChart.Styles.VerticalLinearGauge).Axis.MinorTicks.Visible = true;
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 57:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.NumericGauge());
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.NumericGauge).Value = 123;
                    break;
                case 58:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.OrgSeries());
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 59:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.TagCloud());
                    _controller.chart.Series[0].FillSampleValues(50);
                    break;
                case 60:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.PolarGrid());
                    _controller.chart.Aspect.View3D = false;
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 61:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.Ternary());
                    _controller.chart.Series[0].FillSampleValues();
                    break;
                case 62:
                    _controller.chart.Series.Add(new Steema.TeeChart.Styles.KnobGauge());
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.KnobGauge).ActiveCenter=true;
                    (_controller.chart.Series[0] as Steema.TeeChart.Styles.KnobGauge).Value = 50;
                    break;
                case 63:
                      _controller.chart.Aspect.ZoomScrollStyle=Steema.TeeChart.Drawing.Aspect.ZoomScrollStyles.Manual;
                      Steema.TeeChart.Styles.World world1;
              		  _controller.chart.Series.Add(world1 = new Steema.TeeChart.Styles.World());

              		  Steema.TeeChart.Styles.CustomBar wbar;
              		  TChart tChart2 = new TChart(this);
                      tChart2.Aspect.View3D = false;
                      tChart2.Legend.Visible = false;
                      tChart2.Walls.Visible = false;

                      if ((UIDevice.CurrentDevice.Orientation == UIDeviceOrientation.LandscapeLeft) ||
                          (UIDevice.CurrentDevice.Orientation == UIDeviceOrientation.LandscapeRight))
              		  {
                        System.Drawing.RectangleF midFrame = new System.Drawing.RectangleF(0,0, UIScreen.MainScreen.ApplicationFrame.Height/2, UIScreen.MainScreen.ApplicationFrame.Width-20);
                        _controller.chart.Frame = midFrame;

                        System.Drawing.RectangleF midFrame2 = new System.Drawing.RectangleF( UIScreen.MainScreen.ApplicationFrame.Height/2,0,  UIScreen.MainScreen.ApplicationFrame.Height/2, UIScreen.MainScreen.ApplicationFrame.Width-20);
                        tChart2.Frame = midFrame2;

                        wbar = new Steema.TeeChart.Styles.HorizBar(tChart2.Chart);

                        tChart2.Axes.Left.Labels.Separation = 1;
                        _controller.chart.Footer.TextAlign = MonoTouch.CoreText.CTTextAlignment.Right; //map
                        tChart2.Footer.Text = "to market cost index";
                        tChart2.Footer.Font.Color = UIColor.FromRGB(255,255,255).CGColor;
                        tChart2.Footer.TextAlign = MonoTouch.CoreText.CTTextAlignment.Left;
                        tChart2.Footer.Font.Size = 8;
                        tChart2.Footer.Visible = true;
                        tChart2.Header.Visible = false;
              		  }
              		  else
              		  {
                        System.Drawing.RectangleF midFrame = new System.Drawing.RectangleF(0,0, UIScreen.MainScreen.ApplicationFrame.Width, _controller.chartController.chart.Bounds.Height/2);
                        _controller.chart.Frame = midFrame;

                        System.Drawing.RectangleF midFrame2 = new System.Drawing.RectangleF(0,_controller.chartController.chart.Bounds.Height, UIScreen.MainScreen.ApplicationFrame.Width, _controller.chartController.chart.Bounds.Height);
                        tChart2.Frame = midFrame2;

                        wbar = new Steema.TeeChart.Styles.Bar(tChart2.Chart);

                        tChart2.Axes.Bottom.Labels.Angle = 90;
                        tChart2.Axes.Bottom.Labels.Separation = 1;
                        _controller.chart.Footer.TextAlign = MonoTouch.CoreText.CTTextAlignment.Left;  //map
                        tChart2.Header.Text = "to market cost index";
                        tChart2.Header.Font.Color = UIColor.FromRGB(255,255,255).CGColor;
                        tChart2.Header.TextAlign = MonoTouch.CoreText.CTTextAlignment.Left;
                        tChart2.Header.Font.Size = 8;
                        tChart2.Header.Visible = true;
                        _controller.chart.Panel.MarginLeft = 15;
                        _controller.chart.Panel.MarginRight = 15;
              		  }

              		  wbar.Marks.Visible = false;

                      Steema.TeeChart.Themes.BlackIsBackTheme theme2 = new Steema.TeeChart.Themes.BlackIsBackTheme(tChart2.Chart);
                      theme2.Apply();
              		  Steema.TeeChart.Themes.ColorPalettes.ApplyPalette(tChart2.Chart, Steema.TeeChart.Themes.OperaTheme.OperaPalette);
                      tChart2.Aspect.ZoomScrollStyle=Steema.TeeChart.Drawing.Aspect.ZoomScrollStyles.Manual;

                      tChart2.Panel.Gradient.Visible = false;
                      tChart2.Panel.Color = UIColor.FromRGB(0,0,0).CGColor;
                      tChart2.Axes.Bottom.Grid.Visible = false;

                  	  world1.Map = Steema.TeeChart.Styles.WorldMapType.Europe15;

                  	  _controller.chart.Walls.Visible = false;
                      _controller.chart.Panel.Gradient.Visible = false;
                      _controller.chart.Panel.Color = UIColor.FromRGB(0,0,0).CGColor;

                  	  _controller.chart.Legend.Visible = true;
                  	  _controller.chart.Legend.Font.Size = 8;

                  	  _controller.chart.Legend.Symbol.Position = LegendSymbolPosition.Right;
                  	  world1.ValueFormat = "0.0";

              		      _controller.chart.Axes.Visible = false;

                      _controller.chart.Footer.Font.Color = UIColor.FromRGB(255,255,255).CGColor;
                      _controller.chart.Footer.Text = "index of eu15" + Utils.NewLine + "organic food consumption 2009";
                      _controller.chart.Footer.Font.Size = 8;
                      _controller.chart.Footer.Visible = true;

                      wbar.Color = UIColor.FromRGB(69,69,255).CGColor;
                      wbar.CustomBarWidth = 10;
                      int[] territories = new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
                      for (int i = 0; i < world1.Shapes.Count; i++)
                        {
                          if (((String)(world1.Labels[i])) == "Austria")
                          {
                            world1.ZValues[i] = 89;
                            if (territories[0] == 0)
                            {
                              wbar.Add(4.5, (String)(world1.Labels[i]));
                              territories[0] = 1;
                            }
                          }
                          else if (((String)(world1.Labels[i]))=="Denmark")
                          {
                            world1.ZValues[i] = 107;
                            if (territories[1] == 0)
                            {
                              wbar.Add(4, (String)(world1.Labels[i]));
                              territories[1] = 1;
                            }
                          }
                          else if (((String)(world1.Labels[i])) == ("Finland"))
                          {
                            world1.ZValues[i] = 78;
                            if (territories[2] == 0)
                            {
                              wbar.Add(7.5, (String)(world1.Labels[i]));
                              territories[2] = 1;
                            }
                          }
                          else if (((String)(world1.Labels[i])) == ("Luxembourg"))
                          {
                            world1.ZValues[i] = 86;
                            if (territories[3] == 0)
                            {
                              wbar.Add(4.2, (String)(world1.Labels[i]));
                              territories[3] = 1;
                            }
                          }
                          else if (((String)(world1.Labels[i])) == ("Belgium"))
                          {
                            world1.ZValues[i] = 71;
                            if (territories[4] == 0)
                            {
                              wbar.Add(9.1, (String)(world1.Labels[i]));
                              territories[4] = 1;
                            }
                          }
                          else if (((String)(world1.Labels[i])) == ("Netherlands"))
                          {
                            world1.ZValues[i] = 78;
                            if (territories[5] == 0)
                            {
                              wbar.Add(3.9, (String)(world1.Labels[i]));
                              territories[5] = 1;
                            }
                          }
                          else if (((String)(world1.Labels[i])) == ("Germany"))
                          {
                            world1.ZValues[i] = 64;
                            if (territories[6] == 0)
                            {
                              wbar.Add(1.2, (String)(world1.Labels[i]));
                              territories[6] = 1;
                            }
                          }
                          else if (((String)(world1.Labels[i])) == ("Sweden"))
                          {
                            world1.ZValues[i] = 53;
                            if (territories[7] == 0)
                            {
                              wbar.Add(6.0, (String)(world1.Labels[i]));
                              territories[7] = 1;
                            }
                          }
                          else if (((String)(world1.Labels[i])) == ("UK"))
                          {
                            world1.ZValues[i] = 42;
                            if (territories[8] == 0)
                            {
                              wbar.Add(4.7, (String)(world1.Labels[i]));
                              territories[8] = 1;
                            }
                          }
                          else if (((String)(world1.Labels[i])) == ("Ireland"))
                          {
                            world1.ZValues[i] = 24;
                            if (territories[9] == 0)
                            {
                              wbar.Add(-0.2, (String)(world1.Labels[i]));
                              territories[9] = 1;
                            }
                          }
                          else if (((String)(world1.Labels[i])) == ("Italy"))
                          {
                            world1.ZValues[i] = 32;
                            if (territories[10] == 0)
                            {
                              wbar.Add(6.1, (String)(world1.Labels[i]));
                              territories[10] = 1;
                            }
                          }
                          else if (((String)(world1.Labels[i])) == ("France"))
                          {
                            world1.ZValues[i] = 30;
                            if (territories[11] == 0)
                            {
                              wbar.Add(7.9, (String)(world1.Labels[i]));
                              territories[11] = 1;
                            }
                          }
                          else if (((String)(world1.Labels[i])) == ("Spain"))
                          {
                            world1.ZValues[i] = 13;
                            if (territories[12] == 0)
                            {
                              wbar.Add(3.9, (String)(world1.Labels[i]));
                              territories[12] = 1;
                            }
                          }
                          else if (((String)(world1.Labels[i])) == ("Greece"))
                          {
                            world1.ZValues[i] = 7;
                            if (territories[13] == 0)
                            {
                              wbar.Add(2.1, (String)(world1.Labels[i]));
                              territories[13] = 1;
                            }
                          }
                          else if (((String)(world1.Labels[i])) == ("Portugal"))
                          {
                            world1.ZValues[i] = 11;
                            if (territories[14] == 0)
                            {
                              wbar.Add(0.5, (String)(world1.Labels[i]));
                              territories[14] = 1;
                            }
                          }
                          else if (((String)(world1.Labels[i])) == ("Poland"))
                          {
                            world1.ZValues[i] = 1;
                            if (territories[15] == 0)
                            {
                              wbar.Add(1.9, (String)(world1.Labels[i]));
                              territories[15] = 1;
                            }
                          }
                        }

                        world1.Pen.Color = UIColor.Black.CGColor;
                        world1.Pen.Width = 1;
                        world1.Pen.Visible = true;

                        _controller.chartController.View.AddSubview(tChart2);
                        break;
                    default:
                        break;
                    }

            // This is what the Settings does under Settings>Mail>Show on an iPhone
            tableView.DeselectRow(indexPath,false);
            _controller.NavigationController.PushViewController(_controller.chartController,true);
        }
		public override void ViewDidLoad ()
		{
			base.ViewDidLoad ();
			
			//any additional setup after loading the view, typically from a nib.
			r1 = new System.Drawing.RectangleF(0,0,this.View.Bounds.Width/2,this.View.Bounds.Height/2);						
			r2 = new System.Drawing.RectangleF(this.View.Bounds.Width/2,0,this.View.Bounds.Width/2,this.View.Bounds.Height/2);						
			r3 = new System.Drawing.RectangleF(0,this.View.Bounds.Height/2,this.View.Bounds.Width,this.View.Bounds.Height/2);						
			//r3 = new System.Drawing.RectangleF(0,this.View.Bounds.Height/2,this.View.Bounds.Width/2,this.View.Bounds.Height/2);						
			// r4 = new System.Drawing.RectangleF(this.View.Bounds.Width/2,this.View.Bounds.Height/2,this.View.Bounds.Width/2,this.View.Bounds.Height/2);	
					
			chart1.Frame = r1;
			chart2.Frame = r2;
			chart3.Frame = r3;
			//chart4.Frame = r4;
			
			chart1.Header.Visible = false;
			chart1.Legend.Visible = false;
			chart2.Header.Visible = false;
			chart3.Header.Visible = false;
			//chart4.Header.Visible = false;
			
			this.View.AddSubview(chart1);
			this.View.AddSubview(chart2);
			this.View.AddSubview(chart3);
			//this.View.AddSubview(chart4);
			
			Steema.TeeChart.Themes.BlackIsBackTheme theme1 = new Steema.TeeChart.Themes.BlackIsBackTheme(chart1.Chart);
			Steema.TeeChart.Themes.BlackIsBackTheme theme2 = new Steema.TeeChart.Themes.BlackIsBackTheme(chart2.Chart);
			Steema.TeeChart.Themes.BlackIsBackTheme theme3 = new Steema.TeeChart.Themes.BlackIsBackTheme(chart3.Chart);
			//Steema.TeeChart.Themes.BlackIsBackTheme theme4 = new Steema.TeeChart.Themes.BlackIsBackTheme(chart4.Chart);
			
			theme1.Apply();
			theme2.Apply();
			theme3.Apply();
			//theme4.Apply();
			
			Steema.TeeChart.Themes.ColorPalettes.ApplyPalette(chart1.Chart,Steema.TeeChart.Themes.Theme.OnBlackPalette);	
			Steema.TeeChart.Themes.ColorPalettes.ApplyPalette(chart2.Chart,Steema.TeeChart.Themes.Theme.OnBlackPalette);	
			Steema.TeeChart.Themes.ColorPalettes.ApplyPalette(chart3.Chart,Steema.TeeChart.Themes.Theme.OnBlackPalette);	
			//Steema.TeeChart.Themes.ColorPalettes.ApplyPalette(chart4.Chart,Steema.TeeChart.Themes.Theme.OnBlackPalette);				
			
			// Chart 1
			chart1.Panel.Gradient.Visible = false;
			chart1.Panel.Color = UIColor.Black.CGColor;
			Steema.TeeChart.Styles.Donut series1 = new Steema.TeeChart.Styles.Donut();
			chart1.Aspect.View3D = false;
			series1.FillSampleValues(4);
			series1.Circled = true;
			series1.Pen.Width = 5;
			series1.ExplodeBiggest=20;
			series1.Marks.Transparent = true;
			series1.Marks.Font.Color = UIColor.FromRGB(255,255,255).CGColor;
			series1.Marks.Font.Size = 20;
			chart1.Series.Add(series1);
			  
			// Chart 2
			
			chart2.Aspect.View3D = false;
			chart2.Chart.Aspect.ZoomScrollStyle = Steema.TeeChart.Drawing.Aspect.ZoomScrollStyles.Manual;									
			chart2.Panel.Gradient.Visible = false;
			chart2.Panel.Color = UIColor.Black.CGColor;
			chart2.Walls.Back.Gradient.Visible = true;
			chart2.Walls.Back.Gradient.StartColor = UIColor.FromRGB(0,0,0).CGColor;
			chart2.Walls.Back.Gradient.EndColor = UIColor.DarkGray.CGColor;
			chart2.Axes.Bottom.Grid.Visible = false;
			chart2.Axes.Left.Increment = 15;
			chart2.Axes.Bottom.Labels.Font.Size = 15;
			chart2.Legend.Alignment = LegendAlignments.Bottom;
			chart2.Legend.Transparent = true;
			Steema.TeeChart.Styles.Line series2 = new Steema.TeeChart.Styles.Line();
			series2.Add(15);
			series2.Add(25);
			series2.Add(16);
			series2.Add(30);
			series2.Add(40);
			series2.Add(35);
			series2.Add(25);
			series2.Add(50);
			series2.Pointer.Visible = true;
			series2.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Circle;
			series2.LinePen.Width = 3;
			series2.Pointer.Pen.Visible = false;
			Steema.TeeChart.Styles.Area series3 = new Steema.TeeChart.Styles.Area();
			series3.Add(10);
			series3.Add(15);
			series3.Add(6);
			series3.Add(15);
			series3.Add(10);
			series3.Add(25);
			series3.Add(20);
			series3.Add(24);
			series3.AreaLinesPen.Visible = true;
			series3.AreaLinesPen.Width=3;
			series3.AreaLinesPen.Color = series3.Color;		
			series3.LinePen.Visible = true;
			series3.LinePen.Width = 5;
			series3.AreaLines.Visible = false;
			series3.AreaBrush.Gradient.Visible = true;
			series3.AreaBrush.Gradient.EndColor = UIColor.DarkGray.CGColor;
			chart2.Series.Add(series2);
			chart2.Series.Add(series3);

			// Chart 3
			
			chart3.Aspect.View3D = false;
			chart3.Legend.Visible = false;
			chart3.Chart.Aspect.ZoomScrollStyle = Steema.TeeChart.Drawing.Aspect.ZoomScrollStyles.Manual;									
			chart3.Panel.Gradient.Visible = false;
			chart3.Panel.Color = UIColor.Black.CGColor;
			chart3.Walls.Back.Gradient.Visible = true;
			chart3.Walls.Back.Gradient.StartColor = UIColor.Black.CGColor;
			chart3.Walls.Back.Gradient.EndColor = UIColor.FromRGB(79,79,79).CGColor;
			chart3.Axes.Left.Labels.Separation = 100;
			chart3.Axes.Left.Grid.Visible = true;
			chart3.Axes.Left.Grid.Color = UIColor.FromRGB(79,79,79).CGColor;
			chart3.Axes.Bottom.Grid.Color = UIColor.FromRGB(79,79,79).CGColor;
			chart3.Axes.Left.AxisPen.Visible = false;
			
			Steema.TeeChart.Styles.Candle candle = new Steema.TeeChart.Styles.Candle();
			Steema.TeeChart.Styles.Volume volume = new Steema.TeeChart.Styles.Volume();
			
			chart3.Series.Add(candle);
			chart3.Series.Add(volume);
			
			candle.FillSampleValues(70);
			candle.Pen.Visible = false;
			
			volume.FillSampleValues(70);
			volume.Color = UIColor.Yellow.CGColor;
			
			Steema.TeeChart.Axis axis = chart3.Axes.Left;
			//axis.AxisPen.Color = UIColor.Red.CGColor;
			axis.StartPosition = 0;
			axis.EndPosition = 72;
			axis.Labels.Font.Size = 12;
			
			Steema.TeeChart.Axis customAxis = new Steema.TeeChart.Axis(chart3.Chart);
			customAxis.OtherSide = true;
			chart3.Axes.Custom.Add(customAxis);
			//customAxis.AxisPen.Color = UIColor.Blue.CGColor;
			customAxis.StartPosition = 74;
			customAxis.EndPosition = 100;
			customAxis.Labels.Font.Color = UIColor.FromRGB(255,255,240).CGColor;
			customAxis.Labels.Font.Size = 12;
			customAxis.Grid.Visible = false;
			customAxis.AxisPen.Visible = false;
			
			volume.CustomVertAxis = customAxis;
			
			chart3.Legend.Alignment = LegendAlignments.Bottom;
			chart3.Legend.Transparent = true;
			chart3.Legend.Font.Size = 12;
			chart3.Legend.TopLeftPos = 0;
			
			chart3.Axes.Bottom.Labels.Font.Size = 12;

			
			/* Chart 4

			chart4.Aspect.View3D = false;
			chart4.Chart.Aspect.ZoomScrollStyle = Steema.TeeChart.Drawing.Aspect.ZoomScrollStyles.Manual;									
			chart4.Panel.Gradient.Visible = false;
			chart4.Panel.Color = UIColor.Black.CGColor;
			chart4.Walls.Back.Transparent=true;
			Steema.TeeChart.Styles.HorizBar series5 = new Steema.TeeChart.Styles.HorizBar();
			series5.Add(10);
			series5.Add(50);
			series5.Add(30);
			series5.Add(70);
			//series5.BarHeightPercent=100;
			//series5.CustomBarWidth= 80;
			series5.ColorEach = true;
			//series5.Pen.Width = 3;
			//series5.Gradient.Visible = true;
			chart4.Series.Add(series5);
			chart4.Axes.Bottom.Visible = false;
			*/
		}