/// <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); }
/// <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(); }
public OxyPlot() { InitializeComponent(); this.ViewModel = new OxyPlotViewModel(); this.DataContext = ViewModel; }