GitGraphBlock
ChartForgeX.VisualBlocks
A deterministic visual block for product-neutral commit and branch graphs.
Inheritance
- VisualBlock<GitGraphBlock>
- GitGraphBlock
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
- Extension method MermaidGitGraphDocument.ToGitGraphBlock
- Method MermaidGitGraphRendering.ToGitGraphBlock
- Extension method GitGraphBlock.Accessibility
- Extension method GitGraphBlock.Direction
- Extension method GitGraphBlock.HostOwnsFrame
- Extension method GitGraphBlock.Options
- Extension method GitGraphBlock.Padding
- Extension method GitGraphBlock.ParallelCommits
- Extension method GitGraphBlock.RasterScale
- Extension method GitGraphBlock.RotateCommitLabels
- Extension method GitGraphBlock.ShowBranchLabels
- Extension method GitGraphBlock.ShowCard
- Extension method GitGraphBlock.ShowCommitLabels
- Extension method GitGraphBlock.Size
- Extension method GitGraphBlock.Subtitle
- Extension method GitGraphBlock.SvgColorVariables
- Extension method GitGraphBlock.Theme
- Extension method GitGraphBlock.ThemeMode
- Extension method GitGraphBlock.Title
- Extension method GitGraphBlock.TransparentBackground
- Method GitGraphBlock.AddBranch
- Method GitGraphBlock.AddCommit
- Method GitGraphBlock.Create
- Method GitGraphBlock.NaturalSize
- Method GitGraphBlock.Padding
- Method GitGraphBlock.Size
- Method GitGraphBlock.Theme
- Method GitGraphBlockFluent.Accessibility
- Method GitGraphBlockFluent.Direction
- Method GitGraphBlockFluent.HostOwnsFrame
- Method GitGraphBlockFluent.Options
- Method GitGraphBlockFluent.Padding
- Method GitGraphBlockFluent.ParallelCommits
- Method GitGraphBlockFluent.RasterScale
- Method GitGraphBlockFluent.RotateCommitLabels
- Method GitGraphBlockFluent.ShowBranchLabels
- Method GitGraphBlockFluent.ShowCard
- Method GitGraphBlockFluent.ShowCommitLabels
- Method GitGraphBlockFluent.Size
- Method GitGraphBlockFluent.Subtitle
- Method GitGraphBlockFluent.SvgColorVariables
- Method GitGraphBlockFluent.Theme
- Method GitGraphBlockFluent.ThemeMode
- Method GitGraphBlockFluent.Title
- Method GitGraphBlockFluent.TransparentBackground
Accepted by parameters 36
- Extension method GitGraphBlock.Accessibility
- Extension method GitGraphBlock.Direction
- Extension method GitGraphBlock.HostOwnsFrame
- Extension method GitGraphBlock.Options
- Extension method GitGraphBlock.Padding
- Extension method GitGraphBlock.ParallelCommits
- Extension method GitGraphBlock.RasterScale
- Extension method GitGraphBlock.RotateCommitLabels
- Extension method GitGraphBlock.ShowBranchLabels
- Extension method GitGraphBlock.ShowCard
- Extension method GitGraphBlock.ShowCommitLabels
- Extension method GitGraphBlock.Size
- Extension method GitGraphBlock.Subtitle
- Extension method GitGraphBlock.SvgColorVariables
- Extension method GitGraphBlock.Theme
- Extension method GitGraphBlock.ThemeMode
- Extension method GitGraphBlock.Title
- Extension method GitGraphBlock.TransparentBackground
- Method GitGraphBlockFluent.Accessibility
- Method GitGraphBlockFluent.Direction
- Method GitGraphBlockFluent.HostOwnsFrame
- Method GitGraphBlockFluent.Options
- Method GitGraphBlockFluent.Padding
- Method GitGraphBlockFluent.ParallelCommits
- Method GitGraphBlockFluent.RasterScale
- Method GitGraphBlockFluent.RotateCommitLabels
- Method GitGraphBlockFluent.ShowBranchLabels
- Method GitGraphBlockFluent.ShowCard
- Method GitGraphBlockFluent.ShowCommitLabels
- Method GitGraphBlockFluent.Size
- Method GitGraphBlockFluent.Subtitle
- Method GitGraphBlockFluent.SvgColorVariables
- Method GitGraphBlockFluent.Theme
- Method GitGraphBlockFluent.ThemeMode
- Method GitGraphBlockFluent.Title
- Method GitGraphBlockFluent.TransparentBackground
Constructors
public GitGraphBlock() #Methods
public GitGraphBlock AddBranch(string name, int? order = null) #Adds a branch lane.
Parameters
- name string
- order int? = null
Returns
GitGraphBlockpublic 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
- branchName string
- parentIds System.Collections.Generic.IEnumerable<string>? = null
- type ChartForgeX.VisualBlocks.GitGraphCommitType = Normal
- label string = ""
- tag string = ""
- sourceCommitId string = ""
Returns
GitGraphBlockpublic GitGraphBlock NaturalSize() #Fits commit columns and branch lanes at the current typography within the configured width.
Returns
GitGraphBlockInherited Methods
public GitGraphBlock Padding(double padding) #Parameters
- padding double
Returns
GitGraphBlockpublic GitGraphBlock Padding(double left, double top, double right, double bottom) #Parameters
- left double
- top double
- right double
- bottom double
Returns
GitGraphBlockpublic virtual RgbaImage RenderRgba() #Returns
RgbaImagepublic virtual string RenderSvg(string idScope) #Parameters
- idScope string
Returns
stringpublic GitGraphBlock Size(int width, int height) #Parameters
- width int
- height int
Returns
GitGraphBlockpublic GitGraphBlock Theme(Action<VisualThemeBuilder> configure) #Parameters
- configure Action<VisualThemeBuilder>
Returns
GitGraphBlockProperties
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.
Inherited Properties
public string Title { get; set; } #public string Subtitle { get; set; } #public VisualBlockOptions Options { get; } #FluentInlineExtension 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
- The instance.
- configure System.Action<ChartForgeX.Accessibility.VisualAccessibility>
- Configures the value.
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
- The instance.
- value ChartForgeX.VisualBlocks.GitGraphDirection
- The value.
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
- The instance.
- value bool = true
- The value; true when omitted.
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
- The instance.
- configure System.Action<ChartForgeX.VisualBlocks.VisualBlockOptions>
- Configures the value.
public static GitGraphBlock Padding(GitGraphBlock gitGraphBlock, ChartPadding value) #Sets VisualBlockOptions.Padding: Gets or sets the inner content padding.
Parameters
- gitGraphBlock ChartForgeX.VisualBlocks.GitGraphBlock
- The instance.
- value ChartForgeX.Primitives.ChartPadding
- The value.
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
- The instance.
- value bool = true
- The value; true when omitted.
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
- The instance.
- value int
- The value.
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
- The instance.
- value bool = true
- The value; true when omitted.
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
- The instance.
- value bool = true
- The value; true when omitted.
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
- The instance.
- value bool = true
- The value; true when omitted.
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
- The instance.
- value bool = true
- The value; true when omitted.
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
- The instance.
- value ChartForgeX.Primitives.ChartSize
- The value.
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
- The instance.
- value string
- The value.
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
- The instance.
- value ChartForgeX.Themes.SvgColorVariables?
- The value.
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
- The instance.
- value ChartForgeX.Themes.VisualTheme
- The value.
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
- The instance.
- value ChartForgeX.ThemeMode
- The value.
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
- The instance.
- value string
- The value.
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
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
((global::ChartForgeX.VisualBlocks.VisualBlock<global::ChartForgeX.VisualBlocks.GitGraphBlock>)gitGraphBlock).Options.TransparentBackground = value; gitGraphBlock.TransparentBackground(value);