Skip to content

MarkComposition

StructChartGuruChartGuru
public readonly struct MarkComposition

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

Cheap to compute (one O(n) pass) and cached on 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

NameType
hasBarsSystem.Boolean
hasHorizontalBarsSystem.Boolean
hasLinesSystem.Boolean
hasPointsSystem.Boolean
hasAreasSystem.Boolean
hasCandlesticksSystem.Boolean
hasSectorsSystem.Boolean
hasRulesSystem.Boolean
hasRectanglesSystem.Boolean
totalMarkCountSystem.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

NameType
hasBarsSystem.Boolean
hasHorizontalBarsSystem.Boolean
hasLinesSystem.Boolean
hasPointsSystem.Boolean
hasAreasSystem.Boolean
hasCandlesticksSystem.Boolean
hasSectorsSystem.Boolean
hasRadarSystem.Boolean
hasRulesSystem.Boolean
hasRectanglesSystem.Boolean
totalMarkCountSystem.Int32

public static MarkComposition From(IReadOnlyList<IChartMark> marks)

Builds a composition snapshot from a mark list.

Parameters

NameType
marksSystem.Collections.Generic.IReadOnlyList{ChartGuru.IChartMark}

Returns

ChartGuru.MarkComposition