Search Results for

    Show / Hide Table of Contents

    Class LineItem

    Encapsulates a curve type that is displayed as a line and/or a set of symbols at each point.

    Inheritance
    Object
    CurveItem
    LineItem
    StickItem
    Implements
    ICloneable
    ISerializable
    Inherited Members
    CurveItem._isX2Axis
    CurveItem._isY2Axis
    CurveItem._yAxisIndex
    CurveItem._isVisible
    CurveItem._isSelected
    CurveItem._isSelectable
    CurveItem._isOverrideOrdinal
    CurveItem._points
    CurveItem.Tag
    CurveItem.schema
    CurveItem.Label
    CurveItem.Color
    CurveItem.IsVisible
    CurveItem.IsSelected
    CurveItem.IsSelectable
    CurveItem.IsOverrideOrdinal
    CurveItem.IsX2Axis
    CurveItem.IsY2Axis
    CurveItem.YAxisIndex
    CurveItem.IsBar
    CurveItem.IsPie
    CurveItem.IsLine
    CurveItem.NPts
    CurveItem.Points
    CurveItem.Item[Int32]
    CurveItem.Link
    CurveItem.AddPoint(Double, Double)
    CurveItem.AddPoint(PointPair)
    CurveItem.Clear()
    CurveItem.RemovePoint(Int32)
    CurveItem.GetXAxis(GraphPane)
    CurveItem.GetYAxis(GraphPane)
    CurveItem.GetYAxisIndex(GraphPane)
    CurveItem.MakeUnique()
    CurveItem.GetRange(Double, Double, Double, Double, Boolean, Boolean, GraphPane)
    CurveItem.BaseAxis(GraphPane)
    CurveItem.ValueAxis(GraphPane)
    CurveItem.GetBarWidth(GraphPane)
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: ZedGraph
    Assembly: ZedGraph.dll
    Syntax
    [Serializable]
    public class LineItem : CurveItem, ICloneable, ISerializable

    Constructors

    | Improve this Doc View Source

    LineItem(SerializationInfo, StreamingContext)

    Constructor for deserializing objects

    Declaration
    protected LineItem(SerializationInfo info, StreamingContext context)
    Parameters
    Type Name Description
    SerializationInfo info

    A SerializationInfo instance that defines the serialized data

    StreamingContext context

    A StreamingContext instance that contains the serialized data

    | Improve this Doc View Source

    LineItem(String)

    Create a new LineItem, specifying only the legend Label.

    Declaration
    public LineItem(string label)
    Parameters
    Type Name Description
    String label

    The _label that will appear in the legend.

    | Improve this Doc View Source

    LineItem(String, Double[], Double[], Color, SymbolType)

    Create a new LineItem using the specified properties.

    Declaration
    public LineItem(string label, double[] x, double[] y, Color color, SymbolType symbolType)
    Parameters
    Type Name Description
    String label

    The _label that will appear in the legend.

    Double[] x

    An array of double precision values that define the independent (X axis) values for this curve

    Double[] y

    An array of double precision values that define the dependent (Y axis) values for this curve

    Color color

    A Color value that will be applied to the Line and Symbol properties.

    SymbolType symbolType

    A SymbolType enum specifying the type of symbol to use for this LineItem. Use None to hide the symbols.

    | Improve this Doc View Source

    LineItem(String, Double[], Double[], Color, SymbolType, Single)

    Create a new LineItem using the specified properties.

    Declaration
    public LineItem(string label, double[] x, double[] y, Color color, SymbolType symbolType, float lineWidth)
    Parameters
    Type Name Description
    String label

    The _label that will appear in the legend.

    Double[] x

    An array of double precision values that define the independent (X axis) values for this curve

    Double[] y

    An array of double precision values that define the dependent (Y axis) values for this curve

    Color color

    A Color value that will be applied to the Line and Symbol properties.

    SymbolType symbolType

    A SymbolType enum specifying the type of symbol to use for this LineItem. Use None to hide the symbols.

    Single lineWidth

    The width (in points) to be used for the Line. This width is scaled based on CalcScaleFactor(). Use a value of zero to hide the line (see IsVisible).

    | Improve this Doc View Source

    LineItem(String, IPointList, Color, SymbolType)

    Create a new LineItem using the specified properties.

    Declaration
    public LineItem(string label, IPointList points, Color color, SymbolType symbolType)
    Parameters
    Type Name Description
    String label

    The _label that will appear in the legend.

    IPointList points

    A IPointList of double precision value pairs that define the X and Y values for this curve

    Color color

    A Color value that will be applied to the Line and Symbol properties.

    SymbolType symbolType

    A SymbolType enum specifying the type of symbol to use for this LineItem. Use None to hide the symbols.

    | Improve this Doc View Source

    LineItem(String, IPointList, Color, SymbolType, Single)

    Create a new LineItem using the specified properties.

    Declaration
    public LineItem(string label, IPointList points, Color color, SymbolType symbolType, float lineWidth)
    Parameters
    Type Name Description
    String label

    The _label that will appear in the legend.

    IPointList points

    A IPointList of double precision value pairs that define the X and Y values for this curve

    Color color

    A Color value that will be applied to the Line and Symbol properties.

    SymbolType symbolType

    A SymbolType enum specifying the type of symbol to use for this LineItem. Use None to hide the symbols.

    Single lineWidth

    The width (in points) to be used for the Line. This width is scaled based on CalcScaleFactor(). Use a value of zero to hide the line (see IsVisible).

    | Improve this Doc View Source

    LineItem(LineItem)

    The Copy Constructor

    Declaration
    public LineItem(LineItem rhs)
    Parameters
    Type Name Description
    LineItem rhs

    The LineItem object from which to copy

    Fields

    | Improve this Doc View Source

    _line

    Private field that stores a reference to the Line class defined for this LineItem. Use the public property Line to access this value.

    Declaration
    [CLSCompliant(false)]
    protected Line _line
    Field Value
    Type Description
    Line
    | Improve this Doc View Source

    _symbol

    Private field that stores a reference to the Symbol class defined for this LineItem. Use the public property Symbol to access this value.

    Declaration
    [CLSCompliant(false)]
    protected Symbol _symbol
    Field Value
    Type Description
    Symbol
    | Improve this Doc View Source

    schema2

    Current schema value that defines the version of the serialized file

    Declaration
    public const int schema2 = 10
    Field Value
    Type Description
    Int32

    Properties

    | Improve this Doc View Source

    Line

    Gets or sets the Line class instance defined for this LineItem.

    Declaration
    public Line Line { get; set; }
    Property Value
    Type Description
    Line
    | Improve this Doc View Source

    Symbol

    Gets or sets the Symbol class instance defined for this LineItem.

    Declaration
    public Symbol Symbol { get; set; }
    Property Value
    Type Description
    Symbol

    Methods

    | Improve this Doc View Source

    Clone()

    Typesafe, deep-copy clone method.

    Declaration
    public LineItem Clone()
    Returns
    Type Description
    LineItem

    A new, independent copy of this class

    | Improve this Doc View Source

    Draw(Graphics, GraphPane, Int32, Single)

    Do all rendering associated with this LineItem to the specified Graphics device. This method is normally only called by the Draw method of the parent CurveList collection object.

    Declaration
    public override void Draw(Graphics g, GraphPane pane, int pos, float scaleFactor)
    Parameters
    Type Name Description
    Graphics g

    A graphic device object to be drawn into. This is normally e.Graphics from the PaintEventArgs argument to the Paint() method.

    GraphPane pane

    A reference to the GraphPane object that is the parent or owner of this object.

    Int32 pos

    The ordinal position of the current Bar curve.

    Single scaleFactor

    The scaling factor to be used for rendering objects. This is calculated and passed down by the parent GraphPane object using the CalcScaleFactor() method, and is used to proportionally adjust font sizes, etc. according to the actual size of the graph.

    Overrides
    CurveItem.Draw(Graphics, GraphPane, Int32, Single)
    | Improve this Doc View Source

    DrawLegendKey(Graphics, GraphPane, RectangleF, Single)

    Draw a legend key entry for this LineItem at the specified location

    Declaration
    public override void DrawLegendKey(Graphics g, GraphPane pane, RectangleF rect, float scaleFactor)
    Parameters
    Type Name Description
    Graphics g

    A graphic device object to be drawn into. This is normally e.Graphics from the PaintEventArgs argument to the Paint() method.

    GraphPane pane

    A reference to the GraphPane object that is the parent or owner of this object.

    RectangleF rect

    The RectangleF struct that specifies the location for the legend key

    Single scaleFactor

    The scaling factor to be used for rendering objects. This is calculated and passed down by the parent GraphPane object using the CalcScaleFactor() method, and is used to proportionally adjust font sizes, etc. according to the actual size of the graph.

    Overrides
    CurveItem.DrawLegendKey(Graphics, GraphPane, RectangleF, Single)
    | Improve this Doc View Source

    GetCoords(GraphPane, Int32, out String)

    Determine the coords for the rectangle associated with a specified point for this CurveItem

    Declaration
    public override bool GetCoords(GraphPane pane, int i, out string coords)
    Parameters
    Type Name Description
    GraphPane pane

    The GraphPane to which this curve belongs

    Int32 i

    The index of the point of interest

    String coords

    A list of coordinates that represents the "rect" for this point (used in an html AREA tag)

    Returns
    Type Description
    Boolean

    true if it's a valid point, false otherwise

    Overrides
    CurveItem.GetCoords(GraphPane, Int32, out String)
    | Improve this Doc View Source

    GetObjectData(SerializationInfo, StreamingContext)

    Populates a SerializationInfo instance with the data needed to serialize the target object

    Declaration
    [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]
    public override void GetObjectData(SerializationInfo info, StreamingContext context)
    Parameters
    Type Name Description
    SerializationInfo info

    A SerializationInfo instance that defines the serialized data

    StreamingContext context

    A StreamingContext instance that contains the serialized data

    Overrides
    CurveItem.GetObjectData(SerializationInfo, StreamingContext)
    | Improve this Doc View Source

    MakeUnique(ColorSymbolRotator)

    Loads some pseudo unique colors/symbols into this LineItem. This is mainly useful for differentiating a set of new LineItems without having to pick your own colors/symbols. MakeUnique(ColorSymbolRotator)

    Declaration
    public override void MakeUnique(ColorSymbolRotator rotator)
    Parameters
    Type Name Description
    ColorSymbolRotator rotator

    The ColorSymbolRotator that is used to pick the color and symbol for this method call.

    Overrides
    CurveItem.MakeUnique(ColorSymbolRotator)

    Explicit Interface Implementations

    | Improve this Doc View Source

    ICloneable.Clone()

    Implement the ICloneable interface in a typesafe manner by just calling the typed version of Clone()

    Declaration
    object ICloneable.Clone()
    Returns
    Type Description
    Object

    A deep copy of this object

    Implements

    System.ICloneable
    System.Runtime.Serialization.ISerializable
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX