UNPKG

vega-lite

Version:

Vega-Lite is a concise high-level language for interactive visualization.

74 lines 3.3 kB
import { NewSignal, SignalRef } from 'vega'; import { AxisInternal } from '../axis.js'; import { Channel, NonPositionScaleChannel, PositionChannel, ScaleChannel, SingleDefChannel } from '../channel.js'; import { Config } from '../config.js'; import * as vlEncoding from '../encoding.js'; import { Encoding } from '../encoding.js'; import { ExprRef } from '../expr.js'; import { LegendInternal } from '../legend.js'; import { Mark, MarkDef } from '../mark.js'; import { Projection } from '../projection.js'; import { Domain } from '../scale.js'; import { SelectionParameter } from '../selection.js'; import { LayoutSizeMixins, NormalizedUnitSpec } from '../spec/index.js'; import { StackProperties } from '../stack.js'; import { VgData, VgLayout, VgMarkGroup } from '../vega.schema.js'; import { AxisInternalIndex } from './axis/component.js'; import { LegendInternalIndex } from './legend/component.js'; import { Model, ModelWithField } from './model.js'; import { ScaleIndex } from './scale/component.js'; /** * Internal model of Vega-Lite specification for the compiler. */ export declare class UnitModel extends ModelWithField { readonly markDef: MarkDef<Mark, SignalRef>; readonly encoding: Encoding<string>; readonly specifiedScales: ScaleIndex; readonly stack: StackProperties; protected specifiedAxes: AxisInternalIndex; protected specifiedLegends: LegendInternalIndex; specifiedProjection: Projection<ExprRef | SignalRef>; readonly selection: SelectionParameter[]; children: Model[]; constructor(spec: NormalizedUnitSpec, parent: Model, parentGivenName: string, parentGivenSize: LayoutSizeMixins, config: Config<SignalRef>); get hasProjection(): boolean; /** * Return specified Vega-Lite scale domain for a particular channel * @param channel */ scaleDomain(channel: ScaleChannel): Domain; axis(channel: PositionChannel): AxisInternal; legend(channel: NonPositionScaleChannel): LegendInternal; private initScales; private initScale; private initAxes; private initAxis; private initLegends; /** * If this unit lacks order encoding but does contain a color domain * add transform and encoding that aligns the stack order with the color domain. */ private alignStackOrderWithColorDomain; parseData(): void; parseLayoutSize(): void; parseSelections(): void; parseMarkGroup(): void; parseAxesAndHeaders(): void; assembleSelectionTopLevelSignals(signals: any[]): NewSignal[]; assembleSignals(): NewSignal[]; assembleSelectionData(data: readonly VgData[]): VgData[]; assembleLayout(): VgLayout; assembleLayoutSignals(): NewSignal[]; /** * Corrects the data references in marks after assemble. */ correctDataNames: (mark: VgMarkGroup) => any; assembleMarks(): any[]; assembleGroupStyle(): string | string[]; protected getMapping(): vlEncoding.Encoding<string>; get mark(): Mark; channelHasField(channel: Channel): boolean; fieldDef(channel: SingleDefChannel): import("../channeldef.js").FieldDef<string, any>; typedFieldDef(channel: SingleDefChannel): import("../channeldef.js").TypedFieldDef<string, any, boolean | import("../bin.js").BinParams | "binned">; } //# sourceMappingURL=unit.d.ts.map