Skip to content

MarkKey

StructChartGuruChartGuru
public readonly struct MarkKey

Deterministic identity of a mark across data updates, like the identity Swift Charts takes from ForEach(data, id:). It combines the mark's layer (its mark kind) with, in order of preference, its explicit AccessibilityInfo.Identifier with its series, a caller-chosen DataPoint.Id (which names the datum in any series), or its series plus category label or X value. Equal inputs give equal keys in every process, so transitions, selection and accessibility identifiers survive data replacement and restarts. Marks that share a key are told apart by their order; MarkMatcher pairs the n-th duplicate of a key with the n-th duplicate on the other side.

public readonly ulong Value

The 64-bit FNV-1a hash that identifies the mark.

Returns

System.UInt64

public MarkKey(ulong value)

Wraps a raw key value.

Parameters

Name Type
value System.UInt64

public static MarkKey For(IChartMark mark)

Returns the identity of mark: its layer, series and identifier, category or X value.

Parameters

Name Type
mark ChartGuru.IChartMark

Returns

ChartGuru.MarkKey

public static MarkKey ForSeries(IChartMark mark)

The identity of the series mark belongs to within its layer; polylines are matched by it.

Parameters

Name Type
mark ChartGuru.IChartMark

Returns

ChartGuru.MarkKey

public bool Equals(MarkKey other)

Parameters

Name Type
other ChartGuru.MarkKey

Returns

System.Boolean

public override bool Equals(object obj)

Parameters

Name Type
obj System.Object

Returns

System.Boolean

public override int GetHashCode()

Returns

System.Int32

public override string ToString()

The key as 16 lowercase hexadecimal digits, the same in every process.

Returns

System.String

public static bool operator ==(MarkKey left, MarkKey right)

True when both keys identify the same mark.

Parameters

Name Type
left ChartGuru.MarkKey
right ChartGuru.MarkKey

Returns

System.Boolean

public static bool operator !=(MarkKey left, MarkKey right)

True when the keys identify different marks.

Parameters

Name Type
left ChartGuru.MarkKey
right ChartGuru.MarkKey

Returns

System.Boolean