Header menu logo Plotly.NET

Legend Type

Legend

Constructors

Constructor Description

Legend()

Full Usage: Legend()

Returns: Legend
Returns: Legend

Static members

Static member Description

Legend.init (?BGColor, ?BorderColor, ?BorderWidth, ?EntryWidth, ?EntryWidthMode, ?Font, ?GroupClick, ?GroupTitleFont, ?ItemClick, ?ItemDoubleClick, ?ItemSizing, ?ItemWidth, ?Orientation, ?Title, ?TraceGroupGap, ?TraceOrder, ?UIRevision, ?VerticalAlign, ?Visible, ?X, ?XAnchor, ?XRef, ?Y, ?YAnchor, ?YRef)

Full Usage: Legend.init (?BGColor, ?BorderColor, ?BorderWidth, ?EntryWidth, ?EntryWidthMode, ?Font, ?GroupClick, ?GroupTitleFont, ?ItemClick, ?ItemDoubleClick, ?ItemSizing, ?ItemWidth, ?Orientation, ?Title, ?TraceGroupGap, ?TraceOrder, ?UIRevision, ?VerticalAlign, ?Visible, ?X, ?XAnchor, ?XRef, ?Y, ?YAnchor, ?YRef)

Parameters:
    ?BGColor : Color - Sets the legend background color. Defaults to `layout.paper_bgcolor`.
    ?BorderColor : Color - Sets the color of the border enclosing the legend.
    ?BorderWidth : float - Sets the width (in px) of the border enclosing the legend.
    ?EntryWidth : float - Sets the width (in px or fraction) of the legend. Use 0 to size the entry based on the text width, when `entrywidthmode` is set to "pixels".
    ?EntryWidthMode : EntryWidthMode - Determines what entrywidth means.
    ?Font : Font - Sets the font used to text the legend items.
    ?GroupClick : TraceGroupClickOptions - Determines the behavior on legend group item click. "toggleitem" toggles the visibility of the individual item clicked on the graph. "togglegroup" toggles the visibility of all items in the same legendgroup as the item clicked on the graph.
    ?GroupTitleFont : Font - Sets the font for group titles in legend. Defaults to `legend.font` with its size increased about 10%.
    ?ItemClick : TraceItemClickOptions - Determines the behavior on legend item click. "toggle" toggles the visibility of the item clicked on the graph. "toggleothers" makes the clicked item the sole visible item on the graph. "false" disables legend item click interactions.
    ?ItemDoubleClick : TraceItemClickOptions - Determines the behavior on legend item double-click. "toggle" toggles the visibility of the item clicked on the graph. "toggleothers" makes the clicked item the sole visible item on the graph. "false" disables legend item double-click interactions.
    ?ItemSizing : TraceItemSizing - Determines if the legend items symbols scale with their corresponding "trace" attributes or remain "constant" independent of the symbol size on the graph.
    ?ItemWidth : int - Sets the width (in px) of the legend item symbols (the part other than the title.text).
    ?Orientation : Orientation - Sets the orientation of the legend.
    ?Title : Title - Sets the title of the legend.
    ?TraceGroupGap : float - Sets the amount of vertical space (in px) between legend groups.
    ?TraceOrder : TraceOrder - Determines the order at which the legend items are displayed. If "normal", the items are displayed top-to-bottom in the same order as the input data. If "reversed", the items are displayed in the opposite order as "normal". If "grouped", the items are displayed in groups (when a trace `legendgroup` is provided). if "grouped+reversed", the items are displayed in the opposite order as "grouped".
    ?UIRevision : string - Controls persistence of legend-driven changes in trace and pie label visibility. Defaults to `layout.uirevision`.
    ?VerticalAlign : VerticalAlign - Sets the vertical alignment of the symbols with respect to their associated text.
    ?Visible : bool - Determines whether or not this legend is visible.
    ?X : float - Sets the x position (in normalized coordinates) of the legend. Defaults to "1.02" for vertical legends and defaults to "0" for horizontal legends.
    ?XAnchor : XAnchorPosition - Sets the legend's horizontal position anchor. This anchor binds the `x` position to the "left", "center" or "right" of the legend. Value "auto" anchors legends to the right for `x` values greater than or equal to 2/3, anchors legends to the left for `x` values less than or equal to 1/3 and anchors legends with respect to their center otherwise.
    ?XRef : string - Sets the container `x` refers to. "container" spans the entire `width` of the plot. "paper" refers to the width of the plotting area only.
    ?Y : float - Sets the y position (in normalized coordinates) of the legend. Defaults to "1" for vertical legends, defaults to "-0.1" for horizontal legends on graphs w/o range sliders and defaults to "1.1" for horizontal legends on graph with one or multiple range sliders.
    ?YAnchor : YAnchorPosition - Sets the legend's vertical position anchor This anchor binds the `y` position to the "top", "middle" or "bottom" of the legend. Value "auto" anchors legends at their bottom for `y` values less than or equal to 1/3, anchors legends to at their top for `y` values greater than or equal to 2/3 and anchors legends with respect to their middle otherwise.
    ?YRef : string - Sets the container `y` refers to. "container" spans the entire `height` of the plot. "paper" refers to the height of the plotting area only.

