Skip to content

PlotDimensionRange

StructChartGuruChartGuru
public readonly struct PlotDimensionRange

Plot-dimension scale range padding. Swift Charts equivalent: .plotDimension(startPadding:endPadding:).

Pads (or — when negative — extends) the value/band axis at the start and end of the plot rectangle. Sample 28 uses .ChartYScale(range: .plotDimension(endPadding: -8)) to push the lone band slot 8 px past the plot edge.

public readonly float StartPadding

Signed pixel padding at the start of the axis (lower-value end / leading band). Negative values extend marks past the plot edge.

Returns

System.Single

public readonly float EndPadding

Signed pixel padding at the end of the axis (upper-value end / trailing band). Negative values extend marks past the plot edge.

Returns

System.Single

public PlotDimensionRange(float startPadding, float endPadding)

Creates signed start and end padding in pixels. Negative values extend content past the corresponding plot edge.

Parameters

Name Type
startPadding System.Single
endPadding System.Single

public static PlotDimensionRange PlotDimension(float startPadding = 0, float endPadding = 0)

Swift Charts equivalent: .plotDimension(startPadding:endPadding:). Either argument may be negative to extend marks past the plot edge.

Parameters

Name Type
startPadding System.Single
endPadding System.Single

Returns

ChartGuru.PlotDimensionRange