Inheritance: Windows.UI.Xaml.Controls.Control, ISeriesHost
        public void SetGraphs(Chart power, Chart voltage, Chart amperage)
        {
            _power = power;
            _voltage = voltage;
            _amperage = amperage;
            bConfigurer_Command = new RelayCommand(Configurer_Command);

            ObservableCollection<Tuple<int, int>> Test2 = new ObservableCollection<Tuple<int, int>>();
            Test2.Add(new Tuple<int, int>(0, 30));
            Test2.Add(new Tuple<int, int>(1, 20));
            Test2.Add(new Tuple<int, int>(2, 50));
            _power.Series.Add(new LineSeries());
            (_power.Series[0] as LineSeries).ItemsSource = Test2;
            (_power.Series[0] as LineSeries).IndependentValuePath = "Item1";
            (_power.Series[0] as LineSeries).DependentValuePath = "Item2";

            ObservableCollection<Tuple<int, int>> Test3 = new ObservableCollection<Tuple<int, int>>();
            Test3.Add(new Tuple<int, int>(0, 20));
            Test3.Add(new Tuple<int, int>(1, 10));
            Test3.Add(new Tuple<int, int>(2, 60));
            _power.Series.Add(new LineSeries());
            (_power.Series[1] as LineSeries).ItemsSource = Test3;
            (_power.Series[1] as LineSeries).IndependentValuePath = "Item1";
            (_power.Series[1] as LineSeries).DependentValuePath = "Item2";

            _voltage.Series.Add(new LineSeries());
            (_voltage.Series[0] as LineSeries).ItemsSource = Test3;
            (_voltage.Series[0] as LineSeries).IndependentValuePath = "Item1";
            (_voltage.Series[0] as LineSeries).DependentValuePath = "Item2";

            _amperage.Series.Add(new LineSeries());
            (_amperage.Series[0] as LineSeries).ItemsSource = Test3;
            (_amperage.Series[0] as LineSeries).IndependentValuePath = "Item1";
            (_amperage.Series[0] as LineSeries).DependentValuePath = "Item2";
        }
Exemple #2
0
        public static void CalcPk(double lambda, double mu, ListView list, WinRTXamlToolkit.Controls.DataVisualization.Charting.Chart lineChart)
        {
            lineChart.Title = "P(k)";
            List <Point> chartList = new List <Point>();
            double       ro        = lambda / mu;

            for (int k = 0; k <= 10; k++)
            {
                list.Items.Add(k + ") " + (1 - ro) * Math.Pow(ro, k));
                chartList.Add(new Point()
                {
                    x_axis = k, y_axis = (1 - ro) * Math.Pow(ro, k)
                });
            }
            (lineChart.Series[0] as AreaSeries).ItemsSource = chartList;
            (lineChart.Series[0] as AreaSeries).Title       = "P(k)";
            (lineChart.Series[1] as AreaSeries).Visibility  = Windows.UI.Xaml.Visibility.Collapsed;
            (lineChart.Series[1] as AreaSeries).Title       = "";
        }
Exemple #3
0
        public static void CalcWj(double lambda, double mu, int v, ListView list, WinRTXamlToolkit.Controls.DataVisualization.Charting.Chart lineChart)
        {
            List <Point> chartList2 = new List <Point>();
            double       znam       = 0;
            double       ro         = lambda / mu;

            for (int x = 0; x <= v - 1; x++)
            {
                znam += Math.Pow(ro, x) / Factorial(x);
            }
            znam += Math.Pow(ro, v) * v / (Factorial(v) * (v - ro));
            for (int j = 0; j <= v + 10; j++)
            {
                list.Items.Add(j + ") " + Math.Pow(ro, v) / Factorial(v) * Math.Pow(ro / v, j) / znam);
                chartList2.Add(new Point()
                {
                    x_axis = j + v, y_axis = Math.Pow(ro, v) / Factorial(v) * Math.Pow(ro / v, j) / znam
                });
            }
            (lineChart.Series[1] as AreaSeries).ItemsSource = chartList2;
            (lineChart.Series[1] as AreaSeries).Title       = "W(j)";
        }
Exemple #4
0
        public static void CalcPi(double lambda, double mu, int v, ListView list, WinRTXamlToolkit.Controls.DataVisualization.Charting.Chart lineChart)
        {
            List <Point> chartList = new List <Point>();
            double       znam      = 0;
            double       ro        = lambda / mu;

            for (int x = 0; x <= v - 1; x++)
            {
                znam += Math.Pow(ro, x) / Factorial(x);
            }
            znam += Math.Pow(ro, v) * v / (Factorial(v) * (v - ro));
            for (int i = 0; i <= v; i++)
            {
                list.Items.Add(i + ") " + Math.Pow(ro, i) / Factorial(i) / znam);
                chartList.Add(new Point()
                {
                    x_axis = i, y_axis = Math.Pow(ro, i) / Factorial(i) / znam
                });
            }
            (lineChart.Series[0] as AreaSeries).ItemsSource = chartList;
            (lineChart.Series[0] as AreaSeries).Title       = "P(i)";
        }
