AreaPlot
public class AreaPlot : ChartMark, IChartMarkA vectorized area plot that renders a mathematical function as a filled area. Swift Charts equivalent: AreaPlot(x: “x”, y: .linearFunction(…))
Constructors
Section titled “Constructors”
AreaPlot(Func<float, float>, float, float)
Section titled “AreaPlot(Func<float, float>, float, float)”public AreaPlot(Func<float, float> function, float domainMin = 0, float domainMax = 1)Creates an AreaPlot with a function and domain.
Parameters
| Name | Type |
|---|---|
function |
System.Func{System.Single,System.Single} |
domainMin |
System.Single |
domainMax |
System.Single |
AreaPlot(Func<float, float>, Func<float, float>, float, float)
Section titled “AreaPlot(Func<float, float>, Func<float, float>, float, float)”public AreaPlot(Func<float, float> upperFunction, Func<float, float> lowerFunction, float domainMin = 0, float domainMax = 1)Creates an area between two functions.
Parameters
| Name | Type |
|---|---|
upperFunction |
System.Func{System.Single,System.Single} |
lowerFunction |
System.Func{System.Single,System.Single} |
domainMin |
System.Single |
domainMax |
System.Single |
Methods
Section titled “Methods”
LinearFunction(float, float, float, float)
Section titled “LinearFunction(float, float, float, float)”public static AreaPlot LinearFunction(float intercept, float slope, float domainMin = 0, float domainMax = 1)Creates a linear function area plot.
Parameters
| Name | Type |
|---|---|
intercept |
System.Single |
slope |
System.Single |
domainMin |
System.Single |
domainMax |
System.Single |
Returns
ChartGuru.AreaPlot
SineWave(float, float, float, float, float)
Section titled “SineWave(float, float, float, float, float)”public static AreaPlot SineWave(float amplitude = 1, float frequency = 1, float phase = 0, float domainMin = 0, float domainMax = 6.28)Creates a sine wave area plot.
Parameters
| Name | Type |
|---|---|
amplitude |
System.Single |
frequency |
System.Single |
phase |
System.Single |
domainMin |
System.Single |
domainMax |
System.Single |
Returns
ChartGuru.AreaPlot
GetSampledMarks()
Section titled “GetSampledMarks()”public IEnumerable<AreaMark> GetSampledMarks()Samples the function and generates AreaMark data points.
Returns
System.Collections.Generic.IEnumerable{ChartGuru.AreaMark}
Domain(float, float)
Section titled “Domain(float, float)”public AreaPlot Domain(float min, float max)Sets the numeric input domain sampled by the plot; values outside the interval are not generated.
Parameters
| Name | Type |
|---|---|
min |
System.Single |
max |
System.Single |
Returns
ChartGuru.AreaPlot
Samples(int)
Section titled “Samples(int)”public AreaPlot Samples(int count)Sets how many evenly spaced samples are generated across a function plot domain.
Parameters
| Name | Type |
|---|---|
count |
System.Int32 |
Returns
ChartGuru.AreaPlot
InterpolationMethod(InterpolationMethod)
Section titled “InterpolationMethod(InterpolationMethod)”public AreaPlot InterpolationMethod(InterpolationMethod method)Selects how adjacent data points are connected, affecting line and area geometry between samples.
Parameters
| Name | Type |
|---|---|
method |
ChartGuru.InterpolationMethod |
Returns
ChartGuru.AreaPlot
Baseline(float)
Section titled “Baseline(float)”public AreaPlot Baseline(float value)Sets the area baseline; callback overloads evaluate a separate baseline for each sampled X value.
Parameters
| Name | Type |
|---|---|
value |
System.Single |
Returns
ChartGuru.AreaPlot
Baseline(Func<float, float>)
Section titled “Baseline(Func<float, float>)”public AreaPlot Baseline(Func<float, float> function)Sets the area baseline; callback overloads evaluate a separate baseline for each sampled X value.
Parameters
| Name | Type |
|---|---|
function |
System.Func{System.Single,System.Single} |
Returns
ChartGuru.AreaPlot
Opacity(float)
Section titled “Opacity(float)”public AreaPlot Opacity(float value)Configures the alpha multiplier for generated marks; selector overloads evaluate it separately for each datum.
Parameters
| Name | Type |
|---|---|
value |
System.Single |
Returns
ChartGuru.AreaPlot
GetMorphTargets(ChartType, Rect)
Section titled “GetMorphTargets(ChartType, Rect)”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}
Clone()
Section titled “Clone()”public override IChartMark Clone()Creates an independent copy of this Area Plot; later configuration changes do not affect the original instance.
Returns
ChartGuru.IChartMark
Properties
Section titled “Properties”
MarkType
Section titled “MarkType”public override ChartType MarkType { get; }Returns
ChartGuru.ChartType
Function
Section titled “Function”public Func<float, float> Function { get; set; }The function to plot: y = f(x)
Returns
System.Func{System.Single,System.Single}
BaselineFunction
Section titled “BaselineFunction”public Func<float, float> BaselineFunction { get; set; }Optional baseline function for area between two curves. If null, uses the constant Baseline value.
Returns
System.Func{System.Single,System.Single}
DomainMin
Section titled “DomainMin”public float DomainMin { get; set; }Returns
System.Single
DomainMax
Section titled “DomainMax”public float DomainMax { get; set; }Returns
System.Single
SampleCount
Section titled “SampleCount”public int SampleCount { get; set; }Returns
System.Int32
Interpolation
Section titled “Interpolation”public InterpolationMethod Interpolation { get; set; }Returns
ChartGuru.InterpolationMethod
BaselineValue
Section titled “BaselineValue”public float BaselineValue { get; set; }Returns
System.Single
ShowLine
Section titled “ShowLine”public bool ShowLine { get; set; }Returns
System.Boolean
LineWidth
Section titled “LineWidth”public float LineWidth { get; set; }Returns
System.Single
FillOpacity
Section titled “FillOpacity”public float FillOpacity { get; set; }Returns
System.Single
ShowGradient
Section titled “ShowGradient”public bool ShowGradient { get; set; }Returns
System.Boolean