Beispiel #1
0
        /// <summary>
        /// Used with WebChart
        /// </summary>
        /// <param name="tChart1"></param>
        /// <param name="table"></param>
        /// <param name="columnName"></param>
        /// <param name="avg"></param>
        /// <returns></returns>
        static Steema.TeeChart.Styles.Line TChartSeries(Chart tChart1, DataTable table, string columnName, double avg)
        {
            Steema.TeeChart.Styles.Line series1 = new Steema.TeeChart.Styles.Line();
            series1.XValues.DateTime  = true;
            series1.ShowInLegend      = true;
            series1.Pointer.Visible   = true;
            series1.Pointer.HorizSize = 2;
            series1.Pointer.VertSize  = 2;
            Color[] colors = { Color.Red, Color.Green, Color.Blue, Color.Black, Color.Orange, Color.Orange, Color.AliceBlue, Color.Aquamarine, Color.Beige, Color.DarkGreen, Color.Purple };

            if (tChart1.Series.Count < colors.Length)
            {
//        series1.Color = colors[tChart1.Series.Count];
            }
            series1.Title = columnName;

            int sz = table.Rows.Count;

            for (int i = 0; i < sz; i++)
            {
                DateTime date = (DateTime)table.Rows[i][0];
                if (table.Rows[i][columnName] != System.DBNull.Value)
                {
                    double val = (double)table.Rows[i][columnName];
                    series1.Add((double)date.ToOADate(), val);
                }
                else
                {
                    series1.Add((double)date.ToOADate(), avg, Color.Transparent);
                }
            }
            return(series1);
        }
Beispiel #2
0
        public Steema.TeeChart.Styles.Line CreateSeries(DataTable table, string columnName, TimeInterval interval, bool showBadData)
        {
            Steema.TeeChart.Styles.Line series1 = new Steema.TeeChart.Styles.Line();

            double avg = AverageOfColumn(table, columnName, interval, showBadData);

            series1.XValues.DateTime  = true;
            series1.ShowInLegend      = true;
            series1.Pointer.Visible   = true;
            series1.Pointer.HorizSize = 2;
            series1.Pointer.VertSize  = 2;

            Color[] colors = { Color.Red,        Color.Green,     Color.Blue,      Color.Black,     Color.Orange,
                               Color.Aquamarine, Color.DarkGreen, Color.Purple,    Color.Aqua,
                               Color.BlueViolet, Color.Brown,     Color.BurlyWood, Color.CadetBlue,
                               Color.Chartreuse, Color.Chocolate, Color.Coral,     Color.CornflowerBlue };

            if (chart1.Series.Count < colors.Length)
            {
                series1.Color = colors[chart1.Series.Count];
            }

            series1.Title = columnName;

            int sz = table.Rows.Count;

            for (int i = 0; i < sz; i++)
            {
                DateTime date = (DateTime)table.Rows[i][0];

                bool plotPoint = true;
                if (interval == TimeInterval.Irregular)
                {
                    string flag = " ";
                    int    idx  = table.Columns.IndexOf(columnName);
                    idx++; // flag column is next
                    if (!showBadData && table.Rows[i][idx] != DBNull.Value)
                    {
                        flag      = table.Rows[i][idx].ToString().Trim();
                        plotPoint = (flag == "" || flag == " " || flag == "e");
                    }
                }
                if (table.Rows[i][columnName] != System.DBNull.Value && plotPoint)
                {
                    double val = (double)table.Rows[i][columnName];
                    series1.Add((double)date.ToOADate(), val);
                }
                else
                {
                    series1.Add((double)date.ToOADate(), avg, Color.Transparent);
                }
            }

            return(series1);
        }
Beispiel #3
0
        private void timer1_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
        {
            timer1.Stop();

            Random rIdx = new Random(lineSeries1.Count);
            int    rnd  = 0;

            if ((idx1 < 1) && ((lineSeries1.LastVisibleIndex - lineSeries1.FirstVisibleIndex) > 40))
            {
                rnd  = rIdx.Next((int)((lineSeries1.LastVisibleIndex - lineSeries1.FirstVisibleIndex)));
                idx1 = lineSeries1.FirstVisibleIndex + rnd;
            }

            if (lineSeries1.Count > 360)
            {
                if (lineSeries1.XValues.Last > 540)
                {
                    if (deltaUp)
                    {
                        lineSeries1.Add(lineSeries1.XValues.Last + 1, lineSeries1.YValues.Last + r.Next(-5, 45));
                        if (lineSeries1.YValues.Last > 54)
                        {
                            deltaUp = false;
                        }
                    }
                    else
                    {
                        lineSeries1.Add(lineSeries1.XValues.Last + 1, lineSeries1.YValues.Last + r.Next(-45, 5));
                        if (lineSeries1.YValues.Last < -54)
                        {
                            deltaUp = true;
                        }
                    }
                }
                else
                {
                    lineSeries1.Add(lineSeries1.XValues.Last + 1, 100.0 * Math.Sin((lineSeries1.XValues.Last - 360) * Math.PI / 180));
                }
                lineSeries1.Delete(0, 1);
                idx1--;
                tChart1.Axes.Bottom.Scroll(1, false);
            }
            else
            {
                lineSeries1.Add(100.0 * Math.Sin(lineSeries1.Count * Math.PI / 180));
            }

            if (idx1 < lineSeries1.FirstVisibleIndex)
            {
                idx1 = -1;
            }

            timer1.Start();
        }
        public AxisFirstLastLabels()
        {
            // This call is required by the Windows Form Designer.
            InitializeComponent();

            line1.Clear();
            line1.Add(123, "First");
            line1.Add(456, "Second");
            line1.Add(321, "Third");
            line1.Add(234, "Last");


            tChart1.Axes.Bottom.GetAxisDrawLabel += new Steema.TeeChart.GetAxisDrawLabelEventHandler(Bottom_GetAxisDrawLabel);
        }
Beispiel #5
0
        private void LoadRatingTable(TimeSeriesDatabaseDataSet.RatingTableDataTable[] ratingTables)
        {
            tChart1.Series.Clear();

            var ratingTable = ratingTables[0];

            // label axis using first series only
            tChart1.Axes.Bottom.Title.Text = ratingTable.XUnits;
            tChart1.Axes.Left.Title.Text   = ratingTable.YUnits;
            tChart1.Legend.Visible         = true;
            for (int j = 0; j < ratingTables.Length; j++)
            {
                var s = new Steema.TeeChart.Styles.Line();
                tChart1.Series.Add(s);
                s.Title        = ratingTables[j].Name;
                s.ShowInLegend = true;
                ratingTable    = ratingTables[j];
                for (int i = 0; i < ratingTable.Count; i++)
                {
                    double x = ratingTable[i].x;
                    double y = ratingTable[i].y;
                    s.Add(x, y);
                }
            }
        }
        public Log_CustomIncrement()
        {
            // This call is required by the Windows Form Designer.
            InitializeComponent();

            // major ticks = labels
            majors[0] = 0.1;
            majors[1] = 0.2;
            majors[2] = 0.5;
            majors[3] = 1.0;

            // two minors between each major tick
            minors[0] = 0.12;
            minors[1] = 0.17;

            minors[2] = 0.30;
            minors[3] = 0.38;

            minors[4] = 0.55;
            minors[5] = 0.7;

            for (int t = 0; t < 100; t++)
            {
                line1.Add(t, 2.0E-3 * (5 * t - 50) * (2 * t - 10) + 5.0);
            }
        }
Beispiel #7
0
 private void Emt_Load(object sender, EventArgs e)
 {
     tChart1.Header.Text = "�����ʾ�A";
     Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line();
     line1.Add(data);
     tChart1.Series.Add(line1);
 }
Beispiel #8
0
        public Function_Smoothing()
        {
            // This call is required by the Windows Form Designer.
            InitializeComponent();

            line1.Clear();
            line1.Add(new int[] { 4, 9, 5, 7, 2, 12, 15 });
            line1.RefreshSeries();
        }
Beispiel #9
0
        private static void LoadSeriesData(DataTable table, string columnName, double avg, Steema.TeeChart.Styles.Line series1)
        {
            series1.Title = columnName;
            int sz = table.Rows.Count;

            for (int i = 0; i < sz; i++)
            {
                DateTime date = (DateTime)table.Rows[i][0];
                if (table.Rows[i][columnName] != System.DBNull.Value)
                {
                    double val = Convert.ToDouble(table.Rows[i][columnName]);
                    series1.Add(date, val);
                }
                else
                {
                    series1.Add(date, avg, Color.Transparent);
                }
            }
        }
Beispiel #10
0
        private void Realtime_Load(object sender, System.EventArgs e)
        {
            tChart1.Axes.Bottom.Increment = 5;

            // add one sample value to each Series
            lineSeries1.Add(1000);
            lineSeries2.Add(1000);
            lineSeries3.Add(1000);
            lineSeries4.Add(1000);
        }
Beispiel #11
0
        public static void testline(DrawPoint point, Color color, TChart chart)
        {
            int i = 0;

            Steema.TeeChart.Styles.Line Tmpline = new Steema.TeeChart.Styles.Line(chart.Chart);
            for (i = 0; i < point.count; i++)
            {
                Tmpline.Add(point.x[i], point.y[i]);
            }
            Tmpline.Color = color; //LineSeries bounding lines colour
        }
