Пример #1
0
        public Export_HTML5()
        {
            // This call is required by the Windows Form Designer.
            InitializeComponent();


            tChart1.Aspect.View3D = false;
            tChart1.Header.Text   = "TeeChart in HTML5";
            Steema.TeeChart.Styles.HorizBar horizBar1 = new Steema.TeeChart.Styles.HorizBar(tChart1.Chart);
            horizBar1.FillSampleValues();

            // TODO: Add any initialization after the InitializeComponent call
        }
        public Axes_GridBandsCentered()
        {
            // This call is required by the Windows Form Designer.
            horizBar1 = new Steema.TeeChart.Styles.HorizBar();
            InitializeComponent();
            tChart1.Series.Add(horizBar1);
            horizBar1.FillSampleValues();
            horizBar1.BarHeightPercent     = 55;
            horizBar1.Gradient.Visible     = true;
            horizBar1.Gradient.Direction   = System.Drawing.Drawing2D.LinearGradientMode.Horizontal;
            horizBar1.Marks.Transparent    = true;
            horizBar1.MarksOnBar           = true;
            horizBar1.Pen.Visible          = false;
            tChart1.Axes.Left.GridCentered = true;

            // TODO: Add any initialization after the InitializeComponent call
        }
        private void Bar_MarksOnBar_Load(object sender, EventArgs e)
        {
            ser1 = new Steema.TeeChart.Styles.HorizBar();
            ser1.FillSampleValues(5);
            ser1.AutoMarkPosition = false;
            ser1.Pen.Visible      = false;
            tChart1.Series.Add(ser1);

            tChart1.Aspect.View3D    = false;
            ser1.MarksOnBar          = true;
            cbStyle.SelectedIndex    = 0;
            cbLocation.SelectedIndex = 2;
            ser1.Marks.Transparent   = true;
            ser1.Marks.Font.Name     = "Rage Italic";
            ser1.Marks.Font.Color    = Color.Black;
            UDFontSize.Value         = 17;

            ser1.BarStyle             = Steema.TeeChart.Styles.BarStyles.RectGradient;
            ser1.Gradient.StartColor  = Color.FromArgb(230, 200, 90);
            ser1.Gradient.MiddleColor = Color.FromArgb(226, 242, 170);
            ser1.Gradient.EndColor    = Color.FromArgb(230, 200, 90);
            ser1.Gradient.Visible     = true;
        }
        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);
        }
Пример #5
0
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.label1          = new System.Windows.Forms.Label();
            this.comboBox1       = new System.Windows.Forms.ComboBox();
            this.label2          = new System.Windows.Forms.Label();
            this.comboBox2       = new System.Windows.Forms.ComboBox();
            this.button1         = new System.Windows.Forms.Button();
            this.horizBarSeries1 = new Steema.TeeChart.Styles.HorizBar();
            this.horizBarSeries2 = new Steema.TeeChart.Styles.HorizBar();
            this.horizBarSeries3 = new Steema.TeeChart.Styles.HorizBar();
            this.gridBand1       = new Steema.TeeChart.Tools.GridBand();
            this.panel1.SuspendLayout();
            this.SuspendLayout();
            //
            // textBox1
            //
            this.textBox1.Name = "textBox1";
            this.textBox1.Size = new System.Drawing.Size(560, 80);
            this.textBox1.Text = @"The Horizontal Bar style allows single or multiple bars, with different layouts ( 3D, side-to-side, side-all, stacked, stacked 100% ).

