SandDance

vega-deck.gl .types

Interfaces

Axis

interface Axis {
    domain: StyledLine;
    ticks: StyledLine[];
    tickText: TickText[];
    title?: TextLayerDatum;
}

Properties

Name Type Optional
domain StyledLine false
ticks StyledLine[] false
tickText TickText[] false
title TextLayerDatum true

Base

References to dependency libraries.

interface Base {
    deck: DeckBase;
    layers: DeckLayerBase;
    luma: LumaBase;
    vega: VegaBase;
}

Properties

Name Type Optional
deck DeckBase false
layers DeckLayerBase false
luma LumaBase false
vega VegaBase false

Cube

Cuboid information. The cube does not need to have equal dimensions.

interface Cube {
    ordinal?: number;
    isEmpty?: boolean;
    color: Color;
    position: Vec3<number, number, number>;
    size: Vec3<number, number, number>;
}

Properties

Name Type Optional Description
ordinal number true Ordinal position.
isEmpty boolean true Flag whether this cube is a “placeholder” and is not to be rendered nor contains cube data.
color Color false  
position Vec3<number, number, number> false  
size Vec3<number, number, number> false  

CubeLayerDataProps

interface CubeLayerDataProps {
    data: Cube[];
    interpolator?: LinearInterpolator_Class<CubeLayerInterpolatedProps>;
}

Properties

