From 237861e9f8c627ad83bbb118950d9be2d2b020ec Mon Sep 17 00:00:00 2001 From: "olau@iola.dk" Date: Sun, 5 Jul 2009 16:34:37 +0000 Subject: [PATCH] Explain that plugins can be concatenated to reduce download size/latency git-svn-id: https://flot.googlecode.com/svn/trunk@185 1e0a6537-2640-0410-bfb7-f154510ff394 --- API.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/API.txt b/API.txt index 1564337..c196559 100644 --- a/API.txt +++ b/API.txt @@ -1020,7 +1020,14 @@ Plugins Plugins extend the functionality of Flot. To use a plugin, simply include its Javascript file after Flot in the HTML page. -The plugin registers itself in the global array $.plot.plugins. When +If you're worried about download size/latency, you can concatenate all +the plugins you use and Flot itself for that matter into one big file +(make sure you get the order right), then optionally run it through a +Javascript minifier such as YUI Compressor. + +Here's a brief explanation of how the plugin plumbings work: + +Each plugin registers itself in the global array $.plot.plugins. When you make a new plot object with $.plot, Flot goes through this array calling the "init" function of each plugin and merging default options from its "option" attribute. The init function gets a reference to the