Skip to content
ChartForgeX
Class

GitGraphBlock

ChartForgeX.VisualBlocks

Namespace
ChartForgeX.VisualBlocks
Assembly
ChartForgeX
Modifiers
sealed
Attributes
Fluent

A deterministic visual block for product-neutral commit and branch graphs.

Inheritance

Usage

Explore 81 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.

Returned or exposed by 45

Accepted by parameters 36

Constructors

public GitGraphBlock() #

Methods

public GitGraphBlock AddBranch(string name, int? order = null) #

Adds a branch lane.

Parameters

name string required
order int? = null optional
public GitGraphBlock AddCommit(string id, string branchName, IEnumerable<string>? parentIds = null, GitGraphCommitType type = Normal, string label = "", string tag = "", string sourceCommitId = "") #

Adds a commit on a branch.

Parameters

id string required
branchName string required
parentIds System.Collections.Generic.IEnumerable<string>? = null optional
type ChartForgeX.VisualBlocks.GitGraphCommitType = Normal optional
label string = "" optional
tag string = "" optional
sourceCommitId string = "" optional
public static GitGraphBlock Create() #

Creates a git graph block.

public GitGraphBlock NaturalSize() #

Fits commit columns and branch lanes at the current typography within the configured width.

Properties

public IReadOnlyList<GitGraphBranch> Branches { get; } #

Gets branches in declaration order.

public IReadOnlyList<GitGraphCommit> Commits { get; } #

Gets commits in source order.

public bool ShowBranchLabels { get; set; } #

Gets or sets whether branch labels and lane lines are rendered.

public bool ShowCommitLabels { get; set; } #

Gets or sets whether commit labels are rendered.

public override string AccessibleName { get; } #

Gets a concise accessibility label.

public GitGraphDirection Direction { get; set; } #

Gets or sets commit progression. Branch and commit source order remains unchanged.

public bool ParallelCommits { get; set; } #

Gets or sets whether independent branches share ancestry-depth columns. Parents must precede children in source order; commits on one lane remain distinct.

public bool RotateCommitLabels { get; set; } #

Gets or sets whether commit captions are tilted 45 degrees. Tags and branch captions stay upright.

Extension Methods

public static GitGraphBlock Accessibility(GitGraphBlock gitGraphBlock, Action<VisualAccessibility> configure) #

Configures VisualBlockOptions.Accessibility in place: Gets the text alternative, language, and decorative metadata used by static exports.

Parameters

gitGraphBlock ChartForgeX.VisualBlocks.GitGraphBlock required
The instance.
configure System.Action<ChartForgeX.Accessibility.VisualAccessibility> required
Configures the value.

Returns

GitGraphBlock The same instance.
public static GitGraphBlock Direction(GitGraphBlock gitGraphBlock, GitGraphDirection value) #

Sets GitGraphBlock.Direction: Gets or sets commit progression. Branch and commit source order remains unchanged.

Parameters

gitGraphBlock ChartForgeX.VisualBlocks.GitGraphBlock required
The instance.
value ChartForgeX.VisualBlocks.GitGraphDirection required
The value.

Returns

GitGraphBlock The same instance.

Examples

// C# initializer or property                                                // C# fluent
new global::ChartForgeX.VisualBlocks.GitGraphBlock { Direction = value };    gitGraphBlock.Direction(value);
public static GitGraphBlock HostOwnsFrame(GitGraphBlock gitGraphBlock, bool value = true) #

Sets VisualBlockOptions.HostOwnsFrame: Gets or sets whether the host owns the frame, removing the surface and outer padding.

Parameters

gitGraphBlock ChartForgeX.VisualBlocks.GitGraphBlock required
The instance.
value bool = true optional
The value; true when omitted.

Returns

GitGraphBlock The same instance.

Examples

// C# initializer or property                                                                                                                   // C# fluent
((global::ChartForgeX.VisualBlocks.VisualBlock<global::ChartForgeX.VisualBlocks.GitGraphBlock>)gitGraphBlock).Options.HostOwnsFrame = value;    gitGraphBlock.HostOwnsFrame(value);
public static GitGraphBlock Options(GitGraphBlock gitGraphBlock, Action<VisualBlockOptions> configure) #

Configures VisualBlock<GitGraphBlock>.Options in place: Gets shared rendering options.

Parameters

gitGraphBlock ChartForgeX.VisualBlocks.GitGraphBlock required
The instance.
configure System.Action<ChartForgeX.VisualBlocks.VisualBlockOptions> required
Configures the value.

Returns

GitGraphBlock The same instance.
public static GitGraphBlock Padding(GitGraphBlock gitGraphBlock, ChartPadding value) #

Sets VisualBlockOptions.Padding: Gets or sets the inner content padding.

