Fit
@elastic/charts • Exports
@elastic/charts / Fit
Variable: Fit
const
Fit:Readonly
<Object
>
The fit function type
Type declaration
Average
Average:
"average"
Average between the closest non-null
values
Example
[2, null, null, 8] => [2, 5, 5, 8]
Carry
Carry:
"carry"
Use the previous non-null
value
Remarks
This is the opposite of Fit.Lookahead
Example
[2, null, null, 8] => [2, 2, 2, 8]
Explicit
Explicit:
"explicit"
Specify an explicit value X
Example
[2, null, null, 8] => [2, X, X, 8]
Linear
Linear:
"linear"
Linear interpolation between the closest non-null
values
Example
[2, null, null, 8] => [2, 4, 6, 8]
Lookahead
Lookahead:
"lookahead"
Use the next non-null
value
Remarks
This is the opposite of Fit.Carry
Example
[2, null, null, 8] => [2, 8, 8, 8]
Nearest
Nearest:
"nearest"
Use the closest non-null
value (before or after)
Example
[2, null, null, 8] => [2, 2, 8, 8]
None
None:
"none"
Don't draw value on the graph. Slices out area between null
values.
Example
[2, null, null, 8] => [2, null null, 8]
Zero
Zero:
"zero"
Sets all null
values to 0
Example
[2, null, null, 8] => [2, 0, 0, 8]
Source
packages/charts/src/chart_types/xy_chart/utils/specs.ts:180
Generated using typedoc-plugin-markdown and TypeDoc