Exemple #5
0
        public static void CalcPk(double a, double mu, int v, uint n, ListView list, WinRTXamlToolkit.Controls.DataVisualization.Charting.Chart lineChart)
        {
            lineChart.Title = "P(k)";
            List <Point> chartList = new List <Point>();
            double       znam      = 0;

            for (uint x = 0; x <= v; x++)
            {
                znam += Cnm(n, x) * Math.Pow(a / (1 - a), x);
            }
            for (uint k = 0; k <= v; k++)
            {
                list.Items.Add(k + ") " + Cnm(n, k) * Math.Pow(a / (1 - a), k) / znam);
                chartList.Add(new Point()
                {
                    x_axis = k, y_axis = Cnm(n, k) * Math.Pow(a / (1 - a), k) / znam
                });
            }
            (lineChart.Series[0] as AreaSeries).ItemsSource = chartList;
            (lineChart.Series[0] as AreaSeries).Title       = "P(k)";
            (lineChart.Series[1] as AreaSeries).Visibility  = Windows.UI.Xaml.Visibility.Collapsed;
            (lineChart.Series[1] as AreaSeries).Title       = "";
        }
Exemple #6
0
        public static void CalcPk(double lambda, double mu, int v, ListView list, WinRTXamlToolkit.Controls.DataVisualization.Charting.Chart lineChart)
        {
            lineChart.Title = "P(k)";
            List <Point> chartList = new List <Point>();
            double       znam      = 0;
            double       ro        = lambda / mu;

            for (int x = 0; x <= v; x++)
            {
                znam += Math.Pow(ro, x) / Factorial(x);
            }
            for (int k = 0; k <= v; k++)
            {
                list.Items.Add(k + ") " + Math.Pow(ro, k) / Factorial(k) / znam);
                chartList.Add(new Point()
                {
                    x_axis = k, y_axis = Math.Pow(ro, k) / Factorial(k) / znam
                });
            }
            (lineChart.Series[0] as AreaSeries).ItemsSource = chartList;
            (lineChart.Series[0] as AreaSeries).Title       = "P(k)";
            (lineChart.Series[1] as AreaSeries).Visibility  = Windows.UI.Xaml.Visibility.Collapsed;
            (lineChart.Series[1] as AreaSeries).Title       = "";
        }
 public PriorityChart(Chart mychart)
 {
     this.myChart = mychart;
     this.myChart.Series.Clear();
     this.bsStatusNew = freshSeries("New"); this.myChart.Series.Add(bsStatusNew);
     this.bsStatusReplied = freshSeries("Replied"); this.myChart.Series.Add(bsStatusReplied);
     this.bsStatusInProgress = freshSeries("In Progress"); this.myChart.Series.Add(bsStatusInProgress);
     this.bsStatusOnHold = freshSeries("On Hold"); this.myChart.Series.Add(bsStatusOnHold);
     this.bsStatusWaitingReply = freshSeries("Waiting Reply"); this.myChart.Series.Add(bsStatusWaitingReply);
     this.bsStatusResolved = freshSeries("Resolved"); this.myChart.Series.Add(bsStatusResolved);
     readAll();
 }
 public CategoryChart(Chart mychart)
 {
     this.myChart = mychart;
     this.myChart.Series.Clear();
     this.bsPriorityLow = freshSeries("Low"); this.myChart.Series.Add(bsPriorityLow);
     this.bsPriorityMedium = freshSeries("Medium"); this.myChart.Series.Add(bsPriorityMedium);
     this.bsPriorityHigh = freshSeries("High"); this.myChart.Series.Add(bsPriorityHigh);
     this.bsPriorityCritical = freshSeries("Critical"); this.myChart.Series.Add(bsPriorityCritical);
     readAll();
 }
 public StatusChart(Chart mychart)
 {
     this.myChart = mychart;
     this.myChart.Series.Clear();
     this.bsCategoryGeneral = freshSeries("general"); this.myChart.Series.Add(bsCategoryGeneral);
     this.bsCategoryStudentVM = freshSeries("reqForStudentVM"); this.myChart.Series.Add(bsCategoryStudentVM);
     this.bsCategorySpecialityServers = freshSeries("reqForSpecialityServers"); this.myChart.Series.Add(bsCategorySpecialityServers);
     this.bsCategoryClassTech = freshSeries("classTechIssues"); this.myChart.Series.Add(bsCategoryClassTech);
     this.bsCategoryOfficeTech = freshSeries("officeTechIssues"); this.myChart.Series.Add(bsCategoryOfficeTech);
     this.bsCategoryWebsiteUpdate = freshSeries("departmentalWebsiteUpdate"); this.myChart.Series.Add(bsCategoryWebsiteUpdate);
     this.bsCategoryDeanAdmin = freshSeries("deanOfficeAdminSupport"); this.myChart.Series.Add(bsCategoryDeanAdmin);
     this.bsCategoryItAdmin = freshSeries("itAdminSupport"); this.myChart.Series.Add(bsCategoryItAdmin);
     this.bsCategoryCsswweAdmin = freshSeries("csswweAdminSupport"); this.myChart.Series.Add(bsCategoryCsswweAdmin);
     readAll();
 }
 public void SetGraphs(Chart power, Chart voltage, Chart amperage)
 {
     _power = power;
     _voltage = voltage;
     _amperage = amperage;
     Communication.GetInstance.sendFuncs["getModules"].DynamicInvoke((Action<JObject, JObject>)GetModulesCallback);
 }