Skip to content

TrendLinePlot

ClassChartGuruChartGuru
[Serializable]
public class TrendLinePlot : ChartMark, IChartMark, IChartContent

First-class trend line mark that wraps ChartGuru.TrendLineUtils regression calculations into a renderable chart mark implementing ChartGuru.IChartContent. Swift Charts equivalent: LinearRegressionPlot(x:y:) (ChartGuru extends beyond linear to polynomial, exponential, logarithmic, and power regressions).

public override ChartType MarkType { get; }

No description is available for this member.

Returns

ChartGuru.ChartType — No return description is available.

public DataPoint IChartContent_DataPoint { get; }

No description is available for this member.

Returns

ChartGuru.DataPoint — No return description is available.

public RegressionType RegressionKind { get; }

No description is available for this member.

Returns

ChartGuru.RegressionType — No return description is available.

public float RSquared { get; }

No description is available for this member.

Returns

System.Single — No return description is available.

public string EquationText { get; }

No description is available for this member.

Returns

System.String — No return description is available.

public bool ShowsEquation { get; set; }

No description is available for this member.

Returns

System.Boolean — No return description is available.

public bool ShowsRSquared { get; set; }

No description is available for this member.

Returns

System.Boolean — No return description is available.

public TrendLinePlot(Vector2[] sourcePoints, RegressionType type = RegressionType.Linear)

No description is available for this member.

Parameters

Name Type Description
sourcePoints UnityEngine.Vector2[]
type ChartGuru.RegressionType

TrendLinePlot(float[], float[], RegressionType)

Section titled “TrendLinePlot(float[], float[], RegressionType)”
public TrendLinePlot(float[] xValues, float[] yValues, RegressionType type = RegressionType.Linear)

No description is available for this member.

Parameters

Name Type Description
xValues System.Single[]
yValues System.Single[]
type ChartGuru.RegressionType

FromData(IEnumerable, Func<T, float>, Func<T, float>, RegressionType)

Section titled “FromData(IEnumerable, Func<T, float>, Func<T, float>, RegressionType)”
public static TrendLinePlot FromData<T>(IEnumerable<T> data, Func<T, float> xSelector, Func<T, float> ySelector, RegressionType type = RegressionType.Linear)

No description is available for this member.

Parameters

Name Type Description
data System.Collections.Generic.IEnumerable{{T}}
xSelector System.Func{{T},System.Single}
ySelector System.Func{{T},System.Single}
type ChartGuru.RegressionType

Returns

ChartGuru.TrendLinePlot — No return description is available.

public IEnumerable<IChartMark> GetMarks()

Expands this composite content into individual chart marks for rendering.

Returns

System.Collections.Generic.IEnumerable{ChartGuru.IChartMark} — Enumerable of primitive chart marks.

public TrendLinePlot RegressionType(RegressionType type)

Regression types supported for trend line calculations.

Parameters

Name Type Description
type ChartGuru.RegressionType

Returns

ChartGuru.TrendLinePlot — No return description is available.

public TrendLinePlot PolynomialDegree(int degree)

No description is available for this member.

Parameters

Name Type Description
degree System.Int32

Returns

ChartGuru.TrendLinePlot — No return description is available.

public TrendLinePlot Samples(int count)

No description is available for this member.

Parameters

Name Type Description
count System.Int32

Returns

ChartGuru.TrendLinePlot — No return description is available.

public TrendLinePlot Domain(float min, float max)

No description is available for this member.

Parameters

Name Type Description
min System.Single
max System.Single

Returns

ChartGuru.TrendLinePlot — No return description is available.

public TrendLinePlot LineStyle(float width)

No description is available for this member.

Parameters

Name Type Description
width System.Single

Returns

ChartGuru.TrendLinePlot — No return description is available.

public TrendLinePlot LineStyle(StrokeStyle style)

No description is available for this member.

Parameters

Name Type Description
style ChartGuru.StrokeStyle

Returns

ChartGuru.TrendLinePlot — No return description is available.

public TrendLinePlot ForegroundStyle(Color color)

No description is available for this member.

Parameters

Name Type Description
color UnityEngine.Color

Returns

ChartGuru.TrendLinePlot — No return description is available.

public TrendLinePlot ShowEquation(bool show = true)

No description is available for this member.

Parameters

Name Type Description
show System.Boolean

Returns

ChartGuru.TrendLinePlot — No return description is available.

public TrendLinePlot ShowRSquared(bool show = true)

No description is available for this member.

Parameters

Name Type Description
show System.Boolean

Returns

ChartGuru.TrendLinePlot — No return description is available.

public override (Vector2 source, Vector2 target) GetMorphTargets(ChartType targetType, Rect plotArea)

No description is available for this member.

Parameters

Name Type Description
targetType ChartGuru.ChartType
plotArea UnityEngine.Rect

Returns

System.ValueTuple{UnityEngine.Vector2,UnityEngine.Vector2} — No return description is available.

public override IChartMark Clone()

No description is available for this member.

Returns

ChartGuru.IChartMark — No return description is available.