Skip to content
ChartForgeX
Class

GraphScene

ChartForgeX.Interactivity

Namespace
ChartForgeX.Interactivity
Assembly
ChartForgeX.Interactivity
Modifiers
sealed

Describes a host-neutral graph exploration scene that adapters can render with SVG, Canvas, WebGL, desktop, or native controls.

Inheritance

  • object
  • GraphScene

Usage

Explore 39 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 28

Constructors

public GraphScene() #

Methods

public static GraphScene Create(string id, string title) #

Creates a new graph scene.

Parameters

id string required
Stable scene identifier.
title string required
Human-readable scene title.

Returns

GraphScene A new graph scene.
public void Validate() #

Validates node, edge, and cluster references before an adapter renders or mutates the scene.

Properties

public string Id { get; set; } #

Gets or sets the stable scene identifier used for host events and persisted state.

public string Title { get; set; } #

Gets or sets the human-readable scene title.

public string? Subtitle { get; set; } #

Gets or sets an optional scene subtitle.

public List<GraphSceneNode> Nodes { get; } #

Gets graph nodes keyed by stable node id.

public List<GraphSceneEdge> Edges { get; } #

Gets graph edges keyed by stable edge id.

public List<GraphSceneCluster> Clusters { get; } #

Gets semantic or computed clusters that an adapter can collapse, expand, or summarize.

public GraphSceneOptions Options { get; } #

Gets reusable graph exploration settings and capability hints.

public Dictionary<string, string> Metadata { get; } #

Gets arbitrary scene-level metadata for host adapters and diagnostics.

Extension Methods

public static GraphScene AddCluster(GraphScene scene, string id, string label, string[] nodeIds, Action<GraphSceneCluster>? configure = null) #

Adds a cluster to the graph scene.

Parameters

scene ChartForgeX.Interactivity.GraphScene required
The graph scene.
id string required
Stable cluster id.
label string required
Cluster label.
nodeIds string[] required
Node ids contained by the cluster.
configure System.Action<ChartForgeX.Interactivity.GraphSceneCluster>? = null optional
Optional cluster configuration callback.

Returns

GraphScene The current graph scene.
public static GraphScene AddEdge(GraphScene scene, string id, string sourceNodeId, string targetNodeId, string? label = null, Action<GraphSceneEdge>? configure = null) #

Adds an edge to the graph scene.

Parameters

scene ChartForgeX.Interactivity.GraphScene required
The graph scene.
id string required
Stable edge id.
sourceNodeId string required
Source node id.
targetNodeId string required
Target node id.
label string? = null optional
Optional edge label.
configure System.Action<ChartForgeX.Interactivity.GraphSceneEdge>? = null optional
Optional edge configuration callback.

Returns

GraphScene The current graph scene.
public static GraphScene AddNode(GraphScene scene, string id, string label, Action<GraphSceneNode>? configure = null) #

Adds a node to the graph scene.

Parameters

scene ChartForgeX.Interactivity.GraphScene required
The graph scene.
id string required
Stable node id.
label string required
Node label.
configure System.Action<ChartForgeX.Interactivity.GraphSceneNode>? = null optional
Optional node configuration callback.

Returns

GraphScene The current graph scene.
public static GraphScenePatchResult ApplyPatch(GraphScene scene, GraphScenePatch patch) #

Applies a patch atomically and validates the complete scene before committing it.

Parameters

scene ChartForgeX.Interactivity.GraphScene required
The graph document to update.
patch ChartForgeX.Interactivity.GraphScenePatch required
The requested additions, replacements, and removals.

Returns

GraphScenePatchResult The resulting graph document counts.
public static GraphSceneStage CreateNeighborhood(GraphScene scene, string rootNodeId, Action<GraphSceneNeighborhoodOptions>? configure = null) #

Creates a view centered on a node, with explicit node and relationship budgets.

Parameters

scene ChartForgeX.Interactivity.GraphScene required
The complete source scene. Replan after changing its nodes or relationships.
rootNodeId string required
The node retained on every neighborhood page.
configure System.Action<ChartForgeX.Interactivity.GraphSceneNeighborhoodOptions>? = null optional
Optional distance, budget, and paging settings.

Returns

GraphSceneStage A stage consumable by the static graph exporters. Counts include everything omitted from the source scene.
public static IReadOnlyList<GraphSceneStage> CreateStages(GraphScene scene, Action<GraphSceneStageOptions>? configure = null) #

Creates overview-to-detail stages for a graph scene.

Parameters

scene ChartForgeX.Interactivity.GraphScene required
The graph scene to plan.
configure System.Action<ChartForgeX.Interactivity.GraphSceneStageOptions>? = null optional
Optional stage planning configuration.

Returns

IReadOnlyList<GraphSceneStage> Ordered deterministic graph stages.
public static IReadOnlyList<GraphSceneCluster> GetEffectiveClusters(GraphScene scene) #

Gets declared clusters plus any reusable clusters derived from the active cluster policy.

Parameters

scene ChartForgeX.Interactivity.GraphScene required
The source graph scene.

Returns

IReadOnlyList<GraphSceneCluster> Cluster definitions that adapters should render, collapse, search, export, and expose through host events.
public static IReadOnlyList<GraphSceneStageImageResult> SaveGraphStageImages(GraphScene scene, string outputDirectory, string fileNamePrefix, Action<GraphSceneStageImageOptions>? configure = null) #

Saves deterministic overview-to-detail graph stage images without creating interactive HTML.

Parameters

scene ChartForgeX.Interactivity.GraphScene required
outputDirectory string required
fileNamePrefix string required
configure System.Action<ChartForgeX.Interactivity.Html.GraphSceneStageImageOptions>? = null optional

Returns

IReadOnlyList<GraphSceneStageImageResult>
public static string ToGraphExplorerHtmlFragment(GraphScene scene, Action<HtmlGraphExplorerOptions>? configure = null) #

Renders the graph scene to an embeddable fragment with inline assets.

Parameters

scene ChartForgeX.Interactivity.GraphScene required
The graph scene to render.
configure System.Action<ChartForgeX.Interactivity.Html.HtmlGraphExplorerOptions>? = null optional
Optional adapter configuration callback.

Returns

string An embeddable HTML fragment.
public static string ToGraphExplorerHtmlPage(GraphScene scene, Action<HtmlGraphExplorerOptions>? configure = null) #

Renders the graph scene to a complete self-contained HTML page.

Parameters

scene ChartForgeX.Interactivity.GraphScene required
The graph scene to render.
configure System.Action<ChartForgeX.Interactivity.Html.HtmlGraphExplorerOptions>? = null optional
Optional adapter configuration callback.

Returns

string A complete HTML document.
public static byte[] ToGraphPng(GraphScene scene, GraphSceneStage? stage = null, Action<GraphSceneStaticRenderOptions>? configure = null) #

Renders a graph scene or planned stage to PNG bytes without opening a browser.

Parameters

scene ChartForgeX.Interactivity.GraphScene required
stage ChartForgeX.Interactivity.GraphSceneStage? = null optional
configure System.Action<ChartForgeX.Interactivity.Html.GraphSceneStaticRenderOptions>? = null optional

Returns

byte[]
public static string ToGraphSvg(GraphScene scene, GraphSceneStage? stage = null, Action<GraphSceneStaticRenderOptions>? configure = null) #

Renders a graph scene or planned stage to script-free SVG.

Parameters

scene ChartForgeX.Interactivity.GraphScene required
stage ChartForgeX.Interactivity.GraphSceneStage? = null optional
configure System.Action<ChartForgeX.Interactivity.Html.GraphSceneStaticRenderOptions>? = null optional

Returns

string