flot: add support for flot plugins

This commit is contained in:
Ken Sheedlo
2015-03-11 15:04:10 -07:00
parent c594427c40
commit 26f370917d
+14 -2
View File
@@ -198,6 +198,13 @@ declare module jquery.flot {
c2p(canvasPoint: canvasPoint):point;
}
interface plugin {
init(options: plotOptions): any;
options?: any;
name?: string;
version?: string;
}
interface plot {
highlight(series: dataSeries, datapoint: item): void;
unhightlight(): void;
@@ -221,9 +228,14 @@ declare module jquery.flot {
getPlotOffset(): canvasPoint;
getOptions(): plotOptions;
}
interface plotStatic {
(placeholder: JQuery, data: dataSeries[], options?: plotOptions): plot;
(placeholder: JQuery, data: any[], options?: plotOptions): plot;
plugins: plugin[];
}
}
interface JQueryStatic {
plot(placeholder: JQuery, data: jquery.flot.dataSeries[], options?: jquery.flot.plotOptions): jquery.flot.plot;
plot(placeholder: JQuery, data: any[], options?: jquery.flot.plotOptions): jquery.flot.plot;
plot: jquery.flot.plotStatic;
}