\PhpOffice\PhpSpreadsheet\Shared\TrendTrend

Summary

Methods
Properties
Constants
calculate()
No public properties found
TREND_LINEAR
TREND_LOGARITHMIC
TREND_EXPONENTIAL
TREND_POWER
TREND_POLYNOMIAL_2
TREND_POLYNOMIAL_3
TREND_POLYNOMIAL_4
TREND_POLYNOMIAL_5
TREND_POLYNOMIAL_6
TREND_BEST_FIT
TREND_BEST_FIT_NO_POLY
No protected methods found
No protected properties found
N/A
No private methods found
$trendTypes
$trendTypePolynomialOrders
$trendCache
N/A

Constants

TREND_LINEAR

TREND_LINEAR = 'Linear'

TREND_LOGARITHMIC

TREND_LOGARITHMIC = 'Logarithmic'

TREND_EXPONENTIAL

TREND_EXPONENTIAL = 'Exponential'

TREND_POWER

TREND_POWER = 'Power'

TREND_POLYNOMIAL_2

TREND_POLYNOMIAL_2 = 'Polynomial_2'

TREND_POLYNOMIAL_3

TREND_POLYNOMIAL_3 = 'Polynomial_3'

TREND_POLYNOMIAL_4

TREND_POLYNOMIAL_4 = 'Polynomial_4'

TREND_POLYNOMIAL_5

TREND_POLYNOMIAL_5 = 'Polynomial_5'

TREND_POLYNOMIAL_6

TREND_POLYNOMIAL_6 = 'Polynomial_6'

TREND_BEST_FIT

TREND_BEST_FIT = 'Bestfit'

TREND_BEST_FIT_NO_POLY

TREND_BEST_FIT_NO_POLY = 'Bestfit_no_Polynomials'

Properties

$trendTypes

$trendTypes : string[]

Names of the best-fit Trend analysis methods.

Type

string[]

$trendTypePolynomialOrders

$trendTypePolynomialOrders : string[]

Names of the best-fit Trend polynomial orders.

Type

string[]

$trendCache

$trendCache : \PhpOffice\PhpSpreadsheet\Shared\Trend\bestFit[]

Cached results for each method when trying to identify which provides the best fit.

Type

bestFit[]

Methods

calculate()

calculate(mixed  $trendType = self::TREND_BEST_FIT, mixed  $yValues = [], mixed  $xValues = [], mixed  $const = true) : mixed

Parameters

mixed $trendType
mixed $yValues
mixed $xValues
mixed $const

Returns

mixed —