Rewrite HTML generation.
[dygraphs.git] / gallery / README
1 Tips on adding entries to the gallery
2  
3 * You can use the id in conjunction with specialized CSS.
4
5 * Most files don't have a lot of HTML, but some have tons. See
6   independent-series for tips on adding a lot of HTML.
7
8 * You can also define a function called cleanup, which is the
9   opposite of setup. It's perfect for stopping timers, for instance.
10
11 * Callbacks in HTML widgets. You might assume you can use
12   <button onclick="func">
13   and then define func in your run script:
14   
15   run: function() { function func() { .. }; }
16
17   but because func is defined in function scope the button can't call it.
18   The solution is to put func in the global scope, which is the same as window
19   scope:
20
21   run: function() { function window.func() { .. }; }
22
23 * You'll find it easier if you convert all the double-quotes in your HTML to
24   single quotes.
25
26 TODOs:
27   * Remove the awful tables in interaction.html (that I wrote)
28   * Move all style to css
29   * Consider moving HTML to HTML files that are read via XMLHTTP
30   * Add margin-left: 30px to #workarea, and then make #workarea h2 { margin-left: -30px}
31   * Standard width. No need for very wide graphs.
32   * Remove runtime warnings.