Beispiel #12
0
        private void addDataToChart(byte a, byte b, byte c, byte d)
        {
            timerDrawI++;
            red.Add(timerDrawI, a * 256 + b);
            blue.Add(timerDrawI, c * 256 + d);

            if (timerDrawI >= 1000)
            {
                red.Delete(0);
                blue.Delete(0);
            }
        }
Beispiel #13
0
        public Axis_Items()
        {
            // This call is required by the Windows Form Designer.
            InitializeComponent();

            int[] values = { 200, 0, 123, 300, 260, -100, 650, 400 };
            line1.Add(values);

            AddCustomLabels();

            SetDemoControls();

            numericUpDown2.Value = 123;
        }
Beispiel #14
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            var view = inflater.Inflate(Resource.Layout.ExchangeFragment, container, false);

            context = view.Context;

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

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

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

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

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

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

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

            //chart.Header.Color = Color.OrangeRed;
            chart.Header.Font.Color = Color.OrangeRed;
            layout.AddView(chart, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, 600));
            return(view);
        }
Beispiel #15
0
        private static void ReadIntoTChart(Series series1, Steema.TeeChart.Styles.Line tSeries)
        {
            tSeries.Clear();
            tSeries.XValues.DateTime = true;

            for (int i = 0; i < series1.Count; i++)
            {
                if (!series1[i].IsMissing)
                {
                    tSeries.Add(series1[i].DateTime, series1[i].Value);
                }
                //tSeries[tSeries.Count - 1].Label ="";
                //tSeries.Marks.Items[tSeries.Count - 1].Text = "\n";
                if (tSeries.Count > 0)
                {
                    tSeries.Marks.Items[tSeries.Count - 1].Visible = false;
                }
            }
        }
Beispiel #16
0
        private static void ReadIntoTChart(Series series1, Steema.TeeChart.Styles.Line tSeries, bool rightAxis = false)
        {
            tSeries.Clear();
            tSeries.XValues.DateTime = true;

            for (int i = 0; i < series1.Count; i++)
            {
                if (!series1[i].IsMissing)
                {
                    tSeries.Add(series1[i].DateTime, series1[i].Value);
                }
                if (tSeries.Count > 0)
                {
                    tSeries.Marks.Items[tSeries.Count - 1].Visible = false;
                }
            }
            if (rightAxis)
            {
                tSeries.VertAxis = Steema.TeeChart.Styles.VerticalAxis.Right;
            }
        }
        private void InitializeChart()
        {
            tChart1.Aspect.View3D    = false;
            tChart1.Series.Add(line1 = new Steema.TeeChart.Styles.Line());
            tChart1.Series.Add(line2 = new Steema.TeeChart.Styles.Line());

            line1.FillSampleValues();
            for (int i = 0; i < line1.Count; i++)
            {
                line2.Add(line1.XValues[i], line1.YValues[i] / 2.0);
            }

            tChart1.Tools.Add(seriesBandTool1 = new Steema.TeeChart.Tools.SeriesBandTool());
            seriesBandTool1.Series            = line1;
            seriesBandTool1.Series2           = line2;

            line1.LinePen.Width = 3;
            line2.LinePen.Width = 3;

            seriesBandTool1.Gradient.Visible    = true;
            seriesBandTool1.Gradient.StartColor = Color.Silver;
        }
Beispiel #18
0
        public Axis_Isometric()
        {
            // This call is required by the Windows Form Designer.
            InitializeComponent();

            tChart1.Axes.Left.Grid.Style        = System.Drawing.Drawing2D.DashStyle.Solid;
            tChart1.Axes.Left.Grid.Color        = Color.Black;
            tChart1.Axes.Left.Increment         = 50.0;
            tChart1.Axes.Left.Labels.Separation = 0;

            tChart1.Axes.Bottom.Grid.Style        = System.Drawing.Drawing2D.DashStyle.Solid;
            tChart1.Axes.Bottom.Grid.Color        = Color.Black;
            tChart1.Axes.Bottom.Increment         = 50.0;
            tChart1.Axes.Bottom.Labels.Separation = 0;

            Random r = new Random();

            for (int i = 1; i <= 100; i++)
            {
                line1.Add(i, r.Next(1, 100));
            }
        }
Beispiel #19
0
        private void FillCorrelation(Series s1, Series s2, Steema.TeeChart.Styles.Line series1)
        {
            series1.XValues.DateTime = false;
            int sz = s1.Count;

            for (int i = 0; i < s1.Count; i++)
            {
                Point pt = s1[i];

                if (!pt.IsMissing)
                {
                    int idx = s2.IndexOf(pt.DateTime);
                    if (idx >= 0)
                    {
                        Point pt2 = s2[idx];
                        if (!pt2.IsMissing)
                        {
                            series1.Add(pt.Value, pt2.Value);
                        }
                    }
                }
            }
        }
        public void SetColumn(int Col, string Name, string Units, string[] Values)
        {
            if (Name == "Depth")
            {
                CumThicknessMidPoints = SoilComponentUtility.ToMidPoints(SoilComponentUtility.ToThickness(Values));
            }
            else if (Values.Length == CumThicknessMidPoints.Length)
            {
                Steema.TeeChart.Styles.Line NewSeries = new Steema.TeeChart.Styles.Line();
                Chart.Series.Add(NewSeries);

                NewSeries.Title         = Name;
                NewSeries.HorizAxis     = Steema.TeeChart.Styles.HorizontalAxis.Top;
                NewSeries.YValues.Order = Steema.TeeChart.Styles.ValueListOrder.None;
                NewSeries.XValues.Order = Steema.TeeChart.Styles.ValueListOrder.None;
                for (int i = 0; i < Values.Length; i++)
                {
                    if (Values[i] != "")
                    {
                        NewSeries.Add(Convert.ToDouble(Values[i]), CumThicknessMidPoints[i]);
                    }
                }
            }
        }
        public EquilibriumPath(Model model, double eps)
        {
            InitializeComponent();



            Steema.TeeChart.Styles.Line lineNL = new Steema.TeeChart.Styles.Line();
            lineNL.Title = "Нелінійна задача";
            lineNL.Color = Color.Red;
            tChart1.Series.Add(lineNL);

            Steema.TeeChart.Styles.Line lineL = new Steema.TeeChart.Styles.Line();
            lineL.Title = "Лінійна задача";
            lineL.Color = Color.Blue;
            tChart1.Series.Add(lineL);

            Vector alfa = new Vector(3);

            alfa[0] = model.shape.L;
            alfa[1] = alfa[2] = 0;
            int iter = 0;

            for (double load = 0; load < 1000; load += 20)
            {
                Force F = new Force((-1) * load, model.shape.H);

                model.load.F1[0] = F.F10;
                model.load.F1[1] = F.F11;
                model.load.F1[2] = F.F12;
                model.load.F3[0] = F.F30;
                model.load.F3[1] = F.F31;
                model.load.F3[2] = F.F32;
                Vector uDiscreteL  = SolidMechanicSolver.Solve(model, eps, true, out iter);
                Vector uDiscreteNL = SolidMechanicSolver.Solve(model, eps, false, out iter);

                if (iter < 1000)
                {
                    ApproximationResult resultNL = new ApproximationResult(model.shape, uDiscreteNL);
                    lineNL.Add(Vector.Norm(resultNL.U(alfa)), load);
                    ApproximationResult resultL = new ApproximationResult(model.shape, uDiscreteL);
                    lineL.Add(Vector.Norm(resultL.U(alfa)), load);
                }
                else
                {
                    break;
                }
            }

            /*
             */

            /*
             * for (int i = 20; i <= 200; i += 20)
             * {
             *  model.mesh = new Mesh(model.shape, i);
             *
             *
             *  lineAnalit.Add(i, Vector.Norm(analitical.U(alfa)));
             *  line.Add(i, Vector.Norm(result.U(alfa)));
             * }
             */
        }