Parameters

gitGraphBlock ChartForgeX.VisualBlocks.GitGraphBlock required
The instance.
value ChartForgeX.Primitives.ChartPadding required
The value.

Returns

GitGraphBlock The same instance.

Examples

// C# initializer or property                                                                                                             // C# fluent
((global::ChartForgeX.VisualBlocks.VisualBlock<global::ChartForgeX.VisualBlocks.GitGraphBlock>)gitGraphBlock).Options.Padding = value;    gitGraphBlock.Padding(value);
public static GitGraphBlock ParallelCommits(GitGraphBlock gitGraphBlock, bool value = true) #

Sets GitGraphBlock.ParallelCommits: Gets or sets whether independent branches share ancestry-depth columns. Parents must precede children in source order; commits on one lane remain distinct.

Parameters

gitGraphBlock ChartForgeX.VisualBlocks.GitGraphBlock required
The instance.
value bool = true optional
The value; true when omitted.

Returns

GitGraphBlock The same instance.

Examples

// C# initializer or property                                                      // C# fluent
new global::ChartForgeX.VisualBlocks.GitGraphBlock { ParallelCommits = value };    gitGraphBlock.ParallelCommits(value);
public static GitGraphBlock RasterScale(GitGraphBlock gitGraphBlock, int value) #

Sets VisualBlockOptions.RasterScale: Gets or sets the output pixel multiplier used by PNG exports.

Parameters

gitGraphBlock ChartForgeX.VisualBlocks.GitGraphBlock required
The instance.
value int required
The value.

Returns

GitGraphBlock The same instance.

Examples

// C# initializer or property                                                                                                                 // C# fluent
((global::ChartForgeX.VisualBlocks.VisualBlock<global::ChartForgeX.VisualBlocks.GitGraphBlock>)gitGraphBlock).Options.RasterScale = value;    gitGraphBlock.RasterScale(value);
public static GitGraphBlock RotateCommitLabels(GitGraphBlock gitGraphBlock, bool value = true) #

Sets GitGraphBlock.RotateCommitLabels: Gets or sets whether commit captions are tilted 45 degrees. Tags and branch captions stay upright.

Parameters

gitGraphBlock ChartForgeX.VisualBlocks.GitGraphBlock required
The instance.
value bool = true optional
The value; true when omitted.

Returns

GitGraphBlock The same instance.

Examples

// C# initializer or property                                                         // C# fluent
new global::ChartForgeX.VisualBlocks.GitGraphBlock { RotateCommitLabels = value };    gitGraphBlock.RotateCommitLabels(value);
public static GitGraphBlock ShowBranchLabels(GitGraphBlock gitGraphBlock, bool value = true) #

Sets GitGraphBlock.ShowBranchLabels: Gets or sets whether branch labels and lane lines are rendered.

Parameters

gitGraphBlock ChartForgeX.VisualBlocks.GitGraphBlock required
The instance.
value bool = true optional
The value; true when omitted.

Returns

GitGraphBlock The same instance.

Examples

// C# initializer or property                                                       // C# fluent
new global::ChartForgeX.VisualBlocks.GitGraphBlock { ShowBranchLabels = value };    gitGraphBlock.ShowBranchLabels(value);
public static GitGraphBlock ShowCard(GitGraphBlock gitGraphBlock, bool value = true) #

Sets VisualBlockOptions.ShowCard: Gets or sets whether the outer card surface should be rendered.

Parameters

gitGraphBlock ChartForgeX.VisualBlocks.GitGraphBlock required
The instance.
value bool = true optional
The value; true when omitted.

Returns

GitGraphBlock The same instance.

Examples

// C# initializer or property                                                                                                              // C# fluent
((global::ChartForgeX.VisualBlocks.VisualBlock<global::ChartForgeX.VisualBlocks.GitGraphBlock>)gitGraphBlock).Options.ShowCard = value;    gitGraphBlock.ShowCard(value);
public static GitGraphBlock ShowCommitLabels(GitGraphBlock gitGraphBlock, bool value = true) #

Sets GitGraphBlock.ShowCommitLabels: Gets or sets whether commit labels are rendered.

Parameters

gitGraphBlock ChartForgeX.VisualBlocks.GitGraphBlock required
The instance.
value bool = true optional
The value; true when omitted.

Returns

GitGraphBlock The same instance.

Examples

// C# initializer or property                                                       // C# fluent
new global::ChartForgeX.VisualBlocks.GitGraphBlock { ShowCommitLabels = value };    gitGraphBlock.ShowCommitLabels(value);
public static GitGraphBlock Size(GitGraphBlock gitGraphBlock, ChartSize value) #

Sets VisualBlockOptions.Size: Gets or sets the rendered block size in pixels.

