private void FillSeries()
        {
            double tmp = 0;

            for (int i = 0; i < console.Length; i++)
            {
                area1.Add(tmp, price[i], console[i]);
                tmp += units[i];
            }

            average            = new Steema.TeeChart.Styles.Line(tChart1.Chart);
            average.Color      = Color.Black;
            average.Function   = new Steema.TeeChart.Functions.Average();
            average.DataSource = area1;

            //A "dummy" point is necessary to plot last area
            area1.Add(tmp, price[price.Length - 1]);
            average.XValues[average.Count - 1] = tmp;
        }
Пример #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     mystyle++;
     tChart1.Series.Clear();
     switch (mystyle)
     {
         case 1:
             Steema.TeeChart.Styles.Area area = new Steema.TeeChart.Styles.Area();
             area.Add(data);
             tChart1.Series.Add(area);
             break;
         case 2:
             Steema.TeeChart.Styles.Arrow arrow= new Steema.TeeChart.Styles.Arrow();
             arrow.Add(data);
             tChart1.Series.Add(arrow);
             break;
         case 3:
             Steema.TeeChart.Styles.Bar Bar = new Steema.TeeChart.Styles.Bar();
             Bar.Add(data);
             tChart1.Series.Add(Bar);
             break;
         case 4:
             Steema.TeeChart.Styles.Bar3D Bar3D = new Steema.TeeChart.Styles.Bar3D();
             Bar3D.Add(data);
             tChart1.Series.Add(Bar3D);
             break;
         case 5:
             Steema.TeeChart.Styles.BarJoin BarJoin = new Steema.TeeChart.Styles.BarJoin();
             BarJoin.Add(data);
             tChart1.Series.Add(BarJoin);
             break;
         case 6:
             Steema.TeeChart.Styles.Bezier Bezier = new Steema.TeeChart.Styles.Bezier();
             Bezier.Add(data);
             tChart1.Series.Add(Bezier);
             break;
     }
     if (mystyle > 10)
         mystyle = 0;
 }
        public Page6()
        {
            // NavigationPage.SetHasNavigationBar(this, false);

            dashChart = new Chart();
            dashChart.Aspect.View3D = false;
            Steema.TeeChart.Styles.Area area1 = new Steema.TeeChart.Styles.Area();
            Steema.TeeChart.Styles.Area area2 = new Steema.TeeChart.Styles.Area();
            dashChart.Series.Add(area1);
            dashChart.Series.Add(area2);

            area2.Transparency         = 50;
            area1.Gradient.Visible     = true;
            area2.Gradient.Visible     = true;
            area1.AreaLinesPen.Visible = false;
            area2.AreaLinesPen.Visible = false;
            area1.LinePen.Color        = Color.White;
            area1.LinePen.Width        = 2;
            area2.LinePen.Color        = Color.White;
            area2.LinePen.Width        = 2;
            area1.Gradient.StartColor  = Color.FromRgb(255, 255, 255);
            area1.Gradient.EndColor    = Color.FromRgb(186, 85, 211);
            area2.Gradient.StartColor  = Color.FromRgb(255, 255, 255);
            area2.Gradient.EndColor    = Color.FromRgb(186, 85, 211);

            dashChart.Axes.Left.Visible             = false;
            dashChart.Axes.Bottom.AxisPen.Color     = Color.White;
            dashChart.Axes.Bottom.Labels.Font.Color = Color.White;

            Random rnd1 = new Random();

            for (int i = 0; i < 40; i++)
            {
                area1.Add(rnd1.Next(100));
                area2.Add(rnd1.Next(70));
            }

            area1.Smoothed = true;
            area2.Smoothed = true;

            dashChart.Axes.Bottom.SetMinMax(10, 30);

            // Areas and Points
            dashChart.Panel.Color            = Color.FromRgb(186, 85, 211);
            dashChart.Panel.Gradient.Visible = false;
            dashChart.Title.Text             = "Areas and Points";
            dashChart.Title.Alignment        = TextAlignment.End;
            dashChart.Title.Font.Size        = 12;
            dashChart.Title.Font.Color       = Color.White;
            //dashBoard0.Title.Font.Name = "";
            dashChart.Legend.Visible     = false;
            dashChart.Walls.Back.Visible = false;


            DashView5 = new ChartView
            {
                VerticalOptions   = LayoutOptions.FillAndExpand,
                HorizontalOptions = LayoutOptions.FillAndExpand,
            };
            DashView5.Model = dashChart;

            Content = new StackLayout
            {
                Children =
                {
                    DashView5
                }
            };
        }
        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;
             */
        }