Beispiel #22
0
        private void button1_Click(object sender, EventArgs e)
        {
            tChart1.Series.Clear();
            double E   = double.Parse(Etxt.Text);   //модуль Юнга
            double v   = double.Parse(Vtxt.Text);   //коефіцієнт Пуасона
            double h   = double.Parse(Htxt.Text);   //товщина
            int    N   = int.Parse(Ntxt.Text);      //к-сть розбиттів
            double l   = double.Parse(Ltxt.Text);   //довжина
            double K   = double.Parse(Ktxt.Text);   //кривизна
            double eps = double.Parse(EPStxt.Text); //точність

            sigma = double.Parse(Ftxt.Text);
            int count = 6 * (N + 1);

            model = new Model(E, v, h, l, K, N);

            load = sigma;//(-1)*CountLoad(sigma);
            Force F = new Force(load, h);

            model.load.F1[0] = F.F10;
            model.load.F1[1] = F.F11;
            model.load.F1[2] = F.F12;
            model.load.F3[0] = F.F30;
            model.load.F3[1] = F.F31;
            model.load.F3[2] = F.F32;

            bool linear = false;

            if (checkBox1.Checked)
            {
                linear = true;
            }


            int    iter      = 0;
            Vector uDiscrete = SolidMechanicSolver.Solve(model, eps, linear, out iter);

            txtNorm.Text += "Ітерацій: " + iter + "\r\nРозбиття: " + N + "\r\n";

            ApproximationResult result     = new ApproximationResult(model.shape, uDiscrete);
            AnaliticalMarchuk   analitical = new AnaliticalMarchuk(l, h, E, v, load);

            //AnaliticalMukha analitical = new AnaliticalMukha(l, h, E, v, load);

            Steema.TeeChart.Styles.Line lineU1 = new Steema.TeeChart.Styles.Line();
            lineU1.Title = "U1";
            lineU1.Color = Color.Red;
            tChart1.Series.Add(lineU1);

            Steema.TeeChart.Styles.Line lineU3 = new Steema.TeeChart.Styles.Line();
            lineU3.Title = "U3";
            lineU3.Color = Color.Green;
            tChart1.Series.Add(lineU3);

            /*Steema.TeeChart.Styles.Line lineU1a = new Steema.TeeChart.Styles.Line();
             * lineU1a.Title = "U1 аналітичне";
             * lineU1a.Color = Color.Aqua;
             * tChart1.Series.Add(lineU1a);*/
            Steema.TeeChart.Styles.Line lineU3a = new Steema.TeeChart.Styles.Line();
            lineU3a.Title = "U3 аналітичне";
            lineU3a.Color = Color.Blue;
            tChart1.Series.Add(lineU3a);

            Vector alfa = new Vector(Constants.DIMENSION_COUNT);

            alfa[0] = model.mesh[0].Begin;
            alfa[1] = 0;
            alfa[2] = 0;
            lineU1.Add(model.mesh[0].Begin, result.U(alfa)[0]);
            lineU3.Add(model.mesh[0].Begin, result.U(alfa)[2]);
            //lineU1a.Add(model.mesh[0].Begin, analitical.U(alfa)[0]);
            lineU3a.Add(model.mesh[0].Begin, -0.01);//W2(alfa[0])); //analitical.U(alfa)[2]); //W2(alfa[0]));
            for (int i = 0; i < N; i++)
            {
                double xCur = model.mesh[i].End;
                alfa    = new Vector(Constants.DIMENSION_COUNT);
                alfa[0] = xCur;
                alfa[1] = 0;
                alfa[2] = 0;
                if (xCur > model.shape.L)
                {
                    xCur    = model.shape.L;
                    alfa[0] = xCur;
                }
                Vector resFEM = result.U(alfa);
                //Vector resAnalit = W2(xCur);
                lineU1.Add(xCur, resFEM[0]);
                lineU3.Add(xCur, resFEM[2]);
                //lineU1a.Add(xCur, analitical.U(alfa)[0]);
                //lineU3a.Add(xCur, analitical.U(alfa)[2]);
                //lineU1a.Add(xCur, resAnalit[0]);
                //lineU3a.Add(xCur, W2(xCur));
            }


            dataGridView1.RowCount        = 1;
            dataGridView1.ColumnCount     = 5;
            dataGridView1.Columns[0].Name = "alfa1";
            dataGridView1.Columns[1].Name = "U1";
            dataGridView1.Columns[2].Name = "U1_analitical";
            dataGridView1.Columns[3].Name = "U3";
            dataGridView1.Columns[4].Name = "U3_analitical";



            double alfaCur = model.mesh[0].Begin;

            alfa[0] = alfaCur;
            alfa[1] = 0;
            alfa[2] = 0;
            List <string> row = new List <string>();

            row.Add(alfaCur.ToString());
            row.Add(result.U(alfa)[0].ToString("0.0000000000"));
            row.Add(analitical.U(alfa)[0].ToString("0.0000000000"));
            row.Add(result.U(alfa)[2].ToString("0.0000000000"));
            row.Add(analitical.U(alfa)[2].ToString("0.0000000000"));
            //row.Add(W2(alfa[0]).ToString("0.0000000000"));
            dataGridView1.Rows.Add(row.ToArray());

            for (int i = 0; i < N; i++)
            {
                alfaCur = model.mesh[i].End;
                alfa    = new Vector(Constants.DIMENSION_COUNT);
                alfa[0] = alfaCur;
                alfa[1] = 0;
                alfa[2] = 0;
                if (alfaCur > model.shape.L)
                {
                    alfaCur = model.shape.L;
                    alfa[0] = alfaCur;
                }
                row = new List <string>();
                row.Add(alfaCur.ToString());
                row.Add(result.U(alfa)[0].ToString("0.0000000000"));
                row.Add(analitical.U(alfa)[0].ToString("0.0000000000"));
                row.Add(result.U(alfa)[2].ToString("0.0000000000"));
                //row.Add(analitical.U(alfa)[2].ToString("0.0000000000"));
                row.Add(W2(alfa[0]).ToString("0.0000000000"));
                dataGridView1.Rows.Add(row.ToArray());
            }
        }
Beispiel #23
0
        //
        //**********************************************************************************************
        //
        public void Scale(List<TPoint> aTop, List<TPoint> aRight, List<TPoint> aBottom, List<TPoint> aLeft)
        {
            TopBoundary = aTop;
              RightBoundary = aRight;
              BottomBoundary = aBottom;
              LeftBoundary = aLeft;

              XMax = -1.0e99;
              XMin = 1.0e99;
              YMax = -1.0e99;
              YMin = 1.0e99;

              foreach (TPoint MyPoint in TopBoundary)
              {
            if (MyPoint.X < XMin)
            {
              XMin = MyPoint.X;
            }
            if (MyPoint.X > XMax)
            {
              XMax = MyPoint.X;
            }
            if (MyPoint.Y < YMin)
            {
              YMin = MyPoint.Y;
            }
            if (MyPoint.Y > YMax)
            {
              YMax = MyPoint.Y;
            }
              }

              foreach (TPoint MyPoint in RightBoundary)
              {
            if (MyPoint.X < XMin)
            {
              XMin = MyPoint.X;
            }
            if (MyPoint.X > XMax)
            {
              XMax = MyPoint.X;
            }
            if (MyPoint.Y < YMin)
            {
              YMin = MyPoint.Y;
            }
            if (MyPoint.Y > YMax)
            {
              YMax = MyPoint.Y;
            }
              }

              foreach (TPoint MyPoint in BottomBoundary)
              {
            if (MyPoint.X < XMin)
            {
              XMin = MyPoint.X;
            }
            if (MyPoint.X > XMax)
            {
              XMax = MyPoint.X;
            }
            if (MyPoint.Y < YMin)
            {
              YMin = MyPoint.Y;
            }
            if (MyPoint.Y > YMax)
            {
              YMax = MyPoint.Y;
            }
              }

              foreach (TPoint MyPoint in LeftBoundary)
              {
            if (MyPoint.X < XMin)
            {
              XMin = MyPoint.X;
            }
            if (MyPoint.X > XMax)
            {
              XMax = MyPoint.X;
            }
            if (MyPoint.Y < YMin)
            {
              YMin = MyPoint.Y;
            }
            if (MyPoint.Y > YMax)
            {
              YMax = MyPoint.Y;
            }
              }
              MyChart.Panel.Color = BackgroundColor;
              MyChart.Panel.Brush.Color = BackgroundColor;
              MyChart.Panel.Gradient.Visible = false;
              MyChart.Panel.Shadow.Visible = false;
              MyChart.Panel.Transparent = false;
              MyChart.BackColor = BackgroundColor;
              MyChart.Legend.Visible = false;
              MyChart.Footer.Visible = false;
              MyChart.Chart.Aspect.View3D = false;
              MyChart.Panel.Pen.Color = ForegroundColor;
              MyChart.Header.Font.Color = ForegroundColor;
              MyChart.Walls.Right.Color = BackgroundColor;
              MyChart.Walls.Back.Color = BackgroundColor;
              MyChart.Walls.Visible = false;

              MyChart.Axes.Bottom.AxisPen.Color = ForegroundColor;
              MyChart.Axes.Bottom.Title.Color = ForegroundColor;
              MyChart.Axes.Bottom.Ticks.Color = ForegroundColor;
              MyChart.Axes.Bottom.Labels.Color = ForegroundColor;
              MyChart.Axes.Bottom.Grid.Color = ForegroundColor;
              MyChart.Axes.Bottom.MinorTicks.Color = ForegroundColor;
              MyChart.Axes.Bottom.Labels.Font.Color = ForegroundColor;

              MyChart.Axes.Left.AxisPen.Color = ForegroundColor;
              MyChart.Axes.Left.Title.Color = ForegroundColor;
              MyChart.Axes.Left.Ticks.Color = ForegroundColor;
              MyChart.Axes.Left.Labels.Color = ForegroundColor;
              MyChart.Axes.Left.Grid.Color = ForegroundColor;
              MyChart.Axes.Left.MinorTicks.Color = ForegroundColor;
              MyChart.Axes.Left.Labels.Font.Color = ForegroundColor;
              MyChart.Panel.Bevel.ColorOne = BackgroundColor;
              MyChart.Panel.Bevel.ColorTwo = BackgroundColor;

              MyChart.Axes.Left.Automatic = false;
              MyChart.Axes.Left.Maximum = YMax;
              MyChart.Axes.Left.Minimum = YMin;

              MyChart.Axes.Bottom.Automatic = false;
              MyChart.Axes.Bottom.Minimum = XMin;
              MyChart.Axes.Bottom.Maximum = XMax;

              MyChart.Legend.Visible = false;
              MyChart.Header.Visible = false;
              MyChart.Axes.Bottom.Title.Visible = false;
              MyChart.Axes.Left.Title.Visible = false;

              Steema.TeeChart.Styles.Line MyLine = new Steema.TeeChart.Styles.Line();
              MyLine.Add(XMin, YMin);
              MyLine.Add(XMax, YMax);
              MyChart.Series.Add(MyLine);

              MyChart.Draw();
              MyChart.Update();
              MyChart.Refresh();
              Application.DoEvents();

              HorOffset = MyChart.Axes.Bottom.IStartPos;
              HorSize = MyChart.Axes.Bottom.IEndPos - HorOffset + 2;
              VertOffset = MyChart.Axes.Left.IStartPos;
              VertSize = MyChart.Axes.Left.IEndPos - VertOffset + 2;
              MyBitmap = new Bitmap(HorSize, VertSize);

              MyGraph = Graphics.FromImage(MyBitmap);
              MyGraph.Clear(BackgroundColor);

              dX = HorSize / (XMax - XMin);
              dY = VertSize / (YMax - YMin);
        }
        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);
        }
