import Component from '@glimmer/component'; import { Scale, ScaleIdentity } from "../scale"; import { Accessor, Encoding } from "../encoding"; /** * A valid Mark component must have a `data` arg. */ interface MarkArgs { data: any[]; } /** * This is used internally by Marks to qualify a scale with the data arg * on the next tick of the runloop (to avoid mutating a property twice in * the same render). * * @param context - A Lineal Mark comonent * @param scale - The scale to qualify * @param encoding - The encoding whose accesor to use for data lookups * @param field - The name of the encoded channel (used for formatting error messages) * @throws - When the scale has an invalid range (which is not computed as * part of scale qualification) */ declare function qualifyScale(context: Component, scale: Scale, encoding: Encoding, field: string, data?: any[]): void; /** * Given an argument value and maybe a Scale object, determines what Scale should be * returned (the Scale, if provided, or an Identity "pass-through" scale if the arg is * a static value instead of a field or accessor. * * @param arg - An accessor, typically from a Mark component's args * @param scale - A scale, typically from a Mark component's args * @returns A scale, either the provided scale or a ScaleIdentity */ declare function scaleFrom(arg: Accessor, scale?: Scale): ScaleIdentity | Scale | undefined; export { MarkArgs, qualifyScale, scaleFrom };