Skip to content

MarkComposition

StructChartGuruChartGuru
public readonly struct MarkComposition

Snapshot of which mark kinds are present in a ChartGuru.Chart’s mark list. Drives the renderer and layout-engine’s mark-kind dispatch (Swift Charts parity: every kind that exists renders, regardless of ChartGuru.Chart.ChartType).

Cheap to compute (one O(n) pass) and cached on [ChartGuru.Chart](/tools/chartguru/api/chartguru-chart/); recomputed only when the mark list mutates.

The flags answer "is at least one mark of this kind present?" — fine-grained per-mark behavior (visibility, range vs scalar, layout) stays on the marks.

public readonly bool HasBars

Returns

System.Boolean

public readonly bool HasHorizontalBars

Returns

System.Boolean

public readonly bool HasLines

Returns

System.Boolean

public readonly bool HasPoints

Returns

System.Boolean

public readonly bool HasAreas

Returns

System.Boolean

public readonly bool HasCandlesticks

Returns

System.Boolean

public readonly bool HasSectors

Returns

System.Boolean

public readonly bool HasRadar

Returns

System.Boolean

public readonly bool HasRules

Returns

System.Boolean

public readonly bool HasRectangles

Returns

System.Boolean

public readonly bool HasAnyCartesian

True when at least one cartesian-family mark is present.

Returns

System.Boolean

public readonly bool HasAnyPolar

True when at least one polar-family mark (Sector) is present.

Returns

System.Boolean

public readonly int TotalMarkCount

Returns

System.Int32

public static readonly MarkComposition Empty

Returns

ChartGuru.MarkComposition

MarkComposition(bool, bool, bool, bool, bool, bool, bool, bool, bool, int)

Section titled “MarkComposition(bool, bool, bool, bool, bool, bool, bool, bool, bool, int)”
public MarkComposition(bool hasBars, bool hasHorizontalBars, bool hasLines, bool hasPoints, bool hasAreas, bool hasCandlesticks, bool hasSectors, bool hasRules, bool hasRectangles, int totalMarkCount)

Creates a renderer-dispatch snapshot from precomputed mark-kind flags, treating radar marks as absent.

Parameters

Name Type
hasBars System.Boolean
hasHorizontalBars System.Boolean
hasLines System.Boolean
hasPoints System.Boolean
hasAreas System.Boolean
hasCandlesticks System.Boolean
hasSectors System.Boolean
hasRules System.Boolean
hasRectangles System.Boolean
totalMarkCount System.Int32

MarkComposition(bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, int)

Section titled “MarkComposition(bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, int)”
public MarkComposition(bool hasBars, bool hasHorizontalBars, bool hasLines, bool hasPoints, bool hasAreas, bool hasCandlesticks, bool hasSectors, bool hasRadar, bool hasRules, bool hasRectangles, int totalMarkCount)

Creates a renderer-dispatch snapshot from precomputed mark-kind flags and the total source mark count.

Parameters

Name Type
hasBars System.Boolean
hasHorizontalBars System.Boolean
hasLines System.Boolean
hasPoints System.Boolean
hasAreas System.Boolean
hasCandlesticks System.Boolean
hasSectors System.Boolean
hasRadar System.Boolean
hasRules System.Boolean
hasRectangles System.Boolean
totalMarkCount System.Int32

public static MarkComposition From(IReadOnlyList<IChartMark> marks)

Builds a composition snapshot from a mark list.

Parameters

Name Type
marks System.Collections.Generic.IReadOnlyList{ChartGuru.IChartMark}

Returns

ChartGuru.MarkComposition