Options include 2D and 3D, color-each-bar, bar style, patterns, dark 3D, bottom origin, auto-mark positions, stacking groups, marks, border, etc.";
            //
            // panel1
            //
            this.panel1.Controls.Add(this.button1);
            this.panel1.Controls.Add(this.comboBox2);
            this.panel1.Controls.Add(this.label2);
            this.panel1.Controls.Add(this.comboBox1);
            this.panel1.Controls.Add(this.label1);
            this.panel1.Location = new System.Drawing.Point(0, 80);
            this.panel1.Name     = "panel1";
            this.panel1.Size     = new System.Drawing.Size(560, 36);
            //
            // tChart1
            //
            //
            // tChart1.Aspect
            //
            this.tChart1.Aspect.SmoothingMode     = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
            this.tChart1.Aspect.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
            //
            // tChart1.Header
            //
            this.tChart1.Header.Lines = new string[] {
                "tChart1"
            };
            this.tChart1.Location = new System.Drawing.Point(0, 116);
            this.tChart1.Name     = "tChart1";
            //
            // tChart1.Panel
            //
            //
            // tChart1.Panel.Brush
            //
            this.tChart1.Panel.Brush.Color = System.Drawing.Color.FromArgb(((System.Byte)(254)), ((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(255)));
            this.tChart1.Series.Add(this.horizBarSeries1);
            this.tChart1.Series.Add(this.horizBarSeries2);
            this.tChart1.Series.Add(this.horizBarSeries3);
            this.tChart1.Size = new System.Drawing.Size(560, 214);
            this.tChart1.Tools.Add(this.gridBand1);
            //
            // tChart1.Walls
            //
            //
            // tChart1.Walls.Bottom
            //
            //
            // tChart1.Walls.Bottom.Pen
            //
            this.tChart1.Walls.Bottom.Pen.Visible = false;
            this.tChart1.Walls.Bottom.Size        = 5;
            //
            // tChart1.Walls.Left
            //
            //
            // tChart1.Walls.Left.Pen
            //
            this.tChart1.Walls.Left.Pen.Visible = false;
            this.tChart1.Walls.Left.Size        = 5;
            //
            // label1
            //
            this.label1.AutoSize  = true;
            this.label1.Location  = new System.Drawing.Point(14, 10);
            this.label1.Name      = "label1";
            this.label1.Size      = new System.Drawing.Size(44, 16);
            this.label1.TabIndex  = 2;
            this.label1.Text      = "&Layout :";
            this.label1.TextAlign = System.Drawing.ContentAlignment.TopRight;
            //
            // comboBox1
            //
            this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.comboBox1.Items.AddRange(new object[] {
                "3D",
                "Side-to-side",
                "Stacked",
                "Stacked 100%",
                "Side All"
            });
            this.comboBox1.Location              = new System.Drawing.Point(64, 8);
            this.comboBox1.Name                  = "comboBox1";
            this.comboBox1.Size                  = new System.Drawing.Size(112, 21);
            this.comboBox1.TabIndex              = 3;
            this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
            //
            // label2
            //
            this.label2.AutoSize  = true;
            this.label2.Location  = new System.Drawing.Point(202, 10);
            this.label2.Name      = "label2";
            this.label2.Size      = new System.Drawing.Size(63, 16);
            this.label2.TabIndex  = 4;
            this.label2.Text      = "&Style Bar 1:";
            this.label2.TextAlign = System.Drawing.ContentAlignment.TopRight;
            //
            // comboBox2
            //
            this.comboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.comboBox2.Items.AddRange(new object[] {
                "Rectangle",
                "Pyramid",
                "Invert. Pyramid",
                "Cylinder",
                "Ellipse",
                "Arrow",
                "Rect. Gradient",
                "Cone"
            });
            this.comboBox2.Location              = new System.Drawing.Point(272, 8);
            this.comboBox2.Name                  = "comboBox2";
            this.comboBox2.Size                  = new System.Drawing.Size(104, 21);
            this.comboBox2.TabIndex              = 5;
            this.comboBox2.SelectedIndexChanged += new System.EventHandler(this.comboBox2_SelectedIndexChanged);
            //
            // button1
            //
            this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.button1.Location  = new System.Drawing.Point(400, 6);
            this.button1.Name      = "button1";
            this.button1.TabIndex  = 6;
            this.button1.Text      = "&Edit...";
            this.button1.Click    += new System.EventHandler(this.button1_Click);
            //
            // horizBarSeries1
            //
            //
            // horizBarSeries1.Brush
            //
            this.horizBarSeries1.Brush.Color = System.Drawing.Color.Red;
            //
            // horizBarSeries1.Gradient
            //
            this.horizBarSeries1.Brush.Gradient.Direction = System.Drawing.Drawing2D.LinearGradientMode.Horizontal;
            //
            // horizBarSeries1.Gradient
            //
            this.horizBarSeries1.Gradient.Direction = System.Drawing.Drawing2D.LinearGradientMode.Horizontal;
            //
            // horizBarSeries1.Marks
            //
            //
            // horizBarSeries1.Marks.Symbol
            //
            //
            // horizBarSeries1.Marks.Symbol.Shadow
            //
            this.horizBarSeries1.Marks.Symbol.Shadow.Height  = 1;
            this.horizBarSeries1.Marks.Symbol.Shadow.Visible = true;
            this.horizBarSeries1.Marks.Symbol.Shadow.Width   = 1;
            this.horizBarSeries1.Title = "horizBarSeries1";
            //
            // horizBarSeries1.XValues
            //
            this.horizBarSeries1.XValues.DataMember = "X";
            //
            // horizBarSeries1.YValues
            //
            this.horizBarSeries1.YValues.DataMember = "Bar";
            this.horizBarSeries1.YValues.Order      = Steema.TeeChart.Styles.ValueListOrder.Ascending;
            //
            // horizBarSeries2
            //
            //
            // horizBarSeries2.Brush
            //
            this.horizBarSeries2.Brush.Color = System.Drawing.Color.Green;
            //
            // horizBarSeries2.Gradient
            //
            this.horizBarSeries2.Brush.Gradient.Direction = System.Drawing.Drawing2D.LinearGradientMode.Horizontal;
            //
            // horizBarSeries2.Gradient
            //
            this.horizBarSeries2.Gradient.Direction = System.Drawing.Drawing2D.LinearGradientMode.Horizontal;
            //
            // horizBarSeries2.Marks
            //
            //
            // horizBarSeries2.Marks.Symbol
            //
            //
            // horizBarSeries2.Marks.Symbol.Shadow
            //
            this.horizBarSeries2.Marks.Symbol.Shadow.Height  = 1;
            this.horizBarSeries2.Marks.Symbol.Shadow.Visible = true;
            this.horizBarSeries2.Marks.Symbol.Shadow.Width   = 1;
            this.horizBarSeries2.Title = "horizBarSeries2";
            //
            // horizBarSeries2.XValues
            //
            this.horizBarSeries2.XValues.DataMember = "X";
            //
            // horizBarSeries2.YValues
            //
            this.horizBarSeries2.YValues.DataMember = "Bar";
            this.horizBarSeries2.YValues.Order      = Steema.TeeChart.Styles.ValueListOrder.Ascending;
            //
            // horizBarSeries3
            //
            //
            // horizBarSeries3.Brush
            //
            this.horizBarSeries3.Brush.Color = System.Drawing.Color.Yellow;
            //
            // horizBarSeries3.Gradient
            //
            this.horizBarSeries3.Brush.Gradient.Direction = System.Drawing.Drawing2D.LinearGradientMode.Horizontal;
            //
            // horizBarSeries3.Gradient
            //
            this.horizBarSeries3.Gradient.Direction = System.Drawing.Drawing2D.LinearGradientMode.Horizontal;
            //
            // horizBarSeries3.Marks
            //
            //
            // horizBarSeries3.Marks.Symbol
            //
            //
            // horizBarSeries3.Marks.Symbol.Shadow
            //
            this.horizBarSeries3.Marks.Symbol.Shadow.Height  = 1;
            this.horizBarSeries3.Marks.Symbol.Shadow.Visible = true;
            this.horizBarSeries3.Marks.Symbol.Shadow.Width   = 1;
            this.horizBarSeries3.Title = "horizBarSeries3";
            //
            // horizBarSeries3.XValues
            //
            this.horizBarSeries3.XValues.DataMember = "X";
            //
            // horizBarSeries3.YValues
            //
            this.horizBarSeries3.YValues.DataMember = "Bar";
            this.horizBarSeries3.YValues.Order      = Steema.TeeChart.Styles.ValueListOrder.Ascending;
            //
            // gridBand1
            //
            this.gridBand1.Axis = this.tChart1.Axes.Bottom;
            //
            // gridBand1.Band1
            //
            this.gridBand1.Band1.Color = System.Drawing.Color.FromArgb(((System.Byte)(127)), ((System.Byte)(192)), ((System.Byte)(192)), ((System.Byte)(192)));
            //
            // gridBand1.Band2
            //
            this.gridBand1.Band2.Color = System.Drawing.Color.FromArgb(((System.Byte)(127)), ((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(255)));
            //
            // SeriesType_HorizBar
            //
            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
            this.ClientSize        = new System.Drawing.Size(560, 330);
            this.Name  = "SeriesType_HorizBar";
            this.Load += new System.EventHandler(this.SeriesType_HorizBar_Load);
            this.panel1.ResumeLayout(false);
            this.ResumeLayout(false);
        }
Пример #6
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);
        }
