Xceed Chart for WinForms v4.4 Documentation
Xceed.Chart.Core.v4.4 Assembly / Xceed.Chart.Core Namespace / SurfaceSeriesBase Class / Palette Property
Example


In This Topic
    Palette Property
    In This Topic
    Gives access to the custom palette associated with the surface. To make the chart use the custom palette you have to set the AutomaticPalette property to false.
    Syntax
    'Declaration
     
    <CategoryAttribute("Palette")>
    <DescriptionAttribute("Gives access to the custom palette associated with the surface.")>
    Public Property Palette As Palette
    'Usage
     
    Dim instance As SurfaceSeriesBase
    Dim value As Palette
     
    instance.Palette = value
     
    value = instance.Palette
    [Category("Palette")]
    [Description("Gives access to the custom palette associated with the surface.")]
    public Palette Palette {get; set;}
    Example
    The following example enables the custom palette, clears it and adds several new entries:
    surface.AutomaticPalette = False
    surface.Palette.Clear()
    surface.Palette.Add(0.0, Color.Purple)
    surface.Palette.Add(1.5, Color.MediumSlateBlue)
    surface.Palette.Add(3.0, Color.CornflowerBlue)
    surface.AutomaticPalette = false;
    surface.Palette.Clear();
    surface.Palette.Add(0.0, Color.Purple);
    surface.Palette.Add(1.5, Color.MediumSlateBlue);
    surface.Palette.Add(3.0, Color.CornflowerBlue);
    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