Update echarts.d.ts

This commit is contained in:
Xie Jingyang
2016-04-09 22:44:19 +08:00
parent 4aed26de32
commit 3305eb6f74

70
echarts/echarts.d.ts vendored
View File

@@ -7,28 +7,46 @@ declare namespace ECharts {
function init(dom:HTMLDivElement|HTMLCanvasElement, theme?:Object|string, opts?:{
devicePixelRatio?: number
renderer?: string
}): ECharts;
function connect(group:string|Array<string>);
function disConnect(group:string);
function dispose(target: ECharts|HTMLDivElement|HTMLCanvasElement);
function getInstanceByDom(target: HTMLDivElement|HTMLCanvasElement);
function registerMap(mapName: string, geoJson: Object, specialAreas?: Object);
function registerTheme(themeName: string, theme: Object);
}):ECharts;
function connect(group:string|Array<string>):void;
function disConnect(group:string):void;
function dispose(target:ECharts|HTMLDivElement|HTMLCanvasElement):void;
function getInstanceByDom(target:HTMLDivElement|HTMLCanvasElement):void;
function registerMap(mapName:string, geoJson:Object, specialAreas?:Object):void;
function registerTheme(themeName:string, theme:Object):void;
class ECharts {
group:string;
setOption(option: EChartOption, notMerge?: boolean, notRefreshImmediately?: boolean)
getWidth(): number
getHeight(): number
getDom(): HTMLCanvasElement|HTMLDivElement
getOption(): Object
resize()
dispatchAction(payload: Object)
on(eventName: string, handler: Function, context?: Object)
off(eventName: string, handler?: Function)
showLoading(type?: string, opts?: Object)
hideLoading()
getDataURL(opts: {
setOption(option:EChartOption, notMerge?:boolean, notRefreshImmediately?:boolean):void
getWidth():number
getHeight():number
getDom():HTMLCanvasElement|HTMLDivElement
getOption():Object
resize():void
dispatchAction(payload:Object):void
on(eventName:string, handler:Function, context?:Object):void
off(eventName:string, handler?:Function):void
showLoading(type?:string, opts?:Object):void
hideLoading():void
getDataURL(opts:{
// 导出的格式,可选 png, jpeg
type?: string,
// 导出的图片分辨率比例,默认为 1。
@@ -36,17 +54,21 @@ declare namespace ECharts {
// 导出的图片背景色,默认使用 option 里的 backgroundColor
backgroundColor?: string
}):string
getConnectedDataURL(opts: {
getConnectedDataURL(opts:{
// 导出的格式,可选 png, jpeg
type: string,
// 导出的图片分辨率比例,默认为 1。
pixelRatio: number,
// 导出的图片背景色,默认使用 option 里的 backgroundColor
backgroundColor: string
}): string
clear()
isDisposed(): boolean
dispose()
}):string
clear():void
isDisposed():boolean
dispose():void
}
interface EChartOption {