Skip to content

SymbolStyle

StructChartGuruChartGuru
public readonly struct SymbolStyle

Combines a SymbolShape with optional stroke-border styling. Constructed via SymbolShapeExtensions.StrokeBorder(SymbolShape, float) or implicit conversion from SymbolShape for filled symbols. Swift Charts equivalent: BasicChartSymbolShape + .StrokeBorder(lineWidth:).

public readonly SymbolShape Shape

The base glyph shape.

Returns

ChartGuru.SymbolShape

public readonly bool Stroked

True when the symbol should render as an outline rather than filled.

Returns

System.Boolean

public readonly float StrokeWidth

Stroke width in pixels. Only consulted when SymbolStyle.Stroked is true.

Returns

System.Single

public readonly StrokeStyle? Stroke

Optional explicit stroke style (line cap / dash). When non-null, takes priority over SymbolStyle.StrokeWidth.

Returns

System.Nullable{ChartGuru.StrokeStyle}

SymbolStyle(SymbolShape, bool, float, StrokeStyle?)

Section titled “SymbolStyle(SymbolShape, bool, float, StrokeStyle?)”
public SymbolStyle(SymbolShape shape, bool stroked, float strokeWidth, StrokeStyle? stroke)

Creates a filled or outlined symbol style, clamping the fallback outline width to a non-negative pixel value.

Parameters

NameType
shapeChartGuru.SymbolShape
strokedSystem.Boolean
strokeWidthSystem.Single
strokeSystem.Nullable{ChartGuru.StrokeStyle}

public static SymbolStyle Filled(SymbolShape shape)

Filled symbol of the given shape.

Parameters

NameType
shapeChartGuru.SymbolShape

Returns

ChartGuru.SymbolStyle

public static SymbolStyle StrokeBorder(SymbolShape shape, float lineWidth = 1)

Stroked-border symbol with the given line width.

Parameters

NameType
shapeChartGuru.SymbolShape
lineWidthSystem.Single

Returns

ChartGuru.SymbolStyle

public static SymbolStyle StrokeBorder(SymbolShape shape, StrokeStyle style)

Stroked-border symbol with the given StrokeStyle.

Parameters

NameType
shapeChartGuru.SymbolShape
styleChartGuru.StrokeStyle

Returns

ChartGuru.SymbolStyle

implicit operator SymbolStyle(SymbolShape)

Section titled “implicit operator SymbolStyle(SymbolShape)”
public static implicit operator SymbolStyle(SymbolShape shape)

Implicit conversion from SymbolShape to a filled SymbolStyle.

Parameters

NameType
shapeChartGuru.SymbolShape

Returns

ChartGuru.SymbolStyle