Returns: Legend

Returns a new Legend object with the given styles

?BGColor : Color

Sets the legend background color. Defaults to `layout.paper_bgcolor`.

?BorderColor : Color

Sets the color of the border enclosing the legend.

?BorderWidth : float

Sets the width (in px) of the border enclosing the legend.

?EntryWidth : float

Sets the width (in px or fraction) of the legend. Use 0 to size the entry based on the text width, when `entrywidthmode` is set to "pixels".

?EntryWidthMode : EntryWidthMode

Determines what entrywidth means.

?Font : Font

Sets the font used to text the legend items.

?GroupClick : TraceGroupClickOptions

Determines the behavior on legend group item click. "toggleitem" toggles the visibility of the individual item clicked on the graph. "togglegroup" toggles the visibility of all items in the same legendgroup as the item clicked on the graph.

?GroupTitleFont : Font

Sets the font for group titles in legend. Defaults to `legend.font` with its size increased about 10%.

?ItemClick : TraceItemClickOptions

Determines the behavior on legend item click. "toggle" toggles the visibility of the item clicked on the graph. "toggleothers" makes the clicked item the sole visible item on the graph. "false" disables legend item click interactions.

?ItemDoubleClick : TraceItemClickOptions

Determines the behavior on legend item double-click. "toggle" toggles the visibility of the item clicked on the graph. "toggleothers" makes the clicked item the sole visible item on the graph. "false" disables legend item double-click interactions.

?ItemSizing : TraceItemSizing

Determines if the legend items symbols scale with their corresponding "trace" attributes or remain "constant" independent of the symbol size on the graph.

?ItemWidth : int

Sets the width (in px) of the legend item symbols (the part other than the title.text).

?Orientation : Orientation

Sets the orientation of the legend.

?Title : Title

Sets the title of the legend.

?TraceGroupGap : float

Sets the amount of vertical space (in px) between legend groups.

?TraceOrder : TraceOrder

Determines the order at which the legend items are displayed. If "normal", the items are displayed top-to-bottom in the same order as the input data. If "reversed", the items are displayed in the opposite order as "normal". If "grouped", the items are displayed in groups (when a trace `legendgroup` is provided). if "grouped+reversed", the items are displayed in the opposite order as "grouped".

?UIRevision : string

Controls persistence of legend-driven changes in trace and pie label visibility. Defaults to `layout.uirevision`.

?VerticalAlign : VerticalAlign

Sets the vertical alignment of the symbols with respect to their associated text.

?Visible : bool

Determines whether or not this legend is visible.

?X : float

Sets the x position (in normalized coordinates) of the legend. Defaults to "1.02" for vertical legends and defaults to "0" for horizontal legends.

?XAnchor : XAnchorPosition

Sets the legend's horizontal position anchor. This anchor binds the `x` position to the "left", "center" or "right" of the legend. Value "auto" anchors legends to the right for `x` values greater than or equal to 2/3, anchors legends to the left for `x` values less than or equal to 1/3 and anchors legends with respect to their center otherwise.

?XRef : string

Sets the container `x` refers to. "container" spans the entire `width` of the plot. "paper" refers to the width of the plotting area only.

?Y : float

Sets the y position (in normalized coordinates) of the legend. Defaults to "1" for vertical legends, defaults to "-0.1" for horizontal legends on graphs w/o range sliders and defaults to "1.1" for horizontal legends on graph with one or multiple range sliders.

?YAnchor : YAnchorPosition

Sets the legend's vertical position anchor This anchor binds the `y` position to the "top", "middle" or "bottom" of the legend. Value "auto" anchors legends at their bottom for `y` values less than or equal to 1/3, anchors legends to at their top for `y` values greater than or equal to 2/3 and anchors legends with respect to their middle otherwise.

?YRef : string

Sets the container `y` refers to. "container" spans the entire `height` of the plot. "paper" refers to the height of the plotting area only.

