Defines an Axis.Separator, this class customizes the separator of an axis.
Inheritance: System.Windows.FrameworkElement, ISeparatorView
        void PersistentChart.CreateGraph()
        {
            _employeesInCompanyChart                = new CartesianChart();
            _employeesInCompanyChart.Name           = "Chart";
            _employeesInCompanyChart.Series         = _viewModel.SeriesCollection;
            _employeesInCompanyChart.LegendLocation = LegendLocation.Left;

            Axis AxisX = new Axis();

            AxisX.Title  = "Mes";
            AxisX.Labels = _viewModel.Labels;
            _employeesInCompanyChart.AxisX.Add(AxisX);

            Axis AxisY = new Axis();

            AxisY.Title = "Empleados";
            //AxisY.LabelFormatter = _viewModel.Formatter;

            LiveCharts.Wpf.Separator sep = new LiveCharts.Wpf.Separator();
            sep.IsEnabled   = false;
            sep.Step        = 1;
            AxisX.Separator = sep;

            _employeesInCompanyChart.AxisY.Add(AxisY);

            GridContainer.Children.Add(_employeesInCompanyChart);
            _gContainer = GridContainer;
        }
Example #2
0
        public DiagnosticsPerGroup()
        {
            InitializeComponent();
            DataContext = this;

            var groups = new string[20];

            for (int i = 0; i < 20; i++)
            {
                if (i < 19)
                {
                    groups[i] = string.Format("De {0} a {1} años", i * 5, i * 5 + 4);
                }
                else
                {
                    groups[i] = string.Format("De {0} o más", i * 5);
                }
            }
            ComboBoxGroups.ItemsSource = groups;

            ComboBoxGenders.ItemsSource = new string[] { "Hombres", "Mujeres", "Ambos" };

            Separator = new LiveCharts.Wpf.Separator()
            {
                Step = 1
            };

            Formatter = value => value.ToString("N");
        }
Example #3
0
 public MainWindow()
 {
     InitializeComponent();
     Values1            = new ChartValues <ObservablePoint>();
     Values2            = new ChartValues <ObservablePoint>();
     SepX               = new LiveCharts.Wpf.Separator();
     SepY               = new LiveCharts.Wpf.Separator();
     OsY                = new Axis();
     OsX                = new Axis();
     button2.Visibility = Visibility.Collapsed;
 }
Example #4
0
        public CommunitiesPerDiagnostic()
        {
            InitializeComponent();
            DataContext = this;

            Separator = new LiveCharts.Wpf.Separator()
            {
                Step = 1
            };

            Formatter = value => value.ToString("N");
        }
Example #5
0
        public CommunitiesPerSpecialty()
        {
            InitializeComponent();
            DataContext = this;

            Specialties = new ObservableCollection <Specialty>(App.DbContext.Specialties);

            Separator = new LiveCharts.Wpf.Separator()
            {
                Step = 1
            };

            Formatter = value => value.ToString("N");
        }
Example #6
0
        public SpecialtiesPerRegion()
        {
            InitializeComponent();
            DataContext = this;

            Parishes = new ObservableCollection <Parish>(App.DbContext.Parishes);
            ComboBoxParish.SelectedIndex = 0;

            Separator = new LiveCharts.Wpf.Separator()
            {
                Step = 1
            };

            Formatter = value => value.ToString("N");
        }
