Skip to content

LineMark

ClassChartGuruChartGuru
public class LineMark : ChartMark, IChartMark

Plots connected data points as a line with configurable interpolation, symbols, and stroke styling.

public LineMark()

public LineMark(float x, float y)

Creates a line sample at the supplied XY coordinates with the default shadow settings.

Parameters

Name Type
x System.Single
y System.Single
public LineMark(DataPoint point)

Creates a line sample from an existing point, preserving its identity and grouping metadata.

Parameters

Name Type
point ChartGuru.DataPoint

LineMark(PlottableValueRef, PlottableValueRef, int)

Section titled “LineMark(PlottableValueRef, PlottableValueRef, int)”
public LineMark(PlottableValueRef x, PlottableValueRef y, int index = 0)

Creates a line sample from semantic X/Y bindings and carries their axis and category metadata into the mark.

Parameters

Name Type
x ChartGuru.PlottableValueRef
y ChartGuru.PlottableValueRef
index System.Int32

public LineMark InterpolationMethod(InterpolationMethod method)

Sets the interpolation method for this line. Swift Charts equivalent: .InterpolationMethod(.catmullRom)

Parameters

Name Type
method ChartGuru.InterpolationMethod

Returns

ChartGuru.LineMark

public LineMark LineStyle(float lineWidth)

Sets the line Width (stroke width). Swift Charts equivalent: .LineStyle(StrokeStyle(lineWidth:))

Parameters

Name Type
lineWidth System.Single

Returns

ChartGuru.LineMark

public LineMark LineStyle(StrokeStyle style)

Sets the full stroke style including width, dash pattern, etc. Swift Charts equivalent: .LineStyle(StrokeStyle(lineWidth:dash:))

Parameters

Name Type
style ChartGuru.StrokeStyle

Returns

ChartGuru.LineMark

public LineMark LineStyle(PlottableValueRef value)

Encodes a value into the line style scale for automatic dash pattern assignment. Swift Charts equivalent: .LineStyle(by: .Value(“Category”, category))

Parameters

Name Type
value ChartGuru.PlottableValueRef

Returns

ChartGuru.LineMark

public LineMark Symbol(SymbolShape shape, float size = 6)

Enables point symbols for this line and sets their shape. Swift Charts equivalent: .Symbol(.circle)

Parameters

Name Type
shape ChartGuru.SymbolShape
size System.Single

Returns

ChartGuru.LineMark

public LineMark Symbol(SymbolStyle style, float size = 6)

Enables point symbols using a ChartGuru.SymbolStyle, supporting stroked-border rendering. Swift Charts equivalent: .Symbol(.circle.StrokeBorder(lineWidth: 2)).

Parameters

Name Type
style ChartGuru.SymbolStyle
size System.Single

Returns

ChartGuru.LineMark

public LineMark Symbol(PlottableValueRef value)

Encodes a value into the symbol scale for automatic symbol assignment. Swift Charts equivalent: .Symbol(by: .Value(“Category”, category))

Parameters

Name Type
value ChartGuru.PlottableValueRef

Returns

ChartGuru.LineMark

public LineMark SymbolSize(float size)

Sets the symbol size for this line’s point markers. Swift Charts equivalent: .SymbolSize(value)

Parameters

Name Type
size System.Single

Returns

ChartGuru.LineMark

public LineMark SymbolSize(PlottableValueRef value)

Encodes a value into the symbol size scale for automatic sizing. Swift Charts equivalent: .SymbolSize(by: .Value(“Size”, size))

Parameters

Name Type
value ChartGuru.PlottableValueRef

Returns

ChartGuru.LineMark

public override (Vector2 source, Vector2 target) GetMorphTargets(ChartType targetType, Rect plotArea)

Projects this mark into plot-space geometry that the morph renderer can interpolate toward the requested chart type.

Parameters

Name Type
targetType ChartGuru.ChartType
plotArea UnityEngine.Rect

Returns

System.ValueTuple{UnityEngine.Vector2,UnityEngine.Vector2}

public override IChartMark Clone()

Creates an independent copy of this Line Mark; later configuration changes do not affect the original instance.

Returns

ChartGuru.IChartMark

public override ChartType MarkType { get; }

Returns

ChartGuru.ChartType

public InterpolationMethod Interpolation { get; set; }

Returns

ChartGuru.InterpolationMethod

public float LineWidth { get; set; }

Returns

System.Single

public float[] Dash { get; set; }

The dash pattern for dashed lines. Null or empty for solid lines. Example: [5, 3] = 5px dash, 3px gap.

Returns

System.Single[]

public float DashPhase { get; set; }

How far into the dash pattern the line starts.

Returns

System.Single

public bool IsDashed { get; }

Returns true if this line uses a dash pattern.

Returns

System.Boolean

public bool ShowPoints { get; set; }

Returns

System.Boolean

public SymbolShape PointSymbol { get; set; }

Returns

ChartGuru.SymbolShape

public float PointSize { get; set; }

Returns

System.Single

public bool PointStroked { get; set; }

True when point symbols render as a stroked outline rather than filled. Swift Charts equivalent: .Symbol(.circle.StrokeBorder(lineWidth: 2)).

Returns

System.Boolean

public float PointStrokeWidth { get; set; }

Stroke width in pixels for stroked point symbols.

Returns

System.Single

public float Tension { get; set; }

Returns

System.Single

public bool ShowGradient { get; set; }

Returns

System.Boolean

public object LineStyleKey { get; }

Returns

System.Object

public object SymbolKey { get; }

Returns

System.Object

public object SymbolSizeKey { get; }

Returns

System.Object