Returns: Legend

Legend.style (?BGColor, ?BorderColor, ?BorderWidth, ?EntryWidth, ?EntryWidthMode, ?Font, ?GroupClick, ?GroupTitleFont, ?ItemClick, ?ItemDoubleClick, ?ItemSizing, ?ItemWidth, ?Orientation, ?Title, ?TraceGroupGap, ?TraceOrder, ?UIRevision, ?VerticalAlign, ?Visible, ?X, ?XAnchor, ?XRef, ?Y, ?YAnchor, ?YRef)

Full Usage: Legend.style (?BGColor, ?BorderColor, ?BorderWidth, ?EntryWidth, ?EntryWidthMode, ?Font, ?GroupClick, ?GroupTitleFont, ?ItemClick, ?ItemDoubleClick, ?ItemSizing, ?ItemWidth, ?Orientation, ?Title, ?TraceGroupGap, ?TraceOrder, ?UIRevision, ?VerticalAlign, ?Visible, ?X, ?XAnchor, ?XRef, ?Y, ?YAnchor, ?YRef)

Parameters:
    ?BGColor : Color - Sets the legend background color. Defaults to `layout.paper_bgcolor`.
    ?BorderColor : Color - Sets the color of the border enclosing the legend.
    ?BorderWidth : float - Sets the width (in px) of the border enclosing the legend.
    ?EntryWidth : float - Sets the width (in px or fraction) of the legend. Use 0 to size the entry based on the text width, when `entrywidthmode` is set to "pixels".
    ?EntryWidthMode : EntryWidthMode - Determines what entrywidth means.
    ?Font : Font - Sets the font used to text the legend items.
    ?GroupClick : TraceGroupClickOptions - Determines the behavior on legend group item click. "toggleitem" toggles the visibility of the individual item clicked on the graph. "togglegroup" toggles the visibility of all items in the same legendgroup as the item clicked on the graph.
    ?GroupTitleFont : Font - Sets the font for group titles in legend. Defaults to `legend.font` with its size increased about 10%.
    ?ItemClick : TraceItemClickOptions - Determines the behavior on legend item click. "toggle" toggles the visibility of the item clicked on the graph. "toggleothers" makes the clicked item the sole visible item on the graph. "false" disables legend item click interactions.
    ?ItemDoubleClick : TraceItemClickOptions - Determines the behavior on legend item double-click. "toggle" toggles the visibility of the item clicked on the graph. "toggleothers" makes the clicked item the sole visible item on the graph. "false" disables legend item double-click interactions.
    ?ItemSizing : TraceItemSizing - Determines if the legend items symbols scale with their corresponding "trace" attributes or remain "constant" independent of the symbol size on the graph.
    ?ItemWidth : int - Sets the width (in px) of the legend item symbols (the part other than the title.text).
    ?Orientation : Orientation - Sets the orientation of the legend.
    ?Title : Title - Sets the title of the legend.
    ?TraceGroupGap : float - Sets the amount of vertical space (in px) between legend groups.
    ?TraceOrder : TraceOrder - Determines the order at which the legend items are displayed. If "normal", the items are displayed top-to-bottom in the same order as the input data. If "reversed", the items are displayed in the opposite order as "normal". If "grouped", the items are displayed in groups (when a trace `legendgroup` is provided). if "grouped+reversed", the items are displayed in the opposite order as "grouped".
    ?UIRevision : string - Controls persistence of legend-driven changes in trace and pie label visibility. Defaults to `layout.uirevision`.
    ?VerticalAlign : VerticalAlign - Sets the vertical alignment of the symbols with respect to their associated text.
    ?Visible : bool - Determines whether or not this legend is visible.
    ?X : float - Sets the x position (in normalized coordinates) of the legend. Defaults to "1.02" for vertical legends and defaults to "0" for horizontal legends.
    ?XAnchor : XAnchorPosition - Sets the legend's horizontal position anchor. This anchor binds the `x` position to the "left", "center" or "right" of the legend. Value "auto" anchors legends to the right for `x` values greater than or equal to 2/3, anchors legends to the left for `x` values less than or equal to 1/3 and anchors legends with respect to their center otherwise.
    ?XRef : string - Sets the container `x` refers to. "container" spans the entire `width` of the plot. "paper" refers to the width of the plotting area only.
    ?Y : float - Sets the y position (in normalized coordinates) of the legend. Defaults to "1" for vertical legends, defaults to "-0.1" for horizontal legends on graphs w/o range sliders and defaults to "1.1" for horizontal legends on graph with one or multiple range sliders.
    ?YAnchor : YAnchorPosition - Sets the legend's vertical position anchor This anchor binds the `y` position to the "top", "middle" or "bottom" of the legend. Value "auto" anchors legends at their bottom for `y` values less than or equal to 1/3, anchors legends to at their top for `y` values greater than or equal to 2/3 and anchors legends with respect to their middle otherwise.
    ?YRef : string - Sets the container `y` refers to. "container" spans the entire `height` of the plot. "paper" refers to the height of the plotting area only.