Beispiel #25
0
        public Page1()
        {
            // NavigationPage.SetHasNavigationBar(this, false);

            dashBoard0 = new Chart();
            dashBoard0.Aspect.View3D = false;
            Steema.TeeChart.Styles.Bar  bar1  = new Steema.TeeChart.Styles.Bar();
            Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line();
            dashBoard0.Series.Add(bar1);
            dashBoard0.Series.Add(line1);
            //barline chart
            bar1.Clear();
            bar1.Add(20);
            bar1.Add(50);
            bar1.Add(10);
            bar1.Add(70);
            bar1.Add(46);
            bar1.Pen.Visible          = false;
            bar1.BarStyle             = Steema.TeeChart.Styles.BarStyles.RectGradient;
            bar1.Marks.Visible        = false;
            bar1.Gradient.StartColor  = Color.White;
            bar1.Gradient.EndColor    = Color.FromRgb(102, 205, 170);
            bar1.Marks.Visible        = true;
            bar1.Marks.Shadow.Visible = false;
            bar1.Marks.Color          = Color.White;
            bar1.Marks.Font.Size      = 10;
            bar1.Marks.Font.Color     = Color.FromRgb(102, 205, 170);
            bar1.Marks.Pen.Visible    = false;
            bar1.Marks.ArrowLength    = 5;
            bar1.Color = Color.White;

            line1.Clear();
            line1.Add(0, 45);
            line1.Add(0.444444444444444, 55);
            line1.Add(0.888888888888889, 75);
            line1.Add(1.33333333333333, 65);
            line1.Add(1.77777777777778, 45);
            line1.Add(2.22222222222222, 80);
            line1.Add(2.66666666666667, 85);
            line1.Add(3.11111111111111, 98);
            line1.Add(3.55555555555556, 75);
            line1.Add(4, 68);
            line1.Color = Color.FromRgb(255, 255, 240);

            line1.LinePen.Width = 3;
            line1.Smoothed      = true;

            dashBoard0.Panel.Color            = Color.FromRgb(102, 205, 170);
            dashBoard0.Panel.Gradient.Visible = false;
            dashBoard0.Walls.Back.Visible     = false;
            dashBoard0.Title.Text             = "Bars and Lines";
            dashBoard0.Title.Alignment        = TextAlignment.Start;
            dashBoard0.Title.Font.Size        = 12;
            dashBoard0.Title.Font.Color       = Color.White;
            //dashBoard0.Title.Font.Name = "";
            dashBoard0.Axes.Left.AxisPen.Visible     = false;
            dashBoard0.Axes.Bottom.AxisPen.Color     = Color.White;
            dashBoard0.Legend.Visible                = false;
            dashBoard0.Axes.Left.Grid.Color          = Color.White;
            dashBoard0.Axes.Left.Grid.Style          = Steema.TeeChart.Drawing.DashStyle.Dot;
            dashBoard0.Axes.Left.Labels.Font.Color   = Color.White;
            dashBoard0.Axes.Bottom.Labels.Font.Color = Color.White;
            dashBoard0.Axes.Left.Increment           = 25;

            DashView0 = new ChartView
            {
                VerticalOptions   = LayoutOptions.FillAndExpand,
                HorizontalOptions = LayoutOptions.FillAndExpand,
            };
            DashView0.Model = dashBoard0;

            Content = new StackLayout
            {
                Children =
                {
                    DashView0
                }
            };
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

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

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

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

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

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


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

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

            // Chart 2

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

            // Chart 3

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

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

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

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

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

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

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

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

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

            volume.CustomVertAxis = customAxis;

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

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


            /* Chart 4
             *
             * chart4.Aspect.View3D = false;
             * chart4.Chart.Aspect.ZoomScrollStyle = Steema.TeeChart.Drawing.Aspect.ZoomScrollStyles.Manual;
             * chart4.Panel.Gradient.Visible = false;
             * chart4.Panel.Color = UIColor.Black.CGColor;
             * chart4.Walls.Back.Transparent=true;
             * Steema.TeeChart.Styles.HorizBar series5 = new Steema.TeeChart.Styles.HorizBar();
             * series5.Add(10);
             * series5.Add(50);
             * series5.Add(30);
             * series5.Add(70);
             * //series5.BarHeightPercent=100;
             * //series5.CustomBarWidth= 80;
             * series5.ColorEach = true;
             * //series5.Pen.Width = 3;
             * //series5.Gradient.Visible = true;
             * chart4.Series.Add(series5);
             * chart4.Axes.Bottom.Visible = false;
             */
        }
        public WebAnalytics()
        {
            this.tChart3     = new Steema.TeeChart.Chart();
            this.donut3      = new Steema.TeeChart.Styles.Donut();
            this.annotation3 = new Steema.TeeChart.Tools.Annotation();
            this.tChart2     = new Steema.TeeChart.Chart();
            this.donut2      = new Steema.TeeChart.Styles.Donut();
            this.annotation2 = new Steema.TeeChart.Tools.Annotation();
            this.tChart4     = new Steema.TeeChart.Chart();
            this.line1       = new Steema.TeeChart.Styles.Line();
            this.line2       = new Steema.TeeChart.Styles.Line();
            this.line3       = new Steema.TeeChart.Styles.Line();
            this.cursorTool1 = new Steema.TeeChart.Tools.CursorTool();
            this.annotation4 = new Steema.TeeChart.Tools.Annotation();
            this.cursorTool2 = new Steema.TeeChart.Tools.CursorTool();
            this.annotation6 = new Steema.TeeChart.Tools.Annotation();
            this.cursorTool3 = new Steema.TeeChart.Tools.CursorTool();
            this.annotation8 = new Steema.TeeChart.Tools.Annotation();
            this.tChart1     = new Steema.TeeChart.Chart();
            this.donut1      = new Steema.TeeChart.Styles.Donut();
            this.annotation1 = new Steema.TeeChart.Tools.Annotation();
            this.textSource1 = new Steema.TeeChart.Data.TextSource();

            // tChart3
            this.tChart3.Aspect.Elevation               = 315;
            this.tChart3.Aspect.Orthogonal              = false;
            this.tChart3.Aspect.Perspective             = 0;
            this.tChart3.Aspect.Rotation                = 360;
            this.tChart3.Aspect.View3D                  = false;
            this.tChart3.Footer.Font.Brush.Color        = Color.Gray;
            this.tChart3.Header.Visible                 = false;
            this.tChart3.Legend.Visible                 = false;
            this.tChart3.Panel.Bevel.Outer              = Steema.TeeChart.Drawing.BevelStyles.None;
            this.tChart3.Panel.Brush.Color              = Color.White;
            this.tChart3.Panel.Brush.Gradient.EndColor  = Color.White;
            this.tChart3.Panel.Brush.Gradient.UseMiddle = false;
            this.tChart3.Series.Add(this.donut3);
            this.tChart3.Tools.Add(this.annotation3);
            this.tChart3.Walls.Back.Brush.Gradient.EndColor = Color.White;

            // donut3
            this.donut3.Brush.Color   = Color.FromRgb(((int)(((byte)(243)))), ((int)(((byte)(156)))), ((int)(((byte)(53)))));
            this.donut3.Circled       = true;
            this.donut3.Color         = Color.FromRgb(((int)(((byte)(68)))), ((int)(((byte)(102)))), ((int)(((byte)(163)))));
            this.donut3.DonutPercent  = 95;
            this.donut3.Frame.Circled = true;
            this.donut3.Frame.FrameElementPercents = new double[] {
                25D,
                60D,
                15D
            };
            this.donut3.Frame.OuterBand.Gradient.UseMiddle = false;
            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.RotationAngle       = 180;
            this.donut3.Shadow.Height       = 3;
            this.donut3.Shadow.Width        = 3;
            this.donut3.Title = "Series0";
            this.donut3.UniqueCustomRadius = true;
            this.donut3.XValues.DataMember = "Angle";
            this.donut3.XValues.Order      = Steema.TeeChart.Styles.ValueListOrder.Ascending;
            this.donut3.YValues.DataMember = "Pie";

            // annotation3
            this.annotation3.AutoSize                   = true;
            this.annotation3.Callout.ArrowHead          = Steema.TeeChart.Styles.ArrowHeadStyles.None;
            this.annotation3.Callout.ArrowHeadDirection = Steema.TeeChart.Styles.ArrowHeadDirection.FromPoint;
            this.annotation3.Callout.ArrowHeadSize      = 8;
            this.annotation3.Callout.Brush.Color        = Color.Black;
            this.annotation3.Callout.Distance           = 0;
            this.annotation3.Callout.Draw3D             = false;
            this.annotation3.Callout.SizeDouble         = 0D;
            this.annotation3.Callout.SizeUnits          = Steema.TeeChart.Styles.PointerSizeUnits.Pixels;
            this.annotation3.Callout.XPosition          = 0;
            this.annotation3.Callout.YPosition          = 0;
            this.annotation3.Callout.ZPosition          = 0;
            this.annotation3.Position                   = Steema.TeeChart.Tools.AnnotationPositions.Center;
            this.annotation3.Shape.Font.Name            = "Segoe UI";
            this.annotation3.Shape.Font.Size            = 29;
            this.annotation3.Shape.Lines                = new string[] { "$1500" };
            this.annotation3.Shape.Transparent          = true;
            this.annotation3.Text = "$1500";

            // tChart2
            this.tChart2.Aspect.Elevation               = 315;
            this.tChart2.Aspect.Orthogonal              = false;
            this.tChart2.Aspect.Perspective             = 0;
            this.tChart2.Aspect.Rotation                = 360;
            this.tChart2.Aspect.View3D                  = false;
            this.tChart2.Footer.Font.Brush.Color        = Color.Gray;
            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.Panel.Brush.Gradient.UseMiddle = false;
            this.tChart2.Series.Add(this.donut2);
            this.tChart2.Tools.Add(this.annotation2);
            this.tChart2.Walls.Back.Brush.Gradient.EndColor = Color.White;

            // donut2
            this.donut2.Brush.Color   = Color.FromRgb(((int)(((byte)(243)))), ((int)(((byte)(156)))), ((int)(((byte)(53)))));
            this.donut2.Circled       = true;
            this.donut2.Color         = Color.FromRgb(((int)(((byte)(68)))), ((int)(((byte)(102)))), ((int)(((byte)(163)))));
            this.donut2.DonutPercent  = 95;
            this.donut2.Frame.Circled = true;
            this.donut2.Frame.FrameElementPercents = new double[] {
                25D,
                60D,
                15D
            };
            this.donut2.Frame.OuterBand.Gradient.UseMiddle = false;
            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.RotationAngle       = 247;
            this.donut2.Shadow.Height       = 3;
            this.donut2.Shadow.Width        = 3;
            this.donut2.Title = "Series0";
            this.donut2.UniqueCustomRadius = true;
            this.donut2.XValues.DataMember = "Angle";
            this.donut2.XValues.Order      = Steema.TeeChart.Styles.ValueListOrder.Ascending;
            this.donut2.YValues.DataMember = "Pie";
            // annotation2
            this.annotation2.AutoSize                   = true;
            this.annotation2.Callout.ArrowHead          = Steema.TeeChart.Styles.ArrowHeadStyles.None;
            this.annotation2.Callout.ArrowHeadDirection = Steema.TeeChart.Styles.ArrowHeadDirection.FromPoint;
            this.annotation2.Callout.ArrowHeadSize      = 8;
            this.annotation2.Callout.Brush.Color        = Color.Black;
            this.annotation2.Callout.Distance           = 0;
            this.annotation2.Callout.Draw3D             = false;
            this.annotation2.Callout.SizeDouble         = 0D;
            this.annotation2.Callout.SizeUnits          = Steema.TeeChart.Styles.PointerSizeUnits.Pixels;
            this.annotation2.Callout.XPosition          = 0;
            this.annotation2.Callout.YPosition          = 0;
            this.annotation2.Callout.ZPosition          = 0;
            this.annotation2.Position                   = Steema.TeeChart.Tools.AnnotationPositions.Center;
            this.annotation2.Shape.Font.Name            = "Segoe UI";
            this.annotation2.Shape.Font.Size            = 29;
            this.annotation2.Shape.Lines                = new string[] { "3390" };
            this.annotation2.Shape.Transparent          = true;
            this.annotation2.Text = "3390";

            // tChart4
            this.tChart4.Aspect.View3D = false;
            this.tChart4.Axes.Bottom.MinorTicks.Visible = false;
            this.tChart4.Axes.Left.Grid.Visible         = false;
            this.tChart4.Axes.Left.Increment            = 20D;
            this.tChart4.Axes.Left.MinorTicks.Visible   = false;
            this.tChart4.Footer.Font.Brush.Color        = Color.Blue;
            this.tChart4.Header.Visible                 = false;
            this.tChart4.Legend.Alignment               = Steema.TeeChart.LegendAlignments.Bottom;
            this.tChart4.Legend.Transparent             = true;
            this.tChart4.Panel.Bevel.Outer              = Steema.TeeChart.Drawing.BevelStyles.None;
            this.tChart4.Panel.Brush.Color              = Color.White;
            this.tChart4.Panel.Brush.Gradient.EndColor  = Color.White;
            this.tChart4.Panel.Brush.Gradient.UseMiddle = false;
            this.tChart4.Series.Add(this.line1);
            this.tChart4.Series.Add(this.line2);
            this.tChart4.Series.Add(this.line3);
            this.tChart4.Tools.Add(this.cursorTool1);
            this.tChart4.Tools.Add(this.annotation4);
            this.tChart4.Tools.Add(this.cursorTool2);
            this.tChart4.Tools.Add(this.annotation6);
            this.tChart4.Tools.Add(this.cursorTool3);
            this.tChart4.Tools.Add(this.annotation8);
            this.tChart4.Walls.Back.Brush.Gradient.EndColor = Color.White;
            this.tChart4.Walls.Back.Visible = false;
            this.tChart4.AfterDraw         += new Steema.TeeChart.PaintChartEventHandler(this.tChart4_AfterDraw);

            // line1
            this.line1.Brush.Color         = Color.FromRgb(((int)(((byte)(68)))), ((int)(((byte)(102)))), ((int)(((byte)(163)))));
            this.line1.Color               = Color.FromRgb(((int)(((byte)(68)))), ((int)(((byte)(102)))), ((int)(((byte)(163)))));
            this.line1.ColorEach           = false;
            this.line1.ColorMember         = "Colors";
            this.line1.LinePen.Color       = Color.FromRgb(((int)(((byte)(41)))), ((int)(((byte)(61)))), ((int)(((byte)(98)))));
            this.line1.LinePen.Width       = 4;
            this.line1.Pointer.Pen.Visible = false;
            this.line1.Pointer.SizeDouble  = 0D;
            this.line1.Pointer.SizeUnits   = Steema.TeeChart.Styles.PointerSizeUnits.Pixels;
            this.line1.Pointer.Style       = Steema.TeeChart.Styles.PointerStyles.Circle;
            this.line1.Title               = "Speed";
            this.line1.XValues.DataMember  = "X";
            this.line1.XValues.Order       = Steema.TeeChart.Styles.ValueListOrder.Ascending;
            this.line1.YValues.DataMember  = "Y";

            // line2
            this.line2.Brush.Color         = Color.FromRgb(((int)(((byte)(6)))), ((int)(((byte)(191)))), ((int)(((byte)(89)))));
            this.line2.Color               = Color.FromRgb(((int)(((byte)(6)))), ((int)(((byte)(191)))), ((int)(((byte)(89)))));
            this.line2.ColorEach           = false;
            this.line2.LinePen.Color       = Color.FromRgb(((int)(((byte)(146)))), ((int)(((byte)(94)))), ((int)(((byte)(32)))));
            this.line2.LinePen.Width       = 4;
            this.line2.Pointer.Pen.Visible = false;
            this.line2.Pointer.SizeDouble  = 0D;
            this.line2.Pointer.SizeUnits   = Steema.TeeChart.Styles.PointerSizeUnits.Pixels;
            this.line2.Pointer.Style       = Steema.TeeChart.Styles.PointerStyles.Circle;
            this.line2.Title               = "Time";
            this.line2.XValues.DataMember  = "X";
            this.line2.XValues.Order       = Steema.TeeChart.Styles.ValueListOrder.Ascending;
            this.line2.YValues.DataMember  = "Y";

            // line3
            this.line3.Brush.Color         = Color.FromRgb(((int)(((byte)(238)))), ((int)(((byte)(17)))), ((int)(((byte)(34)))));
            this.line3.Color               = Color.FromRgb(((int)(((byte)(238)))), ((int)(((byte)(17)))), ((int)(((byte)(34)))));
            this.line3.ColorEach           = false;
            this.line3.ColorMember         = "Colors";
            this.line3.LinePen.Color       = Color.FromRgb(((int)(((byte)(146)))), ((int)(((byte)(94)))), ((int)(((byte)(32)))));
            this.line3.LinePen.Width       = 4;
            this.line3.Pointer.Pen.Visible = false;
            this.line3.Pointer.SizeDouble  = 0D;
            this.line3.Pointer.SizeUnits   = Steema.TeeChart.Styles.PointerSizeUnits.Pixels;
            this.line3.Pointer.Style       = Steema.TeeChart.Styles.PointerStyles.Circle;
            this.line3.Title               = "Visitors";
            this.line3.XValues.DataMember  = "X";
            this.line3.XValues.Order       = Steema.TeeChart.Styles.ValueListOrder.Ascending;
            this.line3.YValues.DataMember  = "Y";

            // cursorTool1
            this.cursorTool1.FollowMouse = true;
            this.cursorTool1.Pen.Color   = Color.Gray;
            this.cursorTool1.Series      = this.line1;
            this.cursorTool1.Style       = Steema.TeeChart.Tools.CursorToolStyles.Vertical;
            this.cursorTool1.Change     += new Steema.TeeChart.Tools.CursorChangeEventHandler(this.cursorTool1_Change);

            // annotation4
            this.annotation4.AutoSize                   = true;
            this.annotation4.Callout.ArrowHead          = Steema.TeeChart.Styles.ArrowHeadStyles.None;
            this.annotation4.Callout.ArrowHeadDirection = Steema.TeeChart.Styles.ArrowHeadDirection.FromPoint;
            this.annotation4.Callout.ArrowHeadSize      = 8;
            this.annotation4.Callout.Brush.Color        = Color.Black;
            this.annotation4.Callout.Distance           = 0;
            this.annotation4.Callout.Draw3D             = false;
            this.annotation4.Callout.SizeDouble         = 0D;
            this.annotation4.Callout.SizeUnits          = Steema.TeeChart.Styles.PointerSizeUnits.Pixels;
            this.annotation4.Callout.XPosition          = 0;
            this.annotation4.Callout.YPosition          = 0;
            this.annotation4.Callout.ZPosition          = 0;
            this.annotation4.Left                   = 56;
            this.annotation4.Shape.Bottom           = 212;
            this.annotation4.Shape.Brush.Color      = Color.FromRgb(((int)(((byte)(238)))), ((int)(((byte)(17)))), ((int)(((byte)(34)))));
            this.annotation4.Shape.CustomPosition   = true;
            this.annotation4.Shape.Font.Brush.Color = Color.White;
            this.annotation4.Shape.Left             = 56;
            this.annotation4.Shape.Lines            = new string[] { "0" };
            this.annotation4.Shape.Pen.Visible      = false;
            this.annotation4.Shape.Right            = 75;
            this.annotation4.Shape.Shadow.Visible   = false;
            this.annotation4.Shape.ShapeStyle       = Steema.TeeChart.Drawing.TextShapeStyle.RoundRectangle;
            this.annotation4.Shape.Top              = 194;
            this.annotation4.Shape.Visible          = false;
            this.annotation4.Text                   = "0";
            this.annotation4.Top = 194;

            // cursorTool2
            this.cursorTool2.FollowMouse = true;
            this.cursorTool2.Pen.Color   = Color.Gray;
            this.cursorTool2.Series      = this.line2;
            this.cursorTool2.Style       = Steema.TeeChart.Tools.CursorToolStyles.Vertical;

            // annotation6
            this.annotation6.AutoSize                   = true;
            this.annotation6.Callout.ArrowHead          = Steema.TeeChart.Styles.ArrowHeadStyles.None;
            this.annotation6.Callout.ArrowHeadDirection = Steema.TeeChart.Styles.ArrowHeadDirection.FromPoint;
            this.annotation6.Callout.ArrowHeadSize      = 8;
            this.annotation6.Callout.Brush.Color        = Color.Black;
            this.annotation6.Callout.Distance           = 0;
            this.annotation6.Callout.Draw3D             = false;
            this.annotation6.Callout.SizeDouble         = 0D;
            this.annotation6.Callout.SizeUnits          = Steema.TeeChart.Styles.PointerSizeUnits.Pixels;
            this.annotation6.Callout.XPosition          = 0;
            this.annotation6.Callout.YPosition          = 0;
            this.annotation6.Callout.ZPosition          = 0;
            this.annotation6.Left                   = -19;
            this.annotation6.Shape.Bottom           = 212;
            this.annotation6.Shape.Brush.Color      = Color.FromRgb(((int)(((byte)(238)))), ((int)(((byte)(17)))), ((int)(((byte)(34)))));
            this.annotation6.Shape.CustomPosition   = true;
            this.annotation6.Shape.Font.Brush.Color = Color.White;
            this.annotation6.Shape.Left             = -19;
            this.annotation6.Shape.Lines            = new string[] { "-0,458" };
            this.annotation6.Shape.Pen.Visible      = false;
            this.annotation6.Shape.Right            = 29;
            this.annotation6.Shape.Shadow.Visible   = false;
            this.annotation6.Shape.ShapeStyle       = Steema.TeeChart.Drawing.TextShapeStyle.RoundRectangle;
            this.annotation6.Shape.Top              = 194;
            this.annotation6.Shape.Visible          = false;
            this.annotation6.Text                   = "-0,458";
            this.annotation6.TextAlign              = TextAlignment.Center;
            this.annotation6.Top = 194;

            // cursorTool3
            this.cursorTool3.FollowMouse = true;
            this.cursorTool3.Pen.Color   = Color.Gray;
            this.cursorTool3.Series      = this.line3;
            this.cursorTool3.Style       = Steema.TeeChart.Tools.CursorToolStyles.Vertical;

            // annotation8
            this.annotation8.AutoSize                   = true;
            this.annotation8.Callout.ArrowHead          = Steema.TeeChart.Styles.ArrowHeadStyles.None;
            this.annotation8.Callout.ArrowHeadDirection = Steema.TeeChart.Styles.ArrowHeadDirection.FromPoint;
            this.annotation8.Callout.ArrowHeadSize      = 8;
            this.annotation8.Callout.Brush.Color        = Color.Black;
            this.annotation8.Callout.Distance           = 0;
            this.annotation8.Callout.Draw3D             = false;
            this.annotation8.Callout.SizeDouble         = 0D;
            this.annotation8.Callout.SizeUnits          = Steema.TeeChart.Styles.PointerSizeUnits.Pixels;
            this.annotation8.Callout.XPosition          = 0;
            this.annotation8.Callout.YPosition          = 0;
            this.annotation8.Callout.ZPosition          = 0;
            this.annotation8.Left                   = -19;
            this.annotation8.Shape.Bottom           = 212;
            this.annotation8.Shape.Brush.Color      = Color.FromRgb(((int)(((byte)(238)))), ((int)(((byte)(17)))), ((int)(((byte)(34)))));
            this.annotation8.Shape.CustomPosition   = true;
            this.annotation8.Shape.Font.Brush.Color = Color.White;
            this.annotation8.Shape.Left             = -19;
            this.annotation8.Shape.Lines            = new string[] { "-0,458" };
            this.annotation8.Shape.Pen.Visible      = false;
            this.annotation8.Shape.Right            = 29;
            this.annotation8.Shape.Shadow.Visible   = false;
            this.annotation8.Shape.ShapeStyle       = Steema.TeeChart.Drawing.TextShapeStyle.RoundRectangle;
            this.annotation8.Shape.Top              = 194;
            this.annotation8.Shape.Visible          = false;
            this.annotation8.Text                   = "-0,458";
            this.annotation8.TextAlign              = TextAlignment.Center;
            this.annotation8.Top = 194;

            // tChart1
            this.tChart1.Aspect.Elevation               = 315;
            this.tChart1.Aspect.Orthogonal              = false;
            this.tChart1.Aspect.Perspective             = 0;
            this.tChart1.Aspect.Rotation                = 360;
            this.tChart1.Aspect.View3D                  = false;
            this.tChart1.Footer.Font.Brush.Color        = Color.Gray;
            this.tChart1.Header.Visible                 = false;
            this.tChart1.Legend.Visible                 = false;
            this.tChart1.Panel.Bevel.Outer              = Steema.TeeChart.Drawing.BevelStyles.None;
            this.tChart1.Panel.Brush.Color              = Color.White;
            this.tChart1.Panel.Brush.Gradient.EndColor  = Color.White;
            this.tChart1.Panel.Brush.Gradient.UseMiddle = false;
            this.tChart1.Series.Add(this.donut1);
            this.tChart1.Tools.Add(this.annotation1);
            this.tChart1.Walls.Back.Brush.Gradient.EndColor = Color.White;

            // donut1
            this.donut1.Brush.Color   = Color.FromRgb(((int)(((byte)(243)))), ((int)(((byte)(156)))), ((int)(((byte)(53)))));
            this.donut1.Circled       = true;
            this.donut1.Color         = Color.FromRgb(((int)(((byte)(68)))), ((int)(((byte)(102)))), ((int)(((byte)(163)))));
            this.donut1.DonutPercent  = 95;
            this.donut1.Frame.Circled = true;
            this.donut1.Frame.FrameElementPercents = new double[] {
                25D,
                60D,
                15D
            };
            this.donut1.Frame.OuterBand.Gradient.UseMiddle = false;
            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.RotationAngle       = 180;
            this.donut1.Shadow.Height       = 3;
            this.donut1.Shadow.Width        = 3;
            this.donut1.Title = "Series0";
            this.donut1.UniqueCustomRadius = true;
            this.donut1.XValues.DataMember = "Angle";
            this.donut1.XValues.Order      = Steema.TeeChart.Styles.ValueListOrder.Ascending;
            this.donut1.YValues.DataMember = "Pie";

            // annotation1
            this.annotation1.AutoSize                   = true;
            this.annotation1.Callout.ArrowHead          = Steema.TeeChart.Styles.ArrowHeadStyles.None;
            this.annotation1.Callout.ArrowHeadDirection = Steema.TeeChart.Styles.ArrowHeadDirection.FromPoint;
            this.annotation1.Callout.ArrowHeadSize      = 8;
            this.annotation1.Callout.Brush.Color        = Color.Black;
            this.annotation1.Callout.Distance           = 0;
            this.annotation1.Callout.Draw3D             = false;
            this.annotation1.Callout.SizeDouble         = 0D;
            this.annotation1.Callout.SizeUnits          = Steema.TeeChart.Styles.PointerSizeUnits.Pixels;
            this.annotation1.Callout.XPosition          = 0;
            this.annotation1.Callout.YPosition          = 0;
            this.annotation1.Callout.ZPosition          = 0;
            this.annotation1.Position                   = Steema.TeeChart.Tools.AnnotationPositions.Center;
            this.annotation1.Shape.Font.Name            = "Segoe UI";
            this.annotation1.Shape.Font.Size            = 29;
            this.annotation1.Shape.Lines                = new string[] { "$750" };
            this.annotation1.Shape.Transparent          = true;
            this.annotation1.Text = "$750";

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

            donut1.Clear();
            donut1.Add(750, Color.FromRgb(((int)(((byte)(68)))), ((int)(((byte)(102)))), ((int)(((byte)(163))))));
            donut1.Add(250, Color.Transparent);
            donut1.Pen.Visible = false;

            donut2.Clear();
            donut2.Add(3390, Color.Green);
            donut2.Add(2510, Color.Transparent);
            donut2.Pen.Visible = false;

            donut3.Clear();
            donut3.Add(1500, Color.Red);
            donut3.Add(500, Color.Transparent);
            donut3.Pen.Visible = false;
            donut3.Pen.Color   = Color.White;

            double[] vals1 = new double[] { 220, 150, 135, 190, 210, 200 };
            double[] vals2 = new double[] { 100, 70, 100, 150, 110, 24 };
            double[] vals3 = new double[] { 100, 130, 80, 130, 126, 240 };

            line1.Smoothed = true;
            line2.Smoothed = true;
            line3.Smoothed = true;
            line1.Add(vals1);
            line2.Add(vals2);
            line3.Add(vals3);

            annotation4.Shape.Font.Brush.Color = line1.Color;
            annotation6.Shape.Font.Brush.Color = line2.Color;
            annotation8.Shape.Font.Brush.Color = line3.Color;
            cursorTool1_Change(tChart4, new Steema.TeeChart.Tools.CursorChangeEventArgs());

            this.tChart1.Aspect.ZoomText = true;
            this.tChart2.Aspect.ZoomText = true;
            this.tChart3.Aspect.ZoomText = true;
            this.tChart4.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;

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

            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)
                    }
                }
            };

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

            // Build the page.
            this.Content = grid;
        }