Name Type Optional
data Cube[] false
interpolator LinearInterpolator_Class][ClassDeclaration-4]<[CubeLayerInterpolatedProps> true

CubeLayerDefaultProps

interface CubeLayerDefaultProps {
    lightingMix: number;
    fp64?: boolean;
    getColor?: (o: Cube) => number[];
    getSize?: (o: Cube) => number[];
    getPosition?: (o: Cube) => number[];
}

Properties

Name Type Optional
lightingMix number false
fp64 boolean true
getColor (o: Cube) => number[] true
getSize (o: Cube) => number[] true
getPosition (o: Cube) => number[] true

DeckBase

deck.gl/core dependency.

interface DeckBase {
    CompositeLayer: typeof ???;
    COORDINATE_SYSTEM: typeof ???;
    Deck: typeof ???;
    Layer: typeof ???;
    LinearInterpolator: typeof ???;
    OrbitView: typeof ???;
    _OrbitController: typeof ???;
}

Properties

Name Type Optional
CompositeLayer typeof ??? false
COORDINATE_SYSTEM typeof ??? false
Deck typeof ??? false
Layer typeof ??? false
LinearInterpolator typeof ??? false
OrbitView typeof ??? false
_OrbitController typeof ??? false

DeckLayerBase

deck.gl/layers dependency.

interface DeckLayerBase {
    IconLayer: typeof ???;
    LineLayer: typeof ???;
    PolygonLayer: typeof ???;
    TextLayer: typeof ???;
}

Properties

Name Type Optional
IconLayer typeof ??? false
LineLayer typeof ??? false
PolygonLayer typeof ??? false
TextLayer typeof ??? false

FacetRect

Rect area and title for a facet.

interface FacetRect {
    facetTitle?: TextLayerDatum;
    lines: StyledLine[];
}

Properties

Name Type Optional
facetTitle TextLayerDatum true
lines StyledLine[] false

Legend

interface Legend {
    title?: string;
    rows: { [index: number]: LegendRow; };
}

Properties

Name Type Optional
title string true
rows { [index: number]: LegendRow; } false

LegendRow

interface LegendRow {
    label?: string;
    value?: string;
    symbol?: LegendRowSymbol;
}

Properties

Name Type Optional
label string true
value string true
symbol LegendRowSymbol true

LegendRowSymbol

interface LegendRowSymbol {
    bounds: { x1: number; y1: number; x2: number; y2: number; };
    fill: string;
    shape: string;
}

Properties

Name Type Optional
bounds { x1: number; y1: number; x2: number; y2: number; } false
fill string false
shape string false

LumaBase

luma.gl dependency.

interface LumaBase {
    CubeGeometry: typeof ???;
    fp64: typeof ???;
    Model: typeof ???;
    Texture2D: typeof ???;
}

Properties

Name Type Optional
CubeGeometry typeof ??? false
fp64 typeof ??? false
Model typeof ??? false
Texture2D typeof ??? false

PreStage

Function that can be called prior to presenting the stage.

interface PreStage {
    (stage: Stage, deckProps: DeckProps): void;
}

Call

(stage: Stage, deckProps: DeckProps): void;

Parameters

Name Type
stage Stage
deckProps DeckProps

Return type

void


PresenterConfig

Configuration options to be used by the Presenter.

interface PresenterConfig {
    transitionDurations?: TransitionDurations;
    preStage?: PreStage;
    redraw?: () => void;
    onCubeHover?: (e: MouseEvent | PointerEvent | TouchEvent, cube: Cube) => void;
    onCubeClick?: (e: MouseEvent | PointerEvent | TouchEvent, cube: Cube) => void;
    onLayerClick?: (info: PickInfo, pickedInfos: PickInfo[], e: MouseEvent) => any;
    onLegendClick?: (e: MouseEvent | PointerEvent | TouchEvent, legend: Legend, clickedIndex: number) => void;
    onPresent?: () => void;
    shouldViewstateTransition?: () => boolean;
    preLayer?: (stage: Stage) => void;
    onTextClick?: (e: MouseEvent | PointerEvent | TouchEvent, t: TextLayerDatum) => void;
    onTextHover?: (e: MouseEvent | PointerEvent | TouchEvent, t: TextLayerDatum) => boolean;
    getTextColor?: (o: TextLayerDatum) => Color;
    getTextHighlightColor?: (o: TextLayerDatum) => Color;
}

Properties

Name Type Optional
transitionDurations TransitionDurations true
preStage PreStage true
redraw () => void true
onCubeHover (e: MouseEvent | PointerEvent | TouchEvent, cube: Cube) => void true
onCubeClick (e: MouseEvent | PointerEvent | TouchEvent, cube: Cube) => void true
onLayerClick (info: PickInfo, pickedInfos: PickInfo[], e: MouseEvent) => any true
onLegendClick (e: MouseEvent | PointerEvent | TouchEvent, legend: Legend, clickedIndex: number) => void true
onPresent () => void true
shouldViewstateTransition () => boolean true
preLayer (stage: Stage) => void true
onTextClick (e: MouseEvent | PointerEvent | TouchEvent, t: TextLayerDatum) => void true
onTextHover (e: MouseEvent | PointerEvent | TouchEvent, t: TextLayerDatum) => boolean true
getTextColor (o: TextLayerDatum) => Color true
getTextHighlightColor (o: TextLayerDatum) => Color true

PresenterStyle

interface PresenterStyle {
    cssPrefix?: string;
    defaultCubeColor?: Color;
    highlightColor?: Color;
    lightSettings?: { [view extends View]: LightSettings };
    fontFamily?: string;
}

Properties

Name Type Optional
cssPrefix string true
defaultCubeColor Color true
highlightColor Color true
lightSettings { [view extends View]: LightSettings } true
fontFamily string true

QueuedAnimationOptions

Options to pass to Presenter.queueAnimation()

interface QueuedAnimationOptions {
    waitingLabel?: string;
    handlerLabel?: string;
    animationCanceled?: () => void;
}

Properties

Name Type Optional Description
waitingLabel string true Debug label to observe which animation is waiting.
handlerLabel string true Debug label to observe which handler is invoked.
animationCanceled () => void true Function to invoke if animation was interrupted when another animation is queued.

Scene3d

Vega Scene plus camera type.

interface Scene3d extends Scene {
    view: View;
}

Extends

Scene

Properties

Name Type Optional
view View false

Stage

Data structure containing all that is necessary to present a chart.

interface Stage {
    backgroundColor?: Color;
    cubeData: Cube[];
    legend?: Legend;
    axes: { x: Axis[]; y: Axis[]; };
    textData: TextLayerDatum[];
    view: View;
    gridLines?: StyledLine[];
    facets?: FacetRect[];
}

Properties

Name Type Optional
backgroundColor Color true
cubeData Cube[] false
legend Legend true
axes { x: Axis[]; y: Axis[]; } false
textData TextLayerDatum[] false
view View false
gridLines StyledLine[] true
facets FacetRect[] true

StyledLine

interface StyledLine extends LineLayerDatum {
    strokeWidth?: number;
}

Extends

LineLayerDatum

Properties

Name Type Optional
strokeWidth number true

TickText

interface TickText extends TextLayerDatum {
    value: number | string;
}

Extends

TextLayerDatum

Properties

Name Type Optional
value number | string false

TransitionDurations

Lengths of time for a transition animation.

interface TransitionDurations {
    color?: number;
    position?: number;
    size?: number;
    view?: number;
}

Properties

Name Type Optional
color number true
position number true
size number true
view number true

VegaBase

Vega library dependency.

interface VegaBase {
    CanvasHandler: CanvasHandler;
    inferType: typeof ???;
    inferTypes: typeof ???;
    loader: typeof ???;
    parse: typeof ???;
    read: typeof ???;
    renderModule: typeof ???;
    Renderer: typeof ???;
    sceneVisit: typeof ???;
    scheme: typeof ???;
    View: typeof ???;
}

Properties

Name Type Optional
CanvasHandler CanvasHandler false
inferType typeof ??? false
inferTypes typeof ??? false
loader typeof ??? false
parse typeof ??? false
read typeof ??? false
renderModule typeof ??? false
Renderer typeof ??? false
sceneVisit typeof ??? false
scheme typeof ??? false
View typeof ??? false

ViewGlConfig

Options for the View.

interface ViewGlConfig {
    presenter?: Presenter;
    presenterConfig?: PresenterConfig;
    getView?: { (): View; };
}

Properties

Name Type Optional
presenter Presenter true
presenterConfig PresenterConfig true
getView { (): View; } true

Types

CubeLayerProps

type CubeLayerProps = LayerProps & CubeLayerDefaultProps & CubeLayerDataProps;

Type

LayerProps & CubeLayerDefaultProps & CubeLayerDataProps


Vec3

3 dimensional array of numbers.

type Vec3 = [number, number, number];

Type

[number, number, number]


View

Types of camera views.

type View = "2d" | "3d";

Type

“2d” “3d”