Пример #7
0
        public MultiDonuts()
        {
            Steema.TeeChart.Animations.EasingFunctions.BounceEase bounceEase1 = new Steema.TeeChart.Animations.EasingFunctions.BounceEase();
            Steema.TeeChart.Animations.EasingFunctions.CircleEase circleEase1 = new Steema.TeeChart.Animations.EasingFunctions.CircleEase();
            this.tChart4             = new Steema.TeeChart.Chart();
            this.donut4              = new Steema.TeeChart.Styles.Donut();
            this.tChart3             = new Steema.TeeChart.Chart();
            this.donut3              = new Steema.TeeChart.Styles.Donut();
            this.tChart2             = new Steema.TeeChart.Chart();
            this.donut2              = new Steema.TeeChart.Styles.Donut();
            this.tChart1             = new Steema.TeeChart.Chart();
            this.donut1              = new Steema.TeeChart.Styles.Donut();
            this.label1              = new Label();
            this.label2              = new Label();
            this.tChart5             = new Steema.TeeChart.Chart();
            this.horizBar1           = new Steema.TeeChart.Styles.HorizBar();
            this.chartPartAnimation1 = new Steema.TeeChart.Animations.ChartPartAnimation();
            this.chartPartAnimation2 = new Steema.TeeChart.Animations.ChartPartAnimation();

            // tChart4
            this.tChart4.Aspect.ColorPaletteIndex      = 14;
            this.tChart4.Aspect.Elevation              = 315;
            this.tChart4.Aspect.Orthogonal             = false;
            this.tChart4.Aspect.Perspective            = 0;
            this.tChart4.Aspect.Rotation               = 360;
            this.tChart4.Aspect.View3D                 = false;
            this.tChart4.Footer.Font.Bold              = true;
            this.tChart4.Footer.Font.Brush.Color       = Color.Gray;
            this.tChart4.Footer.Lines                  = new string[] { "WHILE SHOPPING" };
            this.tChart4.Footer.Visible                = true;
            this.tChart4.Header.Visible                = false;
            this.tChart4.Legend.Alignment              = Steema.TeeChart.LegendAlignments.Bottom;
            this.tChart4.Legend.Font.Bold              = true;
            this.tChart4.Legend.Font.Brush.Color       = Color.FromRgb(((int)(((byte)(243)))), ((int)(((byte)(234)))), ((int)(((byte)(141)))));
            this.tChart4.Legend.Font.Name              = "Segoe UI";
            this.tChart4.Legend.Font.Size              = 24;
            this.tChart4.Legend.FontSeriesColor        = true;
            this.tChart4.Legend.LegendStyle            = Steema.TeeChart.LegendStyles.LastValues;
            this.tChart4.Legend.Symbol.Visible         = false;
            this.tChart4.Legend.TopLeftPos             = 5;
            this.tChart4.Legend.Transparent            = true;
            this.tChart4.Legend.VertSpacing            = -10;
            this.tChart4.Panel.Brush.Color             = Color.White;
            this.tChart4.Panel.Brush.Gradient.EndColor = Color.White;
            this.tChart4.Panel.Brush.Gradient.Visible  = false;
            this.tChart4.Panel.Brush.ImageMode         = Steema.TeeChart.Drawing.ImageMode.Center;
            this.tChart4.Panel.ImageMode               = Steema.TeeChart.Drawing.ImageMode.Center;
            this.tChart4.Panel.MarginBottom            = 2D;
            this.tChart4.Series.Add(this.donut4);
            this.tChart4.SubFooter.Font.Brush.Color         = Color.Gray;
            this.tChart4.Walls.Back.Brush.Gradient.EndColor = Color.White;
            // donut4
            this.donut4.AutoPenColor  = false;
            this.donut4.Brush.Color   = Color.FromRgb(((int)(((byte)(242)))), ((int)(((byte)(192)))), ((int)(((byte)(93)))));
            this.donut4.Circled       = true;
            this.donut4.Color         = Color.FromRgb(((int)(((byte)(243)))), ((int)(((byte)(234)))), ((int)(((byte)(141)))));
            this.donut4.DonutPercent  = 60;
            this.donut4.Frame.Circled = true;
            this.donut4.Frame.FrameElementPercents = new double[] {
                25D,
                60D,
                15D
            };
            this.donut4.Frame.OuterBand.Gradient.UseMiddle = false;
            this.donut4.Frame.Width         = 4;
            this.donut4.LabelMember         = "Labels";
            this.donut4.Marks.Visible       = false;
            this.donut4.MarksPie.LegSize    = 0;
            this.donut4.MarksPie.VertCenter = false;
            this.donut4.MultiPie            = Steema.TeeChart.Styles.MultiPies.Automatic;
            this.donut4.OtherSlice.Style    = Steema.TeeChart.Styles.PieOtherStyles.None;
            this.donut4.OtherSlice.Text     = "";
            this.donut4.OtherSlice.Value    = 0D;
            this.donut4.Pen.Color           = Color.FromRgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.donut4.Pen.Width           = 3;
            this.donut4.RotationAngle       = 91;
            this.donut4.Title = "donut1";
            this.donut4.UniqueCustomRadius = true;
            this.donut4.XValues.DataMember = "Angle";
            this.donut4.XValues.Order      = Steema.TeeChart.Styles.ValueListOrder.Ascending;
            this.donut4.YValues.DataMember = "Pie";
            // tChart3
            this.tChart3.Aspect.ColorPaletteIndex      = 14;
            this.tChart3.Aspect.Elevation              = 315;
            this.tChart3.Aspect.Orthogonal             = false;
            this.tChart3.Aspect.Perspective            = 0;
            this.tChart3.Aspect.Rotation               = 360;
            this.tChart3.Aspect.RotationFloat          = 360D;
            this.tChart3.Aspect.View3D                 = false;
            this.tChart3.Footer.Font.Bold              = true;
            this.tChart3.Footer.Font.Brush.Color       = Color.Gray;
            this.tChart3.Footer.Lines                  = new string[] { "WHILE HAVING DINNER" };
            this.tChart3.Footer.Visible                = true;
            this.tChart3.Header.Visible                = false;
            this.tChart3.Legend.Alignment              = Steema.TeeChart.LegendAlignments.Bottom;
            this.tChart3.Legend.Font.Bold              = true;
            this.tChart3.Legend.Font.Brush.Color       = Color.FromRgb(((int)(((byte)(243)))), ((int)(((byte)(234)))), ((int)(((byte)(141)))));
            this.tChart3.Legend.Font.Name              = "Segoe UI";
            this.tChart3.Legend.Font.Size              = 24;
            this.tChart3.Legend.FontSeriesColor        = true;
            this.tChart3.Legend.LegendStyle            = Steema.TeeChart.LegendStyles.LastValues;
            this.tChart3.Legend.Symbol.Visible         = false;
            this.tChart3.Legend.TopLeftPos             = 5;
            this.tChart3.Legend.Transparent            = true;
            this.tChart3.Legend.VertSpacing            = -10;
            this.tChart3.Panel.Brush.Color             = Color.White;
            this.tChart3.Panel.Brush.Gradient.EndColor = Color.White;
            this.tChart3.Panel.Brush.Gradient.Visible  = false;
            this.tChart3.Panel.Brush.ImageMode         = Steema.TeeChart.Drawing.ImageMode.Center;
            this.tChart3.Panel.ImageMode               = Steema.TeeChart.Drawing.ImageMode.Center;
            this.tChart3.Panel.MarginBottom            = 2D;
            this.tChart3.Series.Add(this.donut3);
            this.tChart3.SubFooter.Font.Brush.Color         = Color.Gray;
            this.tChart3.Walls.Back.Brush.Gradient.EndColor = Color.White;
            // donut3
            this.donut3.AutoPenColor  = false;
            this.donut3.Brush.Color   = Color.FromRgb(((int)(((byte)(242)))), ((int)(((byte)(192)))), ((int)(((byte)(93)))));
            this.donut3.Circled       = true;
            this.donut3.Color         = Color.FromRgb(((int)(((byte)(243)))), ((int)(((byte)(234)))), ((int)(((byte)(141)))));
            this.donut3.DonutPercent  = 60;
            this.donut3.Frame.Circled = true;
            this.donut3.Frame.FrameElementPercents = new double[] {
                25D,
                60D,
                15D
            };
            this.donut3.Frame.OuterBand.Gradient.UseMiddle = false;
            this.donut3.Frame.Width         = 4;
            this.donut3.LabelMember         = "Labels";
            this.donut3.Marks.Visible       = false;
            this.donut3.MarksPie.LegSize    = 0;
            this.donut3.MarksPie.VertCenter = false;
            this.donut3.MultiPie            = Steema.TeeChart.Styles.MultiPies.Automatic;
            this.donut3.OtherSlice.Style    = Steema.TeeChart.Styles.PieOtherStyles.None;
            this.donut3.OtherSlice.Text     = "";
            this.donut3.OtherSlice.Value    = 0D;
            this.donut3.Pen.Color           = Color.FromRgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.donut3.Pen.Width           = 3;
            this.donut3.RotationAngle       = 91;
            this.donut3.Title = "donut1";
            this.donut3.UniqueCustomRadius = true;
            this.donut3.XValues.DataMember = "Angle";
            this.donut3.XValues.Order      = Steema.TeeChart.Styles.ValueListOrder.Ascending;
            this.donut3.YValues.DataMember = "Pie";
            // tChart2
            this.tChart2.Aspect.ColorPaletteIndex      = 14;
            this.tChart2.Aspect.Elevation              = 315;
            this.tChart2.Aspect.Orthogonal             = false;
            this.tChart2.Aspect.Perspective            = 0;
            this.tChart2.Aspect.Rotation               = 360;
            this.tChart2.Aspect.RotationFloat          = 360D;
            this.tChart2.Aspect.View3D                 = false;
            this.tChart2.Footer.Font.Bold              = true;
            this.tChart2.Footer.Font.Brush.Color       = Color.Gray;
            this.tChart2.Footer.Lines                  = new string[] { "WHILE COMMUTING" };
            this.tChart2.Footer.Visible                = true;
            this.tChart2.Header.Visible                = false;
            this.tChart2.Legend.Alignment              = Steema.TeeChart.LegendAlignments.Bottom;
            this.tChart2.Legend.Font.Bold              = true;
            this.tChart2.Legend.Font.Brush.Color       = Color.FromRgb(((int)(((byte)(243)))), ((int)(((byte)(234)))), ((int)(((byte)(141)))));
            this.tChart2.Legend.Font.Name              = "Segoe UI";
            this.tChart2.Legend.Font.Size              = 24;
            this.tChart2.Legend.FontSeriesColor        = true;
            this.tChart2.Legend.LegendStyle            = Steema.TeeChart.LegendStyles.LastValues;
            this.tChart2.Legend.Symbol.Visible         = false;
            this.tChart2.Legend.TopLeftPos             = 5;
            this.tChart2.Legend.Transparent            = true;
            this.tChart2.Legend.VertSpacing            = -10;
            this.tChart2.Panel.Brush.Color             = Color.White;
            this.tChart2.Panel.Brush.Gradient.EndColor = Color.White;
            this.tChart2.Panel.Brush.Gradient.Visible  = false;
            this.tChart2.Panel.Brush.ImageMode         = Steema.TeeChart.Drawing.ImageMode.Center;
            this.tChart2.Panel.ImageMode               = Steema.TeeChart.Drawing.ImageMode.Center;
            this.tChart2.Panel.MarginBottom            = 2D;
            this.tChart2.Series.Add(this.donut2);
            this.tChart2.SubFooter.Font.Brush.Color         = Color.Gray;
            this.tChart2.Walls.Back.Brush.Gradient.EndColor = Color.White;
            // donut2
            this.donut2.AutoPenColor  = false;
            this.donut2.Brush.Color   = Color.FromRgb(((int)(((byte)(242)))), ((int)(((byte)(192)))), ((int)(((byte)(93)))));
            this.donut2.Circled       = true;
            this.donut2.Color         = Color.FromRgb(((int)(((byte)(243)))), ((int)(((byte)(234)))), ((int)(((byte)(141)))));
            this.donut2.DonutPercent  = 60;
            this.donut2.Frame.Circled = true;
            this.donut2.Frame.FrameElementPercents = new double[] {
                25D,
                60D,
                15D
            };
            this.donut2.Frame.OuterBand.Gradient.UseMiddle = false;
            this.donut2.Frame.Width         = 4;
            this.donut2.LabelMember         = "Labels";
            this.donut2.Marks.Visible       = false;
            this.donut2.MarksPie.LegSize    = 0;
            this.donut2.MarksPie.VertCenter = false;
            this.donut2.MultiPie            = Steema.TeeChart.Styles.MultiPies.Automatic;
            this.donut2.OtherSlice.Style    = Steema.TeeChart.Styles.PieOtherStyles.None;
            this.donut2.OtherSlice.Text     = "";
            this.donut2.OtherSlice.Value    = 0D;
            this.donut2.Pen.Color           = Color.FromRgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.donut2.Pen.Width           = 3;
            this.donut2.RotationAngle       = 91;
            this.donut2.Title = "donut1";
            this.donut2.UniqueCustomRadius = true;
            this.donut2.XValues.DataMember = "Angle";
            this.donut2.XValues.Order      = Steema.TeeChart.Styles.ValueListOrder.Ascending;
            this.donut2.YValues.DataMember = "Pie";
            // tChart1
            this.tChart1.Animations.Add(this.chartPartAnimation2);
            this.tChart1.Aspect.ColorPaletteIndex      = 21;
            this.tChart1.Aspect.Elevation              = 315;
            this.tChart1.Aspect.Orthogonal             = false;
            this.tChart1.Aspect.Perspective            = 0;
            this.tChart1.Aspect.Rotation               = 360;
            this.tChart1.Aspect.RotationFloat          = 360D;
            this.tChart1.Aspect.View3D                 = false;
            this.tChart1.Footer.Font.Bold              = true;
            this.tChart1.Footer.Font.Brush.Color       = Color.Gray;
            this.tChart1.Footer.Lines                  = new string[] { "LATE AT NIGHT IN BED" };
            this.tChart1.Footer.Visible                = true;
            this.tChart1.Header.Visible                = false;
            this.tChart1.Legend.Alignment              = Steema.TeeChart.LegendAlignments.Bottom;
            this.tChart1.Legend.Font.Bold              = true;
            this.tChart1.Legend.Font.Brush.Color       = Color.FromRgb(((int)(((byte)(243)))), ((int)(((byte)(234)))), ((int)(((byte)(141)))));
            this.tChart1.Legend.Font.Name              = "Segoe UI";
            this.tChart1.Legend.Font.Size              = 24;
            this.tChart1.Legend.FontSeriesColor        = true;
            this.tChart1.Legend.LegendStyle            = Steema.TeeChart.LegendStyles.LastValues;
            this.tChart1.Legend.Symbol.Visible         = false;
            this.tChart1.Legend.TopLeftPos             = 5;
            this.tChart1.Legend.Transparent            = true;
            this.tChart1.Legend.VertSpacing            = -10;
            this.tChart1.Panel.Brush.Color             = Color.White;
            this.tChart1.Panel.Brush.Gradient.EndColor = Color.White;
            this.tChart1.Panel.Brush.Gradient.Visible  = false;
            this.tChart1.Panel.Brush.ImageMode         = Steema.TeeChart.Drawing.ImageMode.Center;
            this.tChart1.Panel.ImageMode               = Steema.TeeChart.Drawing.ImageMode.Center;
            this.tChart1.Panel.MarginBottom            = 2D;
            this.tChart1.Series.Add(this.donut1);
            this.tChart1.SubFooter.Font.Brush.Color         = Color.Gray;
            this.tChart1.Walls.Back.Brush.Gradient.EndColor = Color.White;
            // donut1
            this.donut1.AutoPenColor  = false;
            this.donut1.Brush.Color   = Color.FromRgb(((int)(((byte)(255)))), ((int)(((byte)(172)))), ((int)(((byte)(0)))));
            this.donut1.Circled       = true;
            this.donut1.Color         = Color.FromRgb(((int)(((byte)(243)))), ((int)(((byte)(234)))), ((int)(((byte)(141)))));
            this.donut1.DonutPercent  = 60;
            this.donut1.Frame.Circled = true;
            this.donut1.Frame.FrameElementPercents = new double[] {
                25D,
                60D,
                15D
            };
            this.donut1.Frame.OuterBand.Gradient.UseMiddle = false;
            this.donut1.Frame.Width         = 4;
            this.donut1.LabelMember         = "Labels";
            this.donut1.Marks.Visible       = false;
            this.donut1.MarksPie.LegSize    = 0;
            this.donut1.MarksPie.VertCenter = false;
            this.donut1.MultiPie            = Steema.TeeChart.Styles.MultiPies.Automatic;
            this.donut1.OtherSlice.Style    = Steema.TeeChart.Styles.PieOtherStyles.None;
            this.donut1.OtherSlice.Text     = "";
            this.donut1.OtherSlice.Value    = 0D;
            this.donut1.Pen.Color           = Color.FromRgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.donut1.Pen.Width           = 3;
            this.donut1.RotationAngle       = 91;
            this.donut1.Title = "donut1";
            this.donut1.UniqueCustomRadius = true;
            this.donut1.XValues.DataMember = "Angle";
            this.donut1.XValues.Order      = Steema.TeeChart.Styles.ValueListOrder.Ascending;
            this.donut1.YValues.DataMember = "Pie";
            // label1
            this.label1.Text = "Ericson consumerLab.   2014";
            // label2
            this.label2.Text = "Where do customers watch mobile video content ?";
            // tChart5
            this.tChart5.Animations.Add(this.chartPartAnimation1);
            this.tChart5.Aspect.ColorPaletteIndex          = 14;
            this.tChart5.Aspect.View3D                     = false;
            this.tChart5.Axes.Bottom.AxisPen.Visible       = false;
            this.tChart5.Axes.Bottom.Grid.Visible          = false;
            this.tChart5.Axes.Bottom.MinorTicks.Visible    = false;
            this.tChart5.Axes.Bottom.Visible               = false;
            this.tChart5.Axes.Left.AxisPen.Color           = Color.Gray;
            this.tChart5.Axes.Left.AxisPen.Width           = 1;
            this.tChart5.Axes.Left.Grid.Visible            = false;
            this.tChart5.Axes.Left.Labels.Font.Brush.Color = Color.Gray;
            this.tChart5.Axes.Left.Labels.Font.Name        = "Segoe UI";
            this.tChart5.Axes.Left.Labels.Font.Size        = 16;
            this.tChart5.Axes.Left.MinorTicks.Visible      = false;
            this.tChart5.Footer.Font.Brush.Color           = Color.Blue;
            this.tChart5.Header.Visible                    = false;
            this.tChart5.Legend.Visible                    = false;
            this.tChart5.Panel.Brush.Color                 = Color.White;
            this.tChart5.Panel.Brush.Gradient.EndColor     = Color.White;
            this.tChart5.Series.Add(this.horizBar1);
            this.tChart5.Walls.Back.Brush.Gradient.EndColor = Color.White;
            this.tChart5.Walls.Back.Visible = false;
            // horizBar1
            this.horizBar1.BarHeightPercent       = 90;
            this.horizBar1.BarRound               = Steema.TeeChart.Styles.BarRounding.AtValue;
            this.horizBar1.BarStyle               = Steema.TeeChart.Styles.BarStyles.RoundRectangle;
            this.horizBar1.Brush.Color            = Color.FromRgb(((int)(((byte)(243)))), ((int)(((byte)(234)))), ((int)(((byte)(141)))));
            this.horizBar1.Color                  = Color.FromRgb(((int)(((byte)(243)))), ((int)(((byte)(234)))), ((int)(((byte)(141)))));
            this.horizBar1.ColorEach              = false;
            this.horizBar1.Marks.Brush.Visible    = false;
            this.horizBar1.Marks.Font.Brush.Color = Color.Gray;
            this.horizBar1.Marks.Style            = Steema.TeeChart.Styles.MarksStyles.Value;
            this.horizBar1.Marks.Transparent      = true;
            this.horizBar1.Pen.Color              = Color.FromRgb(((int)(((byte)(146)))), ((int)(((byte)(140)))), ((int)(((byte)(85)))));
            this.horizBar1.Pen.Visible            = false;
            this.horizBar1.Title                  = "horizBar1";
            this.horizBar1.ValueFormat            = "## %";
            this.horizBar1.XValues.DataMember     = "X";
            this.horizBar1.YValues.DataMember     = "Bar";
            this.horizBar1.YValues.Order          = Steema.TeeChart.Styles.ValueListOrder.Ascending;
            // chartPartAnimation1
            this.chartPartAnimation1.Axis           = null;
            bounceEase1.EasingMode                  = Steema.TeeChart.Animations.EasingFunctions.EasingMode.EaseOut;
            this.chartPartAnimation1.EasingFunction = bounceEase1;
            this.chartPartAnimation1.EasingMode     = Steema.TeeChart.Animations.EasingFunctions.EasingMode.EaseOut;
            this.chartPartAnimation1.Fade           = Steema.TeeChart.Animations.TransformFade.None;
            this.chartPartAnimation1.RotateMax      = 0F;
            this.chartPartAnimation1.RotateMin      = 0F;
            this.chartPartAnimation1.Series         = null;
            this.chartPartAnimation1.Speed          = 1000;
            this.chartPartAnimation1.Target         = Steema.TeeChart.ChartClickedPartStyle.Series;
            this.chartPartAnimation1.ZoomStyle      = Steema.TeeChart.Animations.TransformZoom.None;
            // chartPartAnimation2
            this.chartPartAnimation2.Axis           = null;
            circleEase1.EasingMode                  = Steema.TeeChart.Animations.EasingFunctions.EasingMode.EaseIn;
            this.chartPartAnimation2.EasingFunction = circleEase1;
            this.chartPartAnimation2.EasingMode     = Steema.TeeChart.Animations.EasingFunctions.EasingMode.EaseIn;
            this.chartPartAnimation2.Fade           = Steema.TeeChart.Animations.TransformFade.In;
            this.chartPartAnimation2.RotateMax      = 360F;
            this.chartPartAnimation2.RotateMin      = 0F;
            this.chartPartAnimation2.Series         = null;
            this.chartPartAnimation2.Speed          = 1000;
            this.chartPartAnimation2.Target         = Steema.TeeChart.ChartClickedPartStyle.Series;
            this.chartPartAnimation2.TranslateStyle = Steema.TeeChart.Animations.TransformTranslate.None;
            this.chartPartAnimation2.ZoomStyle      = Steema.TeeChart.Animations.TransformZoom.None;

            tChart1.Panel.Gradient.Visible = false;
            tChart2.Panel.Gradient.Visible = false;
            tChart3.Panel.Gradient.Visible = false;
            tChart4.Panel.Gradient.Visible = false;
            tChart5.Panel.Gradient.Visible = false;

            this.tChart1.Aspect.ZoomText = true;
            this.tChart2.Aspect.ZoomText = true;
            this.tChart3.Aspect.ZoomText = true;
            this.tChart4.Aspect.ZoomText = true;
            this.tChart5.Aspect.ZoomText = true;

            initChart();

            chartView1 = new ChartView
            {
                VerticalOptions   = LayoutOptions.FillAndExpand,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                WidthRequest      = 25,
                HeightRequest     = 25
            };
            chartView1.Model = tChart1;

            chartView2 = new ChartView
            {
                VerticalOptions   = LayoutOptions.FillAndExpand,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                WidthRequest      = 25,
                HeightRequest     = 25
            };
            chartView2.Model = tChart2;

            chartView3 = new ChartView
            {
                VerticalOptions   = LayoutOptions.FillAndExpand,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                WidthRequest      = 25,
                HeightRequest     = 25
            };
            chartView3.Model = tChart3;

            chartView4 = new ChartView
            {
                VerticalOptions   = LayoutOptions.FillAndExpand,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                WidthRequest      = 25,
                HeightRequest     = 25
            };
            chartView4.Model = tChart4;

            chartView5 = new ChartView
            {
                VerticalOptions   = LayoutOptions.FillAndExpand,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                WidthRequest      = 25,
                HeightRequest     = 25
            };
            chartView5.Model = tChart5;

            Grid grid = new Grid
            {
                VerticalOptions = LayoutOptions.FillAndExpand,
                Padding         = 5,
                RowDefinitions  =
                {
                    new RowDefinition {
                        Height = new GridLength(1, GridUnitType.Star)
                    },
                    new RowDefinition {
                        Height = new GridLength(1, GridUnitType.Star)
                    }
                },
                ColumnDefinitions =
                {
                    new ColumnDefinition {
                        Width = new GridLength(1, GridUnitType.Star)
                    },
                    new ColumnDefinition {
                        Width = new GridLength(1, GridUnitType.Star)
                    },
                    new ColumnDefinition {
                        Width = new GridLength(1, GridUnitType.Star)
                    },
                    new ColumnDefinition {
                        Width = new GridLength(1, GridUnitType.Star)
                    }
                }
            };

            grid.Children.Add(chartView1, 0, 0);
            grid.Children.Add(chartView2, 1, 0);
            grid.Children.Add(chartView3, 2, 0);
            grid.Children.Add(chartView4, 3, 0);
            grid.Children.Add(chartView5, 0, 4, 1, 2);

            // Build the page.
            this.Content = grid;
        }