Пример #5
0
		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;
			*/
		}
Пример #6
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            // Creating the Chart component
            Chart = new TChart();

            // Setting the Chart bounds
            Chart.Frame = View.Frame;

            // 2D Chart
            Chart.Aspect.View3D = false;

            // Chart appearance
            Chart.Header.Font.Color    = Color.White;
            Chart.Header.Font.Size     = 16;
            Chart.Header.Text          = "CALORIES";
            Chart.Header.Font.Name     = "Verdana";
            Chart.SubHeader.Text       = "Today's Summary";
            Chart.SubHeader.Visible    = true;
            Chart.SubHeader.Font.Bold  = true;
            Chart.SubHeader.Font.Name  = "Verdana";
            Chart.Header.Font.Size     = 12;
            Chart.SubHeader.Font.Color = Color.FromArgb(255, 78, 191, 185);
            Chart.SubFooter.Visible    = true;
            Chart.SubFooter.Font.Name  = "Verdana";
            Chart.SubFooter.Text       = "TeeChart for Xamarin.Forms";
            Chart.SubFooter.Font.Color = Color.FromArgb(255, 78, 191, 185);
            Chart.Header.Font.Size     = 12;

            Chart.Panel.Gradient.StartColor = Color.FromArgb(255, 17, 151, 140);
            Chart.Panel.Gradient.EndColor   = Color.FromArgb(255, 11, 93, 143);
            Chart.Panel.Gradient.UseMiddle  = false;
            Chart.Panel.Gradient.Visible    = true;

            Chart.Panel.Pen.Visible = true;
            Chart.Panel.Pen.Color   = Color.FromArgb(255, 20, 58, 69);
            Chart.Panel.Color       = Color.FromArgb(255, 11, 93, 143);

            // Customizing the Axes grid appearance
            Chart.Axes.Bottom.Grid.Visible       = false;
            Chart.Axes.Bottom.MinorTicks.Visible = false;

            // Setting a custom left axis increment, and axis pen width, and other properties
            Chart.Axes.Left.AxisPen.Width   = 1;
            Chart.Axes.Bottom.AxisPen.Width = 1;
            Chart.Axes.Bottom.AxisPen.Color = Color.FromArgb(255, 51, 138, 166);
            Chart.Axes.Left.MaximumOffset   = 12;
            Chart.Axes.Left.AxisPen.Visible = false;
            Chart.Axes.Left.Grid.Color      = Color.FromArgb(255, 51, 138, 166);

            Chart.Axes.Right.AxisPen.Visible    = false;
            Chart.Axes.Right.Grid.Color         = Color.FromArgb(255, 51, 138, 166);
            Chart.Axes.Right.Labels.Font.Color  = Color.FromArgb(255, 78, 191, 185);
            Chart.Axes.Right.Labels.Font.Size   = 12;
            Chart.Axes.Right.MinorTicks.Visible = false;
            Chart.Axes.Right.Ticks.Visible      = false;
            Chart.Axes.Right.GridCentered       = true;
            Chart.Axes.Right.Ticks.Length       = -150;
            Chart.Axes.Right.Ticks.Visible      = true;
            Chart.Axes.Right.RelativePosition   = 10;

            Chart.Axes.Left.Labels.Visible      = false;
            Chart.Axes.Bottom.Labels.Font.Color = Color.FromArgb(255, 51, 138, 166);
            Chart.Axes.Bottom.Labels.Font.Size  = 12;

            // Chaging the Legend, Panel and Walls appearance
            Chart.Legend.Transparent = true;
            Chart.Legend.Font.Color  = Color.White;
            Chart.Legend.Font.Size   = 16;
            Chart.Legend.Alignment   = LegendAlignments.Bottom;
            Chart.Legend.LegendStyle = LegendStyles.Series;

            Chart.Walls.Back.Visible = false;

            Chart.Panel.BorderPen.Width = 3;
            Chart.Panel.BorderRound     = 32;
            Chart.Panel.Bevel.Width     = 2;
            Chart.Panel.Bevel.Outer     = Steema.TeeChart.Drawing.BevelStyles.Lowered;
            Chart.Panel.Bevel.Inner     = Steema.TeeChart.Drawing.BevelStyles.Lowered;
            Chart.Panel.Bevel.ColorOne  = Color.FromArgb(255, 20, 58, 69);
            Chart.Panel.Bevel.ColorTwo  = Color.FromArgb(255, 20, 58, 69);

            // Allow to Zoom and Pan over the Chart Series
            Chart.Panning.Active = true;
            Chart.Zoom.Active    = true;

            // Creating the Chart Series (FastLine series in that case)
            Steema.TeeChart.Styles.Area fline1 = new Steema.TeeChart.Styles.Area(Chart.Chart);

            fline1.AreaBrush.Gradient.Visible    = true;
            fline1.AreaBrush.Gradient.StartColor = Color.FromArgb(255, 78, 191, 185);
            fline1.LinePen.Color = Color.FromArgb(255, 197, 248, 229);
            fline1.AreaBrush.Gradient.EndColor = Color.Transparent;
            fline1.AreaLinesPen.Color          = Color.FromArgb(255, 197, 248, 229);
            fline1.AreaLinesPen.Width          = 3;
            fline1.AreaLines.Visible           = false;
            fline1.Title = "Today";

            var tmpHour = Utils.GetDateTimeStep(DateTimeSteps.OneHour);

            // Adding data to the Series
            fline1.Add(DateTime.Now.ToOADate(), 350, "350");
            fline1.Add(DateTime.Now.ToOADate() + tmpHour, 500, "500");
            fline1.Add(DateTime.Now.ToOADate() + tmpHour * 2, 400, "400");
            fline1.Add(DateTime.Now.ToOADate() + tmpHour * 3, 475, "475");
            fline1.Add(DateTime.Now.ToOADate() + tmpHour * 4, 300, "300");
            fline1.Add(DateTime.Now.ToOADate() + tmpHour * 5, 222, "222");
            fline1.Add(DateTime.Now.ToOADate() + tmpHour * 6, 280, "280");

            fline1.Smoothed = true;
            fline1.VertAxis = Steema.TeeChart.Styles.VerticalAxis.Right;

            fline1.XValues.DateTime = true;
            Chart.Axes.Bottom.Labels.DateTimeFormat = "HH:mm tt";
            Chart.Axes.Bottom.Increment             = Steema.TeeChart.Utils.GetDateTimeStep(DateTimeSteps.OneHour);
            Chart.Axes.Right.MinimumOffset          = 10;

            // Add a click Tolerance in pixels
            fline1.ClickTolerance = 3;

            // Hiding Series Marks
            fline1.Marks.Visible = false;
            fline1.LinePen.Width = 4;

            // Setting custom left axis increment
            Chart.Axes.Right.Increment = 100;
            Chart.Axes.Right.Automatic = true;

            Chart.Panning.Allow = ScrollModes.Horizontal;

            // Scroll by points per page....
            // Chart.Page.MaxPointsPerPage = 10;

            // Scroll by using UISlider and SetMinMax
            //Chart.Panel.MarginBottom += 10;
            //Chart.Axes.Bottom.SetMinMax(0, 10);

            /* Using Slider to scroll
             * UISlider slider1 = new UISlider(new CoreGraphics.CGRect(0,this.View.Frame.Height - 25,this.View.Frame.Width, 20));
             * slider1.MinValue = 5;
             * slider1.MaxValue = 95;
             * slider1.Value = 5.0f; // the current value
             * slider1.ValueChanged += (sender, e) => Chart.Axes.Bottom.SetMinMax(((UISlider)sender).Value - 5, ((UISlider)sender).Value + 5);
             */

            // Use of Annotation Tool
            annotation                 = new Annotation(Chart.Chart);
            annotation.Active          = false;
            annotation.Shape.Font.Size = 14;
            //annotation.Shape.Font.Bold = true;

            annotation.Shape.Pen.Color = Color.White;
            annotation.Shape.Pen.Width = 3;
            annotation.TextAlign       = CTTextAlignment.Center;
            annotation.Position        = AnnotationPositions.Center;

            // Chart and Series events
            Chart.ClickBackground += Chart_ClickBackground;
            Chart.ClickSeries     += Chart_ClickSeries;
            Chart.ClickLegend     += Chart_ClickLegend;
            Chart.AfterDraw       += Chart_AfterDraw1;
            Chart.ClickAxis       += Chart_ClickAxis;
            Chart.ClickTitle      += Chart_ClickTitle;
            Chart.GetLegendText   += Chart_GetLegendText;


            Chart.Draw();


            // Finally adding the Chart View as SubView to the parent View
            View.AddSubview(Chart);

            // In the case we want to add an slider
            //View.AddSubview(slider1);
        }
        /// <summary>
        /// Method to draw frequency area chart from the datatable
        /// </summary>
        /// <param name="dataTable">DataTable with the source data</param>
        /// <param name="chart">Chart to insert area into</param>
        private void DrawAreaFromDataTable(DataTable dataTable, Steema.TeeChart.TChart chart)
        {
            chart.Series.RemoveAllSeries();
            Steema.TeeChart.Styles.Area areaSeries = new Steema.TeeChart.Styles.Area();
            areaSeries.ColorEach = true;
            areaSeries.Marks.Style = Steema.TeeChart.Styles.MarksStyles.LabelValue;
            if (this.ToolStripMenuToggleMarks.Checked)
            {
                areaSeries.Marks.Visible = true;
            }
            else
            {
                areaSeries.Marks.Visible = false;
            }

            foreach (DataRow dataRow in dataTable.Rows)
            {
                double temp;
                try
                {
                    temp = Convert.ToDouble(dataRow[1]);
                }
                catch
                {
                    temp = 0;
                }
                if (this.ToolStripMenuItemAbsolute.Checked)
                {
                    areaSeries.Add(temp, dataRow[0].ToString());
                }
                else
                {
                    if ((temp != 0) && (this.rowCount != 0))
                    {
                        temp = Math.Round(((temp / (double)this.rowCount) * 100), 2);
                        areaSeries.Add(temp, dataRow[0].ToString());
                    }
                    else
                    {
                        areaSeries.Add(0, dataRow[0].ToString());
                    }
                }
                chart.Series.Add(areaSeries);
            }
        }
 /// <summary>
 /// Method to draw frequency area graph from the datatable
 /// </summary>
 /// <param name="dataTable">DataTable with the source data</param>
 /// <param name="chart">Chart to insert area into</param>
 private void DrawAreaFromDataTable(ArrayList categoriesFrequency, Steema.TeeChart.TChart chart)
 {
     chart.Series.RemoveAllSeries();
     Steema.TeeChart.Styles.Area areaSeries;
     areaSeries = new Steema.TeeChart.Styles.Area();
     areaSeries.ColorEach = true;
     areaSeries.Marks.Style = Steema.TeeChart.Styles.MarksStyles.LabelValue;
     if (this.ToolStripMenuItemToggleMarks.Checked)
     {
         areaSeries.Marks.Visible = true;
     }
     else
     {
         areaSeries.Marks.Visible = false;
     }
     foreach (CategoryFrequency catFrequency in categoriesFrequency)
     {
         double temp;
         try
         {
             temp = Convert.ToDouble(catFrequency.count);
         }
         catch
         {
             temp = 0;
         }
         if (this.ToolStripMenuItemAbsolute.Checked)
         {
             areaSeries.Add(temp, catFrequency.key);
         }
         else
         {
             if ((temp != 0) && (this.rowCount != 0))
             {
                 temp = Math.Round(((temp / (double)this.rowCount) * 100), 2);
                 areaSeries.Add(temp, catFrequency.key);
             }
             else
             {
                 areaSeries.Add(0, catFrequency.key);
             }
         }
         chart.Series.Add(areaSeries);
     }
 }