Xceed Chart for WinForms v4.4 Documentation
Xceed.Chart.Core.v4.4 Assembly / Xceed.Chart.Core Namespace / Series Class / Add Method / Add(Double,String,FillEffect,LineProperties) Method
the value to be inserted in the Values data series
the string to be inserted in the Labels data series
the FillEffect to be inserted in the Appearance.FillEffects data series
the LineProperties to be inserted in the Appearance.LineProperties data series
Example


In This Topic
    Add(Double,String,FillEffect,LineProperties) Method
    In This Topic
    Adds new values in the Values, Labels, FillEffects and LineProperties series.
    Syntax
    'Declaration
     
    Public Overloads Sub Add( _
       ByVal dValue As Double, _
       ByVal sLabel As String, _
       ByVal fe As FillEffect, _
       ByVal lp As LineProperties _
    ) 
    'Usage
     
    Dim instance As Series
    Dim dValue As Double
    Dim sLabel As String
    Dim fe As FillEffect
    Dim lp As LineProperties
     
    instance.Add(dValue, sLabel, fe, lp)
    public void Add( 
       double dValue,
       string sLabel,
       FillEffect fe,
       LineProperties lp
    )

    Parameters

    dValue
    the value to be inserted in the Values data series
    sLabel
    the string to be inserted in the Labels data series
    fe
    the FillEffect to be inserted in the Appearance.FillEffects data series
    lp
    the LineProperties to be inserted in the Appearance.LineProperties data series
    Example
    The following code creates a bar chart with labels and different bar fill colors and bar borders.
    Dim bar As BarSeries =  Chart.Series.Add(SeriesType.Bar) 
    bar.Add(23, "Bar1", New FillEffect(Color.Chocolate), New LineProperties(1, Color.Black))
    bar.Add(67, "Bar2", New FillEffect(Color.Blue), New LineProperties(1, Color.Green))
    bar.Add(78, "Bar3", New FillEffect(Color.Coral), New LineProperties(1, Color.Red))
    bar.Appearance.FillMode = AppearanceFillMode.DataPoints
    bar.Appearance.LineMode = AppearanceLineMode.DataPoints
    bar.DataLabels.Format = "<value> <label>"
    BarSeries bar = Chart.Series.Add(SeriesType.Bar);
    bar.Add(23, "Bar1", new FillEffect(Color.Chocolate), new LineProperties(1, Color.Black));
    bar.Add(67, "Bar2", new FillEffect(Color.Blue), new LineProperties(1, Color.Green));
    bar.Add(78, "Bar3", new FillEffect(Color.Coral), new LineProperties(1, Color.Red));
    bar.Appearance.FillMode = AppearanceFillMode.DataPoints;
    bar.Appearance.LineMode = AppearanceLineMode.DataPoints;
    bar.DataLabels.Format = "<value> <label>";
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also