These are chat archives for oxyplot/oxyplot

8th
Nov 2015
tjbobo
@tjbobo
Nov 08 2015 20:22
Hi guys, is any difference between DateTimeAxis.ToDouble(DateTime value) method and ToOADate() + 1 ? I want to use double expression for time in my entire project but with separate model and plot layer.
Also Iam using my old extension for auto adjusted Y axes, has oxyplot an integrated solution already?
tjbobo
@tjbobo
Nov 08 2015 20:56
@A191919 Well you can but it will be ugly code ;) U need to know which inherited types of Series u are using and implement them. Somethink like that but please dont use dynamic its just example :D
public static dynamic GetPoints(this PlotModel model, int index)
{
    var series = model.Series[index];

    if (series is LineSeries)
    {
        return ((LineSeries)series).Points;
    }

    if (series is DataSeries)
    {
        return ((DataSeries)series).Items;
    }

    throw new NotSupportedException("Not supported Series type");
}