old_sql 1.16.0 → 1.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (273) hide show
  1. data/README.md +24 -13
  2. data/app/controllers/old_sql/report_controller.rb +3 -17
  3. data/app/views/layouts/old_sql/chart.html.erb +11 -0
  4. data/app/views/old_sql/report/chart.html.erb +8 -25
  5. data/lib/generators/old_sql/templates/user_design_template.csv +2 -3
  6. data/lib/generators/old_sql/templates/user_old_sql_demo_chart_design.yml +18 -9
  7. data/lib/old_sql/report_design/chart.rb +2 -2
  8. data/lib/old_sql/report_design/chart_item.rb +4 -4
  9. data/lib/old_sql/report_design/chart_parser.rb +2 -2
  10. data/public/javascripts/old_sql/chart.js +33 -0
  11. metadata +5 -265
  12. data/public/javascripts/old_sql/MochiKit-1.4.2/Changes +0 -362
  13. data/public/javascripts/old_sql/MochiKit-1.4.2/LICENSE.txt +0 -69
  14. data/public/javascripts/old_sql/MochiKit-1.4.2/MANIFEST +0 -179
  15. data/public/javascripts/old_sql/MochiKit-1.4.2/META.json +0 -17
  16. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Async.html +0 -814
  17. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Base.html +0 -1703
  18. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Color.html +0 -755
  19. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/DOM.html +0 -1197
  20. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/DateTime.html +0 -168
  21. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/DragAndDrop.html +0 -187
  22. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Format.html +0 -300
  23. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Iter.html +0 -524
  24. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Logging.html +0 -420
  25. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/LoggingPane.html +0 -142
  26. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Position.html +0 -38
  27. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Selector.html +0 -240
  28. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Signal.html +0 -508
  29. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Sortable.html +0 -244
  30. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Style.html +0 -385
  31. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/VersionHistory.html +0 -384
  32. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Visual.html +0 -1161
  33. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/index.html +0 -447
  34. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/js/toc.js +0 -113
  35. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Async.rst +0 -767
  36. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Base.rst +0 -1445
  37. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Color.rst +0 -651
  38. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/DOM.rst +0 -1143
  39. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/DateTime.rst +0 -145
  40. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/DragAndDrop.rst +0 -197
  41. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Format.rst +0 -258
  42. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Iter.rst +0 -454
  43. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Logging.rst +0 -348
  44. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/LoggingPane.rst +0 -128
  45. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Position.rst +0 -26
  46. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Selector.rst +0 -203
  47. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Signal.rst +0 -498
  48. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Sortable.rst +0 -186
  49. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Style.rst +0 -353
  50. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/VersionHistory.rst +0 -362
  51. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Visual.rst +0 -895
  52. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/index.rst +0 -83
  53. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/ajax_tables.css +0 -69
  54. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/ajax_tables.js +0 -401
  55. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/domains.json +0 -10
  56. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/domains.xml +0 -40
  57. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/index.html +0 -96
  58. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/color_wheel/color_wheel.css +0 -4
  59. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/color_wheel/color_wheel.js +0 -95
  60. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/color_wheel/index.html +0 -31
  61. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/dnd_sortable.css +0 -23
  62. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/dropmarker.png +0 -0
  63. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/icon.png +0 -0
  64. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/index.html +0 -54
  65. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable2_test.html +0 -150
  66. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable3_test.html +0 -42
  67. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable4_test.html +0 -90
  68. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable5_test.html +0 -29
  69. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable_test.html +0 -38
  70. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable_tree_test.html +0 -189
  71. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/draggable/draggable.css +0 -28
  72. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/draggable/draggable.js +0 -73
  73. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/draggable/index.html +0 -38
  74. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_bigslide.html +0 -36
  75. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_blind.html +0 -65
  76. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_blindslide.html +0 -31
  77. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_combi.css +0 -18
  78. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_fadeappear.html +0 -61
  79. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_grow_shrink.html +0 -38
  80. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_onload.html +0 -67
  81. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_queue.html +0 -67
  82. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_queue_limit.html +0 -30
  83. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_scroll.html +0 -483
  84. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_slide.html +0 -62
  85. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/full.html +0 -71
  86. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/icon.png +0 -0
  87. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/index.html +0 -150
  88. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/interpreter/index.html +0 -88
  89. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/interpreter/interpreter.css +0 -54
  90. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/interpreter/interpreter.js +0 -373
  91. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/key_events/index.html +0 -78
  92. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/key_events/key_events.css +0 -5
  93. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/key_events/key_events.js +0 -85
  94. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/logging_pane/index.html +0 -46
  95. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/logging_pane/logging_pane.css +0 -78
  96. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/logging_pane/logging_pane.js +0 -11
  97. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mochiregexp/index.html +0 -74
  98. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mochiregexp/mochiregexp.css +0 -73
  99. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mochiregexp/mochiregexp.js +0 -125
  100. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mouse_events/index.html +0 -88
  101. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mouse_events/mouse_events.css +0 -17
  102. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mouse_events/mouse_events.js +0 -59
  103. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/rounded_corners/index.html +0 -28
  104. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/rounded_corners/rounded_corners.css +0 -3
  105. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/rounded_corners/rounded_corners.js +0 -19
  106. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_boxes.html +0 -45
  107. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_full.html +0 -119
  108. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_ghost.html +0 -40
  109. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_hoverclass.html +0 -43
  110. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_scroll.html +0 -91
  111. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_snap.html +0 -54
  112. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/index.html +0 -93
  113. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/simple_dnd.css +0 -64
  114. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/sortable_tables/index.html +0 -71
  115. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/sortable_tables/sortable_tables.css +0 -66
  116. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/sortable_tables/sortable_tables.js +0 -203
  117. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/SyntaxHighlighter.css +0 -177
  118. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/Tests.html +0 -339
  119. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushCSharp.js +0 -30
  120. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushDelphi.js +0 -31
  121. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushJScript.js +0 -22
  122. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushPhp.js +0 -23
  123. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushPython.js +0 -71
  124. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushSql.js +0 -40
  125. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushVb.js +0 -29
  126. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushXml.js +0 -61
  127. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shCore.js +0 -622
  128. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/view-source.css +0 -1
  129. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/view-source.html +0 -19
  130. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/view-source.js +0 -70
  131. data/public/javascripts/old_sql/MochiKit-1.4.2/include/_img/bg_docheader.gif +0 -0
  132. data/public/javascripts/old_sql/MochiKit-1.4.2/include/_img/g_bullet.gif +0 -0
  133. data/public/javascripts/old_sql/MochiKit-1.4.2/include/_img/g_logo_doc.gif +0 -0
  134. data/public/javascripts/old_sql/MochiKit-1.4.2/include/css/documentation.css +0 -130
  135. data/public/javascripts/old_sql/MochiKit-1.4.2/include/css/general.css +0 -48
  136. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Async.js +0 -682
  137. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Base.js +0 -1489
  138. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Color.js +0 -863
  139. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/DOM.js +0 -1256
  140. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/DateTime.js +0 -222
  141. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/DragAndDrop.js +0 -793
  142. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Format.js +0 -304
  143. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Iter.js +0 -844
  144. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Logging.js +0 -315
  145. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/LoggingPane.js +0 -353
  146. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/MochiKit.js +0 -188
  147. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/MockDOM.js +0 -115
  148. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Position.js +0 -236
  149. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Selector.js +0 -415
  150. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Signal.js +0 -897
  151. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Sortable.js +0 -589
  152. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Style.js +0 -594
  153. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Test.js +0 -162
  154. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Visual.js +0 -2026
  155. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/__package__.js +0 -18
  156. data/public/javascripts/old_sql/MochiKit-1.4.2/packed/MochiKit/MochiKit.js +0 -7829
  157. data/public/javascripts/old_sql/MochiKit-1.4.2/packed/MochiKit/__package__.js +0 -6
  158. data/public/javascripts/old_sql/MochiKit-1.4.2/packed/MochiKit/customize.html +0 -251
  159. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/FakeJSAN.js +0 -40
  160. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/SimpleTest/SimpleTest.js +0 -381
  161. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/SimpleTest/TestRunner.js +0 -159
  162. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/SimpleTest/test.css +0 -28
  163. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/cli.js +0 -6
  164. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/index.html +0 -25
  165. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/standalone.js +0 -16
  166. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Base.js +0 -577
  167. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Color.js +0 -137
  168. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_DateTime.js +0 -52
  169. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_DragAndDrop.js +0 -30
  170. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Format.js +0 -89
  171. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Iter.js +0 -186
  172. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Logging.js +0 -88
  173. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Async.html +0 -408
  174. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Async.json +0 -1
  175. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Base.html +0 -34
  176. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Color.html +0 -84
  177. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DOM-Safari.html +0 -48
  178. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DOM.html +0 -363
  179. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DateTime.html +0 -39
  180. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DragAndDrop.html +0 -54
  181. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Format.html +0 -39
  182. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Iter.html +0 -38
  183. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-JSAN.html +0 -32
  184. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Logging.html +0 -40
  185. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-MochiKit.html +0 -18
  186. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Selector.html +0 -295
  187. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Signal.html +0 -43
  188. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Style.html +0 -223
  189. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Visual.html +0 -197
  190. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Signal.js +0 -481
  191. data/public/javascripts/old_sql/plotkit-0.9.1/COPYING +0 -28
  192. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/Base.js +0 -406
  193. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/Canvas.js +0 -683
  194. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/EasyPlot.js +0 -161
  195. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/Layout.js +0 -756
  196. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/PlotKit.js +0 -151
  197. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/PlotKit_Packed.js +0 -2177
  198. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/SVG.js +0 -705
  199. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/SweetCanvas.js +0 -348
  200. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/SweetSVG.js +0 -247
  201. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/dummy.svg +0 -9
  202. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/excanvas.js +0 -723
  203. data/public/javascripts/old_sql/plotkit-0.9.1/README +0 -1
  204. data/public/javascripts/old_sql/plotkit-0.9.1/doc/MochiKitAdditions.html +0 -2
  205. data/public/javascripts/old_sql/plotkit-0.9.1/doc/MochiKitAdditions.txt +0 -2
  206. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Base.html +0 -302
  207. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Base.txt +0 -139
  208. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Canvas.html +0 -172
  209. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Canvas.txt +0 -81
  210. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.EasyPlot.html +0 -155
  211. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.EasyPlot.txt +0 -50
  212. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Layout.html +0 -428
  213. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Layout.txt +0 -330
  214. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.QuickStart.html +0 -368
  215. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.QuickStart.txt +0 -256
  216. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Renderer.html +0 -436
  217. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Renderer.txt +0 -299
  218. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SVG.html +0 -159
  219. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SVG.txt +0 -64
  220. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetCanvas.html +0 -131
  221. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetCanvas.txt +0 -34
  222. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetSVG.html +0 -131
  223. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetSVG.txt +0 -34
  224. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.html +0 -334
  225. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.txt +0 -151
  226. data/public/javascripts/old_sql/plotkit-0.9.1/doc/SVGCanvasCompat.html +0 -304
  227. data/public/javascripts/old_sql/plotkit-0.9.1/doc/SVGCanvasCompat.txt +0 -144
  228. data/public/javascripts/old_sql/plotkit-0.9.1/doc/barsample.png +0 -0
  229. data/public/javascripts/old_sql/plotkit-0.9.1/doc/black.png +0 -0
  230. data/public/javascripts/old_sql/plotkit-0.9.1/doc/blue.png +0 -0
  231. data/public/javascripts/old_sql/plotkit-0.9.1/doc/cyan.png +0 -0
  232. data/public/javascripts/old_sql/plotkit-0.9.1/doc/doc.css +0 -62
  233. data/public/javascripts/old_sql/plotkit-0.9.1/doc/generate.py +0 -37
  234. data/public/javascripts/old_sql/plotkit-0.9.1/doc/green.png +0 -0
  235. data/public/javascripts/old_sql/plotkit-0.9.1/doc/orange.png +0 -0
  236. data/public/javascripts/old_sql/plotkit-0.9.1/doc/piesample.png +0 -0
  237. data/public/javascripts/old_sql/plotkit-0.9.1/doc/purple.png +0 -0
  238. data/public/javascripts/old_sql/plotkit-0.9.1/doc/red.png +0 -0
  239. data/public/javascripts/old_sql/plotkit-0.9.1/scripts/custom_rhino.jar +0 -0
  240. data/public/javascripts/old_sql/plotkit-0.9.1/scripts/pack.py +0 -58
  241. data/public/javascripts/old_sql/plotkit-0.9.1/tests/axis.html +0 -31
  242. data/public/javascripts/old_sql/plotkit-0.9.1/tests/basic.html +0 -25
  243. data/public/javascripts/old_sql/plotkit-0.9.1/tests/basic.js +0 -143
  244. data/public/javascripts/old_sql/plotkit-0.9.1/tests/debug.html +0 -56
  245. data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo-svg.html +0 -58
  246. data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo-svg.js +0 -133
  247. data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo.html +0 -57
  248. data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo.js +0 -136
  249. data/public/javascripts/old_sql/plotkit-0.9.1/tests/dynamic.html +0 -161
  250. data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/firefox.png +0 -0
  251. data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/konqueror.png +0 -0
  252. data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/mozilla.ico +0 -0
  253. data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/msie.gif +0 -0
  254. data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/opera.ico +0 -0
  255. data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/safari.gif +0 -0
  256. data/public/javascripts/old_sql/plotkit-0.9.1/tests/labels-img.html +0 -38
  257. data/public/javascripts/old_sql/plotkit-0.9.1/tests/labels.html +0 -43
  258. data/public/javascripts/old_sql/plotkit-0.9.1/tests/prototype_compat.html +0 -28
  259. data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-easy.html +0 -29
  260. data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-horiz.html +0 -53
  261. data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-neg.html +0 -29
  262. data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-svg.html +0 -61
  263. data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart.html +0 -57
  264. data/public/javascripts/old_sql/plotkit-0.9.1/tests/sample.txt +0 -6
  265. data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg-sweet.html +0 -29
  266. data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg-sweet.js +0 -141
  267. data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg.html +0 -26
  268. data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg.js +0 -147
  269. data/public/javascripts/old_sql/plotkit-0.9.1/tests/sweet.html +0 -24
  270. data/public/javascripts/old_sql/plotkit-0.9.1/tests/sweet.js +0 -89
  271. data/public/javascripts/old_sql/plotkit-0.9.1/tests/tests.css +0 -66
  272. data/public/javascripts/old_sql/plotkit-0.9.1/tests/testsvg.html +0 -20
  273. data/public/javascripts/old_sql/plotkit-0.9.1/tests/testsvg.js +0 -31
