Xceed Chart for WinForms v4.4 Documentation
Xceed.Chart.Standard.v4.4 Assembly / Xceed.Chart.Standard Namespace / LineProperties Class / Factor Property
Example


In This Topic
    Factor Property
    In This Topic
    A multiplier for each bit in the line stipple pattern.
    Syntax
    'Declaration
     
    Public Property Factor As Integer
    'Usage
     
    Dim instance As LineProperties
    Dim value As Integer
     
    instance.Factor = value
     
    value = instance.Factor
    public int Factor {get; set;}
    Remarks
    The Pattern and Factor properties define the line by working together to define whether a certain pixel from the line should be drawn or not. If factor is 3, for example, each bit in the pattern will be used three times before the next bit in the pattern is used. The factor parameter is clamped to the range [1, 256] and defaults to one. The values of the LinePattern enumeration actually represent 16-bit integers whose bit pattern determines which fragments of a line will be drawn when the line is rasterized.
    Example
    The following example shows how to define a custom pattern and modify the factor.
    Dim chart As Chart = ChartControl.Charts.GetAt(0) 
    Dim bar As BarSeries = CType(chart.Series.Add(SeriesType.Bar), BarSeries)
    
    bar.Add(10, "Apples")
    bar.Add(20, "Oranges")
    bar.Add(30, "Bananas")
    bar.Add(25, "Tomatoes")
    bar.Add(29, "Cucumbers")
    
    bar.Appearance.LineMode = AppearanceLineMode.Series
    bar.BarBorder.Color = System.Drawing.Color.Black
    bar.BarBorder.Pattern = CType(0x8888, LinePattern)
    bar.BarBorder.Factor = 3
    Chart chart = ChartControl.Charts.GetAt(0);
    BarSeries bar = (BarSeries)chart.Series.Add(SeriesType.Bar);
    
    bar.Add(10, "Apples");
    bar.Add(20, "Oranges");
    bar.Add(30, "Bananas");
    bar.Add(25, "Tomatoes");
    bar.Add(29, "Cucumbers");
    
    bar.Appearance.LineMode = AppearanceLineMode.Series;
    bar.BarBorder.Color = System.Drawing.Color.Black;
    bar.BarBorder.Pattern = (LinePattern)0x8888;
    bar.BarBorder.Factor = 3;
    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