DateTimeAxis, vb and WPF error

Sep 10, 2012 at 2:18 PM

Anyone else using this library with the combination DateTimeAxis +VB.net 2010 +WPF?

I'm getting an error on creating an axis:

'.ctor' is ambiguous because multiple kinds of members with this name exist in class 'OxyPlot.DateTimeAxis'

with the code: (error is on the variable)

Dim xAxis As New DateTimeAxis()
xAxis.IntervalType = DateTimeIntervalType.Months
xAxis.Title = "Time"
model.Axes.Add(xAxis)

Am I using this wrong or is this an error with the vb only?

Sep 10, 2012 at 5:16 PM
Edited Sep 10, 2012 at 5:35 PM

Looking into it a bit more VB has an issue with constructors where the properties are optional:

DataTimeAxis.cs:

public DateTimeAxis()

public DateTimeAxis( AxisPosition pos = AxisPosition.Bottom, string title = null, string format = null, DateTimeIntervalType intervalType = DateTimeIntervalType.Auto) : base(pos, title)

Commenting out the first constructor gets rid of the problem.