menu

Xamarin.Forms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SFChartLegend - Xamarin.Forms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SFChartLegend

    Represents the legend in SFChart. This class can be used to customize the appearance of legend items.

    Inheritance
    System.Object
    SFChartLegend
    Namespace: Syncfusion.MacOS.Charts.SfChart
    Assembly: Syncfusion.SfChart.XForms.macOS.dll
    Syntax
    public class SFChartLegend : Object

    Constructors

    SFChartLegend()

    Declaration
    public SFChartLegend()

    Properties

    BackgroundColor

    Gets or sets the color value that represents the background of the legend.

    Declaration
    public NSColor BackgroundColor { get; set; }
    Property Value
    Type
    AppKit.NSColor

    BorderColor

    Gets or sets the color value that represents the border of the legend.

    Declaration
    public NSColor BorderColor { get; set; }
    Property Value
    Type
    AppKit.NSColor

    BorderWidth

    Gets or sets the float value that represents the border line width of the legend.

    Declaration
    public float BorderWidth { get; set; }
    Property Value
    Type
    System.Single

    CornerRadius

    Gets or sets the ChartCornerRadius value that represents rounded corners of the legend border.

    Declaration
    public ChartCornerRadius CornerRadius { get; set; }
    Property Value
    Type
    ChartCornerRadius

    Dashes

    Gets or sets the NSArray value that represents the border dashes of the legend.

    Declaration
    public NSArray Dashes { get; set; }
    Property Value
    Type
    Foundation.NSArray

    DockPosition

    Gets or sets placement of the legend inside the chart.

    Declaration
    public SFChartLegendPosition DockPosition { get; set; }
    Property Value
    Type
    SFChartLegendPosition

    EdgeInsets

    Gets or sets margin of the legend inside the chart.

    Declaration
    public NSEdgeInsets EdgeInsets { get; set; }
    Property Value
    Type
    AppKit.NSEdgeInsets

    IconHeight

    Gets or sets the height of the legend icon.

    Declaration
    public float IconHeight { get; set; }
    Property Value
    Type
    System.Single

    IconWidth

    Gets or sets the width of the legend icon.

    Declaration
    public float IconWidth { get; set; }
    Property Value
    Type
    System.Single

    IsIconVisible

    Gets or sets the value that indicates whether to display the legend icon.

    Declaration
    public bool IsIconVisible { get; set; }
    Property Value
    Type
    System.Boolean

    ItemMargin

    Gets or sets the margin of the legend items.

    Declaration
    public NSEdgeInsets ItemMargin { get; set; }
    Property Value
    Type
    AppKit.NSEdgeInsets

    LabelStyle

    Gets the customized style for the label inside the legend item.

    Declaration
    public SFLegendLabelStyle LabelStyle { get; }
    Property Value
    Type
    SFLegendLabelStyle

    MaxWidth

    Gets or sets double value that used to customize the legend ItemsLayout width, when the ChartLegendOverflowMode value is Wrap.

    Declaration
    public double MaxWidth { get; set; }
    Property Value
    Type
    System.Double

    OffsetX

    Gets or sets the horizontal offset value for the legend. Works when the DockPosition property set to Floating.

    Declaration
    public float OffsetX { get; set; }
    Property Value
    Type
    System.Single

    OffsetY

    Gets or sets the vertical offset value for the legend. Works when the DockPosition property set to Floating.

    Declaration
    public float OffsetY { get; set; }
    Property Value
    Type
    System.Single

    Orientation

    Gets or sets the orientation of the legend items.

    Declaration
    public SFChartLegendOrientation Orientation { get; set; }
    Property Value
    Type
    SFChartLegendOrientation

    OverflowMode

    Gets or sets ChartLegendOverflowMode value that indicates items overflow action in legend.

    Declaration
    public ChartLegendOverflowMode OverflowMode { get; set; }
    Property Value
    Type
    ChartLegendOverflowMode

    Series

    Gets or sets SFSeries, which indicates whether the legend items should be generated based on this series data points.

    Declaration
    public SFSeries Series { get; set; }
    Property Value
    Type
    SFSeries
    Remarks

    ToggleSeriesVisibility will not works for cartesian and polar series

    Title

    Gets the title of the legend.

    Declaration
    public SFChartTitle Title { get; }
    Property Value
    Type
    SFChartTitle

    ToggleSeriesVisibility

    Gets or sets the value that indicates whether to bind the series visibility with its corresponding legend item in the legend.

    Declaration
    public bool ToggleSeriesVisibility { get; set; }
    Property Value
    Type
    System.Boolean

    Visible

    Gets or sets Visibility that represents the series visibility in SfChart.

    Declaration
    public bool Visible { get; set; }
    Property Value
    Type
    System.Boolean
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved