Jul 30, 2013 at 2:25 PM
Edited Jul 30, 2013 at 3:25 PM
I got a program that I am using OxyPlot.
I need to add Plots dynamically to a StackPanel.
My problems are the following.
If i define the Plot Padding and Margin, it is not followed.
I need to use DateTimeaxis. If I define the axis Position to AxisPosition.None it create a linear axix and ignore my DateTimeAxis.
What i want to make is to place two plots with no space between them.
Any help on that?
PS: Some code:
Here I set the DateTimeAxis Position
dateTimeAxis1 = new DateTimeAxis
CalendarWeekRule = CalendarWeekRule.FirstFourDayWeek,
FirstDayOfWeek = DayOfWeek.Monday,
MajorGridlineStyle = LineStyle.Solid,
MinorGridlineStyle = LineStyle.Dot,
Minimum = DateTimeAxis.ToDouble(FirstDate),
Maximum = DateTimeAxis.ToDouble(FinalDate),
IsPanEnabled = false,
IsZoomEnabled = false
dateTimeAxis1.Position = AxisPosition.Top;
dateTimeAxis1.Position = AxisPosition.None;
Here I set the Plot Margin and Padding
myPlot = new OxyPlot.Wpf.Plot()
Height = 150,
IsRendering = true
myPlot.Padding = new Thickness(5, 0, 15, 0);
myPlot.PlotMargins = new Thickness(0, 0, 0, 0);