public AnalyzingStockMarketsChartPage ()
		{
			InitializeComponent ();

			SfBusyIndicator busyIndicator = new SfBusyIndicator ();

			Chart.Opacity = .25;
			//Chart settings
			BackgroundColor = MyColors.MidnightBlue;

			//Busy Indicator
			busyIndicator.ViewBoxWidth = 150;
			busyIndicator.ViewBoxHeight = 150;
			busyIndicator.HeightRequest = 50;
			busyIndicator.WidthRequest = 50;
			busyIndicator.BackgroundColor = MyColors.MidnightBlue;
			busyIndicator.AnimationType = AnimationTypes.DoubleCircle;
			busyIndicator.TextColor = MyColors.Turqoise;
			busyIndicator.IsVisible = true;
			busyIndicator.IsBusy = true;
			busyIndicator.HorizontalOptions = LayoutOptions.Center;
			busyIndicator.VerticalOptions = LayoutOptions.Center;

			relativeLayout.Children.Add (busyIndicator, Constraint.Constant (App.ScreenWidth / 2), Constraint.Constant (App.ScreenHeight / 3), Constraint.Constant (10), Constraint.Constant (10));

			//get data
			Task.Run (() => {
				Device.BeginInvokeOnMainThread (
					() => {
						var indicators = new AnalyzingStockMarkets.GetStockMarketIndicators ();

						var cd = indicators.ChartData;
						var hd = indicators.HistoricalData;

						BindingContext = new AnalyzingStockMarketsViewModel (cd);


						var vm = new AnalyzingStockMarketsViewModel (cd);
						first.Label = vm.DataArray [0] [0].Name;
						second.Label = vm.DataArray [1] [1].Name;
						third.Label = vm.DataArray [2] [2].Name;
						fourth.Label = vm.DataArray [3] [3].Name;
						fifth.Label = vm.DataArray [4] [4].Name;
						sixth.Label = vm.DataArray [5] [5].Name;

						//turn off busy indicator
						busyIndicator.IsVisible = false;
						busyIndicator.IsBusy = false;

						Chart.FadeTo (1, 500, Easing.CubicIn);

					});

			});


		}
		public KalmanRelationshipChartPage ()
		{
			InitializeComponent ();

			SfBusyIndicator busyIndicator = new SfBusyIndicator ();

			BackgroundColor = MyColors.MidnightBlue;

			Chart.Opacity = .25;

			relativeLayout.Children.Add (busyIndicator, Constraint.Constant (App.ScreenWidth/2), Constraint.Constant (App.ScreenHeight/3), Constraint.Constant (10), Constraint.Constant (10));

			//Busy Indicator
			busyIndicator.ViewBoxWidth = 150;
			busyIndicator.ViewBoxHeight = 150;
			busyIndicator.HeightRequest = 50;
			busyIndicator.WidthRequest = 50;
			busyIndicator.BackgroundColor = MyColors.MidnightBlue;
			busyIndicator.AnimationType = AnimationTypes.DoubleCircle;
			busyIndicator.TextColor = MyColors.Turqoise;
			busyIndicator.IsVisible = true;
			busyIndicator.IsBusy = true;
			busyIndicator.HorizontalOptions = LayoutOptions.Center;
			busyIndicator.VerticalOptions = LayoutOptions.Center;

			//get data
			Task.Run (() => {
				
				AnalyzingStockMarkets.GetStockMarketIndicators indicators = new AnalyzingStockMarkets.GetStockMarketIndicators ();

				var indexPoints = indicators.IndexPoints;
				var lines = indicators.Lines;	
				var vm = new KalmanRelationshipViewModel (indexPoints, lines);

				Device.BeginInvokeOnMainThread (
					() => {
						BindingContext = vm;

						Market0.Label = vm.Points [0] [0].Name;
						Market1.Label = vm.Points [1] [0].Name;
						Market2.Label = vm.Points [2] [0].Name;
						Market3.Label = vm.Points [3] [0].Name;
						Market4.Label = vm.Points [4] [0].Name;
						Market5.Label = vm.Points [5] [0].Name;	

						//turn off busy indicator
						busyIndicator.IsVisible = false;
						busyIndicator.IsBusy = false;

						Chart.FadeTo(1, 500, Easing.CubicIn);
					});
			});
		}
Beispiel #3
0
        public AnalyzingStockMarketsChartPage()
        {
            InitializeComponent();

            SfBusyIndicator busyIndicator = new SfBusyIndicator();

            Chart.Opacity = .25;
            //Chart settings
            BackgroundColor = MyColors.MidnightBlue;

            //Busy Indicator
            busyIndicator.ViewBoxWidth      = 150;
            busyIndicator.ViewBoxHeight     = 150;
            busyIndicator.HeightRequest     = 50;
            busyIndicator.WidthRequest      = 50;
            busyIndicator.BackgroundColor   = MyColors.MidnightBlue;
            busyIndicator.AnimationType     = AnimationTypes.DoubleCircle;
            busyIndicator.TextColor         = MyColors.Turqoise;
            busyIndicator.IsVisible         = true;
            busyIndicator.IsBusy            = true;
            busyIndicator.HorizontalOptions = LayoutOptions.Center;
            busyIndicator.VerticalOptions   = LayoutOptions.Center;

            relativeLayout.Children.Add(busyIndicator, Constraint.Constant(App.ScreenWidth / 2), Constraint.Constant(App.ScreenHeight / 3), Constraint.Constant(10), Constraint.Constant(10));

            //get data
            Task.Run(() => {
                Device.BeginInvokeOnMainThread(
                    () => {
                    var indicators = new AnalyzingStockMarkets.GetStockMarketIndicators();

                    var cd = indicators.ChartData;
                    var hd = indicators.HistoricalData;

                    BindingContext = new AnalyzingStockMarketsViewModel(cd);


                    var vm       = new AnalyzingStockMarketsViewModel(cd);
                    first.Label  = vm.DataArray [0] [0].Name;
                    second.Label = vm.DataArray [1] [1].Name;
                    third.Label  = vm.DataArray [2] [2].Name;
                    fourth.Label = vm.DataArray [3] [3].Name;
                    fifth.Label  = vm.DataArray [4] [4].Name;
                    sixth.Label  = vm.DataArray [5] [5].Name;

                    //turn off busy indicator
                    busyIndicator.IsVisible = false;
                    busyIndicator.IsBusy    = false;

                    Chart.FadeTo(1, 500, Easing.CubicIn);
                });
            });
        }
