SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Fills a geometric series — each value the previous one MULTIPLIED by a ratio, where Linear adds.

    IAutoFill.Options.stepValue is that ratio, not an increment: 1 stepping by 2 fills 2, 4, 8, 16. Nothing here is a special case — a ratio of 0 collapses the series to zeros, a negative one alternates the sign, and a zero anchor stays zero, all of which is just the multiplication.

    With IAutoFill.Options.trend the ratio is FITTED instead — a least-squares line through the logs of the values, which is a geometric curve through the values themselves.

    Never auto-detected: Excel offers growth only as an explicit choice, so this is not among the fillers Types.Series composes.

    Implements

    Index
    id: string = 'growth'

    Identifies the filler. Must be unique among the fillers in use.

    This is what names the fill in a menu, survives into a transaction's ITransaction.Operation.params, and lets a script ask for a fill type by name — so it is a stable key, not a display label.

    supportsStep: boolean = true

    Whether Options.stepValue means anything to this filler.

    These three say only which fields an authoring surface should OFFER; they say nothing about whether the filler can be applied to a given selection (see Preset). The step's meaning is the filler's own — an addend for a linear series, a RATIO for a growth one, a count of units for a date one — so the value is passed through uninterpreted.

    supportsStop: boolean = true

    Whether Options.stopValue means anything to this filler.

    Only an ordered series can be stopped; a list or an ordinal one has nothing to compare.

    supportsTrend: boolean = true

    Whether this filler can fit its series to the values rather than stepping from them (Options.trend).

    A fit needs at least two values, so a preset that turns it on carries that arity — see Preset.minValues.

    type: InteropScalarType = InteropScalarType.Number

    The value type this filler reads.

    • The filler is only ever offered values of this type — a claim that runs past the type is trimmed back, so matches does not have to re-check what the caller already knows. Blanks carry no type and never split a series.
    • Leave it undefined to be offered a segment of ANY type (still one type at a time).
    • Dates are InteropScalarType.Date: cell values are serial numbers, and it is the cell's number format — not the runtime type — that makes one a date.
    • A filler that reads more than one type registers once per type; where it sits in each Composite's list is its priority for that type.
    • Create a IAutoFill.FillAt function using the provided values and options.

      Parameters

      Returns FillAt<number> | null

      • The first elements in the values is guaranteed to never be null.
      • Return null if the autofill is unable to fill.
    • Claims the run of numbers — but only one it could fill: with no ratio given (and no fit asked for) the numbers must already step by a constant ratio, or there is nothing to continue and the caller would only repeat them. 1, 2, 3, 4 is not offered a growth fill; 1, 2, 4, 8 and a lone 5 are.

      Parameters

      Returns number