Skip to content

Interface: TrendlineOptions ​

trendlineOptions: plotly.py's trendline_options in camelCase. Which keys apply depends on the kind; others are rejected.

Properties ​

PropertyModifierTypeDescription
addConstant?readonlybooleanols: fit an intercept (default true); false fits a line through the origin.
adjust?readonlybooleanewm: adjusted weights (default true).
alpha?readonlynumberewm: smoothing factor α.
center?readonlybooleanrolling: center the windows.
com?readonlynumberewm: center of mass.
frac?readonlynumberlowess: share of the points in each local fit, 0–1. Default 0.6666666 (px).
function?readonlyWindowFunctionrolling / expanding / ewm: the statistic, by pandas' method name (default 'mean'), or for rolling / expanding a function of each window's present values.
functionArgs?readonlyReadonly<Record<string, unknown>>Arguments of the statistic: ddof of std / var, std of a 'gaussian' window.
halflife?readonlynumberewm: half-life, in observations.
ignoreNa?readonlybooleanewm: missing values do not age the weights.
logX?readonlybooleanols: fit against log10(x) (x must be positive).
logY?readonlybooleanols: fit log10(y) and draw 10^fit (y must be positive).
minPeriods?readonlynumberrolling / expanding / ewm: present values a result needs.
span?readonlynumberewm: span.
window?readonlystring | numberrolling: observations per window, or a time span ('7D', '12h') over dates on x.
winType?readonly"boxcar" | "triang" | "gaussian"rolling: window weights, 'boxcar', 'triang' or 'gaussian'.

Released under the MIT License.