Beispiel #28
0
        public Norma(Model model, double eps, double load)
        {
            InitializeComponent();

            AnaliticalMukha analitical = new AnaliticalMukha(model.shape.L, model.shape.H, model.material.E, model.material.V, load * model.shape.H);

            Steema.TeeChart.Styles.Line lineAnalit = new Steema.TeeChart.Styles.Line();
            lineAnalit.Title = "Analytical";
            lineAnalit.Color = Color.Red;
            tChart1.Series.Add(lineAnalit);

            Steema.TeeChart.Styles.Line line = new Steema.TeeChart.Styles.Line();
            line.Title = "Nonlinear FEM";
            line.Color = Color.Green;
            tChart1.Series.Add(line);

            Vector alfa = new Vector(3);

            alfa[0] = model.shape.L;
            alfa[1] = alfa[2] = 0;
            int iter = 0;

            dataGridView1.RowCount        = 1;
            dataGridView1.ColumnCount     = 2;
            dataGridView1.Columns[0].Name = "N";
            dataGridView1.Columns[1].Name = "(Au,u)";



            for (int i = 20; i <= 200; i += 20)
            {
                model.mesh = new Mesh(model.shape, i);
                Vector uDiscrete = SolidMechanicSolver.Solve(model, eps, false, out iter);
                //Matrix K = SolidMechanicSolver.CreateHardMatrix(model);
                //Vector KNonLinear = SolidMechanicSolver.NonLinearPart(model, uDiscrete);
                Vector FNonlinear = SolidMechanicSolver.CreateTotalVector(model);

                double norm = FNonlinear * uDiscrete;//uDiscrete * K * uDiscrete + 2 * uDiscrete * KNonLinear;



                line.Add(i, norm);

                List <string> row = new List <string>();
                row.Add(i.ToString());
                row.Add(norm.ToString("0.000000000000"));
                dataGridView1.Rows.Add(row.ToArray());

                /*
                 * ApproximationResult result = new ApproximationResult(model.shape, uDiscrete);
                 *
                 * lineAnalit.Add(i, Vector.Norm(analitical.U(alfa)));
                 * line.Add(i, Vector.Norm(result.U(alfa)));*/
            }



            /*Steema.TeeChart.Styles.Line lineU1a = new Steema.TeeChart.Styles.Line();
             * lineU1a.Title = "U1 аналітичне";
             * tChart1.Series.Add(lineU1a);
             * Steema.TeeChart.Styles.Line lineU3a = new Steema.TeeChart.Styles.Line();
             * lineU3a.Title = "U3 аналітичне";
             * tChart1.Series.Add(lineU3a);
             *
             * Vector alfa = new Vector(Constants.DIMENSION_COUNT);
             * alfa[0] = model.mesh[0].Begin;
             * alfa[1] = 0;
             * alfa[2] = 0;
             * lineU1.Add(model.mesh[0].Begin, result.U(alfa)[0]);
             * lineU3.Add(model.mesh[0].Begin, result.U(alfa)[2]);
             * lineU1a.Add(model.mesh[0].Begin, analitical.U(alfa)[0]);
             * lineU3a.Add(model.mesh[0].Begin, analitical.U(alfa)[2]);
             * for (int i = 0; i < N; i++)
             * {
             *  double xCur = model.mesh[i].End;
             *  alfa = new Vector(Constants.DIMENSION_COUNT);
             *  alfa[0] = xCur;
             *  alfa[1] = 0;
             *  alfa[2] = 0;
             *  if (xCur > model.shape.L)
             *  {
             *      xCur = model.shape.L;
             *      alfa[0] = xCur;
             *  }
             *  Vector resFEM = result.U(alfa);
             *  Vector resAnalit = analitical.U(alfa);
             *  lineU1.Add(xCur, resFEM[0]);
             *  lineU3.Add(xCur, resFEM[2]);
             *  lineU1a.Add(xCur, resAnalit[0]);
             *  lineU3a.Add(xCur, resAnalit[2]);
             * }
             */
        }
