Project

ChartForgeX

Render deterministic charts, dashboards, topology, hierarchy, and report visuals directly from .NET.

Stars 47
Forks 2
NuGet downloads 75,067
Release ChartForgeX-v2.0.0
Language: HTML Updated: 2026-10-12

API Reference

Class

TopologyLegend

Namespace ChartForgeX.Topology
Assembly ChartForgeX
Modifiers sealed

Represents an optional topology legend.

Inheritance

  • Object
  • TopologyLegend

Usage

Explore 10 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters 2

Constructors

public TopologyLegend() #

Methods

public TopologyLegend AddEdgeKind(String label, TopologyEdgeKind edgeKind, String? color = null, TopologyEdgeLineStyle lineStyle = Auto) #
Returns: TopologyLegend

Adds an edge-kind legend item.

Parameters

label System.String requiredposition: 0
The item label.
edgeKind ChartForgeX.Topology.TopologyEdgeKind requiredposition: 1
The represented edge kind.
color System.String? = null optionalposition: 2
An optional color override.
lineStyle ChartForgeX.Topology.TopologyEdgeLineStyle = Auto optionalposition: 3
An optional edge line style override.

Returns

The current legend.

public TopologyLegend AddNodeKind(String label, TopologyNodeKind nodeKind, String? color = null, String? symbol = null, String? backgroundColor = null, String? iconId = null) #
Returns: TopologyLegend

Adds a node-kind legend item.

Parameters

label System.String requiredposition: 0
The item label.
nodeKind ChartForgeX.Topology.TopologyNodeKind requiredposition: 1
The represented node kind.
color System.String? = null optionalposition: 2
An optional color override.
symbol System.String? = null optionalposition: 3
An optional short symbol override.
backgroundColor System.String? = null optionalposition: 4
An optional node marker background color override.
iconId System.String? = null optionalposition: 5
An optional topology icon id for the legend marker.

Returns

The current legend.

public TopologyLegend AddStatus(String label, TopologyHealthStatus status, String? color = null) #
Returns: TopologyLegend

Adds a status legend item.

Parameters

label System.String requiredposition: 0
The item label.
status ChartForgeX.Topology.TopologyHealthStatus requiredposition: 1
The represented status.
color System.String? = null optionalposition: 2
An optional color override.

Returns

The current legend.

public static TopologyLegend Create(String? title = "Topology Legend") #
Returns: TopologyLegend

Creates a new topology legend.

Parameters

title System.String? = "Topology Legend" optionalposition: 0
The optional legend title.

Returns

A topology legend.

public static TopologyLegend Default() #
Returns: TopologyLegend

Creates a generic default health legend.

Returns

A default topology legend.

public static TopologyLegend Infer(TopologyChart chart) #
Returns: TopologyLegend

Infers a generic legend from statuses, node kinds, node symbols, and edge kinds used by the chart.

Parameters

chart ChartForgeX.Topology.TopologyChart requiredposition: 0
The topology chart.

Returns

An inferred topology legend.

public static TopologyLegend? Resolve(TopologyChart chart, TopologyLegendMode mode) #
Returns: TopologyLegend?

Resolves the legend according to the requested legend mode.

Parameters

chart ChartForgeX.Topology.TopologyChart requiredposition: 0
The topology chart.
mode ChartForgeX.Topology.TopologyLegendMode requiredposition: 1
The legend mode.

Returns

The resolved legend, if any.

Properties

public String? Title { get; set; } #

Gets or sets the legend title.

public List<TopologyLegendItem> Items { get; } #

Gets the legend items.