Пример #8
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.radioButton1 = new System.Windows.Forms.RadioButton();
     this.radioButton2 = new System.Windows.Forms.RadioButton();
     this.label1       = new System.Windows.Forms.Label();
     this.checkBox1    = new System.Windows.Forms.CheckBox();
     this.horizBar1    = new Steema.TeeChart.Styles.HorizBar();
     this.panel1.SuspendLayout();
     this.SuspendLayout();
     //
     // textBox1
     //
     this.textBox1.BackColor = System.Drawing.Color.AliceBlue;
     this.textBox1.Name      = "textBox1";
     this.textBox1.Size      = new System.Drawing.Size(440, 63);
     this.textBox1.Text      = "Vertical axes can align their Labels to the opposite direction.\r\nNote: The labels" +
                               " Angle should be 0 (no label rotation).\r\n\r\ntChart1.Axes.Left.Labels.Align = TeeC" +
                               "hart.AxisLabelAlign.Opposite;";
     //
     // panel1
     //
     this.panel1.BackColor = System.Drawing.SystemColors.Control;
     this.panel1.Controls.Add(this.checkBox1);
     this.panel1.Controls.Add(this.label1);
     this.panel1.Controls.Add(this.radioButton2);
     this.panel1.Controls.Add(this.radioButton1);
     this.panel1.Location = new System.Drawing.Point(0, 63);
     this.panel1.Name     = "panel1";
     this.panel1.Size     = new System.Drawing.Size(440, 33);
     //
     // tChart1
     //
     //
     // tChart1.Aspect
     //
     this.tChart1.Aspect.Chart3DPercent    = 20;
     this.tChart1.Aspect.SmoothingMode     = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
     this.tChart1.Aspect.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
     //
     // tChart1.Axes
     //
     //
     // tChart1.Axes.Bottom
     //
     //
     // tChart1.Axes.Bottom.AxisPen
     //
     this.tChart1.Axes.Bottom.AxisPen.Width = 1;
     //
     // tChart1.Axes.Bottom.Labels
     //
     //
     // tChart1.Axes.Bottom.Labels.Font
     //
     //
     // tChart1.Axes.Left.AxisPen
     //
     this.tChart1.Axes.Left.AxisPen.Width = 1;
     //
     // tChart1.Header
     //
     //
     // tChart1.Header.Font
     //
     //
     // tChart1.Header.Font.Brush
     //
     this.tChart1.Header.Font.Brush.Color = System.Drawing.Color.FromArgb(((System.Byte)(254)), ((System.Byte)(0)), ((System.Byte)(0)), ((System.Byte)(128)));
     this.tChart1.Header.Font.Name        = "Verdana";
     //
     // tChart1.Header.Font.Shadow
     //
     //
     // tChart1.Header.Font.Shadow.Brush
     //
     this.tChart1.Header.Font.Shadow.Brush.Color = System.Drawing.Color.FromArgb(((System.Byte)(254)), ((System.Byte)(224)), ((System.Byte)(224)), ((System.Byte)(224)));
     this.tChart1.Header.Font.Shadow.Visible     = true;
     this.tChart1.Header.Lines = new string[] {
         "Axis labels alignment"
     };
     //
     // tChart1.Legend
     //
     //
     // tChart1.Legend.Shadow
     //
     this.tChart1.Legend.Shadow.Visible = false;
     this.tChart1.Location = new System.Drawing.Point(0, 96);
     this.tChart1.Name     = "tChart1";
     //
     // tChart1.Panel
     //
     //
     // tChart1.Panel.Brush
     //
     this.tChart1.Panel.Brush.Color = System.Drawing.Color.FromArgb(((System.Byte)(254)), ((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(255)));
     //
     // tChart1.Panel.Gradient
     //
     this.tChart1.Panel.Brush.Gradient.MiddleColor = System.Drawing.Color.FromArgb(((System.Byte)(254)), ((System.Byte)(192)), ((System.Byte)(192)), ((System.Byte)(255)));
     this.tChart1.Panel.Brush.Gradient.StartColor  = System.Drawing.Color.FromArgb(((System.Byte)(254)), ((System.Byte)(192)), ((System.Byte)(192)), ((System.Byte)(255)));
     this.tChart1.Panel.Brush.Gradient.UseMiddle   = true;
     this.tChart1.Panel.Brush.Gradient.Visible     = true;
     //
     // tChart1.Panel.Gradient
     //
     this.tChart1.Panel.Gradient.MiddleColor = System.Drawing.Color.FromArgb(((System.Byte)(254)), ((System.Byte)(192)), ((System.Byte)(192)), ((System.Byte)(255)));
     this.tChart1.Panel.Gradient.StartColor  = System.Drawing.Color.FromArgb(((System.Byte)(254)), ((System.Byte)(192)), ((System.Byte)(192)), ((System.Byte)(255)));
     this.tChart1.Panel.Gradient.UseMiddle   = true;
     this.tChart1.Panel.Gradient.Visible     = true;
     this.tChart1.Series.Add(this.horizBar1);
     this.tChart1.Size = new System.Drawing.Size(440, 237);
     //
     // tChart1.Walls
     //
     //
     // tChart1.Walls.Back
     //
     //
     // tChart1.Walls.Back.Brush
     //
     this.tChart1.Walls.Back.Brush.Color = System.Drawing.Color.FromArgb(((System.Byte)(63)), ((System.Byte)(192)), ((System.Byte)(192)), ((System.Byte)(255)));
     //
     // tChart1.Walls.Back.Gradient
     //
     this.tChart1.Walls.Back.Brush.Gradient.Transparency = 75;
     //
     // tChart1.Walls.Back.Gradient
     //
     this.tChart1.Walls.Back.Gradient.Transparency = 75;
     this.tChart1.Walls.Back.Transparent           = false;
     //
     // tChart1.Walls.Bottom
     //
     //
     // tChart1.Walls.Bottom.Pen
     //
     this.tChart1.Walls.Bottom.Pen.Visible = false;
     //
     // tChart1.Walls.Left
     //
     //
     // tChart1.Walls.Left.Pen
     //
     this.tChart1.Walls.Left.Pen.Visible = false;
     this.tChart1.Walls.Left.Size        = 1;
     //
     // radioButton1
     //
     this.radioButton1.Checked         = true;
     this.radioButton1.FlatStyle       = System.Windows.Forms.FlatStyle.Flat;
     this.radioButton1.Location        = new System.Drawing.Point(64, 8);
     this.radioButton1.Name            = "radioButton1";
     this.radioButton1.Size            = new System.Drawing.Size(47, 21);
     this.radioButton1.TabIndex        = 0;
     this.radioButton1.TabStop         = true;
     this.radioButton1.Text            = "&Left";
     this.radioButton1.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
     //
     // radioButton2
     //
     this.radioButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
     this.radioButton2.Location  = new System.Drawing.Point(120, 8);
     this.radioButton2.Name      = "radioButton2";
     this.radioButton2.Size      = new System.Drawing.Size(79, 21);
     this.radioButton2.TabIndex  = 1;
     this.radioButton2.Text      = "&Right";
     //
     // label1
     //
     this.label1.AutoSize    = true;
     this.label1.Location    = new System.Drawing.Point(20, 10);
     this.label1.Name        = "label1";
     this.label1.Size        = new System.Drawing.Size(29, 16);
     this.label1.TabIndex    = 2;
     this.label1.Text        = "Axis:";
     this.label1.UseMnemonic = false;
     //
     // checkBox1
     //
     this.checkBox1.Checked         = true;
     this.checkBox1.CheckState      = System.Windows.Forms.CheckState.Checked;
     this.checkBox1.FlatStyle       = System.Windows.Forms.FlatStyle.Flat;
     this.checkBox1.Location        = new System.Drawing.Point(216, 8);
     this.checkBox1.Name            = "checkBox1";
     this.checkBox1.Size            = new System.Drawing.Size(154, 21);
     this.checkBox1.TabIndex        = 3;
     this.checkBox1.Text            = "&Opposite label alignment";
     this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
     //
     // horizBar1
     //
     //
     // horizBar1.Brush
     //
     this.horizBar1.Brush.Color = System.Drawing.Color.FromArgb(((System.Byte)(102)), ((System.Byte)(153)), ((System.Byte)(255)));
     //
     // horizBar1.Gradient
     //
     this.horizBar1.Brush.Gradient.Direction = System.Drawing.Drawing2D.LinearGradientMode.Horizontal;
     //
     // horizBar1.Gradient
     //
     this.horizBar1.Gradient.Direction = System.Drawing.Drawing2D.LinearGradientMode.Horizontal;
     //
     // horizBar1.Marks
     //
     this.horizBar1.Marks.Visible = false;
     //
     // horizBar1.Pen
     //
     this.horizBar1.Pen.Color = System.Drawing.Color.FromArgb(((System.Byte)(61)), ((System.Byte)(92)), ((System.Byte)(153)));
     this.horizBar1.Title     = "horizBar1";
     //
     // horizBar1.XValues
     //
     this.horizBar1.XValues.DataMember = "X";
     //
     // horizBar1.YValues
     //
     this.horizBar1.YValues.DataMember = "Bar";
     this.horizBar1.YValues.Order      = Steema.TeeChart.Styles.ValueListOrder.Ascending;
     //
     // Axis_LabelAlign
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(440, 333);
     this.Name = "Axis_LabelAlign";
     this.panel1.ResumeLayout(false);
     this.ResumeLayout(false);
 }
        public ServerStatus()
        {
            tChart1        = new Chart();
            this.horizBar1 = new Steema.TeeChart.Styles.HorizBar();
            this.horizBar2 = new Steema.TeeChart.Styles.HorizBar();
            this.tChart2   = new Chart();
            this.calendar1 = new Steema.TeeChart.Styles.Calendar();
            this.tChart3   = new Chart();
            this.horizBar3 = new Steema.TeeChart.Styles.HorizBar();
            this.horizBar4 = new Steema.TeeChart.Styles.HorizBar();
            this.horizBar5 = new Steema.TeeChart.Styles.HorizBar();
            // tChart1
            this.tChart1.Aspect.ColorPaletteIndex     = 21;
            this.tChart1.Aspect.View3D                = false;
            this.tChart1.Axes.Visible                 = false;
            this.tChart1.Header.AdjustFrame           = false;
            this.tChart1.Header.Brush.Color           = Color.FromRgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.tChart1.Header.Font.Brush.Color      = Color.Gray;
            this.tChart1.Header.Font.Name             = "Segoe UI";
            this.tChart1.Header.Font.Size             = 18;
            this.tChart1.Header.Lines                 = new string[] { "Server Status" };
            this.tChart1.Header.Pen.Color             = Color.FromRgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
            this.tChart1.Header.Transparent           = false;
            this.tChart1.Legend.Visible               = false;
            this.tChart1.Panel.Brush.Color            = Color.FromRgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.tChart1.Panel.Brush.Gradient.Visible = false;
            this.tChart1.Series.Add(this.horizBar1);
            this.tChart1.Series.Add(this.horizBar2);
            this.tChart1.Walls.Visible = false;
            this.tChart1.AfterDraw    += new Steema.TeeChart.PaintChartEventHandler(this.tChart1_AfterDraw);
            // horizBar1
            this.horizBar1.BarRound           = Steema.TeeChart.Styles.BarRounding.AtValue;
            this.horizBar1.Brush.Color        = Color.FromRgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.horizBar1.Color              = Color.FromRgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.horizBar1.ColorEach          = false;
            this.horizBar1.Marks.Visible      = false;
            this.horizBar1.MultiBar           = Steema.TeeChart.Styles.MultiBars.None;
            this.horizBar1.Pen.Color          = Color.FromRgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
            this.horizBar1.Title              = "horizBar1";
            this.horizBar1.XValues.DataMember = "X";
            this.horizBar1.YValues.DataMember = "Bar";
            this.horizBar1.YValues.Order      = Steema.TeeChart.Styles.ValueListOrder.Ascending;
            // horizBar2
            this.horizBar2.BarRound               = Steema.TeeChart.Styles.BarRounding.AtValue;
            this.horizBar2.Brush.Color            = Color.FromRgb(((int)(((byte)(243)))), ((int)(((byte)(156)))), ((int)(((byte)(53)))));
            this.horizBar2.Color                  = Color.FromRgb(((int)(((byte)(243)))), ((int)(((byte)(156)))), ((int)(((byte)(53)))));
            this.horizBar2.ColorEach              = true;
            this.horizBar2.Marks.Arrow.Visible    = false;
            this.horizBar2.Marks.ArrowLength      = -34;
            this.horizBar2.Marks.Brush.Visible    = false;
            this.horizBar2.Marks.Font.Bold        = true;
            this.horizBar2.Marks.Font.Brush.Color = Color.FromRgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.horizBar2.Marks.Style            = Steema.TeeChart.Styles.MarksStyles.Percent;
            this.horizBar2.Marks.Transparent      = true;
            this.horizBar2.Pen.Color              = Color.FromRgb(((int)(((byte)(146)))), ((int)(((byte)(94)))), ((int)(((byte)(32)))));
            this.horizBar2.Title                  = "horizBar2";
            this.horizBar2.YValues.Order          = Steema.TeeChart.Styles.ValueListOrder.Ascending;
            // tChart2
            this.tChart2.Aspect.ColorPaletteIndex      = 21;
            this.tChart2.Footer.Font.Brush.Color       = Color.Blue;
            this.tChart2.Header.Visible                = false;
            this.tChart2.Legend.Visible                = false;
            this.tChart2.Panel.Bevel.Outer             = Steema.TeeChart.Drawing.BevelStyles.None;
            this.tChart2.Panel.Brush.Color             = Color.White;
            this.tChart2.Panel.Brush.Gradient.EndColor = Color.White;
            this.tChart2.Series.Add(this.calendar1);
            this.tChart2.Walls.Back.Brush.Gradient.EndColor = Color.White;
            // calendar1
            this.calendar1.ColorEach          = false;
            this.calendar1.ColorMember        = "Colors";
            this.calendar1.Date               = new System.DateTime(2015, 3, 9, 0, 0, 0, 0);
            this.calendar1.DayOneColumn       = 7;
            this.calendar1.DayOneRow          = 3;
            this.calendar1.Legend.Visible     = false;
            this.calendar1.Pen.Visible        = false;
            this.calendar1.Title              = "calendar1";
            this.calendar1.XValues.DataMember = "X";
            this.calendar1.XValues.Order      = Steema.TeeChart.Styles.ValueListOrder.Ascending;
            this.calendar1.YValues.DataMember = "Y";
            this.calendar1.Change            += new Steema.TeeChart.Styles.Calendar.CalendarChangeEventHandler(this.calendar1_Change);
            // tChart3
            this.tChart3.Aspect.ColorPaletteIndex            = 21;
            this.tChart3.Aspect.View3D                       = false;
            this.tChart3.Axes.Bottom.AxisPen.Width           = 1;
            this.tChart3.Axes.Bottom.Labels.Font.Brush.Color = Color.Gray;
            this.tChart3.Axes.Bottom.Labels.Font.Name        = "Segoe UI";
            this.tChart3.Axes.Left.AxisPen.Visible           = false;
            this.tChart3.Axes.Left.Grid.Visible              = false;
            this.tChart3.Axes.Left.Labels.Font.Brush.Color   = Color.Gray;
            this.tChart3.Axes.Left.Labels.Font.Name          = "Segoe UI";
            this.tChart3.Axes.Left.MinorTicks.Visible        = false;
            this.tChart3.Axes.Left.Ticks.Color               = Color.FromRgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(128)))));
            this.tChart3.Footer.Font.Brush.Color             = Color.Blue;
            this.tChart3.Header.Alignment                    = TextAlignment.Start;
            this.tChart3.Header.Font.Brush.Color             = Color.Gray;
            this.tChart3.Header.Font.Size                    = 16;
            this.tChart3.Header.Lines                  = new string[] { "Active Servers" };
            this.tChart3.Legend.Alignment              = Steema.TeeChart.LegendAlignments.Bottom;
            this.tChart3.Legend.Transparent            = true;
            this.tChart3.Panel.Bevel.Outer             = Steema.TeeChart.Drawing.BevelStyles.None;
            this.tChart3.Panel.Brush.Color             = Color.FromRgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.tChart3.Panel.Brush.Gradient.EndColor = Color.White;
            this.tChart3.Panel.Brush.Gradient.Visible  = false;
            this.tChart3.Panel.MarginBottom            = 1D;
            this.tChart3.Panel.MarginLeft              = 2D;
            this.tChart3.Panel.MarginRight             = 2D;
            this.tChart3.Panel.MarginTop               = 2D;
            this.tChart3.Series.Add(this.horizBar3);
            this.tChart3.Series.Add(this.horizBar4);
            this.tChart3.Series.Add(this.horizBar5);
            this.tChart3.Walls.Back.Brush.Gradient.EndColor = Color.White;
            this.tChart3.Walls.Back.Visible = false;
            // horizBar3
            this.horizBar3.BarRound           = Steema.TeeChart.Styles.BarRounding.AtValue;
            this.horizBar3.Brush.Color        = Color.FromRgb(((int)(((byte)(220)))), ((int)(((byte)(92)))), ((int)(((byte)(5)))));
            this.horizBar3.Color              = Color.FromRgb(((int)(((byte)(220)))), ((int)(((byte)(92)))), ((int)(((byte)(5)))));
            this.horizBar3.ColorEach          = false;
            this.horizBar3.Marks.Visible      = false;
            this.horizBar3.Pen.Color          = Color.FromRgb(((int)(((byte)(132)))), ((int)(((byte)(55)))), ((int)(((byte)(3)))));
            this.horizBar3.Title              = "Server 1";
            this.horizBar3.XValues.DataMember = "X";
            this.horizBar3.YValues.DataMember = "Bar";
            this.horizBar3.YValues.Order      = Steema.TeeChart.Styles.ValueListOrder.Ascending;
            // horizBar4
            this.horizBar4.BarRound           = Steema.TeeChart.Styles.BarRounding.AtValue;
            this.horizBar4.Brush.Color        = Color.FromRgb(((int)(((byte)(255)))), ((int)(((byte)(172)))), ((int)(((byte)(0)))));
            this.horizBar4.Color              = Color.FromRgb(((int)(((byte)(255)))), ((int)(((byte)(172)))), ((int)(((byte)(0)))));
            this.horizBar4.ColorEach          = false;
            this.horizBar4.Marks.Visible      = false;
            this.horizBar4.Pen.Color          = Color.FromRgb(((int)(((byte)(153)))), ((int)(((byte)(103)))), ((int)(((byte)(0)))));
            this.horizBar4.Title              = "Server 2";
            this.horizBar4.XValues.DataMember = "X";
            this.horizBar4.YValues.DataMember = "Bar";
            this.horizBar4.YValues.Order      = Steema.TeeChart.Styles.ValueListOrder.Ascending;
            // horizBar5
            this.horizBar5.BarRound           = Steema.TeeChart.Styles.BarRounding.AtValue;
            this.horizBar5.Brush.Color        = Color.FromRgb(((int)(((byte)(110)))), ((int)(((byte)(197)))), ((int)(((byte)(184)))));
            this.horizBar5.Color              = Color.FromRgb(((int)(((byte)(110)))), ((int)(((byte)(197)))), ((int)(((byte)(184)))));
            this.horizBar5.ColorEach          = false;
            this.horizBar5.Marks.Visible      = false;
            this.horizBar5.Pen.Color          = Color.FromRgb(((int)(((byte)(66)))), ((int)(((byte)(118)))), ((int)(((byte)(110)))));
            this.horizBar5.Title              = "Server 3";
            this.horizBar5.XValues.DataMember = "X";
            this.horizBar5.YValues.DataMember = "Bar";
            this.horizBar5.YValues.Order      = Steema.TeeChart.Styles.ValueListOrder.Ascending;

            tChart1.Panel.Gradient.Visible = false;
            tChart2.Panel.Gradient.Visible = false;
            tChart3.Panel.Gradient.Visible = false;

            double[] h1Vals = new double[] { 100, 100, 100, 100, 100 };
            horizBar1.Add(h1Vals);
            double[] h2Vals = new double[] { 60, 85, 40, 55, 50 };
            horizBar2.Add(h2Vals);

            horizBar3.FillSampleValues(3);
            horizBar4.FillSampleValues(3);
            horizBar5.FillSampleValues(3);
            horizBar3.Labels[0] = "Speed";
            horizBar3.Labels[1] = "Time";
            horizBar3.Labels[2] = "Visitors";

            calendar1.FillSampleValues();
            calendar1.Date              = DateTime.Now;
            calendar1.Today.Color       = Steema.TeeChart.Themes.LookoutTheme.SeawashPalette[9];
            calendar1.Sunday.Color      = Steema.TeeChart.Themes.LookoutTheme.SeawashPalette[10];
            calendar1.Sunday.Font.Color = Color.Black;

            this.tChart1.Aspect.ZoomText = true;
            this.tChart2.Aspect.ZoomText = true;
            this.tChart3.Aspect.ZoomText = true;

            chartView1 = new ChartView
            {
                VerticalOptions   = LayoutOptions.FillAndExpand,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                WidthRequest      = 25,
                HeightRequest     = 25
            };
            chartView1.Model = tChart1;

            chartView2 = new ChartView
            {
                VerticalOptions   = LayoutOptions.FillAndExpand,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                WidthRequest      = 25,
                HeightRequest     = 25
            };
            chartView2.Model = tChart2;

            chartView3 = new ChartView
            {
                VerticalOptions   = LayoutOptions.FillAndExpand,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                WidthRequest      = 25,
                HeightRequest     = 25
            };
            chartView3.Model = tChart3;

            Grid grid = new Grid
            {
                VerticalOptions = LayoutOptions.FillAndExpand,
                Padding         = 5,
                RowDefinitions  =
                {
                    new RowDefinition {
                        Height = new GridLength(1, GridUnitType.Star)
                    },
                    new RowDefinition {
                        Height = new GridLength(1, GridUnitType.Star)
                    }
                },
                ColumnDefinitions =
                {
                    new ColumnDefinition {
                        Width = new GridLength(1, GridUnitType.Star)
                    },
                    new ColumnDefinition {
                        Width = new GridLength(1, GridUnitType.Star)
                    }
                }
            };

            grid.Children.Add(chartView1, 0, 0);
            grid.Children.Add(chartView2, 1, 0);
            grid.Children.Add(chartView3, 0, 2, 1, 2);

            // Build the page.
            this.Content = grid;
        }
        /// <summary>
        /// Method to draw frequency bar chart from the datatable
        /// </summary>
        /// <param name="dataTable">DataTable with the source data</param>
        /// <param name="chart">Chart to insert bars into</param>
        private void DrawBarsFromDataTable(DataTable dataTable, Steema.TeeChart.TChart chart)
        {
            chart.Series.RemoveAllSeries();
            Steema.TeeChart.Styles.HorizBar barSeriesBar;
            barSeriesBar = new Steema.TeeChart.Styles.HorizBar();
            barSeriesBar.MultiBar = Steema.TeeChart.Styles.MultiBars.SideAll;
            barSeriesBar.ColorEach = true;
            barSeriesBar.Marks.Style = Steema.TeeChart.Styles.MarksStyles.LabelValue;
            if (this.ToolStripMenuToggleMarks.Checked)
            {
                barSeriesBar.Marks.Visible = true;
            }
            else
            {
                barSeriesBar.Marks.Visible = false;
            }

            foreach (DataRow dataRow in dataTable.Rows)
            {
                double temp;
                try
                {
                    temp = Convert.ToDouble(dataRow[1]);
                }
                catch
                {
                    temp = 0;
                }
                if (this.ToolStripMenuItemAbsolute.Checked)
                {
                    barSeriesBar.Add(temp, dataRow[0].ToString());
                }
                else
                {
                    if ((temp != 0) && (this.rowCount != 0))
                    {
                        temp = Math.Round(((temp / (double)this.rowCount) * 100), 2);
                        barSeriesBar.Add(temp, dataRow[0].ToString());
                    }
                    else
                    {
                        barSeriesBar.Add(0, dataRow[0].ToString());
                    }
                }
                chart.Series.Add(barSeriesBar);
            }
        }
