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

Name Type
config ChartGuru.PlotStyleConfig

public PlotStyleBuilder Background(Color color)

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

Parameters

Name Type
color UnityEngine.Color

Returns

ChartGuru.PlotStyleBuilder

public PlotStyleBuilder Background(Gradient gradient)

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

Parameters

Name Type
gradient UnityEngine.Gradient

Returns

ChartGuru.PlotStyleBuilder

public PlotStyleBuilder Background(LinearGradientStyle gradient)

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

Parameters

Name Type
gradient ChartGuru.LinearGradientStyle

Returns

ChartGuru.PlotStyleBuilder

public PlotStyleBuilder Background(FourCornerGradient fourCorner)

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

Parameters

Name Type
fourCorner ChartGuru.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

Name Type
color UnityEngine.Color
width System.Single

Returns

ChartGuru.PlotStyleBuilder

public PlotStyleBuilder CornerRadius(float radius)

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

Parameters

Name Type
radius System.Single

Returns

ChartGuru.PlotStyleBuilder

public PlotStyleBuilder Frame(float width, float height)

Applies a frame/padding around the plot area.

Parameters

Name Type
width System.Single
height System.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

Name Type
all System.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

Name Type
horizontal System.Single
vertical System.Single

Returns

ChartGuru.PlotStyleBuilder

public PlotStyleBuilder Padding(Edge edges, float length)

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

Parameters

Name Type
edges ChartGuru.Edge
length System.Single

Returns

ChartGuru.PlotStyleBuilder