Skip to content

PlotStyleBuilder

ClassChartGuruChartGuru
public class PlotStyleBuilder

Builder for fluent plot style configuration. Swift Charts equivalent: .chartPlotStyle { $0.Background(.blue) }

public PlotStyleBuilder(PlotStyleConfig config)

Creates a Plot Style Builder backed by the supplied config; fluent changes are accumulated until the configuration is built.

Parameters

NameType
configChartGuru.PlotStyleConfig

public PlotStyleBuilder Background(Color color)

Sets the plot area background color. Swift Charts equivalent: .Background(color)

Parameters

NameType
colorUnityEngine.Color

Returns

ChartGuru.PlotStyleBuilder

public PlotStyleBuilder Background(Gradient gradient)

Sets the plot area background gradient. Swift Charts equivalent: .Background(gradient)

Parameters

NameType
gradientUnityEngine.Gradient

Returns

ChartGuru.PlotStyleBuilder

public PlotStyleBuilder Background(LinearGradientStyle gradient)

Sets the plot area background using a LinearGradientStyle (gradient + direction).

Parameters

NameType
gradientChartGuru.LinearGradientStyle

Returns

ChartGuru.PlotStyleBuilder

public PlotStyleBuilder Background(FourCornerGradient fourCorner)

Sets the plot area background using a four-corner gradient.

Parameters

NameType
fourCornerChartGuru.FourCornerGradient

Returns

ChartGuru.PlotStyleBuilder

public PlotStyleBuilder Border(Color color, float width = 1)

Adds a border to the plot area. Swift Charts equivalent: .Border(color, width:)

Parameters

NameType
colorUnityEngine.Color
widthSystem.Single

Returns

ChartGuru.PlotStyleBuilder

public PlotStyleBuilder CornerRadius(float radius)

Sets the corner radius for rounded plot area. Swift Charts equivalent: .ClipShape(.rect(cornerRadius:))

Parameters

NameType
radiusSystem.Single

Returns

ChartGuru.PlotStyleBuilder

public PlotStyleBuilder Frame(float width, float height)

Applies a frame/padding around the plot area.

Parameters

NameType
widthSystem.Single
heightSystem.Single

Returns

ChartGuru.PlotStyleBuilder

public PlotStyleBuilder Padding()

Adds 16 px of padding on every side of the plot area. Swift Charts equivalent: .Padding().

Returns

ChartGuru.PlotStyleBuilder

public PlotStyleBuilder Padding(float all)

Adds the given amount of padding on every side of the plot area. Swift Charts equivalent: .Padding(length).

Parameters

NameType
allSystem.Single

Returns

ChartGuru.PlotStyleBuilder

public PlotStyleBuilder Padding(float horizontal, float vertical)

Adds horizontal/vertical padding around the plot area. Swift Charts equivalent: .Padding(.horizontal, h).Padding(.vertical, v).

Parameters

NameType
horizontalSystem.Single
verticalSystem.Single

Returns

ChartGuru.PlotStyleBuilder

public PlotStyleBuilder Padding(Edge edges, float length)

Adds padding on the specified edges. Swift Charts equivalent: .Padding(edges, length).

Parameters

NameType
edgesChartGuru.Edge
lengthSystem.Single

Returns

ChartGuru.PlotStyleBuilder