alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class MapsLegendSettings

    Gets or sets the option for the customization of legend for the maps.

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    MapsLegendSettings
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    Inherited Members
    ComponentBase.Assets
    ComponentBase.AssignedRenderMode
    ComponentBase.DispatchExceptionAsync(Exception)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.OnAfterRender(bool)
    ComponentBase.OnAfterRenderAsync(bool)
    ComponentBase.OnInitialized()
    ComponentBase.OnParametersSet()
    ComponentBase.RendererInfo
    ComponentBase.SetParametersAsync(ParameterView)
    ComponentBase.ShouldRender()
    ComponentBase.StateHasChanged()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    OwningComponentBase.IsDisposed
    OwningComponentBase.ScopedServices
    Namespace: Syncfusion.Blazor.Maps
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class MapsLegendSettings : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

    Constructors

    MapsLegendSettings()

    Declaration
    public MapsLegendSettings()

    Properties

    Alignment

    Gets or sets the alignment for the legend in maps.

    Declaration
    [Parameter]
    public Alignment Alignment { get; set; }
    Property Value
    Type Description
    Alignment

    One of the Alignment enum values indicating how the legend is aligned.

    Remarks

    Use this property to control the horizontal alignment of the legend within its container.

    Background

    Gets or sets the background color for the legend in maps.

    Declaration
    [Parameter]
    public string Background { get; set; }
    Property Value
    Type Description
    string

    A string that specifies the background color, with a default value of "transparent".

    Remarks

    The background color of the legend can be customized to enhance its visibility and aesthetic appeal within the map.

    ChildContent

    Gets or sets the content of the UI element.

    Declaration
    [Parameter]
    public RenderFragment ChildContent { get; set; }
    Property Value
    Type Description
    RenderFragment

    A RenderFragment representing the content rendered inside the legend.

    Remarks

    This property allows custom content to be defined and rendered within the legend.

    Fill

    Gets or sets the color of the legend in maps.

    Declaration
    [Parameter]
    public string Fill { get; set; }
    Property Value
    Type Description
    string

    A string representing the color to be applied to the legend items.

    Remarks

    This property affects the visual appearance of the legend by applying the specified color.

    Height

    Gets or sets the height of the legend in maps.

    Declaration
    [Parameter]
    public string Height { get; set; }
    Property Value
    Type Description
    string

    A string representing the height of the legend.

    Remarks

    Use this property to define the vertical size of the legend within the map area.

    InvertedPointer

    Enables or disables the visibility of the inverted pointer in interactive legend in maps.

    Declaration
    [Parameter]
    public bool InvertedPointer { get; set; }
    Property Value
    Type Description
    bool

    A boolean value indicating whether the inverted pointer is visible.

    Remarks

    The inverted pointer provides a visual indication for interactive legend items, highlighting the selected or focused state.

    LabelDisplayMode

    Gets or sets the display mode for the label in legend.

    Declaration
    [Parameter]
    public LabelIntersectAction LabelDisplayMode { get; set; }
    Property Value
    Type Description
    LabelIntersectAction

    One of the LabelIntersectAction enum values determining the label display mode.

    Remarks

    This property is used to control how overlapping legend labels are handled, ensuring clarity and readability.

    LabelPosition

    Gets or sets the position of the label in legend.

    Declaration
    [Parameter]
    public LabelPosition LabelPosition { get; set; }
    Property Value
    Type Description
    LabelPosition

    One of the LabelPosition enum values indicating the label position.

    Remarks

    Labels can be positioned relative to legend items to improve the layout and presentation of legend information.

    Mode

    Gets or sets the mode of the legend in maps. The modes available are default and interactive modes.

    Declaration
    [Parameter]
    public LegendMode Mode { get; set; }
    Property Value
    Type Description
    LegendMode

    One of the LegendMode enum values specifying the mode of the legend.

    Remarks

    The mode determines the behavior of the legend, providing options for static or interactive interactions.

    Opacity

    Gets or sets the opacity for the legend in maps.

    Declaration
    [Parameter]
    public double Opacity { get; set; }
    Property Value
    Type Description
    double

    A double value representing the opacity of the legend, with a default value of 1.

    Remarks

    The opacity specifies the transparency level of the legend, useful for differentiating the legend from the map background.

    Orientation

    Gets or sets the orientation of the legend in maps.

    Declaration
    [Parameter]
    public LegendArrangement Orientation { get; set; }
    Property Value
    Type Description
    LegendArrangement

    One of the LegendArrangement enum values indicating the orientation of the legend.

    Remarks

    The orientation defines how legend items are arranged within the legend area, either horizontally or vertically.

    Position

    Gets or sets the position of the legend in maps.

    Declaration
    [Parameter]
    public LegendPosition Position { get; set; }
    Property Value
    Type Description
    LegendPosition

    One of the LegendPosition enum values indicating the position of the legend.

    Remarks

    Determine where the legend is placed relative to the map component, helping allocate space effectively.

    RemoveDuplicateLegend

    Enables or disables the removal of duplicate legend items.

    Declaration
    [Parameter]
    public bool RemoveDuplicateLegend { get; set; }
    Property Value
    Type Description
    bool

    A boolean value indicating whether duplicate legend items should be removed.

    Remarks

    This feature is particularly useful to avoid redundancy in the legend display, improving visual clarity.

    Shape

    Gets or sets the shape of the legend in maps.

    Declaration
    [Parameter]
    public LegendShape Shape { get; set; }
    Property Value
    Type Description
    LegendShape

    One of the LegendShape enum values specifying the shape used in the legend.

    Remarks

    Change the shape of the legend items to match the design preferences or data representations being used.

    ShapeHeight

    Gets or sets the width of the shapes in legend.

    Declaration
    [Parameter]
    public double ShapeHeight { get; set; }
    Property Value
    Type Description
    double

    A double value representing the width of the shapes in the legend.

    Remarks

    Define the width of each legend item to ensure consistency and proportional sizing within the legend.

    ShapePadding

    Gets or sets the padding for the shapes in legend.

    Declaration
    [Parameter]
    public double ShapePadding { get; set; }
    Property Value
    Type Description
    double

    A double value representing the padding around the shapes.

    Remarks

    Adjust the padding to control the spacing between legend items, affecting overall layout and spacing.

    ShapeWidth

    Gets or sets the width of the shapes in legend.

    Declaration
    [Parameter]
    public double ShapeWidth { get; set; }
    Property Value
    Type Description
    double

    A double value that specifies the width of shapes in the legend.

    Remarks

    Specify the width for legend shapes to maintain a harmonious visual arrangement.

    ShowLegendPath

    Gets or sets the path for the legend from the data source to be shown.

    Declaration
    [Parameter]
    public string ShowLegendPath { get; set; }
    Property Value
    Type Description
    string

    A string value specifying the path for displaying the legend items from the data source.

    Remarks

    This ensures the legend displays relevant information drawn from the provided data sources.

    ToggleVisibility

    Enables or disables the toggle visibility for legend in maps.

    Declaration
    [Parameter]
    public bool ToggleVisibility { get; set; }
    Property Value
    Type Description
    bool

    A boolean indicating whether legend items can toggle visibility.

    Remarks

    Provide users with the option to show or hide specific legend items, enhancing interactivity.

    Type

    Gets or sets the type of the legend in maps.

    Declaration
    [Parameter]
    public LegendType Type { get; set; }
    Property Value
    Type Description
    LegendType

    One of the LegendType enum values specifying the legend type.

    Remarks

    This property differentiates between legends for layers, markers, and other map elements.

    UseMarkerShape

    Enables or disables rendering legend items based on shapes from the data source of markers.

    Declaration
    [Parameter]
    public bool UseMarkerShape { get; set; }
    Property Value
    Type Description
    bool

    A boolean value determining whether marker shapes are used for rendering legend items.

    Remarks

    This functionality connects the legend representation to specific marker shapes for better data interpretation.

    ValuePath

    Sets and gets the value from the data source for legend.

    Declaration
    [Parameter]
    public string ValuePath { get; set; }
    Property Value
    Type Description
    string

    A string specifying the field value path for providing legend item values.

    Remarks

    The value path links legend items to data field values for accurate and dynamic representation.

    Visible

    Gets or sets a value indicating whether or not to enable the visibility state of the legend in maps.

    Declaration
    [Parameter]
    public bool Visible { get; set; }
    Property Value
    Type Description
    bool

    A boolean value indicating the visibility state of the legend.

    Remarks

    Use this to control whether the legend is visible or hidden by default, streamlining the map view.

    Width

    Gets or sets the width of the legend in maps.

    Declaration
    [Parameter]
    public string Width { get; set; }
    Property Value
    Type Description
    string

    A string specifying the width of the legend.

    Remarks

    Defining legend width helps manage space allocation within the map while ensuring legibility.

    X

    Gets or sets the horizontal position of the legend when the position of the legend is set as Float type.

    Declaration
    [Parameter]
    public double X { get; set; }
    Property Value
    Type Description
    double

    A double representing the horizontal coordinate position when legend is floating.

    Remarks

    This setting places the legend at a specific horizontal position, beneficial for layouts allowing free placement.

    Y

    Gets or sets the vertical position of the legend when the position of the legend is set as Float type.

    Declaration
    [Parameter]
    public double Y { get; set; }
    Property Value
    Type Description
    double

    A double representing the vertical coordinate position when legend is floating.

    Remarks

    This property allows precise control over the vertical positioning of the floating legend.

    Methods

    BuildRenderTree(RenderTreeBuilder)

    Declaration
    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    Parameters
    Type Name Description
    RenderTreeBuilder __builder
    Overrides
    ComponentBase.BuildRenderTree(RenderTreeBuilder)

    Dispose(bool)

    Disposes the property values during the destroy of the component that is hold up for the execution of the component.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing
    Overrides
    OwningComponentBase.Dispose(bool)

    OnInitializedAsync()

    OnInitializedAsync method is called when the component has received its initial parameters.

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type Description
    Task

    Task representing the asynchronous operation.

    Overrides
    ComponentBase.OnInitializedAsync()

    OnParametersSetAsync()

    OnParametersSetAsync is a lifecycle method that is invoked when the component has received parameters, and the incoming values have been assigned to the properties.

    Declaration
    protected override Task OnParametersSetAsync()
    Returns
    Type Description
    Task

    Task representing the asynchronous operation.

    Overrides
    ComponentBase.OnParametersSetAsync()

    Implements

    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved