Created
March 14, 2013 13:25
-
-
Save BartDM/5161269 to your computer and use it in GitHub Desktop.
Code samples of blog post Creating graphs in WPF using OxyPlot on http://blog.bartdemeyer.be
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 }; | |
PlotModel.Axes.Add(dateAxis); | |
var valueAxis = new LinearAxis(AxisPosition.Left, 0) { MajorGridlineStyle = LineStyle.Solid, MinorGridlineStyle = LineStyle.Dot, Title = "Value" }; | |
PlotModel.Axes.Add(valueAxis); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment