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 : array<mixed,string>

Names of the best-fit Trend analysis methods.

Type

array<mixed,string>

$trendTypePolynomialOrders

$trendTypePolynomialOrders : array<mixed,string>

Names of the best-fit Trend polynomial orders.

Type

array<mixed,string>

$trendCache

$trendCache : array<mixed,\PhpOffice\PhpSpreadsheet\Shared\Trend\bestFit>

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

Type

array<mixed,\PhpOffice\PhpSpreadsheet\Shared\Trend\bestFit>

Methods

calculate()

calculate(  $trendType = self::TREND_BEST_FIT,   $yValues = array(),   $xValues = array(),   $const = true) 

Parameters

$trendType
$yValues
$xValues
$const