Exemplo n.º 1
0
        /// <summary>
        /// Plots the specified plotModel model.
        /// </summary>
        /// <param name="plotModel">The plotModel.</param>
        /// <exception cref="ArgumentNullException">The <paramref name="plotModel"/> is <c>null</c>.</exception>
        public void Plot(OxyPlotModel plotModel)
        {
            Argument.IsNotNull("plotModel", plotModel);

            var orchestraService = GetService <IOrchestraService>();

            var viewModel = new OxyPlotViewModel(plotModel);

            orchestraService.ShowDocument(viewModel);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MainViewModel"/> class.
        /// </summary>
        public MainViewModel()
        {
            _booksReadFromDatabase   = new ObservableCollection <BookRead>();
            _nationsReadFromDatabase = new ObservableCollection <Nation>();

            _booksReadDatabase   = new BooksReadDatabase(DatabaseConnectionString);
            _nationsReadDatabase = new NationDatabase(DatabaseConnectionString);

            _selectedPlot = PlotType.AverageDaysPerBook;

            _oxyPlotChart = new OxyPlotViewModel(_selectedPlot);

            SetupPlotTypesByTitle();
        }
Exemplo n.º 3
0
 public OxyPlot()
 {
     InitializeComponent();
     this.ViewModel   = new OxyPlotViewModel();
     this.DataContext = ViewModel;
 }