@sqlrooms/mosaic / astToDOM
Function: astToDOM()
astToDOM(
ast,options?):Promise<{element:HTMLElement|SVGSVGElement;params:Map<string,Param<any> |Selection>; }>
Generate a running web application (DOM content) for a Mosaic spec AST.
Parameters
| Parameter | Type | Description |
|---|---|---|
ast | SpecNode | Mosaic AST root node. |
options? | { baseURL?: string; plotDefaults?: any[]; params?: Map<string, Param<any>>; api?: any; } | Instantiation options. |
options.baseURL? | string | - |
options.plotDefaults? | any[] | - |
options.params? | Map<string, Param<any>> | - |
options.api? | any | - |
Returns
Promise<{ element: HTMLElement | SVGSVGElement; params: Map<string, Param<any> | Selection>; }>
A Promise to an object with the resulting DOM element, and a map of named parameters (Param and Selection instances).
