Skip to content

LegendNode<T> ​

Namespace: Hex1b.Nodes

Assembly: Hex1b.dll

Render node for . Renders a standalone legend with colored swatches and labels.

csharp
public sealed class LegendNode<T> : Hex1bNode

Inheritance ​

Object → Hex1bNode → LegendNode<T>

Properties ​

Data ​

Returns: IReadOnlyList<<T>>

csharp
public IReadOnlyList<T>? Data { get; set; }

IsHorizontal ​

Returns: Boolean

csharp
public bool IsHorizontal { get; set; }

LabelSelector ​

Returns: Func<<T>, String>

csharp
public Func<T, string>? LabelSelector { get; set; }

ShowPercentages ​

Returns: Boolean

csharp
public bool ShowPercentages { get; set; }

ShowValues ​

Returns: Boolean

csharp
public bool ShowValues { get; set; }

ValueFormatter ​

Returns: Func<Double, String>

csharp
public Func<double, string>? ValueFormatter { get; set; }

ValueSelector ​

Returns: Func<<T>, Double>

csharp
public Func<T, double>? ValueSelector { get; set; }

Methods ​

GetChildren() ​

Gets the direct children of this node for structural tree traversal. Container nodes should override this to return their children.

Returns: IEnumerable<Hex1bNode>

csharp
public override IEnumerable<Hex1bNode> GetChildren()

MeasureCore(Constraints) ​

Override this method to implement measuring logic for this node.

Parameters:

Returns: Size

csharp
protected override Size MeasureCore(Constraints constraints)

Render(Hex1bRenderContext) ​

Renders the node to the given context.

Parameters:

csharp
public override void Render(Hex1bRenderContext context)

Released under the MIT License.