Example #7
0
        // MARK: Cross Correlation Methods

        private void SetUpCrossCorrelationCharts()                                                                       //same setup as the 4 paw charts above except we're displaying cross correlation values so no scatter plot indicating the current frame is necesssary
        {
            CalculateCrossCorrelationSeries(ref HindLeftInStance, ref HindRightInStance, ref HindLimbsCrossCorrelation); //the cross correlation values also need to be calculated first
            CalculateCrossCorrelationSeries(ref FrontLeftInStance, ref FrontRightInStance, ref ForeLimbsCrossCorrelation);
            CalculateCrossCorrelationSeries(ref HindLeftInStance, ref FrontRightInStance, ref HindLeftToForeRightCC);
            CalculateCrossCorrelationSeries(ref HindRightInStance, ref FrontLeftInStance, ref HindRightToForeLeftCC);

            List <string> labels = new List <string>(); //livecharts won't let us choose a single X axis value and label it, has to be done by having labels for every single point

            foreach (double cur in HindLimbsCrossCorrelation)
            {
                labels.Add("");
            }
            labels[GaitNumberOfFrames - 1] = "Mid Point (" + (GaitNumberOfFrames - 1) + ")";

            LiveCharts.Wpf.Separator separator = new LiveCharts.Wpf.Separator(); //necessary to show the label properly
            separator.StrokeThickness = 0;
            separator.Step            = 1;


            if (HindCorrelationChart.Series.Count < 1)   //SETTING UP FOR THE FIRST TIME
            {
                HindCorrelationChart.AxisX.Clear();
                HindCorrelationChart.AxisY.Clear();
                ForeCorrelationChart.AxisX.Clear();
                ForeCorrelationChart.AxisY.Clear();
                LHRFCorrelationChart.AxisX.Clear();
                LHRFCorrelationChart.AxisY.Clear();
                RHLFCorrelationChart.AxisX.Clear();
                RHLFCorrelationChart.AxisY.Clear();

                //CORRELATION CURRENTLY NOT BEING DISPLAYED IN THE UI BECAUSE IT'S INCORRECT

                // hind limbs correlation
                HindCorrelationChart.AxisX.Add(new Axis {
                    MaxValue  = HindLimbsCrossCorrelation.Count,
                    MinValue  = 0,
                    Labels    = labels,
                    Separator = new LiveCharts.Wpf.Separator {
                        Step = 1, StrokeThickness = 0
                    }
                });

                HindCorrelationChart.AxisY.Add(new Axis {
                    MaxValue = 0.5,
                    MinValue = -0.5
                });

                HindCorrelationChart.Series.Add(new LineSeries {
                    Values            = new ChartValues <double>(HindLimbsCrossCorrelation),
                    PointGeometrySize = 0,
                    LineSmoothness    = 0,
                });

                //front limbs correlation
                ForeCorrelationChart.AxisX.Add(new Axis {
                    MaxValue  = ForeLimbsCrossCorrelation.Count,
                    MinValue  = 0,
                    Labels    = labels,
                    Separator = new LiveCharts.Wpf.Separator {
                        Step = 1, StrokeThickness = 0
                    }
                });

                ForeCorrelationChart.AxisY.Add(new Axis {
                    MaxValue = 0.5,
                    MinValue = -0.5
                });

                ForeCorrelationChart.Series.Add(new LineSeries {
                    Values            = new ChartValues <double>(ForeLimbsCrossCorrelation),
                    PointGeometrySize = 0,
                    LineSmoothness    = 0,
                });


                //hind left to fore right correlation
                LHRFCorrelationChart.AxisX.Add(new Axis {
                    MaxValue  = HindLeftToForeRightCC.Count,
                    MinValue  = 0,
                    Labels    = labels,
                    Separator = new LiveCharts.Wpf.Separator {
                        Step = 1, StrokeThickness = 0
                    }
                });

                LHRFCorrelationChart.AxisY.Add(new Axis {
                    MaxValue = 0.5,
                    MinValue = -0.5
                });

                LHRFCorrelationChart.Series.Add(new LineSeries {
                    Values            = new ChartValues <double>(HindLeftToForeRightCC),
                    PointGeometrySize = 0,
                    LineSmoothness    = 0,
                });


                //hind right to fore left correlation
                RHLFCorrelationChart.AxisX.Add(new Axis {
                    MaxValue  = HindRightToForeLeftCC.Count,
                    MinValue  = 0,
                    Labels    = labels,
                    Separator = new LiveCharts.Wpf.Separator {
                        Step = 1, StrokeThickness = 0
                    }
                });

                RHLFCorrelationChart.AxisY.Add(new Axis {
                    MaxValue = 0.5,
                    MinValue = -0.5
                });

                RHLFCorrelationChart.Series.Add(new LineSeries {
                    Values            = new ChartValues <double>(HindRightToForeLeftCC),
                    PointGeometrySize = 0,
                    LineSmoothness    = 0,
                });
            }
        }
        void PersistentChart.CreateGraph()
        {
            _employeesInCompanyChart = new CartesianChart();
            _employeesInCompanyChart.Name = "Chart";
            _employeesInCompanyChart.Series = _viewModel.SeriesCollection;
            _employeesInCompanyChart.LegendLocation = LegendLocation.Left;

            Axis AxisX = new Axis();
            AxisX.Title = "Mes";
            AxisX.Labels = _viewModel.Labels;
            _employeesInCompanyChart.AxisX.Add(AxisX);

            Axis AxisY = new Axis();
            AxisY.Title = "Empleados";
            //AxisY.LabelFormatter = _viewModel.Formatter;

            LiveCharts.Wpf.Separator sep = new LiveCharts.Wpf.Separator();
            sep.IsEnabled = false;
            sep.Step = 1;
            AxisX.Separator = sep;

            _employeesInCompanyChart.AxisY.Add(AxisY);

            GridContainer.Children.Add(_employeesInCompanyChart);
            _gContainer = GridContainer;
        }