Parameters

gitGraphBlock ChartForgeX.VisualBlocks.GitGraphBlock required
The instance.
value ChartForgeX.Primitives.ChartSize required
The value.

Returns

GitGraphBlock The same instance.

Examples

// C# initializer or property                                                                                                          // C# fluent
((global::ChartForgeX.VisualBlocks.VisualBlock<global::ChartForgeX.VisualBlocks.GitGraphBlock>)gitGraphBlock).Options.Size = value;    gitGraphBlock.Size(value);
public static GitGraphBlock Subtitle(GitGraphBlock gitGraphBlock, string value) #

Sets VisualBlock<GitGraphBlock>.Subtitle: Gets or sets the block subtitle.

Parameters

gitGraphBlock ChartForgeX.VisualBlocks.GitGraphBlock required
The instance.
value string required
The value.

Returns

GitGraphBlock The same instance.

Examples

// C# initializer or property                                               // C# fluent
new global::ChartForgeX.VisualBlocks.GitGraphBlock { Subtitle = value };    gitGraphBlock.Subtitle(value);
public static GitGraphBlock SvgColorVariables(GitGraphBlock gitGraphBlock, SvgColorVariables? value) #

Sets VisualBlockOptions.SvgColorVariables: Gets or sets the CSS custom properties SVG output writes for theme colours, matched by colour value (see SvgColorVariables.Apply), for example SvgColorVariables.SharedRoles of this theme and mode. Null (the default) writes literal colours; PNG output always does.

Parameters

gitGraphBlock ChartForgeX.VisualBlocks.GitGraphBlock required
The instance.
value ChartForgeX.Themes.SvgColorVariables? required
The value.

Returns

GitGraphBlock The same instance.

Examples

// C# initializer or property                                                                                                                       // C# fluent
((global::ChartForgeX.VisualBlocks.VisualBlock<global::ChartForgeX.VisualBlocks.GitGraphBlock>)gitGraphBlock).Options.SvgColorVariables = value;    gitGraphBlock.SvgColorVariables(value);
public static GitGraphBlock Theme(GitGraphBlock gitGraphBlock, VisualTheme value) #

Sets VisualBlockOptions.Theme: Gets or sets the visual theme used by renderers.

Parameters

gitGraphBlock ChartForgeX.VisualBlocks.GitGraphBlock required
The instance.
value ChartForgeX.Themes.VisualTheme required
The value.

Returns

GitGraphBlock The same instance.

Examples

// C# initializer or property                                                                                                           // C# fluent
((global::ChartForgeX.VisualBlocks.VisualBlock<global::ChartForgeX.VisualBlocks.GitGraphBlock>)gitGraphBlock).Options.Theme = value;    gitGraphBlock.Theme(value);
public static GitGraphBlock ThemeMode(GitGraphBlock gitGraphBlock, ThemeMode value) #

Sets VisualBlockOptions.ThemeMode: Gets or sets the explicit mode of the shared theme.

Parameters

gitGraphBlock ChartForgeX.VisualBlocks.GitGraphBlock required
The instance.
value ChartForgeX.ThemeMode required
The value.

Returns

GitGraphBlock The same instance.

Examples

// C# initializer or property                                                                                                               // C# fluent
((global::ChartForgeX.VisualBlocks.VisualBlock<global::ChartForgeX.VisualBlocks.GitGraphBlock>)gitGraphBlock).Options.ThemeMode = value;    gitGraphBlock.ThemeMode(value);
public static GitGraphBlock Title(GitGraphBlock gitGraphBlock, string value) #

Sets VisualBlock<GitGraphBlock>.Title: Gets or sets the block title.

Parameters

gitGraphBlock ChartForgeX.VisualBlocks.GitGraphBlock required
The instance.
value string required
The value.

Returns

GitGraphBlock The same instance.

Examples

// C# initializer or property                                            // C# fluent
new global::ChartForgeX.VisualBlocks.GitGraphBlock { Title = value };    gitGraphBlock.Title(value);
public static GitGraphBlock TransparentBackground(GitGraphBlock gitGraphBlock, bool value = true) #

Sets VisualBlockOptions.TransparentBackground: Gets or sets whether the full background should stay transparent.

Parameters

gitGraphBlock ChartForgeX.VisualBlocks.GitGraphBlock required
The instance.
value bool = true optional
The value; true when omitted.

Returns

GitGraphBlock The same instance.

Examples

// C# initializer or property                                                                                                                           // C# fluent
((global::ChartForgeX.VisualBlocks.VisualBlock<global::ChartForgeX.VisualBlocks.GitGraphBlock>)gitGraphBlock).Options.TransparentBackground = value;    gitGraphBlock.TransparentBackground(value);