DateTimeAxis Interpolation

Oystein Bjorke 10 years ago 0
This discussion was imported from CodePlex

Jumaga2015 wrote at 2013-05-06 17:41:

Hi, I want to make a graphic with price series and I find the problem that interpolates the price series when one day has no data.

It is possible to generate a DateTimeAxis with only the days in the serie?
Dates may behave in the serie like a ordinal serie?

congratulations, OxyPlot is a great job.

objo wrote at 2013-06-08 11:40:

The DateTimeAxis is based on the LinearAxis:
  • DateTime values are converted to double values (days since 1900, like Excel)
  • tries to find automatix major/minor intervals that are 'nice'
  • converts the double values to DateTime before formatting labels
Use the DateTimeAxis.ToDouble static method to get the ordinal values for the dates.
Undefined points should not be plotted, if you want to interpolate you must do this in your code.