This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.ComponentModel; | |
using OxyPlotDemo.Annotations; | |
namespace OxyPlotDemo.ViewModels | |
{ | |
public class MainWindowModel: INotifyPropertyChanged | |
{ | |
public event PropertyChangedEventHandler PropertyChanged; | |
[NotifyPropertyChangedInvocator] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.ComponentModel; | |
using OxyPlot; | |
using OxyPlotDemo.Annotations; | |
namespace OxyPlotDemo.ViewModels | |
{ | |
public class MainWindowModel: INotifyPropertyChanged | |
{ | |
private PlotModel plotModel; | |
public PlotModel PlotModel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Window x:Class="OxyPlotDemo.MainWindow" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:oxy="http://oxyplot.codeplex.com" | |
Title="MainWindow" Height="350" Width="525"> | |
<Grid> | |
<oxy:Plot x:Name="Plot1" Title="A Graph" Model="{Binding PlotModel}" Margin="10" Grid.Row="1"> | |
</oxy:Plot> | |
</Grid> | |
</Window> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Windows; | |
namespace OxyPlotDemo | |
{ | |
/// <summary> | |
/// Interaction logic for MainWindow.xaml | |
/// </summary> | |
public partial class MainWindow : Window | |
{ | |
private ViewModels.MainWindowModel viewModel; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void SetUpModel() | |
{ | |
PlotModel.LegendTitle = "Legend"; | |
PlotModel.LegendOrientation = LegendOrientation.Horizontal; | |
PlotModel.LegendPlacement = LegendPlacement.Outside; | |
PlotModel.LegendPosition = LegendPosition.TopRight; | |
PlotModel.LegendBackground = OxyColor.FromAColor(200, OxyColors.White); | |
PlotModel.LegendBorder = OxyColors.Black; | |
var dateAxis = new DateTimeAxis(AxisPosition.Bottom, "Date", "dd/MM/yy HH:mm") { MajorGridlineStyle = LineStyle.Solid, MinorGridlineStyle = LineStyle.Dot, IntervalLength = 80 }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void LoadData() | |
{ | |
List<Measurement> measurements = Data.GetData(); | |
var dataPerDetector = measurements.GroupBy(m => m.DetectorId).ToList(); | |
foreach (var data in dataPerDetector) | |
{ | |
var lineSerie = new LineSeries | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void UpdateModel() | |
{ | |
List<Measurement> measurements = Data.GetUpdateData(lastUpdate); | |
var dataPerDetector = measurements.GroupBy(m => m.DetectorId).OrderBy(m => m.Key).ToList(); | |
foreach (var data in dataPerDetector) | |
{ | |
var lineSerie = PlotModel.Series[data.Key] as LineSeries; | |
if (lineSerie != null) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public MainWindow() | |
{ | |
viewModel = new ViewModels.MainWindowModel(); | |
DataContext = viewModel; | |
CompositionTarget.Rendering += CompositionTargetRendering; | |
InitializeComponent(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public MainWindow() | |
{ | |
viewModel = new ViewModels.MainWindowModel(); | |
DataContext = viewModel; | |
CompositionTarget.Rendering += CompositionTargetRendering; | |
stopwatch.Start(); | |
InitializeComponent(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PM> Install-Package Atlassian.SDK -Version 2.3.0 |
OlderNewer