Beispiel #4
0
        public KalmanRelationshipChartPage()
        {
            InitializeComponent();

            SfBusyIndicator busyIndicator = new SfBusyIndicator();

            BackgroundColor = MyColors.MidnightBlue;

            Chart.Opacity = .25;

            relativeLayout.Children.Add(busyIndicator, Constraint.Constant(App.ScreenWidth / 2), Constraint.Constant(App.ScreenHeight / 3), Constraint.Constant(10), Constraint.Constant(10));

            //Busy Indicator
            busyIndicator.ViewBoxWidth      = 150;
            busyIndicator.ViewBoxHeight     = 150;
            busyIndicator.HeightRequest     = 50;
            busyIndicator.WidthRequest      = 50;
            busyIndicator.BackgroundColor   = MyColors.MidnightBlue;
            busyIndicator.AnimationType     = AnimationTypes.DoubleCircle;
            busyIndicator.TextColor         = MyColors.Turqoise;
            busyIndicator.IsVisible         = true;
            busyIndicator.IsBusy            = true;
            busyIndicator.HorizontalOptions = LayoutOptions.Center;
            busyIndicator.VerticalOptions   = LayoutOptions.Center;

            //get data
            Task.Run(() => {
                AnalyzingStockMarkets.GetStockMarketIndicators indicators = new AnalyzingStockMarkets.GetStockMarketIndicators();

                var indexPoints = indicators.IndexPoints;
                var lines       = indicators.Lines;
                var vm          = new KalmanRelationshipViewModel(indexPoints, lines);

                Device.BeginInvokeOnMainThread(
                    () => {
                    BindingContext = vm;

                    Market0.Label = vm.Points [0] [0].Name;
                    Market1.Label = vm.Points [1] [0].Name;
                    Market2.Label = vm.Points [2] [0].Name;
                    Market3.Label = vm.Points [3] [0].Name;
                    Market4.Label = vm.Points [4] [0].Name;
                    Market5.Label = vm.Points [5] [0].Name;

                    //turn off busy indicator
                    busyIndicator.IsVisible = false;
                    busyIndicator.IsBusy    = false;

                    Chart.FadeTo(1, 500, Easing.CubicIn);
                });
            });
        }
		public AnalyzingMarketInteractionsChartPage ()
		{
			InitializeComponent ();

			SfBusyIndicator busyIndicator = new SfBusyIndicator ();

			BackgroundColor = MyColors.MidnightBlue;

			Chart.Opacity = .25;

			relativeLayout.Children.Add (busyIndicator, Constraint.Constant (App.ScreenWidth / 2), Constraint.Constant (App.ScreenHeight / 3), Constraint.Constant (10), Constraint.Constant (10));

			//Busy Indicator
			busyIndicator.ViewBoxWidth = 150;
			busyIndicator.ViewBoxHeight = 150;
			busyIndicator.HeightRequest = 50;
			busyIndicator.WidthRequest = 50;
			busyIndicator.BackgroundColor = MyColors.MidnightBlue;
			busyIndicator.AnimationType = AnimationTypes.DoubleCircle;
			busyIndicator.TextColor = MyColors.Turqoise;
			busyIndicator.IsVisible = true;
			busyIndicator.IsBusy = true;
			busyIndicator.HorizontalOptions = LayoutOptions.Center;
			busyIndicator.VerticalOptions = LayoutOptions.Center;

			//get data
			Task.Run (() => {

				AnalyzingStockMarkets.GetStockMarketIndicators indicators = new AnalyzingStockMarkets.GetStockMarketIndicators ();

				var logliks = indicators.LogLikelihood;

				Device.BeginInvokeOnMainThread (
					() => {

						BindingContext = new AnalyzingMarketInteractionsViewModel (logliks);

						//turn off busy indicator
						busyIndicator.IsVisible = false;
						busyIndicator.IsBusy = false;

						Chart.FadeTo (1, 500, Easing.CubicIn);
					});
			});






		}
Beispiel #6
0
        public FittedVersusObservedChartPage()
        {
            InitializeComponent();

            SfBusyIndicator busyIndicator = new SfBusyIndicator();

            BackgroundColor = MyColors.MidnightBlue;

            Chart.Opacity = .25;

            relativeLayout.Children.Add(busyIndicator, Constraint.Constant(App.ScreenWidth / 2), Constraint.Constant(App.ScreenHeight / 3), Constraint.Constant(10), Constraint.Constant(10));

            //Busy Indicator
            busyIndicator.ViewBoxWidth      = 150;
            busyIndicator.ViewBoxHeight     = 150;
            busyIndicator.HeightRequest     = 50;
            busyIndicator.WidthRequest      = 50;
            busyIndicator.BackgroundColor   = MyColors.MidnightBlue;
            busyIndicator.AnimationType     = AnimationTypes.DoubleCircle;
            busyIndicator.TextColor         = MyColors.Turqoise;
            busyIndicator.IsVisible         = true;
            busyIndicator.IsBusy            = true;
            busyIndicator.HorizontalOptions = LayoutOptions.Center;
            busyIndicator.VerticalOptions   = LayoutOptions.Center;

            //get data
            Task.Run(() => {
                AnalyzingStockMarkets.GetStockMarketIndicators indicators = new AnalyzingStockMarkets.GetStockMarketIndicators();

                var original = indicators.OriginalObservedData;
                var fitted   = indicators.FittedData;

                Device.BeginInvokeOnMainThread(
                    () => {
                    BindingContext = new AnalyzingMarketInteractionsViewModel(original, fitted);

                    //turn off busy indicator
                    busyIndicator.IsVisible = false;
                    busyIndicator.IsBusy    = false;

                    series1.Color = MyColors.Turqoise;
                    series2.Color = MyColors.Concrete;

                    Chart.FadeTo(1, 500, Easing.CubicIn);
                });
            });
        }