Example #9
-1
        void PersistentChart.CreateGraph()
        {
            //!ELEMENT CartesianChart
            _paymentsChart      = new CartesianChart();
            _paymentsChart.Name = "Chart";
            //gr.DisableAnimations = true;
            _paymentsChart.Series = _viewModel.SeriesCollection;
            // Series Binding

            /*Binding bndg = new Binding();
             * // Next line don't know if neccessary
             * bndg.Source = _viewModel;
             * bndg.Path = new PropertyPath("SeriesCollection");
             * gr.SetBinding(CartesianChart.SeriesProperty, bndg);*/
            _paymentsChart.LegendLocation = LiveCharts.LegendLocation.Right;


            //!subELEMENT CartesianChart.AxisY
            // Works but commented
            Axis AxisY = new Axis();

            AxisY.Title          = "Pagos";
            AxisY.LabelFormatter = _viewModel.YFormatter;

            /* Binding bndgForm = new Binding();
             * bndgForm.Source = _viewModel;
             * bndgForm.Path = new PropertyPath("YFormatter");
             * AxisY.SetBinding(Axis.LabelFormatterProperty, bndgForm);*/
            //gr.AddToView(AxisY);
            _paymentsChart.AxisY.Add(AxisY);


            //!subELEMENT CartesianChart.AxisX
            Axis AxisX = new Axis();

            AxisX.Title = "Mes";
            // This works
            AxisX.Labels = _viewModel.Labels;

            /*Binding bndgLab = new Binding();
             * bndgLab.Source = _viewModel;
             * bndgLab.Path = new PropertyPath("Labels");
             * AxisX.SetBinding(Axis.LabelsProperty, bndgLab);*/
            /*gr.AddToView(AxisX);*/
            // Separator
            LiveCharts.Wpf.Separator sep = new LiveCharts.Wpf.Separator();
            sep.IsEnabled   = false;
            sep.Step        = 1;
            AxisX.Separator = sep; // Add separator

            _paymentsChart.AxisX.Add(AxisX);
            //gr.SetValue(Grid.RowProperty, 1);
            Grid.SetRow(_paymentsChart, 1);
            Grid.SetColumn(_paymentsChart, 0);
            GridContainer.Children.Add(_paymentsChart);
            _gContainer = GridContainer; // Save the Grid's reference to remove the chart later
        }
Example #10
-1
        void PersistentChart.CreateGraph()
        {
            //!ELEMENT CartesianChart
            _paymentsChart = new CartesianChart();
            _paymentsChart.Name = "Chart";
            //gr.DisableAnimations = true;
            _paymentsChart.Series = _viewModel.SeriesCollection;
            // Series Binding
            /*Binding bndg = new Binding();
            // Next line don't know if neccessary
            bndg.Source = _viewModel;
            bndg.Path = new PropertyPath("SeriesCollection");
            gr.SetBinding(CartesianChart.SeriesProperty, bndg);*/
            _paymentsChart.LegendLocation = LiveCharts.LegendLocation.Right;

            //!subELEMENT CartesianChart.AxisY
            // Works but commented
            Axis AxisY = new Axis();
            AxisY.Title = "Pagos";
            AxisY.LabelFormatter = _viewModel.YFormatter;
            /* Binding bndgForm = new Binding();
             bndgForm.Source = _viewModel;
             bndgForm.Path = new PropertyPath("YFormatter");
             AxisY.SetBinding(Axis.LabelFormatterProperty, bndgForm);*/
            //gr.AddToView(AxisY);
            _paymentsChart.AxisY.Add(AxisY);

            //!subELEMENT CartesianChart.AxisX
            Axis AxisX = new Axis();
            AxisX.Title = "Mes";
            // This works
            AxisX.Labels = _viewModel.Labels;
            /*Binding bndgLab = new Binding();
            bndgLab.Source = _viewModel;
            bndgLab.Path = new PropertyPath("Labels");
            AxisX.SetBinding(Axis.LabelsProperty, bndgLab);*/
            /*gr.AddToView(AxisX);*/
            // Separator
            LiveCharts.Wpf.Separator sep = new LiveCharts.Wpf.Separator();
            sep.IsEnabled = false;
            sep.Step = 1;
            AxisX.Separator = sep; // Add separator

            _paymentsChart.AxisX.Add(AxisX);
            //gr.SetValue(Grid.RowProperty, 1);
            Grid.SetRow(_paymentsChart, 1);
            Grid.SetColumn(_paymentsChart, 0);
            GridContainer.Children.Add(_paymentsChart);
            _gContainer = GridContainer; // Save the Grid's reference to remove the chart later
        }