StringFormat instead of formatted value on DateTimeAxis

Sep 20, 2013 at 12:14 PM
Hi,

I've just installed OxyPlot and started experimenting with it. However, with DateTimeAxis, I ran into a strange problem. Whatever I set as StringFormat shows verbatim as the labels below the axis. I.e., if StringFormat=@"D", I see lots of Ds on the chart not the actual dates. If I set the property to null then yyyy appears instead of the years. Any ideas what's gone wrong?

Snipets below.

Thanks,
Akos

XAML:
<oxy:Plot x:Name="chart" Title="A Graph"/>
C#:
PlotModel model = new PlotModel();
var xAxis = new DateTimeAxis(AxisPosition.Bottom, null, @"D", DateTimeIntervalType.Months) { MajorGridlineStyle = LineStyle.Solid, MinorGridlineStyle = LineStyle.Dot };
model.Axes.Add(xAxis);
var yAxis = new LinearAxis(AxisPosition.Left, 0.0 / 0.0, 0.0 / 0.0, "Value") { MajorGridlineStyle = LineStyle.Solid, MinorGridlineStyle = LineStyle.Dot };
model.Axes.Add(yAxis);
chart.Model = model;
Configuration: Win 7SP1 (Hungarian), VS Pro 2012U3, OxyPlot.Core|Wpf 2013.1.82.1 via NuGet
Coordinator
Sep 20, 2013 at 12:46 PM
Try the latest version, this was fixed yesterday. Egészségedre!
https://oxyplot.codeplex.com/workitem/10077
Sep 20, 2013 at 12:54 PM
Ahh, amazing response time! Thanks! :)