Returns: Legend -> Legend

Returns a function that applies the given styles to a Legend object

?BGColor : Color

Sets the legend background color. Defaults to `layout.paper_bgcolor`.

?BorderColor : Color

Sets the color of the border enclosing the legend.

?BorderWidth : float

Sets the width (in px) of the border enclosing the legend.

?EntryWidth : float

Sets the width (in px or fraction) of the legend. Use 0 to size the entry based on the text width, when `entrywidthmode` is set to "pixels".

?EntryWidthMode : EntryWidthMode

Determines what entrywidth means.

?Font : Font

Sets the font used to text the legend items.

?GroupClick : TraceGroupClickOptions

Determines the behavior on legend group item click. "toggleitem" toggles the visibility of the individual item clicked on the graph. "togglegroup" toggles the visibility of all items in the same legendgroup as the item clicked on the graph.

?GroupTitleFont : Font

Sets the font for group titles in legend. Defaults to `legend.font` with its size increased about 10%.

?ItemClick : TraceItemClickOptions

Determines the behavior on legend item click. "toggle" toggles the visibility of the item clicked on the graph. "toggleothers" makes the clicked item the sole visible item on the graph. "false" disables legend item click interactions.

?ItemDoubleClick : TraceItemClickOptions

Determines the behavior on legend item double-click. "toggle" toggles the visibility of the item clicked on the graph. "toggleothers" makes the clicked item the sole visible item on the graph. "false" disables legend item double-click interactions.

?ItemSizing : TraceItemSizing

Determines if the legend items symbols scale with their corresponding "trace" attributes or remain "constant" independent of the symbol size on the graph.

?ItemWidth : int

Sets the width (in px) of the legend item symbols (the part other than the title.text).

?Orientation : Orientation

Sets the orientation of the legend.

?Title : Title

Sets the title of the legend.

?TraceGroupGap : float

Sets the amount of vertical space (in px) between legend groups.

?TraceOrder : TraceOrder

Determines the order at which the legend items are displayed. If "normal", the items are displayed top-to-bottom in the same order as the input data. If "reversed", the items are displayed in the opposite order as "normal". If "grouped", the items are displayed in groups (when a trace `legendgroup` is provided). if "grouped+reversed", the items are displayed in the opposite order as "grouped".

?UIRevision : string

Controls persistence of legend-driven changes in trace and pie label visibility. Defaults to `layout.uirevision`.

?VerticalAlign : VerticalAlign

Sets the vertical alignment of the symbols with respect to their associated text.

?Visible : bool

Determines whether or not this legend is visible.

?X : float

Sets the x position (in normalized coordinates) of the legend. Defaults to "1.02" for vertical legends and defaults to "0" for horizontal legends.

?XAnchor : XAnchorPosition

Sets the legend's horizontal position anchor. This anchor binds the `x` position to the "left", "center" or "right" of the legend. Value "auto" anchors legends to the right for `x` values greater than or equal to 2/3, anchors legends to the left for `x` values less than or equal to 1/3 and anchors legends with respect to their center otherwise.

?XRef : string

Sets the container `x` refers to. "container" spans the entire `width` of the plot. "paper" refers to the width of the plotting area only.

?Y : float

Sets the y position (in normalized coordinates) of the legend. Defaults to "1" for vertical legends, defaults to "-0.1" for horizontal legends on graphs w/o range sliders and defaults to "1.1" for horizontal legends on graph with one or multiple range sliders.

?YAnchor : YAnchorPosition

Sets the legend's vertical position anchor This anchor binds the `y` position to the "top", "middle" or "bottom" of the legend. Value "auto" anchors legends at their bottom for `y` values less than or equal to 1/3, anchors legends to at their top for `y` values greater than or equal to 2/3 and anchors legends with respect to their middle otherwise.

?YRef : string

Sets the container `y` refers to. "container" spans the entire `height` of the plot. "paper" refers to the height of the plotting area only.

Returns: Legend -> Legend

Type something to start searching.