Пример #11
0
        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);
        }
        /// <summary>
        /// Method to draw frequency bar graph from the datatable
        /// </summary>
        /// <param name="dataTable">DataTable with the source data</param>
        /// <param name="chart">Chart to insert bars into</param>
        private void DrawBarsFromDataTable(ArrayList categoriesFrequency, Steema.TeeChart.TChart chart)
        {
            chart.Series.RemoveAllSeries();
            Steema.TeeChart.Styles.HorizBar barSeriesBar;
            barSeriesBar = new Steema.TeeChart.Styles.HorizBar();
            barSeriesBar.MultiBar = Steema.TeeChart.Styles.MultiBars.SideAll;
            barSeriesBar.ColorEach = true;
            barSeriesBar.Marks.Style = Steema.TeeChart.Styles.MarksStyles.LabelValue;
            if (this.ToolStripMenuItemToggleMarks.Checked)
            {
                barSeriesBar.Marks.Visible = true;
            }
            else
            {
                barSeriesBar.Marks.Visible = false;
            }

            foreach (CategoryFrequency catFrequency in categoriesFrequency)
            {
                double temp;
                try
                {
                    temp = Convert.ToDouble(catFrequency.count);
                }
                catch
                {
                    temp = 0;
                }
                if (this.ToolStripMenuItemAbsolute.Checked)
                {
                    barSeriesBar.Add(temp, catFrequency.key);
                }
                else
                {
                    if ((temp != 0) && (this.rowCount != 0))
                    {
                        temp = Math.Round(((temp / (double)this.rowCount) * 100), 2);
                        barSeriesBar.Add(temp, catFrequency.key);
                    }
                    else
                    {
                        barSeriesBar.Add(0, catFrequency.key);
                    }
                }
                chart.Series.Add(barSeriesBar);
            }
        }