PlotStyleBuilder
public class PlotStyleBuilderBuilder for fluent plot style configuration. Swift Charts equivalent: .chartPlotStyle { $0.Background(.blue) }
Constructors
Section titled “Constructors”
PlotStyleBuilder(PlotStyleConfig)
Section titled “PlotStyleBuilder(PlotStyleConfig)”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 |
Methods
Section titled “Methods”
Background(Color)
Section titled “Background(Color)”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
Background(Gradient)
Section titled “Background(Gradient)”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
Background(LinearGradientStyle)
Section titled “Background(LinearGradientStyle)”public PlotStyleBuilder Background(LinearGradientStyle gradient)Sets the plot area background using a LinearGradientStyle (gradient + direction).
Parameters
| Name | Type |
|---|---|
gradient |
ChartGuru.LinearGradientStyle |
Returns
ChartGuru.PlotStyleBuilder
Background(FourCornerGradient)
Section titled “Background(FourCornerGradient)”public PlotStyleBuilder Background(FourCornerGradient fourCorner)Sets the plot area background using a four-corner gradient.
Parameters
| Name | Type |
|---|---|
fourCorner |
ChartGuru.FourCornerGradient |
Returns
ChartGuru.PlotStyleBuilder
Border(Color, float)
Section titled “Border(Color, float)”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
CornerRadius(float)
Section titled “CornerRadius(float)”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
Frame(float, float)
Section titled “Frame(float, float)”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
Padding()
Section titled “Padding()”public PlotStyleBuilder Padding()Adds 16 px of padding on every side of the plot area.
Swift Charts equivalent: .Padding().
Returns
ChartGuru.PlotStyleBuilder
Padding(float)
Section titled “Padding(float)”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
Padding(float, float)
Section titled “Padding(float, float)”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
Padding(Edge, float)
Section titled “Padding(Edge, float)”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