Factor out ticker functions and clean up their semantics/usage.
[dygraphs.git] / dygraph-dev.js
1 // A dygraph "auto-loader".
2
3 // Check where this script was sourced from. If it was sourced from
4 // '../dygraph-dev.js', then we should source all the other scripts with the
5 // same relative path ('../dygraph.js', '../dygraph-canvas.js', ...)
6 (function() {
7 var src=document.getElementsByTagName('script');
8 var script = src[src.length-1].getAttribute("src");
9
10 // This list needs to be kept in sync w/ the one in generate-combined.sh
11 // and the one in jsTestDriver.conf.
12 var source_files = [
13 "strftime/strftime-min.js",
14 "rgbcolor/rgbcolor.js",
15 "dygraph-layout.js",
16 "dygraph-canvas.js",
17 "dygraph.js",
18 "dygraph-utils.js",
19 "dygraph-gviz.js",
20 "dygraph-interaction-model.js",
21 "dygraph-options-reference.js", // Shouldn't be included in generate-combined.sh
22 "dygraph-tickers.js"
23 ];
24
25 for (var i = 0; i < source_files.length; i++) {
26 document.write('<script type="text/javascript" src="' + script.replace('dygraph-dev.js', source_files[i]) + '"></script>\n');
27 }
28 })();