Skip to content
EliteChart

padBounds

Documentation


Documentation / @elitechart/core / padBounds

code
function padBounds(b, padFraction): MinMax;

Defined in: math/bounds.ts:81

Expand a price range by a fractional padding on each side. Used to give the chart a little breathing room above the highest high and below the lowest low.

Parameters

b

MinMax

padFraction

number

Returns

MinMax

Example

code
import { padBounds } from '@elitechart/core';
padBounds({ min: 100, max: 200 }, 0.1); // { min: 90, max: 210 }