MarkComposition
public readonly struct MarkCompositionSnapshot 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.
Fields
Section titled “Fields”
HasBars
Section titled “HasBars”public readonly bool HasBarsReturns
System.Boolean
HasHorizontalBars
Section titled “HasHorizontalBars”public readonly bool HasHorizontalBarsReturns
System.Boolean
HasLines
Section titled “HasLines”public readonly bool HasLinesReturns
System.Boolean
HasPoints
Section titled “HasPoints”public readonly bool HasPointsReturns
System.Boolean
HasAreas
Section titled “HasAreas”public readonly bool HasAreasReturns
System.Boolean
HasCandlesticks
Section titled “HasCandlesticks”public readonly bool HasCandlesticksReturns
System.Boolean
HasSectors
Section titled “HasSectors”public readonly bool HasSectorsReturns
System.Boolean
HasRadar
Section titled “HasRadar”public readonly bool HasRadarReturns
System.Boolean
HasRules
Section titled “HasRules”public readonly bool HasRulesReturns
System.Boolean
HasRectangles
Section titled “HasRectangles”public readonly bool HasRectanglesReturns
System.Boolean
HasAnyCartesian
Section titled “HasAnyCartesian”public readonly bool HasAnyCartesianTrue when at least one cartesian-family mark is present.
Returns
System.Boolean
HasAnyPolar
Section titled “HasAnyPolar”public readonly bool HasAnyPolarTrue when at least one polar-family mark (Sector) is present.
Returns
System.Boolean
TotalMarkCount
Section titled “TotalMarkCount”public readonly int TotalMarkCountReturns
System.Int32
public static readonly MarkComposition EmptyReturns
ChartGuru.MarkComposition
Constructors
Section titled “Constructors”
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 |
Methods
Section titled “Methods”
From(IReadOnlyList)
Section titled “From(IReadOnlyList)”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