GemBox.Spreadsheet
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    ChartLegend Class

    Namespace:
    GemBox.Spreadsheet.Charts
    Assembly:
    GemBox.Spreadsheet.dll

    Represents a chart legend.

    • C#
    • VB.NET
    public sealed class ChartLegend
    Public NotInheritable Class ChartLegend
    Inheritance:
    System.Object
    ChartLegend

    Properties

    AllowOverlap

    Gets or sets a value indicating whether legend overlaps chart's plot area or resizes it.

    • C#
    • VB.NET
    public bool AllowOverlap { get; set; }
    Public Property AllowOverlap As Boolean
    Property Value
    System.Boolean

    true if legend overlaps chart's plot area without resizing it; otherwise, false if legend doesn't overlap chart's plot area but resizes it instead.

    CustomLayout

    Gets or sets the legend's custom layout.

    • C#
    • VB.NET
    public ChartElementLayout CustomLayout { get; set; }
    Public Property CustomLayout As ChartElementLayout
    Property Value
    ChartElementLayout

    The configuration of how the legend should be positioned and sized inside the chart.

    Fill

    Gets or sets the fill formatting options.

    • C#
    • VB.NET
    public FillFormat Fill { get; set; }
    Public Property Fill As FillFormat
    Property Value
    FillFormat

    The fill formatting options.

    IsVisible

    Gets or sets a value indicating whether legend is visible.

    • C#
    • VB.NET
    public bool IsVisible { get; set; }
    Public Property IsVisible As Boolean
    Property Value
    System.Boolean

    true if legend is visible; otherwise, false.

    Remarks

    If legend is not visible, its properties won't be saved when saving a workbook into XLSX format.

    Outline

    Gets or sets the outline formatting options.

    • C#
    • VB.NET
    public LineFormat Outline { get; set; }
    Public Property Outline As LineFormat
    Property Value
    LineFormat

    The outline formatting options.

    Position

    Gets or sets the legend position.

    • C#
    • VB.NET
    public ChartLegendPosition Position { get; set; }
    Public Property Position As ChartLegendPosition
    Property Value
    ChartLegendPosition

    The legend position.

    TextFormat

    Gets or sets the text formatting options.

    • C#
    • VB.NET
    public TextFormat TextFormat { get; set; }
    Public Property TextFormat As TextFormat
    Property Value
    TextFormat

    The text formatting options.

    Methods

    Delete()

    Deletes legend.

    • C#
    • VB.NET
    public void Delete()
    Public Sub Delete

    ToString()

    Returns a System.String that represents this ChartLegend instance.

    • C#
    • VB.NET
    public override string ToString()
    Public Overrides Function ToString As String
    Returns
    System.String

    A System.String that represents this ChartLegend instance.

    Overrides
    System.Object.ToString()
    Remarks

    This method should be used primarily for debugging purposes and should be considered volatile (format of its return value might change in future versions).

    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.