Skip to content
EliteChart

assertBars

Documentation


Documentation / @elitechart/core / assertBars

code
function assertBars(
   bars, 
   mode?, 
   onWarn?): void;

Defined in: data/validation.ts:85

Assert invariants over an entire bar array. Threads the previous bar through assertBar so monotonicity is enforced edge-to-edge.

Parameters

bars

readonly Bar[]

mode?

ValidationMode = 'strict'

onWarn?

WarnFn

Returns

void

Example

code
import { assertBars } from '@elitechart/core';
assertBars(bars);