// --------------------------------------------------------------------------------------------------------------------
//
// Copyright (c) 2014 OxyPlot contributors
//
//
// Represents an error item.
//
// --------------------------------------------------------------------------------------------------------------------
namespace ExampleLibrary
{
using OxyPlot;
///
/// Represents an error item.
///
public class ErrorItem
{
///
/// Initializes a new instance of the class.
///
public ErrorItem()
{
}
///
/// Initializes a new instance of the class.
///
/// The x.
/// The y.
/// The xerror.
/// The yerror.
public ErrorItem(double x, double y, double xerror, double yerror)
{
this.X = x;
this.Y = y;
this.XError = xerror;
this.YError = yerror;
}
///
/// Gets or sets the X.
///
public double X { get; set; }
///
/// Gets or sets the Y.
///
public double Y { get; set; }
///
/// Gets or sets the X error.
///
public double XError { get; set; }
///
/// Gets or sets the Y error.
///
public double YError { get; set; }
///
/// Returns c# code that generates this instance.
///
/// C# code.
public string ToCode()
{
return CodeGenerator.FormatConstructor(this.GetType(), "{0},{1},{2},{3}", this.X, this.Y, this.XError, this.YError);
}
}
}