Appearance
MetricTrendOutput
Type: Object
Regression-based trend analysis computed via TimescaleDB Toolkit stats_agg(y, x) with slope(), corr(), and determination_coeff()
Fields
| Name | Type | Args | Description | Deprecated |
|---|---|---|---|---|
| avgValue | Float! | Mean daily value over the trend window | ||
| correlation | Float! | Pearson correlation coefficient (-1 to 1). Values near ±1 indicate strong linear trend. | ||
| direction | String! | Derived trend direction: rising, falling, stable, or insufficient_data. Uses |correlation| >= 0.3 as significance threshold. | ||
| rSquared | Float! | R² coefficient of determination (0 to 1). Higher means the trend explains more variance. | ||
| sampleDays | Int! | Number of days with data used in the regression | ||
| slope | Float! | Slope of daily averages over time (value change per second of epoch time) | ||
| stddevValue | Float | Standard deviation of daily values. Null when insufficient data. |