@@ -1,368 +0,0 @@
1
-
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" >
4
- <head>
5
- <title>PlotKit Quick Start | liquidx</title>
6
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
7
- <link href="http://media.liquidx.net/css/x_general.css" media="screen" rel="Stylesheet" type="text/css" />
8
- <link href="http://media.liquidx.net/css/x_header.css" media="screen" rel="Stylesheet" type="text/css" />
9
- <link href="http://media.liquidx.net/css/x_layout.css" media="screen" rel="Stylesheet" type="text/css" />
10
- <link href="http://media.liquidx.net/css/x_blocks.css" media="screen" rel="Stylesheet" type="text/css" />
11
- <link rel="icon" href="/favicon.png" type="image/x-png">
12
- <link rel="shortcut icon" href="/favicon.png" type="image/x-png">
13
- <!--[if lt IE 7.]>
14
- <script defer type="text/javascript" src="http://media.liquidx.net/js/pngfix.js"></script>
15
- <![endif]-->
16
-
17
- <script type="text/javascript" src="/js/mochi/MochiKit.js"></script>
18
- <script type="text/javascript" src="/js/plotkit/Base.js"></script>
19
- <script type="text/javascript" src="/js/plotkit/Layout.js"></script>
20
- <script type="text/javascript" src="/js/plotkit/Canvas.js"></script>
21
- <script type="text/javascript" src="/js/plotkit/SweetCanvas.js"></script>
22
- <link href="doc.css" media="screen" rel="stylesheet" type="text/css" />
23
-
24
- </head>
25
-
26
- <body>
27
- <div id="header">
28
- <div id="logo"><a href="http://www.liquidx.net/"><img src="http://media.liquidx.net/imgx/logo.png" width="256" height="128" alt="liquidx.net" /></a></div>
29
- <div id="menu-hack">
30
- <div id="menu-l"><img src="http://media.liquidx.net/imgx/menu_l.png" width="17" height="28" alt="menu cap" /></div><div id="menu-r"><img src="http://media.liquidx.net/imgx/menu_r.png" width="17" height="28" alt="menu cap" /></div>
31
- <div id="menu-main">
32
- <ul id="menu" class="code">
33
- <li class="tab" id="blog"><a href="http://www.liquidx.net/" title="blog/home">blog</a></li>
34
- <li class="tab" id="code"><a href="http://www.liquidx.net/code/" title="software i have written">software</a></li>
35
- <li class="tab" id="dev"><a href="http://projects.liquidx.net/" title="source code for my open source projects">dev</a></li>
36
- <li class="tab" id="photos"><a href="http://al.tse.id.au/gallery/" title="photos and videos">photos</a></li>
37
- <li class="tab" id="research"><a href="http://al.tse.id.au/research/" title="research profile">research</a></li>
38
- <li class="tab" id="links"><a href="http://www.liquidx.net/links/" title="my bookmarks">linkblog</a></li>
39
- <li class="tab" id="stats"><a href="http://stats.liquidx.net/" title="stats for various parts of my website">stats</a></li>
40
- <li class="tab" id="status"><a href="http://www.liquidx.net/status/" title="weather report for alastair">status</a></li>
41
- <li class="tab" id="about"><a href="http://al.tse.id.au/" title="about alastair tse">aboutme</a></li>
42
- </ul>
43
- </div>
44
- </div>
45
- <div id="quickbuttons">
46
- <span class="quickbutton"><a href="http://www.liquidx.net/albumartwidget/"><img src="http://media.liquidx.net/imgx/quick_widget.png" alt="album art widget" /></a></span>
47
- <span class="quickbutton"><a href="http://www.liquidx.net/plotkit/"><img src="http://media.liquidx.net/imgx/quick_plotkit.png" alt="plotkit" /></a></span>
48
- <span class="quickbutton"><a href="http://www.liquidx.net/fruity/"><img src="http://media.liquidx.net/imgx/quick_fruity.png" alt="fruity" /></a></span>
49
- </div>
50
-
51
- </div>
52
-
53
- <div id="body">
54
- <div class="page doc">
55
-
56
-
57
- <h1> PlotKit Quick Start</h1>
58
- <p>This is just a quick guide on how to get started with PlotKit. If you
59
- want to delve in deeper, be sure to check out the
60
- <a href="PlotKit.html">documentation</a>.
61
- </p>
62
-
63
- <h1> Canvas or SVG</h1>
64
- <p>Before we start, you should know a little about HTML Canvas and SVG
65
- support in the real browser world. For a more indepth coverage, please
66
- check the <a href="SVGCanvasCompat.html">SVG/Canvas Browser Support Status</a>.
67
- </p>
68
- <p>Basically, Canvas and SVG have similar support across modern
69
- browsers. Canvas is supported by Opera 9, Safari 2 and Firefox 1.5,
70
- which probably only accounts for 10% of browsers. PlotKit also supports
71
- a degraded Emulated Canvas mode under IE which means you can achieve
72
- nearly 90% browser support using this technology.
73
- </p>
74
- <p>However, the future is in SVG where Firefox 1.5 and Opera 8 have
75
- support it, and IE6 with the Adobe SVG Viewer (ASV) install means you
76
- get around the same coverage as HTML Canvas.
77
- </p>
78
- <p>PlotKit plans to support both to maximise compatiblity. Canvas has a
79
- simplier rendering engine, but can do the equivalent to what SVG can
80
- apart from animation. SVG has wider support, but is more complex and
81
- support for key features varies widely across different
82
- implementations.
83
- </p>
84
-
85
- <h1> Graphing with Canvas</h1>
86
- <p>Download the latest <a href="http://www.liquidx.net/plotkit/">PlotKit</a> and <a href="http://www.mochikit.com/">MochiKit</a> and extract it on to
87
- your web server and make sure <code>plotkit-0.8/PlotKit</code> and
88
- <code>mochikit/MochiKit</code> is visible.
89
- </p>
90
-
91
- <h2> Preparing the HTML</h2>
92
- <p>Add the script headers for PlotKit to work.
93
- </p>
94
- <pre><code>&lt;script type=&quot;text/javascript&quot; src=&quot;/mochikit/MochiKit.js&quot;&gt;&lt;/script&gt;
95
- &lt;script type=&quot;text/javascript&quot; src=&quot;/plotkit/Base.js&quot;&gt;&lt;/script&gt;
96
- &lt;script type=&quot;text/javascript&quot; src=&quot;/plotkit/Layout.js&quot;&gt;&lt;/script&gt;
97
- &lt;script type=&quot;text/javascript&quot; src=&quot;/plotkit/Canvas.js&quot;&gt;&lt;/script&gt;
98
- &lt;script type=&quot;text/javascript&quot; src=&quot;/plotkit/SweetCanvas.js&quot;&gt;&lt;/script&gt;
99
- </code></pre><p>MochiKit.js is an autoloader for all the elements of MochiKit. You can
100
- reduce the size of it by making your own packed version or just
101
- including the script headers individually.
102
- </p>
103
- <p>The other four PlotKit javascript files deal with some basic
104
- functionality, the layout engine and two renderers, Canvas and
105
- SweetCanvas.
106
- </p>
107
- <p>Now we add the <code>&lt;canvas&gt;</code> tag to where we want the graph to
108
- appear. Note PlotKit <strong>requires</strong> the <code>&lt;canvas&gt;</code> tag is enclosed
109
- inside a <div> tags for labels to work.
110
- </p>
111
- <pre><code> &lt;div&gt;&lt;canvas id=&quot;graph&quot; height=&quot;300&quot; width=&quot;300&quot;&gt;&lt;/canvas&gt;&lt;/div&gt;
112
- </code></pre><p>This will create a blank canvas of 300 by 300 pixels.
113
- </p>
114
-
115
- <h2> Javascript</h2>
116
- <p>There are only two simple steps to draw a chart, first is the create a
117
- layout with our data and second is to create the renderer. So lets
118
- start off with creating the layout.
119
- </p>
120
-
121
- <h3> Layout and Data</h3>
122
- <pre><code>var layout = new PlotKit.Layout(&quot;bar&quot;, {});
123
- layout.addDataset(&quot;sqrt&quot;, [[0, 0], [1, 1], [2, 1.414], [3, 1.73], [4, 2]]);
124
- layout.evaluate();
125
- </code></pre><p>There, it is that simple. Lets explain what each line is doing:
126
- </p>
127
- <ol>
128
- <li><p> <code>var layout = new PlotKit.Layout(&quot;bar&quot;, {});</code>
129
- </p>
130
- <p>We create a new layout object, and tell it that we want a bar chart in the first parameter. The second parameter allows us to pass additional options, which we will go on to later. It can be left null, or in this case just an empty array.
131
- </p>
132
-
133
- </li>
134
-
135
- <li><p> <code>layout.addDataset(&quot;sqrt&quot;, [[0, 0], [1, 1]...)</code>
136
- </p>
137
- <p>This will add a new dataset to the layout. You can add multiple datasets by specifying a different name in the first parameter for each dataset. The dataset consists of an array of (x, y) values. These must be numeric, either floating point or integers.
138
- </p>
139
- <p>Note that PlotKit does not deal with negative numbers at the moment.
140
- </p>
141
-
142
- </li>
143
-
144
- <li><p> <code>layout.evaluate();</code>
145
- </p>
146
- <p>This will be the last command you make on the layout before passing it to the renderer. This will tell the layout to calculate the layout of the chart so the renderer can draw it. It is an expensive operation, so do not call it frequently, only unless the data or options have been changed.
147
- </p>
148
-
149
- </li>
150
- </ol>
151
-
152
- <h3> Renderer</h3>
153
- <pre><code> var canvas = MochiKit.DOM.getElement(&quot;graph&quot;);
154
- var plotter = new PlotKit.SweetCanvasRenderer(canvas, layout, {});
155
- plotter.render();
156
- </code></pre><ol>
157
- <li><p> <code>var canvas = MochiKit.DOM.getElement(&quot;graph&quot;);</code>
158
- </p>
159
- <p>This line will get the HTML element we defined earlier.
160
- </p>
161
-
162
- </li>
163
-
164
- <li><p> <code>var plotter = new PlotKit.SweetCanvasRenderer(canvas, layout, {});</code>
165
- </p>
166
- <p>This will create the renderer to work on the object passed, and also with the data in the layout we created earlier. Again, the third parameter here is for options to relates to the look of the graph. We will show you some things you can do with this in the following section.
167
- </p>
168
-
169
- </li>
170
-
171
- <li><p> <code>plotter.render()</code>
172
- </p>
173
- <p>This line will render the graph.
174
- </p>
175
-
176
- </li>
177
- </ol>
178
-
179
- <h3> Putting it altogether</h3>
180
- <pre><code>function drawGraph() {
181
- var layout = new PlotKit.Layout(&quot;bar&quot;, {});
182
- layout.addDataset(&quot;sqrt&quot;, [[0, 0], [1, 1], [2, 1.414], [3, 1.73], [4, 2]]);
183
- layout.evaluate();
184
- var canvas = MochiKit.DOM.getElement(&quot;graph&quot;);
185
- var plotter = new PlotKit.SweetCanvasRenderer(canvas, layout, {});
186
- plotter.render();
187
- }
188
- MochiKit.DOM.addLoadEvent(drawGraph);
189
- </code></pre><p>This is a sample of what you would use to plot the graph of sqare roots for 0 to 4. Make sure you plot the graph on the load event because the DOM will not be ready if when the Javascript is first loaded.
190
- </p>
191
- <p>See this in an [HTML example here][example1].
192
- </p>
193
-
194
- <h3> Additional Options</h3>
195
- <p>We mentioned that both the layout and renderer may take some additional options. In order to take advantage of that, we can use a simple options dictionary to store options for both layout and the renderer, in this way:
196
- </p>
197
- <pre><code>var options = {
198
- &quot;IECanvasHTC&quot;: &quot;/plotkit/iecanvas.htc&quot;,
199
- &quot;colorScheme&quot;: PlotKit.Base.palette(PlotKit.Base.baseColors()[0]),
200
- &quot;padding&quot;: {left: 0, right: 0, top: 10, bottom: 30},
201
- &quot;xTicks&quot;: [{v:0, label:&quot;zero&quot;},
202
- {v:1, label:&quot;one&quot;},
203
- {v:2, label:&quot;two&quot;},
204
- {v:3, label:&quot;three&quot;},
205
- {v:4, label:&quot;four&quot;}],
206
- &quot;drawYAxis&quot;: false
207
- };
208
-
209
- function drawGraph() {
210
- var layout = new PlotKit.Layout(&quot;bar&quot;, options);
211
- layout.addDataset(&quot;sqrt&quot;, [[0, 0], [1, 1], [2, 1.414], [3, 1.73], [4, 2]]);
212
- layout.evaluate();
213
- var canvas = MochiKit.DOM.getElement(&quot;graph&quot;);
214
- var plotter = new PlotKit.SweetCanvasRenderer(canvas, layout, options);
215
- plotter.render();
216
- }
217
- MochiKit.DOM.addLoadEvent(drawGraph);
218
- </code></pre><p>Here we define some additional options to affect how our graph is rendered.
219
- </p>
220
- <ol>
221
- <li>
222
- First line defines where the <code>IECanvasHTC</code> behaviour file is so that we can have IE support.
223
- </li>
224
-
225
- <li>
226
- Second line defines a new colorScheme to use. Here we are just using another preset color scheme that creates a palette out of the 6th preset base colour.
227
- </li>
228
-
229
- <li>
230
- Third line defines some custom labels we would like by giving the mapping from X value to label.
231
- </li>
232
-
233
- <li>
234
- Fourth line tells the renderer not to draw the Y axis.
235
- </li>
236
- </ol>
237
-
238
- <h1> Demonstration</h1>
239
- <p>To show you that is how it works, below is the graph defined exactly how it is presented in this quick start guide. On the left is a PNG of what you should expect and on the right is what it actually renders to.
240
- </p>
241
-
242
- <h3> Bar charts</h3>
243
- <div>
244
- <div style="float: left; padding-right: 5px;" width="300" height="300"><img src="barsample.png" width="300" height="300" alt="screenshot of graph" /></div>
245
- <div style="float: left; padding-left: 5px;" width="300" height="300"><canvas id="bargraph" width="300" height="300"></canvas></div>
246
- <div style="clear: both; height: 1px; width: 1px;">&nbsp</div>
247
- </div>
248
-
249
-
250
- <h3> Pie Charts</h3>
251
- <div>
252
- <div style="float: left; padding-right: 5px;" width="300" height="300"><img src="piesample.png" width="300" height="300" alt="screenshot of graph" /></div>
253
- <div style="float: left; padding-left: 5px;" width="300" height="300"><canvas id="piegraph" width="300" height="300"></canvas></div>
254
- <div style="clear: both; height: 1px; width: 1px;">&nbsp</div>
255
- </div>
256
-
257
-
258
- <h1> Author</h1>
259
- <p>Alastair Tse - Last Updated: 17th March 2006
260
- </p>
261
-
262
-
263
- </div>
264
- <script type="text/javascript">
265
- <!--
266
-
267
- var options = {
268
- "IECanvasHTC": "../plotkit/iecanvas.htc",
269
- "colorScheme": PlotKit.Base.palette(PlotKit.Base.baseColors()[0]),
270
- "padding": {left: 10, right: 10, top: 10, bottom: 30},
271
- "xTicks": [{v:0, label:"zero"},
272
- {v:1, label:"one"},
273
- {v:2, label:"two"},
274
- {v:3, label:"three"},
275
- {v:4, label:"four"}],
276
- "drawYAxis": false,
277
- "pieRadius": 0.35
278
- };
279
-
280
-
281
- function drawBarGraph() {
282
- var layout = new PlotKit.Layout("bar", options);
283
- layout.addDataset("sqrt", [[0, 0], [1, 1], [2, 1.414], [3, 1.73], [4, 2]]);
284
- layout.evaluate();
285
- var canvas = MochiKit.DOM.getElement("bargraph");
286
- var plotter = new PlotKit.SweetCanvasRenderer(canvas, layout, options);
287
- plotter.render();
288
- }
289
- MochiKit.DOM.addLoadEvent(drawBarGraph);
290
-
291
- function drawPieGraph() {
292
- var layout = new PlotKit.Layout("pie", options);
293
- layout.addDataset("sqrt", [[0, 0], [1, 1], [2, 1.414], [3, 1.73], [4, 2]]);
294
- layout.evaluate();
295
- var canvas = MochiKit.DOM.getElement("piegraph");
296
- var plotter = new PlotKit.SweetCanvasRenderer(canvas, layout, options);
297
- plotter.render();
298
- }
299
-
300
- // Damn opera 9 has a bug with javascript subclassing??
301
- // but works in sweet.html, grr!!
302
- if (navigator.userAgent.toLowerCase().indexOf("opera") == -1) {
303
- MochiKit.DOM.addLoadEvent(drawPieGraph);
304
- }
305
-
306
- //-->
307
- </script>
308
- </div>
309
-
310
-
311
-
312
-
313
- <div id="footer">
314
- <div class="block">
315
- <h3>Syndication Feeds:</h3>
316
- <p>
317
- <ul class="tiny">
318
- <li><a href="http://www.liquidx.net/blog/feed/atom/" class="feed" title="feed for all posts on liquidx.net"><img src="http://media.liquidx.net/imgx/feed.gif" class="feed" alt="feed" />Atom Feed for the Blog Entries</a></li>
319
- <li><a href="http://www.liquidx.net/blog/feed/rss/" class="feed" title="feed for all posts on liquidx.net"><img src="http://media.liquidx.net/imgx/feed.gif" class="feed" alt="feed" />RSS Feed for the Blog Entries</a></li>
320
- <li><a href="http://www.liquidx.net/comments/feed/atom/" class="feed" title="feed for all posts on liquidx.net"><img src="http://media.liquidx.net/imgx/feed.gif" class="feed" alt="feed" />Feed for All Comments</a></li>
321
- <li><a href="http://www.liquidx.net/links/feed/atom/" class="feed" title="feed for all bookmarked links"><img src="http://media.liquidx.net/imgx/feed.gif" class="feed" alt="feed" />Feed for Links</a></li>
322
- </ul>
323
- </p>
324
- </div>
325
- <div class="block">
326
- <h3>About this site:</h3>
327
- <p>Content on this site is licensed under <a href="http://creativecommons.org/licenses/by/2.5/">CC By Attribution</a> unless otherwise specified.
328
- Copyright (c) 2002-2006, <a href="http://al.tse.id.au/">Alastair Tse</a>.</p>
329
- <p>For more information, see <a href="http://al.tse.id.au/">al.tse.id.au</a>.</p>
330
- <p><script type="text/javascript" src="http://technorati.com/embed/itwctkzez.js"></script></p>
331
- </div>
332
- <div class="block">
333
- <h3>Is Made Possible By:</h3>
334
- <p>
335
- <dl>
336
- <dt><a href="http://ecto.kung-foo.tv/" class="clean">ecto</a>. </dt>
337
- <dd>Blogging client for Mac</dd>
338
- <dt><a href="http://djangoproject.com/" class="clean">Django</a>. </dt>
339
- <dd>Python Web Framework</dd>
340
- <dt><a href="http://www.lighttpd.net/" class="clean">lighttpd</a>. </dt>
341
- <dd>Really Fast Web Server</dd>
342
- <dt><a href="http://www.saddi.com/software/flup/" class="clean">flup</a>. </dt>
343
- <dd>FastCGI for Python</dd>
344
- </dl>
345
- </p>
346
- </div>
347
- <div class="block">
348
- <h3>Search My Sites:</h3>
349
- <p>
350
- <div style='margin: 10px; text-align: center; width: 160px;'><form action='http://www.rollyo.com/search.html' ><fieldset style='margin: 0; padding: 4px 0 0 0; height: 60px; border: none; background: url(http://rollyo.com/remote/togo-bg4.png) no-repeat top left;'><div style="position: absolute; float:left; z-index:99; width: 46px; height: 50px;"><a href="http://rollyo.com"><img style="border: none;" height="50" width="46" src="http://rollyo.com/remote/x.gif"></a></div> <input type='text' size='30' style='float: left; width: 90px; margin: 2px 0 0 48px; padding: 0; font-size: 12px;' name='q' value='Search...' onclick='this.value="";' /><br /> <select name='sid' style='float: left; width: 78px; height: 15px; margin: 12px 0 0 46px; font-size: 7pt; padding: 0;'><option value='106081' selected='selected'>liquidx</option><option value='web'>Search The Web</option></select><input type='image' src='http://rollyo.com/remote/btn-togo.png' alt='Go' style='margin: 12px 0 0 3px; float: left;' /><input type='hidden' name='togo-v' value='1' /></fieldset></form></div>
351
- </p>
352
- </div>
353
-
354
-
355
- <div class="clear">&nbsp;</div>
356
-
357
- </div>
358
-
359
-
360
-
361
- <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
362
- <script type="text/javascript">
363
- _uacct = "UA-58117-1";
364
- urchinTracker();
365
- </script>
366
-
367
- </body>
368
- </html>
@@ -1,256 +0,0 @@
1
- {% extends "basex.html" %}
2
- {% load markup %}
3
- {% block pageid %}code{% endblock %}
4
- {% block title %}PlotKit Quick Start{% endblock %}
5
- {% block headers %}
6
- <script type="text/javascript" src="/js/mochi/MochiKit.js"></script>
7
- <script type="text/javascript" src="/js/plotkit/Base.js"></script>
8
- <script type="text/javascript" src="/js/plotkit/Layout.js"></script>
9
- <script type="text/javascript" src="/js/plotkit/Canvas.js"></script>
10
- <script type="text/javascript" src="/js/plotkit/SweetCanvas.js"></script>
11
- <link href="doc.css" media="screen" rel="stylesheet" type="text/css" />
12
- {% endblock %}
13
-
14
-
15
- {% block content %}
16
- <div class="page doc">
17
- {% filter markdown %}
18
- PlotKit Quick Start
19
- ===================
20
-
21
- This is just a quick guide on how to get started with PlotKit. If you
22
- want to delve in deeper, be sure to check out the
23
- [documentation][docs].
24
-
25
- Canvas or SVG
26
- =============
27
-
28
- Before we start, you should know a little about HTML Canvas and SVG
29
- support in the real browser world. For a more indepth coverage, please
30
- check the [SVG/Canvas Browser Support Status][Browser].
31
-
32
- Basically, Canvas and SVG have similar support across modern
33
- browsers. Canvas is supported by Opera 9, Safari 2 and Firefox 1.5,
34
- which probably only accounts for 10% of browsers. PlotKit also supports
35
- a degraded Emulated Canvas mode under IE which means you can achieve
36
- nearly 90% browser support using this technology.
37
-
38
- However, the future is in SVG where Firefox 1.5 and Opera 8 have
39
- support it, and IE6 with the Adobe SVG Viewer (ASV) install means you
40
- get around the same coverage as HTML Canvas.
41
-
42
- PlotKit plans to support both to maximise compatiblity. Canvas has a
43
- simplier rendering engine, but can do the equivalent to what SVG can
44
- apart from animation. SVG has wider support, but is more complex and
45
- support for key features varies widely across different
46
- implementations.
47
-
48
- Graphing with Canvas
49
- ====================
50
-
51
- Download the latest [PlotKit][] and [MochiKit][] and extract it on to
52
- your web server and make sure ``plotkit-0.8/PlotKit`` and
53
- ``mochikit/MochiKit`` is visible.
54
-
55
- Preparing the HTML
56
- ------------------
57
-
58
- Add the script headers for PlotKit to work.
59
-
60
- <script type="text/javascript" src="/mochikit/MochiKit.js"></script>
61
- <script type="text/javascript" src="/plotkit/Base.js"></script>
62
- <script type="text/javascript" src="/plotkit/Layout.js"></script>
63
- <script type="text/javascript" src="/plotkit/Canvas.js"></script>
64
- <script type="text/javascript" src="/plotkit/SweetCanvas.js"></script>
65
-
66
- MochiKit.js is an autoloader for all the elements of MochiKit. You can
67
- reduce the size of it by making your own packed version or just
68
- including the script headers individually.
69
-
70
- The other four PlotKit javascript files deal with some basic
71
- functionality, the layout engine and two renderers, Canvas and
72
- SweetCanvas.
73
-
74
- Now we add the ``<canvas>`` tag to where we want the graph to
75
- appear. Note PlotKit __requires__ the ``<canvas>`` tag is enclosed
76
- inside a <div> tags for labels to work.
77
-
78
- <div><canvas id="graph" height="300" width="300"></canvas></div>
79
-
80
- This will create a blank canvas of 300 by 300 pixels.
81
-
82
- Javascript
83
- ----------
84
-
85
- There are only two simple steps to draw a chart, first is the create a
86
- layout with our data and second is to create the renderer. So lets
87
- start off with creating the layout.
88
-
89
- ### Layout and Data
90
-
91
- var layout = new PlotKit.Layout("bar", {});
92
- layout.addDataset("sqrt", [[0, 0], [1, 1], [2, 1.414], [3, 1.73], [4, 2]]);
93
- layout.evaluate();
94
-
95
- There, it is that simple. Lets explain what each line is doing:
96
-
97
- 1. ``var layout = new PlotKit.Layout("bar", {});``
98
-
99
- We create a new layout object, and tell it that we want a bar chart in the first parameter. The second parameter allows us to pass additional options, which we will go on to later. It can be left null, or in this case just an empty array.
100
-
101
- 2. ``layout.addDataset("sqrt", [[0, 0], [1, 1]...)``
102
-
103
- This will add a new dataset to the layout. You can add multiple datasets by specifying a different name in the first parameter for each dataset. The dataset consists of an array of (x, y) values. These must be numeric, either floating point or integers.
104
-
105
- Note that PlotKit does not deal with negative numbers at the moment.
106
-
107
- 3. ``layout.evaluate();``
108
-
109
- This will be the last command you make on the layout before passing it to the renderer. This will tell the layout to calculate the layout of the chart so the renderer can draw it. It is an expensive operation, so do not call it frequently, only unless the data or options have been changed.
110
-
111
- ### Renderer
112
-
113
- var canvas = MochiKit.DOM.getElement("graph");
114
- var plotter = new PlotKit.SweetCanvasRenderer(canvas, layout, {});
115
- plotter.render();
116
-
117
- 1. ``var canvas = MochiKit.DOM.getElement("graph");``
118
-
119
- This line will get the HTML element we defined earlier.
120
-
121
- 2. ``var plotter = new PlotKit.SweetCanvasRenderer(canvas, layout, {});``
122
-
123
- This will create the renderer to work on the object passed, and also with the data in the layout we created earlier. Again, the third parameter here is for options to relates to the look of the graph. We will show you some things you can do with this in the following section.
124
-
125
- 3. ``plotter.render()``
126
-
127
- This line will render the graph.
128
-
129
- ### Putting it altogether
130
-
131
- function drawGraph() {
132
- var layout = new PlotKit.Layout("bar", {});
133
- layout.addDataset("sqrt", [[0, 0], [1, 1], [2, 1.414], [3, 1.73], [4, 2]]);
134
- layout.evaluate();
135
- var canvas = MochiKit.DOM.getElement("graph");
136
- var plotter = new PlotKit.SweetCanvasRenderer(canvas, layout, {});
137
- plotter.render();
138
- }
139
- MochiKit.DOM.addLoadEvent(drawGraph);
140
-
141
- This is a sample of what you would use to plot the graph of sqare roots for 0 to 4. Make sure you plot the graph on the load event because the DOM will not be ready if when the Javascript is first loaded.
142
-
143
- See this in an [HTML example here][example1].
144
-
145
- ### Additional Options
146
-
147
- We mentioned that both the layout and renderer may take some additional options. In order to take advantage of that, we can use a simple options dictionary to store options for both layout and the renderer, in this way:
148
-
149
- var options = {
150
- "IECanvasHTC": "/plotkit/iecanvas.htc",
151
- "colorScheme": PlotKit.Base.palette(PlotKit.Base.baseColors()[0]),
152
- "padding": {left: 0, right: 0, top: 10, bottom: 30},
153
- "xTicks": [{v:0, label:"zero"},
154
- {v:1, label:"one"},
155
- {v:2, label:"two"},
156
- {v:3, label:"three"},
157
- {v:4, label:"four"}],
158
- "drawYAxis": false
159
- };
160
-
161
- function drawGraph() {
162
- var layout = new PlotKit.Layout("bar", options);
163
- layout.addDataset("sqrt", [[0, 0], [1, 1], [2, 1.414], [3, 1.73], [4, 2]]);
164
- layout.evaluate();
165
- var canvas = MochiKit.DOM.getElement("graph");
166
- var plotter = new PlotKit.SweetCanvasRenderer(canvas, layout, options);
167
- plotter.render();
168
- }
169
- MochiKit.DOM.addLoadEvent(drawGraph);
170
-
171
-
172
- Here we define some additional options to affect how our graph is rendered.
173
-
174
- 1. First line defines where the ``IECanvasHTC`` behaviour file is so that we can have IE support.
175
- 2. Second line defines a new colorScheme to use. Here we are just using another preset color scheme that creates a palette out of the 6th preset base colour.
176
- 3. Third line defines some custom labels we would like by giving the mapping from X value to label.
177
- 4. Fourth line tells the renderer not to draw the Y axis.
178
-
179
- Demonstration
180
- =============
181
-
182
- To show you that is how it works, below is the graph defined exactly how it is presented in this quick start guide. On the left is a PNG of what you should expect and on the right is what it actually renders to.
183
-
184
- ### Bar charts
185
-
186
- <div>
187
- <div style="float: left; padding-right: 5px;" width="300" height="300"><img src="barsample.png" width="300" height="300" alt="screenshot of graph" /></div>
188
- <div style="float: left; padding-left: 5px;" width="300" height="300"><canvas id="bargraph" width="300" height="300"></canvas></div>
189
- <div style="clear: both; height: 1px; width: 1px;">&nbsp</div>
190
- </div>
191
-
192
- ### Pie Charts
193
-
194
- <div>
195
- <div style="float: left; padding-right: 5px;" width="300" height="300"><img src="piesample.png" width="300" height="300" alt="screenshot of graph" /></div>
196
- <div style="float: left; padding-left: 5px;" width="300" height="300"><canvas id="piegraph" width="300" height="300"></canvas></div>
197
- <div style="clear: both; height: 1px; width: 1px;">&nbsp</div>
198
- </div>
199
-
200
- Author
201
- ======
202
-
203
- Alastair Tse - Last Updated: 17th March 2006
204
-
205
- [docs]: PlotKit.html
206
- [Browser]: SVGCanvasCompat.html
207
- [PlotKit]: http://www.liquidx.net/plotkit/
208
- [MochiKit]: http://www.mochikit.com/
209
-
210
- {% endfilter %}
211
- </div>
212
- <script type="text/javascript">
213
- <!--
214
-
215
- var options = {
216
- "IECanvasHTC": "../plotkit/iecanvas.htc",
217
- "colorScheme": PlotKit.Base.palette(PlotKit.Base.baseColors()[0]),
218
- "padding": {left: 10, right: 10, top: 10, bottom: 30},
219
- "xTicks": [{v:0, label:"zero"},
220
- {v:1, label:"one"},
221
- {v:2, label:"two"},
222
- {v:3, label:"three"},
223
- {v:4, label:"four"}],
224
- "drawYAxis": false,
225
- "pieRadius": 0.35
226
- };
227
-
228
-
229
- function drawBarGraph() {
230
- var layout = new PlotKit.Layout("bar", options);
231
- layout.addDataset("sqrt", [[0, 0], [1, 1], [2, 1.414], [3, 1.73], [4, 2]]);
232
- layout.evaluate();
233
- var canvas = MochiKit.DOM.getElement("bargraph");
234
- var plotter = new PlotKit.SweetCanvasRenderer(canvas, layout, options);
235
- plotter.render();
236
- }
237
- MochiKit.DOM.addLoadEvent(drawBarGraph);
238
-
239
- function drawPieGraph() {
240
- var layout = new PlotKit.Layout("pie", options);
241
- layout.addDataset("sqrt", [[0, 0], [1, 1], [2, 1.414], [3, 1.73], [4, 2]]);
242
- layout.evaluate();
243
- var canvas = MochiKit.DOM.getElement("piegraph");
244
- var plotter = new PlotKit.SweetCanvasRenderer(canvas, layout, options);
245
- plotter.render();
246
- }
247
-
248
- // Damn opera 9 has a bug with javascript subclassing??
249
- // but works in sweet.html, grr!!
250
- if (navigator.userAgent.toLowerCase().indexOf("opera") == -1) {
251
- MochiKit.DOM.addLoadEvent(drawPieGraph);
252
- }
253
-
254
- //-->
255
- </script>
256
- {% endblock %}