Merge pull request #3849 from ksheedlo/add-plugins-to-flot-definition

flot: add support for flot plugins
This commit is contained in:
Masahiro Wakame
2015-03-15 22:21:32 +09:00
+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;
unhighlight(): 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;
}