-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
1,540 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import * as VegaLite from 'vega-lite'; | ||
export declare const vega: any; | ||
export declare const vl: typeof VegaLite; | ||
export declare type Mode = 'vega' | 'vega-lite'; | ||
export interface Loader { | ||
load: (uri: string, options?: any) => Promise<string>; | ||
sanitize: (uri: string, options: any) => Promise<{ | ||
href: string; | ||
}>; | ||
http: (uri: string, options: any) => Promise<string>; | ||
file: (filename: string) => Promise<string>; | ||
} | ||
export interface EmbedOptions { | ||
actions?: boolean | { | ||
export?: boolean; | ||
source?: boolean; | ||
editor?: boolean; | ||
}; | ||
mode?: Mode; | ||
logLevel?: number; | ||
loader?: Loader; | ||
renderer?: 'canvas' | 'svg'; | ||
onBeforeParse?: (spec: any) => void; | ||
width?: number; | ||
height?: number; | ||
padding?: number | { | ||
left?: number; | ||
right?: number; | ||
top?: number; | ||
bottom?: number; | ||
}; | ||
config?: string | any; | ||
sourceHeader?: string; | ||
sourceFooter?: string; | ||
editorUrl?: string; | ||
} | ||
/** | ||
* Embed a Vega visualization component in a web page. This function returns a promise. | ||
* | ||
* @param el DOM element in which to place component (DOM node or CSS selector). | ||
* @param spec String : A URL string from which to load the Vega specification. | ||
* Object : The Vega/Vega-Lite specification as a parsed JSON object. | ||
* @param opt A JavaScript object containing options for embedding. | ||
*/ | ||
export default function embed(el: HTMLBaseElement | string, spec: any, opt: EmbedOptions): Promise<{ | ||
view: any; | ||
spec: any; | ||
}>; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import embed from './embed'; | ||
declare const embedModule: typeof embed & { | ||
default?: typeof embed; | ||
vega?; | ||
vl?; | ||
}; | ||
export = embedModule; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/** | ||
* Open editor url in a new window, and pass a message. | ||
*/ | ||
export declare function post(window: Window, url: string, data: any): void; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.