Beispiel #29
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);
        }
Beispiel #30
0
        private void InitChart()
        {
            // Create the Chart
            Chart1 = new TChart();

            // Assign a Rect frame
            Chart1.Frame = this.View.Frame;

            // Creates the AfterDraw Event call
            Chart1.AfterDraw    += new Steema.TeeChart.PaintChartEventHandler(chart_AfterDraw);
            Chart1.GetAxisLabel += Chart1_GetAxisLabel;

            // Adds the Chart view to the Root view
            this.View.AddSubview(Chart1);

            Chart1.Aspect.View3D = false;

            this.Chart1.Axes.Bottom.AxisPen.Visible         = false;
            this.Chart1.Axes.Bottom.Grid.Color              = Color.FromArgb(255, 20, 44, 80);
            this.Chart1.Axes.Bottom.Grid.Style              = Steema.TeeChart.Drawing.DashStyle.Solid;
            this.Chart1.Axes.Bottom.Grid.Width              = 2;
            this.Chart1.Axes.Bottom.Labels.Font.Brush.Color = Color.FromArgb(255, 255, 255, 255);
            this.Chart1.Axes.Bottom.MinorTicks.Visible      = false;
            this.Chart1.Axes.Bottom.TickOnLabelsOnly        = false;
            this.Chart1.Axes.Bottom.Ticks.Visible           = false;
            this.Chart1.Axes.Left.AxisPen.Visible           = false;
            this.Chart1.Axes.Left.Grid.Visible              = false;
            this.Chart1.Axes.Left.Increment = 5D;
            this.Chart1.Axes.Left.Labels.Font.Brush.Color = Color.FromArgb(255, 128, 128, 255);
            this.Chart1.Axes.Left.Labels.Font.Size        = 9;
            this.Chart1.Axes.Left.Labels.Font.SizeFloat   = 9F;
            this.Chart1.Axes.Left.MinorTicks.Visible      = false;
            this.Chart1.Axes.Left.TickOnLabelsOnly        = false;
            this.Chart1.Axes.Left.Ticks.Visible           = false;
            this.Chart1.Header.Font.Brush.Color           = Color.FromArgb(255, 255, 255, 255);
            this.Chart1.Header.Font.Size      = 21;
            this.Chart1.Header.Font.SizeFloat = 21F;
            this.Chart1.Header.Lines          = new string[] {
                "Custom drawing on Chart"
            };

            this.Chart1.Legend.Visible               = false;
            this.Chart1.Panel.Brush.Color            = Color.FromArgb(255, 29, 56, 109);
            this.Chart1.Panel.Brush.Gradient.Visible = false;
            this.Chart1.Panel.MarginLeft             = 22D;

            line1  = new Steema.TeeChart.Styles.Line();
            bar3D1 = new Steema.TeeChart.Styles.Bar3D();
            line2  = new Steema.TeeChart.Styles.Line();

            this.Chart1.Series.Add(this.line1);
            this.Chart1.Series.Add(this.bar3D1);
            this.Chart1.Series.Add(this.line2);
            annotation1 = new Steema.TeeChart.Tools.Annotation();
            annotation2 = new Steema.TeeChart.Tools.Annotation();

            this.Chart1.Tools.Add(this.annotation1);
            this.Chart1.Tools.Add(this.annotation2);
            this.Chart1.Walls.Visible = false;
            // line1
            this.line1.Brush.Color        = Color.FromArgb(255, 255, 255, 255);
            this.line1.Color              = Color.FromArgb(255, 255, 255, 255);
            this.line1.ColorEach          = false;
            this.line1.LinePen.Color      = Color.FromArgb(255, 255, 255, 255);
            this.line1.Pointer.Pen.Color  = Color.FromArgb(255, 29, 56, 109);
            this.line1.Pointer.SizeDouble = 0D;
            this.line1.Pointer.SizeUnits  = Steema.TeeChart.Styles.PointerSizeUnits.Pixels;
            this.line1.Pointer.Style      = Steema.TeeChart.Styles.PointerStyles.Circle;
            this.line1.Pointer.Visible    = true;
            this.line1.Title              = "line1";
            this.line1.XValues.DataMember = "X";
            this.line1.XValues.Order      = Steema.TeeChart.Styles.ValueListOrder.Ascending;
            this.line1.YValues.DataMember = "Y";
            //
            // bar3D1
            this.bar3D1.Brush.Color   = Color.FromArgb(255, 88, 130, 214);
            this.bar3D1.Color         = Color.FromArgb(255, 88, 130, 214);
            this.bar3D1.ColorEach     = false;
            this.bar3D1.Marks.Visible = false;
            this.bar3D1.Pen.Color     = Color.FromArgb(255, 146, 94, 32);
            this.bar3D1.Pen.Visible   = false;
            this.bar3D1.Title         = "bar3D1";
            this.bar3D1.XValues.Order = Steema.TeeChart.Styles.ValueListOrder.Ascending;
            //
            // line2
            this.line2.Brush.Color        = Color.FromArgb(255, 255, 255, 255);
            this.line2.Color              = Color.FromArgb(255, 255, 255, 255);
            this.line2.ColorEach          = false;
            this.line2.LinePen.Color      = Color.FromArgb(255, 255, 255, 255);
            this.line2.Pointer.Pen.Color  = Color.FromArgb(255, 29, 56, 109);
            this.line2.Pointer.SizeDouble = 0D;
            this.line2.Pointer.SizeUnits  = Steema.TeeChart.Styles.PointerSizeUnits.Pixels;
            this.line2.Pointer.Style      = Steema.TeeChart.Styles.PointerStyles.Circle;
            this.line2.Pointer.Visible    = true;
            this.line2.Title              = "line2";
            this.line2.XValues.DataMember = "X";
            this.line2.XValues.Order      = Steema.TeeChart.Styles.ValueListOrder.Ascending;
            this.line2.YValues.DataMember = "Y";
            //
            // annotation1
            //
            this.annotation1.AutoSize                   = true;
            this.annotation1.Callout.ArrowHead          = Steema.TeeChart.Styles.ArrowHeadStyles.None;
            this.annotation1.Callout.ArrowHeadDirection = Steema.TeeChart.Styles.ArrowHeadDirection.FromPoint;
            this.annotation1.Callout.ArrowHeadSize      = 8;
            this.annotation1.Callout.Brush.Color        = Color.Black;
            this.annotation1.Callout.Distance           = 0;
            this.annotation1.Callout.Draw3D             = false;
            this.annotation1.Callout.SizeDouble         = 0D;
            this.annotation1.Callout.SizeUnits          = Steema.TeeChart.Styles.PointerSizeUnits.Pixels;
            this.annotation1.Callout.XPosition          = 0;
            this.annotation1.Callout.YPosition          = 0;
            this.annotation1.Callout.ZPosition          = 0;
            this.annotation1.Left                   = 2;
            this.annotation1.Shape.Bottom           = 373;
            this.annotation1.Shape.CustomPosition   = true;
            this.annotation1.Shape.Font.Brush.Color = Color.FromArgb(255, 255, 255, 255);
            this.annotation1.Shape.Font.Size        = 40;
            this.annotation1.Shape.Font.SizeFloat   = 40F;
            this.annotation1.Shape.Left             = 2;
            this.annotation1.Shape.Lines            = new string[] { "40%" };
            this.annotation1.Shape.Right            = 207;
            this.annotation1.Shape.Top              = 25;
            this.annotation1.Shape.Transparent      = true;
            this.annotation1.Text                   = "40%";
            this.annotation1.Top = 70;
            //
            // annotation2
            //
            this.annotation2.AutoSize                   = true;
            this.annotation2.Callout.ArrowHead          = Steema.TeeChart.Styles.ArrowHeadStyles.None;
            this.annotation2.Callout.ArrowHeadDirection = Steema.TeeChart.Styles.ArrowHeadDirection.FromPoint;
            this.annotation2.Callout.ArrowHeadSize      = 8;
            this.annotation2.Callout.Brush.Color        = Color.Black;
            this.annotation2.Callout.Distance           = 0;
            this.annotation2.Callout.Draw3D             = false;
            this.annotation2.Callout.SizeDouble         = 0D;
            this.annotation2.Callout.SizeUnits          = Steema.TeeChart.Styles.PointerSizeUnits.Pixels;
            this.annotation2.Callout.XPosition          = 0;
            this.annotation2.Callout.YPosition          = 0;
            this.annotation2.Callout.ZPosition          = 0;
            this.annotation2.Left                   = 0;
            this.annotation2.Shape.Bottom           = 280;
            this.annotation2.Shape.CustomPosition   = true;
            this.annotation2.Shape.Font.Brush.Color = Color.FromArgb(255, 128, 128, 255);
            this.annotation2.Shape.Font.Size        = 9;
            this.annotation2.Shape.Font.SizeFloat   = 9F;
            this.annotation2.Shape.Left             = 6;
            this.annotation2.Shape.Lines            = new string[] {
                "Percentage",
                "sample data"
            };
            this.annotation2.Shape.Right       = 166;
            this.annotation2.Shape.Top         = 243;
            this.annotation2.Shape.Transparent = true;
            this.annotation2.Text = "Sample\r\ndata";
            this.annotation2.Top  = 120;

            Chart1.Axes.Left.SetMinMax(-20, 33);
            Chart1.Axes.Bottom.SetMinMax(-1, 16);

            bar3D1.Add(0, 26, -11);
            bar3D1.Add(1, 19, -5);
            bar3D1.Add(2, 18.5, -3);
            bar3D1.Add(3, 19, -1);
            bar3D1.Add(4, 17.5, -0.5, "5 jaar");
            bar3D1.Add(5, 15, 2);
            bar3D1.Add(6, 15, 1);
            bar3D1.Add(7, 15, 0.5);
            bar3D1.Add(8, 14.5, 0.5);
            bar3D1.Add(9, 13, 1, "10 jaar");
            bar3D1.Add(10, 12.5, 1.5);
            bar3D1.Add(11, 12.2, 1.5);
            bar3D1.Add(12, 9, 2.2);
            bar3D1.Add(13, 9, 3);
            bar3D1.Add(14, 7, 3.3, "15 jaar");

            double[] xses = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 };

            double[] firstLine  = { 31, 23, 22, 22.5, 20.5, 19, 18, 17, 16.5, 15.5, 14.9, 13.9, 13, 13.5, 13.2 };
            double[] secondLine = { -19.5, -13, -8, -3, -2, -0.5, -0.6, -1.5, -1, 0, 0.4, 0.2, 1.7, 2.2, 2.7 };

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

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

			
			/* Chart 4

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