old_sql 1.16.0 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +24 -13
- data/app/controllers/old_sql/report_controller.rb +3 -17
- data/app/views/layouts/old_sql/chart.html.erb +11 -0
- data/app/views/old_sql/report/chart.html.erb +8 -25
- data/lib/generators/old_sql/templates/user_design_template.csv +2 -3
- data/lib/generators/old_sql/templates/user_old_sql_demo_chart_design.yml +18 -9
- data/lib/old_sql/report_design/chart.rb +2 -2
- data/lib/old_sql/report_design/chart_item.rb +4 -4
- data/lib/old_sql/report_design/chart_parser.rb +2 -2
- data/public/javascripts/old_sql/chart.js +33 -0
- metadata +5 -265
- data/public/javascripts/old_sql/MochiKit-1.4.2/Changes +0 -362
- data/public/javascripts/old_sql/MochiKit-1.4.2/LICENSE.txt +0 -69
- data/public/javascripts/old_sql/MochiKit-1.4.2/MANIFEST +0 -179
- data/public/javascripts/old_sql/MochiKit-1.4.2/META.json +0 -17
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Async.html +0 -814
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Base.html +0 -1703
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Color.html +0 -755
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/DOM.html +0 -1197
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/DateTime.html +0 -168
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/DragAndDrop.html +0 -187
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Format.html +0 -300
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Iter.html +0 -524
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Logging.html +0 -420
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/LoggingPane.html +0 -142
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Position.html +0 -38
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Selector.html +0 -240
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Signal.html +0 -508
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Sortable.html +0 -244
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Style.html +0 -385
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/VersionHistory.html +0 -384
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Visual.html +0 -1161
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/index.html +0 -447
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/js/toc.js +0 -113
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Async.rst +0 -767
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Base.rst +0 -1445
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Color.rst +0 -651
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/DOM.rst +0 -1143
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/DateTime.rst +0 -145
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/DragAndDrop.rst +0 -197
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Format.rst +0 -258
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Iter.rst +0 -454
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Logging.rst +0 -348
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/LoggingPane.rst +0 -128
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Position.rst +0 -26
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Selector.rst +0 -203
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Signal.rst +0 -498
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Sortable.rst +0 -186
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Style.rst +0 -353
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/VersionHistory.rst +0 -362
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Visual.rst +0 -895
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/index.rst +0 -83
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/ajax_tables.css +0 -69
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/ajax_tables.js +0 -401
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/domains.json +0 -10
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/domains.xml +0 -40
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/index.html +0 -96
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/color_wheel/color_wheel.css +0 -4
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/color_wheel/color_wheel.js +0 -95
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/color_wheel/index.html +0 -31
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/dnd_sortable.css +0 -23
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/dropmarker.png +0 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/icon.png +0 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/index.html +0 -54
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable2_test.html +0 -150
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable3_test.html +0 -42
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable4_test.html +0 -90
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable5_test.html +0 -29
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable_test.html +0 -38
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable_tree_test.html +0 -189
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/draggable/draggable.css +0 -28
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/draggable/draggable.js +0 -73
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/draggable/index.html +0 -38
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_bigslide.html +0 -36
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_blind.html +0 -65
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_blindslide.html +0 -31
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_combi.css +0 -18
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_fadeappear.html +0 -61
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_grow_shrink.html +0 -38
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_onload.html +0 -67
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_queue.html +0 -67
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_queue_limit.html +0 -30
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_scroll.html +0 -483
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_slide.html +0 -62
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/full.html +0 -71
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/icon.png +0 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/index.html +0 -150
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/interpreter/index.html +0 -88
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/interpreter/interpreter.css +0 -54
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/interpreter/interpreter.js +0 -373
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/key_events/index.html +0 -78
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/key_events/key_events.css +0 -5
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/key_events/key_events.js +0 -85
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/logging_pane/index.html +0 -46
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/logging_pane/logging_pane.css +0 -78
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/logging_pane/logging_pane.js +0 -11
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mochiregexp/index.html +0 -74
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mochiregexp/mochiregexp.css +0 -73
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mochiregexp/mochiregexp.js +0 -125
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mouse_events/index.html +0 -88
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mouse_events/mouse_events.css +0 -17
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mouse_events/mouse_events.js +0 -59
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/rounded_corners/index.html +0 -28
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/rounded_corners/rounded_corners.css +0 -3
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/rounded_corners/rounded_corners.js +0 -19
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_boxes.html +0 -45
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_full.html +0 -119
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_ghost.html +0 -40
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_hoverclass.html +0 -43
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_scroll.html +0 -91
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_snap.html +0 -54
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/index.html +0 -93
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/simple_dnd.css +0 -64
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/sortable_tables/index.html +0 -71
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/sortable_tables/sortable_tables.css +0 -66
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/sortable_tables/sortable_tables.js +0 -203
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/SyntaxHighlighter.css +0 -177
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/Tests.html +0 -339
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushCSharp.js +0 -30
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushDelphi.js +0 -31
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushJScript.js +0 -22
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushPhp.js +0 -23
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushPython.js +0 -71
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushSql.js +0 -40
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushVb.js +0 -29
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushXml.js +0 -61
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shCore.js +0 -622
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/view-source.css +0 -1
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/view-source.html +0 -19
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/view-source.js +0 -70
- data/public/javascripts/old_sql/MochiKit-1.4.2/include/_img/bg_docheader.gif +0 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/include/_img/g_bullet.gif +0 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/include/_img/g_logo_doc.gif +0 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/include/css/documentation.css +0 -130
- data/public/javascripts/old_sql/MochiKit-1.4.2/include/css/general.css +0 -48
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Async.js +0 -682
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Base.js +0 -1489
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Color.js +0 -863
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/DOM.js +0 -1256
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/DateTime.js +0 -222
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/DragAndDrop.js +0 -793
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Format.js +0 -304
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Iter.js +0 -844
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Logging.js +0 -315
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/LoggingPane.js +0 -353
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/MochiKit.js +0 -188
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/MockDOM.js +0 -115
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Position.js +0 -236
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Selector.js +0 -415
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Signal.js +0 -897
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Sortable.js +0 -589
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Style.js +0 -594
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Test.js +0 -162
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Visual.js +0 -2026
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/__package__.js +0 -18
- data/public/javascripts/old_sql/MochiKit-1.4.2/packed/MochiKit/MochiKit.js +0 -7829
- data/public/javascripts/old_sql/MochiKit-1.4.2/packed/MochiKit/__package__.js +0 -6
- data/public/javascripts/old_sql/MochiKit-1.4.2/packed/MochiKit/customize.html +0 -251
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/FakeJSAN.js +0 -40
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/SimpleTest/SimpleTest.js +0 -381
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/SimpleTest/TestRunner.js +0 -159
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/SimpleTest/test.css +0 -28
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/cli.js +0 -6
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/index.html +0 -25
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/standalone.js +0 -16
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Base.js +0 -577
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Color.js +0 -137
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_DateTime.js +0 -52
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_DragAndDrop.js +0 -30
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Format.js +0 -89
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Iter.js +0 -186
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Logging.js +0 -88
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Async.html +0 -408
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Async.json +0 -1
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Base.html +0 -34
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Color.html +0 -84
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DOM-Safari.html +0 -48
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DOM.html +0 -363
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DateTime.html +0 -39
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DragAndDrop.html +0 -54
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Format.html +0 -39
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Iter.html +0 -38
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-JSAN.html +0 -32
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Logging.html +0 -40
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-MochiKit.html +0 -18
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Selector.html +0 -295
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Signal.html +0 -43
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Style.html +0 -223
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Visual.html +0 -197
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Signal.js +0 -481
- data/public/javascripts/old_sql/plotkit-0.9.1/COPYING +0 -28
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/Base.js +0 -406
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/Canvas.js +0 -683
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/EasyPlot.js +0 -161
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/Layout.js +0 -756
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/PlotKit.js +0 -151
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/PlotKit_Packed.js +0 -2177
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/SVG.js +0 -705
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/SweetCanvas.js +0 -348
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/SweetSVG.js +0 -247
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/dummy.svg +0 -9
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/excanvas.js +0 -723
- data/public/javascripts/old_sql/plotkit-0.9.1/README +0 -1
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/MochiKitAdditions.html +0 -2
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/MochiKitAdditions.txt +0 -2
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Base.html +0 -302
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Base.txt +0 -139
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Canvas.html +0 -172
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Canvas.txt +0 -81
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.EasyPlot.html +0 -155
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.EasyPlot.txt +0 -50
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Layout.html +0 -428
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Layout.txt +0 -330
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.QuickStart.html +0 -368
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.QuickStart.txt +0 -256
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Renderer.html +0 -436
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Renderer.txt +0 -299
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SVG.html +0 -159
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SVG.txt +0 -64
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetCanvas.html +0 -131
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetCanvas.txt +0 -34
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetSVG.html +0 -131
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetSVG.txt +0 -34
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.html +0 -334
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.txt +0 -151
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/SVGCanvasCompat.html +0 -304
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/SVGCanvasCompat.txt +0 -144
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/barsample.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/black.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/blue.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/cyan.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/doc.css +0 -62
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/generate.py +0 -37
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/green.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/orange.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/piesample.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/purple.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/red.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/scripts/custom_rhino.jar +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/scripts/pack.py +0 -58
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/axis.html +0 -31
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/basic.html +0 -25
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/basic.js +0 -143
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/debug.html +0 -56
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo-svg.html +0 -58
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo-svg.js +0 -133
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo.html +0 -57
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo.js +0 -136
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/dynamic.html +0 -161
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/firefox.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/konqueror.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/mozilla.ico +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/msie.gif +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/opera.ico +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/safari.gif +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/labels-img.html +0 -38
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/labels.html +0 -43
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/prototype_compat.html +0 -28
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-easy.html +0 -29
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-horiz.html +0 -53
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-neg.html +0 -29
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-svg.html +0 -61
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart.html +0 -57
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/sample.txt +0 -6
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg-sweet.html +0 -29
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg-sweet.js +0 -141
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg.html +0 -26
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg.js +0 -147
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/sweet.html +0 -24
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/sweet.js +0 -89
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/tests.css +0 -66
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/testsvg.html +0 -20
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/testsvg.js +0 -31
|
@@ -1,436 +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.Renderer | 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
|
-
<link href="doc.css" media="screen" rel="stylesheet" type="text/css" />
|
|
18
|
-
|
|
19
|
-
</head>
|
|
20
|
-
|
|
21
|
-
<body>
|
|
22
|
-
<div id="header">
|
|
23
|
-
<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>
|
|
24
|
-
<div id="menu-hack">
|
|
25
|
-
<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>
|
|
26
|
-
<div id="menu-main">
|
|
27
|
-
<ul id="menu" class="code">
|
|
28
|
-
<li class="tab" id="blog"><a href="http://www.liquidx.net/" title="blog/home">blog</a></li>
|
|
29
|
-
<li class="tab" id="code"><a href="http://www.liquidx.net/code/" title="software i have written">software</a></li>
|
|
30
|
-
<li class="tab" id="dev"><a href="http://projects.liquidx.net/" title="source code for my open source projects">dev</a></li>
|
|
31
|
-
<li class="tab" id="photos"><a href="http://al.tse.id.au/gallery/" title="photos and videos">photos</a></li>
|
|
32
|
-
<li class="tab" id="research"><a href="http://al.tse.id.au/research/" title="research profile">research</a></li>
|
|
33
|
-
<li class="tab" id="links"><a href="http://www.liquidx.net/links/" title="my bookmarks">linkblog</a></li>
|
|
34
|
-
<li class="tab" id="stats"><a href="http://stats.liquidx.net/" title="stats for various parts of my website">stats</a></li>
|
|
35
|
-
<li class="tab" id="status"><a href="http://www.liquidx.net/status/" title="weather report for alastair">status</a></li>
|
|
36
|
-
<li class="tab" id="about"><a href="http://al.tse.id.au/" title="about alastair tse">aboutme</a></li>
|
|
37
|
-
</ul>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
<div id="quickbuttons">
|
|
41
|
-
<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>
|
|
42
|
-
<span class="quickbutton"><a href="http://www.liquidx.net/plotkit/"><img src="http://media.liquidx.net/imgx/quick_plotkit.png" alt="plotkit" /></a></span>
|
|
43
|
-
<span class="quickbutton"><a href="http://www.liquidx.net/fruity/"><img src="http://media.liquidx.net/imgx/quick_fruity.png" alt="fruity" /></a></span>
|
|
44
|
-
</div>
|
|
45
|
-
|
|
46
|
-
</div>
|
|
47
|
-
|
|
48
|
-
<div id="body">
|
|
49
|
-
<div class="page doc api">
|
|
50
|
-
|
|
51
|
-
<p> <a href="PlotKit.html">PlotKit Home</a> | <a href="PlotKit.Layout.html"><<</a> | <a href="PlotKit.Canvas.html">>></a>
|
|
52
|
-
</p>
|
|
53
|
-
|
|
54
|
-
<h1> PlotKit Renderer</h1>
|
|
55
|
-
<p>A Renderer is responsible for translating the layout calculated by PlotKit.Layout and draw it on to a HTML Canvas, SVG object or any other way. One way to use the renderer is to allow theming of graphs by tweaking the layout.
|
|
56
|
-
</p>
|
|
57
|
-
<p>PlotKit includes some common basic renderers, so you do not need to customise anything if you just plan to change the spacing, colors, fonts, or layout.
|
|
58
|
-
</p>
|
|
59
|
-
<p>PlotKit Renderers should follow an informal protocol to allow users to plug and play different renderers. Below is the informal protocol:
|
|
60
|
-
</p>
|
|
61
|
-
|
|
62
|
-
<h2> PlotKit Renderer Protocol</h2>
|
|
63
|
-
<ul>
|
|
64
|
-
<li>
|
|
65
|
-
Constructor: <code>new Renderer(element, layout, options = {})</code>
|
|
66
|
-
</li>
|
|
67
|
-
</ul>
|
|
68
|
-
<p> <code>element</code> is the element which this renderer will perform on, <code>layout</code> is the PlotKit.Layout object and <code>options</code> is an associative dictionary described below.
|
|
69
|
-
</p>
|
|
70
|
-
<ul>
|
|
71
|
-
<li>
|
|
72
|
-
class function: <code>isSupported()</code>
|
|
73
|
-
</li>
|
|
74
|
-
</ul>
|
|
75
|
-
<p> Optional check that returns <code>true</code> if the renderer is supported in the current browser.
|
|
76
|
-
</p>
|
|
77
|
-
<ul>
|
|
78
|
-
<li>
|
|
79
|
-
object method: <code>render()</code>
|
|
80
|
-
</li>
|
|
81
|
-
</ul>
|
|
82
|
-
<p> Renders to canvas, can be called multiple times, but <code>clear()</code> must be called between invokations.
|
|
83
|
-
</p>
|
|
84
|
-
<ul>
|
|
85
|
-
<li>
|
|
86
|
-
object method: <code>clear()</code>
|
|
87
|
-
</li>
|
|
88
|
-
</ul>
|
|
89
|
-
<p> Clear the canvas.
|
|
90
|
-
</p>
|
|
91
|
-
|
|
92
|
-
<h2> PlotKit Renderer Options</h2>
|
|
93
|
-
<p>To allow some basic flexibility of the output, a renderer should
|
|
94
|
-
accept and act on the following options passed in the constructor.
|
|
95
|
-
</p>
|
|
96
|
-
<table cellpadding="0" cellspacing="0">
|
|
97
|
-
<thead>
|
|
98
|
-
<tr><td>Option name</td><td>Description</td><td>Type</td><td>Default</td></tr>
|
|
99
|
-
</thead>
|
|
100
|
-
<tbody>
|
|
101
|
-
<tr>
|
|
102
|
-
<th>backgroundColor</th>
|
|
103
|
-
<td>color to use for background</td>
|
|
104
|
-
<td>MochiKit.Color.Color</td>
|
|
105
|
-
<td>Color.whiteColor()</td>
|
|
106
|
-
</tr>
|
|
107
|
-
<tr>
|
|
108
|
-
<th>colorScheme</th>
|
|
109
|
-
<td>Color scheme used</td>
|
|
110
|
-
<td>Array of MochiKit.Color.Color</td>
|
|
111
|
-
<td>output of PlotKit.Base.colorScheme()</td>
|
|
112
|
-
</tr>
|
|
113
|
-
<tr>
|
|
114
|
-
<th>strokeColor</th>
|
|
115
|
-
<td>Color used stroking. If set to null, the renderer will
|
|
116
|
-
attempt to use strokeColorTransform</td>
|
|
117
|
-
<td>MochiKit.Color.Color or null</td>
|
|
118
|
-
<td>null</td>
|
|
119
|
-
</tr>
|
|
120
|
-
<tr>
|
|
121
|
-
<th>strokeColorTransform</th>
|
|
122
|
-
<td>Name of the method to call to transform Color into stroke color.</td>
|
|
123
|
-
<td>string (name of a function that accepts no arguments)</td>
|
|
124
|
-
<td>"asStrokeColor"</td>
|
|
125
|
-
</tr>
|
|
126
|
-
<tr>
|
|
127
|
-
<th>drawBackground</th>
|
|
128
|
-
<td>Whether the background should be drawn</td>
|
|
129
|
-
<td>boolean</td>
|
|
130
|
-
<td>true</td>
|
|
131
|
-
</tr>
|
|
132
|
-
<tr>
|
|
133
|
-
<th>shouldFill</th>
|
|
134
|
-
<td>Should fill in area under chart</td>
|
|
135
|
-
<td>boolean</td>
|
|
136
|
-
<td>true</td>
|
|
137
|
-
</tr>
|
|
138
|
-
<tr>
|
|
139
|
-
<th>shouldStroke</th>
|
|
140
|
-
<td>Should stroke the borders of shapes in chart</td>
|
|
141
|
-
<td>boolean</td>
|
|
142
|
-
<td>true</td>
|
|
143
|
-
</tr>
|
|
144
|
-
<tr>
|
|
145
|
-
<th>strokeWidth</th>
|
|
146
|
-
<td>Width of stroke used (if shouldStroke is set)</td>
|
|
147
|
-
<td>float</td>
|
|
148
|
-
<td>0.1</td>
|
|
149
|
-
</tr>
|
|
150
|
-
<tr>
|
|
151
|
-
<th>padding</th>
|
|
152
|
-
<td>Padding of the graph drawn (excluding labels)</td>
|
|
153
|
-
<td>Object with properties: top, bottom, left, right.</td>
|
|
154
|
-
<td>{left: 30, right:20, top: 10, bottom: 10}</td>
|
|
155
|
-
</tr>
|
|
156
|
-
<tr>
|
|
157
|
-
<th>drawYAxis</th>
|
|
158
|
-
<td>draw Y Axis</td>
|
|
159
|
-
<td>boolean</td>
|
|
160
|
-
<td>true</td>
|
|
161
|
-
</tr>
|
|
162
|
-
<tr>
|
|
163
|
-
<th>drawXAxis</th>
|
|
164
|
-
<td>draw X Axis</td>
|
|
165
|
-
<td>boolean</td>
|
|
166
|
-
<td>true</td>
|
|
167
|
-
</tr>
|
|
168
|
-
<tr>
|
|
169
|
-
<th>axisLineColor</th>
|
|
170
|
-
<td>Color of axes line.</td>
|
|
171
|
-
<td>MochiKit.Color.Color</td>
|
|
172
|
-
<td>Color.blackColor()</td>
|
|
173
|
-
</tr>
|
|
174
|
-
<tr>
|
|
175
|
-
<th>axisLineWidth</th>
|
|
176
|
-
<td>axis line width</td>
|
|
177
|
-
<td>float</td>
|
|
178
|
-
<td>0.5</td>
|
|
179
|
-
</tr>
|
|
180
|
-
<tr>
|
|
181
|
-
<th>axisTickSize</th>
|
|
182
|
-
<td>length or height of a tick on the y and x axis respectively, in pixels</td>
|
|
183
|
-
<td>float</td>
|
|
184
|
-
<td>3.0</td>
|
|
185
|
-
</tr>
|
|
186
|
-
<tr>
|
|
187
|
-
<th>axisLabelColor</th>
|
|
188
|
-
<td>color of text label on axis.</td>
|
|
189
|
-
<td>MochiKit.Color.Color</td>
|
|
190
|
-
<td>Color.blackColor()</td>
|
|
191
|
-
</tr>
|
|
192
|
-
<tr>
|
|
193
|
-
<th>axisLabelFontSize</th>
|
|
194
|
-
<td>Font size of labels in pixels </td>
|
|
195
|
-
<td>integer</td>
|
|
196
|
-
<td>9</td>
|
|
197
|
-
</tr>
|
|
198
|
-
<tr>
|
|
199
|
-
<th>axisLabelWidth</th>
|
|
200
|
-
<td>Width of labels on ticks, in pixels</td>
|
|
201
|
-
<td>integer</td>
|
|
202
|
-
<td>50</td>
|
|
203
|
-
</tr>
|
|
204
|
-
<tr>
|
|
205
|
-
<th>enableEvents</th>
|
|
206
|
-
<td>Enable events (if supported)</td>
|
|
207
|
-
<td>boolean</td>
|
|
208
|
-
<td>true</td>
|
|
209
|
-
</tr>
|
|
210
|
-
</tbody>
|
|
211
|
-
</table>
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
<h1> Internal Renderer Methods and Style</h1>
|
|
215
|
-
<p>The default renderers that are available follow a rough structure. If
|
|
216
|
-
you plan to write a new renderer, you should think about using a
|
|
217
|
-
similar structure.
|
|
218
|
-
</p>
|
|
219
|
-
<p>Also, it is important that you follow an Object Orientated style and
|
|
220
|
-
split up the rendering methods as much as logically possible to allow
|
|
221
|
-
other developers to extend the work by using a "psuedo subclassing"
|
|
222
|
-
method described below.
|
|
223
|
-
</p>
|
|
224
|
-
|
|
225
|
-
<h2> Subclassing</h2>
|
|
226
|
-
<p>PlotKit Renderers should adopt a Javascript subclassing structure to
|
|
227
|
-
allow developers/themers to customise certain aspects of the
|
|
228
|
-
rendering. Here is an example of what is expected:
|
|
229
|
-
</p>
|
|
230
|
-
<pre><code>MyRenderer = function(element, layout, options) {
|
|
231
|
-
if (arguments.length > 0)
|
|
232
|
-
this.__init__(element, layout, options);
|
|
233
|
-
};
|
|
234
|
-
|
|
235
|
-
MyRenderer.prototype.__init__ = function(element, layout, options) {
|
|
236
|
-
....
|
|
237
|
-
};
|
|
238
|
-
</code></pre><p>In this case, the default javascript constructor acts only when passed
|
|
239
|
-
arguments. <code>MyRenderer.prototype.__init__</code> is the real
|
|
240
|
-
constructor. It is named in similar vein to Python's constructor.
|
|
241
|
-
</p>
|
|
242
|
-
<p>For users who would like to subclass, they will need to use the
|
|
243
|
-
following snippet of code:
|
|
244
|
-
</p>
|
|
245
|
-
<pre><code> MyAlternateRenderer = function(element, layout. options) {
|
|
246
|
-
if (arguments.length > 0)
|
|
247
|
-
this.__init__(element, layout, options);
|
|
248
|
-
};
|
|
249
|
-
MyAlternateRenderer.prototype = new MyRenderer();
|
|
250
|
-
MyAlternateRenderer.prototype.constructor = MyAlternateRenderer;
|
|
251
|
-
MyAlternateRenderer.__super__ = MyRenderer.prototype;
|
|
252
|
-
|
|
253
|
-
MyAlternateRenderer.prototype.__init__ = function(element, layout, options) {
|
|
254
|
-
MyAlternateRenderer.__super__.__init__.call(this, element, layout, options);
|
|
255
|
-
};
|
|
256
|
-
</code></pre><p>For subclasses, they will need the following magic in order to
|
|
257
|
-
initialise their subclass. But after that, you can either override
|
|
258
|
-
<code>MyAlternateRenderer.prototype.__init__</code> with your own
|
|
259
|
-
implementation or just leave the superclass to deal with the
|
|
260
|
-
constructor.
|
|
261
|
-
</p>
|
|
262
|
-
<p>A more thorough example can be found in the PlotKit source for
|
|
263
|
-
<code>Canvas.js</code> and <code>SweetCanvas.js</code> respectively.
|
|
264
|
-
</p>
|
|
265
|
-
|
|
266
|
-
<h2> Internal Renderer Properties</h2>
|
|
267
|
-
<p>The bundled renderers are have the following common properties to
|
|
268
|
-
allow standard access by all subclasses:
|
|
269
|
-
</p>
|
|
270
|
-
<ul>
|
|
271
|
-
<li>
|
|
272
|
-
<code>this.layout</code>
|
|
273
|
-
</li>
|
|
274
|
-
</ul>
|
|
275
|
-
<p>The PlotKit.Layout object passed by the user.
|
|
276
|
-
</p>
|
|
277
|
-
<ul>
|
|
278
|
-
<li>
|
|
279
|
-
<code>this.element</code>
|
|
280
|
-
</li>
|
|
281
|
-
</ul>
|
|
282
|
-
<p>The HTML element to use, either a Canvas Element or SVG Element depending
|
|
283
|
-
on whether a Canvas Renderer or SVG Renderer is in use.
|
|
284
|
-
</p>
|
|
285
|
-
<ul>
|
|
286
|
-
<li>
|
|
287
|
-
<code>this.options</code>
|
|
288
|
-
</li>
|
|
289
|
-
</ul>
|
|
290
|
-
<p>A dictionary of options that are applicable to the rendering style.
|
|
291
|
-
</p>
|
|
292
|
-
<ul>
|
|
293
|
-
<li>
|
|
294
|
-
<code>this.xlabels</code>
|
|
295
|
-
</li>
|
|
296
|
-
</ul>
|
|
297
|
-
<p>A list of elements that represent the axis. Should be cleared whenever
|
|
298
|
-
<code>clear()</code> is executed.
|
|
299
|
-
</p>
|
|
300
|
-
<ul>
|
|
301
|
-
<li>
|
|
302
|
-
<code>this.ylabels</code>
|
|
303
|
-
</li>
|
|
304
|
-
</ul>
|
|
305
|
-
<p>A list of elements that represent the axis. Should be cleared whenever
|
|
306
|
-
<code>clear()</code> is executed.
|
|
307
|
-
</p>
|
|
308
|
-
|
|
309
|
-
<h2> Internal Renderer Methods</h2>
|
|
310
|
-
<ul>
|
|
311
|
-
<li>
|
|
312
|
-
<code>_renderBarChart()</code>
|
|
313
|
-
</li>
|
|
314
|
-
</ul>
|
|
315
|
-
<p>Renders only the bars of a bar chart on the element by looking at
|
|
316
|
-
<code>this.layout.bars</code> for the bars to render. Will only be called if
|
|
317
|
-
<code>this.layout.style == "bars"</code>
|
|
318
|
-
</p>
|
|
319
|
-
<ul>
|
|
320
|
-
<li>
|
|
321
|
-
<code>_renderLineChart()</code>
|
|
322
|
-
</li>
|
|
323
|
-
</ul>
|
|
324
|
-
<p>Renders only the lines of a line chart on the element by looking at
|
|
325
|
-
<code>this.layout.points</code> for the points to render. Will only be called if
|
|
326
|
-
<code>this.layout.style == "line"</code>
|
|
327
|
-
</p>
|
|
328
|
-
<ul>
|
|
329
|
-
<li>
|
|
330
|
-
<code>_renderPieChart()</code>
|
|
331
|
-
</li>
|
|
332
|
-
</ul>
|
|
333
|
-
<p>Renders only the slices of the pie in <code>this.layout.slices</code>.
|
|
334
|
-
Will only be called if <code>this.layout.style == "pie"</code>
|
|
335
|
-
</p>
|
|
336
|
-
<ul>
|
|
337
|
-
<li>
|
|
338
|
-
<code>_renderBarAxis()</code>
|
|
339
|
-
</li>
|
|
340
|
-
</ul>
|
|
341
|
-
<p>Renders the axis for a bar chart by looking at the
|
|
342
|
-
<code>this.layout.xticks</code> and <code>this.layout.yticks</code>.
|
|
343
|
-
</p>
|
|
344
|
-
<ul>
|
|
345
|
-
<li>
|
|
346
|
-
<code>_renderLineAxis()</code>
|
|
347
|
-
</li>
|
|
348
|
-
</ul>
|
|
349
|
-
<p>Renders the axis for a line chart by looking at the
|
|
350
|
-
<code>this.layout.xticks</code> and <code>this.layout.yticks</code>.
|
|
351
|
-
</p>
|
|
352
|
-
<ul>
|
|
353
|
-
<li>
|
|
354
|
-
<code>_renderPieAxis()</code>
|
|
355
|
-
</li>
|
|
356
|
-
</ul>
|
|
357
|
-
<p>Renders the labels for a pie chart by looking at
|
|
358
|
-
<code>this.layout.xticks</code> only.
|
|
359
|
-
</p>
|
|
360
|
-
<ul>
|
|
361
|
-
<li>
|
|
362
|
-
<code>_renderBackground()</code>
|
|
363
|
-
</li>
|
|
364
|
-
</ul>
|
|
365
|
-
<p>Called to render the background of the chart. Should check whether
|
|
366
|
-
<code>this.options.drawsBackground</code> is set before proceeding.
|
|
367
|
-
</p>
|
|
368
|
-
|
|
369
|
-
<h1> Events from the Chart</h1>
|
|
370
|
-
<p>There is preliminary support for events from the chart for the Canvas
|
|
371
|
-
Renderer but the API is not stablised and subject to change. <strong>(TODO)</strong>.
|
|
372
|
-
</p>
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
</div>
|
|
376
|
-
</div>
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
<div id="footer">
|
|
382
|
-
<div class="block">
|
|
383
|
-
<h3>Syndication Feeds:</h3>
|
|
384
|
-
<p>
|
|
385
|
-
<ul class="tiny">
|
|
386
|
-
<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>
|
|
387
|
-
<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>
|
|
388
|
-
<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>
|
|
389
|
-
<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>
|
|
390
|
-
</ul>
|
|
391
|
-
</p>
|
|
392
|
-
</div>
|
|
393
|
-
<div class="block">
|
|
394
|
-
<h3>About this site:</h3>
|
|
395
|
-
<p>Content on this site is licensed under <a href="http://creativecommons.org/licenses/by/2.5/">CC By Attribution</a> unless otherwise specified.
|
|
396
|
-
Copyright (c) 2002-2006, <a href="http://al.tse.id.au/">Alastair Tse</a>.</p>
|
|
397
|
-
<p>For more information, see <a href="http://al.tse.id.au/">al.tse.id.au</a>.</p>
|
|
398
|
-
<p><script type="text/javascript" src="http://technorati.com/embed/itwctkzez.js"></script></p>
|
|
399
|
-
</div>
|
|
400
|
-
<div class="block">
|
|
401
|
-
<h3>Is Made Possible By:</h3>
|
|
402
|
-
<p>
|
|
403
|
-
<dl>
|
|
404
|
-
<dt><a href="http://ecto.kung-foo.tv/" class="clean">ecto</a>. </dt>
|
|
405
|
-
<dd>Blogging client for Mac</dd>
|
|
406
|
-
<dt><a href="http://djangoproject.com/" class="clean">Django</a>. </dt>
|
|
407
|
-
<dd>Python Web Framework</dd>
|
|
408
|
-
<dt><a href="http://www.lighttpd.net/" class="clean">lighttpd</a>. </dt>
|
|
409
|
-
<dd>Really Fast Web Server</dd>
|
|
410
|
-
<dt><a href="http://www.saddi.com/software/flup/" class="clean">flup</a>. </dt>
|
|
411
|
-
<dd>FastCGI for Python</dd>
|
|
412
|
-
</dl>
|
|
413
|
-
</p>
|
|
414
|
-
</div>
|
|
415
|
-
<div class="block">
|
|
416
|
-
<h3>Search My Sites:</h3>
|
|
417
|
-
<p>
|
|
418
|
-
<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>
|
|
419
|
-
</p>
|
|
420
|
-
</div>
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
<div class="clear"> </div>
|
|
424
|
-
|
|
425
|
-
</div>
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
|
|
430
|
-
<script type="text/javascript">
|
|
431
|
-
_uacct = "UA-58117-1";
|
|
432
|
-
urchinTracker();
|
|
433
|
-
</script>
|
|
434
|
-
|
|
435
|
-
</body>
|
|
436
|
-
</html>
|
|
@@ -1,299 +0,0 @@
|
|
|
1
|
-
{% extends "basex.html" %}
|
|
2
|
-
{% load markup %}
|
|
3
|
-
{% block pageid %}code{% endblock %}
|
|
4
|
-
{% block headers %}
|
|
5
|
-
<link href="doc.css" media="screen" rel="stylesheet" type="text/css" />
|
|
6
|
-
{% endblock %}
|
|
7
|
-
{% block title %}PlotKit.Renderer{% endblock %}
|
|
8
|
-
|
|
9
|
-
{% block content %}
|
|
10
|
-
<div class="page doc api">
|
|
11
|
-
{% filter markdown %}
|
|
12
|
-
[PlotKit Home](PlotKit.html) | [<<](PlotKit.Layout.html) | [>>](PlotKit.Canvas.html)
|
|
13
|
-
|
|
14
|
-
PlotKit Renderer
|
|
15
|
-
================
|
|
16
|
-
|
|
17
|
-
A Renderer is responsible for translating the layout calculated by PlotKit.Layout and draw it on to a HTML Canvas, SVG object or any other way. One way to use the renderer is to allow theming of graphs by tweaking the layout.
|
|
18
|
-
|
|
19
|
-
PlotKit includes some common basic renderers, so you do not need to customise anything if you just plan to change the spacing, colors, fonts, or layout.
|
|
20
|
-
|
|
21
|
-
PlotKit Renderers should follow an informal protocol to allow users to plug and play different renderers. Below is the informal protocol:
|
|
22
|
-
|
|
23
|
-
PlotKit Renderer Protocol
|
|
24
|
-
-------------------------
|
|
25
|
-
* Constructor: ``new Renderer(element, layout, options = {})``
|
|
26
|
-
|
|
27
|
-
``element`` is the element which this renderer will perform on, ``layout`` is the PlotKit.Layout object and ``options`` is an associative dictionary described below.
|
|
28
|
-
|
|
29
|
-
* class function: ``isSupported()``
|
|
30
|
-
|
|
31
|
-
Optional check that returns ``true`` if the renderer is supported in the current browser.
|
|
32
|
-
|
|
33
|
-
* object method: ``render()``
|
|
34
|
-
|
|
35
|
-
Renders to canvas, can be called multiple times, but ``clear()`` must be called between invokations.
|
|
36
|
-
|
|
37
|
-
* object method: ``clear()``
|
|
38
|
-
|
|
39
|
-
Clear the canvas.
|
|
40
|
-
|
|
41
|
-
PlotKit Renderer Options
|
|
42
|
-
------------------------
|
|
43
|
-
To allow some basic flexibility of the output, a renderer should
|
|
44
|
-
accept and act on the following options passed in the constructor.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
<table cellpadding="0" cellspacing="0">
|
|
48
|
-
<thead>
|
|
49
|
-
<tr><td>Option name</td><td>Description</td><td>Type</td><td>Default</td></tr>
|
|
50
|
-
</thead>
|
|
51
|
-
<tbody>
|
|
52
|
-
<tr>
|
|
53
|
-
<th>backgroundColor</th>
|
|
54
|
-
<td>color to use for background</td>
|
|
55
|
-
<td>MochiKit.Color.Color</td>
|
|
56
|
-
<td>Color.whiteColor()</td>
|
|
57
|
-
</tr>
|
|
58
|
-
<tr>
|
|
59
|
-
<th>colorScheme</th>
|
|
60
|
-
<td>Color scheme used</td>
|
|
61
|
-
<td>Array of MochiKit.Color.Color</td>
|
|
62
|
-
<td>output of PlotKit.Base.colorScheme()</td>
|
|
63
|
-
</tr>
|
|
64
|
-
<tr>
|
|
65
|
-
<th>strokeColor</th>
|
|
66
|
-
<td>Color used stroking. If set to null, the renderer will
|
|
67
|
-
attempt to use strokeColorTransform</td>
|
|
68
|
-
<td>MochiKit.Color.Color or null</td>
|
|
69
|
-
<td>null</td>
|
|
70
|
-
</tr>
|
|
71
|
-
<tr>
|
|
72
|
-
<th>strokeColorTransform</th>
|
|
73
|
-
<td>Name of the method to call to transform Color into stroke color.</td>
|
|
74
|
-
<td>string (name of a function that accepts no arguments)</td>
|
|
75
|
-
<td>"asStrokeColor"</td>
|
|
76
|
-
</tr>
|
|
77
|
-
<tr>
|
|
78
|
-
<th>drawBackground</th>
|
|
79
|
-
<td>Whether the background should be drawn</td>
|
|
80
|
-
<td>boolean</td>
|
|
81
|
-
<td>true</td>
|
|
82
|
-
</tr>
|
|
83
|
-
<tr>
|
|
84
|
-
<th>shouldFill</th>
|
|
85
|
-
<td>Should fill in area under chart</td>
|
|
86
|
-
<td>boolean</td>
|
|
87
|
-
<td>true</td>
|
|
88
|
-
</tr>
|
|
89
|
-
<tr>
|
|
90
|
-
<th>shouldStroke</th>
|
|
91
|
-
<td>Should stroke the borders of shapes in chart</td>
|
|
92
|
-
<td>boolean</td>
|
|
93
|
-
<td>true</td>
|
|
94
|
-
</tr>
|
|
95
|
-
<tr>
|
|
96
|
-
<th>strokeWidth</th>
|
|
97
|
-
<td>Width of stroke used (if shouldStroke is set)</td>
|
|
98
|
-
<td>float</td>
|
|
99
|
-
<td>0.1</td>
|
|
100
|
-
</tr>
|
|
101
|
-
<tr>
|
|
102
|
-
<th>padding</th>
|
|
103
|
-
<td>Padding of the graph drawn (excluding labels)</td>
|
|
104
|
-
<td>Object with properties: top, bottom, left, right.</td>
|
|
105
|
-
<td>{left: 30, right:20, top: 10, bottom: 10}</td>
|
|
106
|
-
</tr>
|
|
107
|
-
<tr>
|
|
108
|
-
<th>drawYAxis</th>
|
|
109
|
-
<td>draw Y Axis</td>
|
|
110
|
-
<td>boolean</td>
|
|
111
|
-
<td>true</td>
|
|
112
|
-
</tr>
|
|
113
|
-
<tr>
|
|
114
|
-
<th>drawXAxis</th>
|
|
115
|
-
<td>draw X Axis</td>
|
|
116
|
-
<td>boolean</td>
|
|
117
|
-
<td>true</td>
|
|
118
|
-
</tr>
|
|
119
|
-
<tr>
|
|
120
|
-
<th>axisLineColor</th>
|
|
121
|
-
<td>Color of axes line.</td>
|
|
122
|
-
<td>MochiKit.Color.Color</td>
|
|
123
|
-
<td>Color.blackColor()</td>
|
|
124
|
-
</tr>
|
|
125
|
-
<tr>
|
|
126
|
-
<th>axisLineWidth</th>
|
|
127
|
-
<td>axis line width</td>
|
|
128
|
-
<td>float</td>
|
|
129
|
-
<td>0.5</td>
|
|
130
|
-
</tr>
|
|
131
|
-
<tr>
|
|
132
|
-
<th>axisTickSize</th>
|
|
133
|
-
<td>length or height of a tick on the y and x axis respectively, in pixels</td>
|
|
134
|
-
<td>float</td>
|
|
135
|
-
<td>3.0</td>
|
|
136
|
-
</tr>
|
|
137
|
-
<tr>
|
|
138
|
-
<th>axisLabelColor</th>
|
|
139
|
-
<td>color of text label on axis.</td>
|
|
140
|
-
<td>MochiKit.Color.Color</td>
|
|
141
|
-
<td>Color.blackColor()</td>
|
|
142
|
-
</tr>
|
|
143
|
-
<tr>
|
|
144
|
-
<th>axisLabelFontSize</th>
|
|
145
|
-
<td>Font size of labels in pixels </td>
|
|
146
|
-
<td>integer</td>
|
|
147
|
-
<td>9</td>
|
|
148
|
-
</tr>
|
|
149
|
-
<tr>
|
|
150
|
-
<th>axisLabelWidth</th>
|
|
151
|
-
<td>Width of labels on ticks, in pixels</td>
|
|
152
|
-
<td>integer</td>
|
|
153
|
-
<td>50</td>
|
|
154
|
-
</tr>
|
|
155
|
-
<tr>
|
|
156
|
-
<th>enableEvents</th>
|
|
157
|
-
<td>Enable events (if supported)</td>
|
|
158
|
-
<td>boolean</td>
|
|
159
|
-
<td>true</td>
|
|
160
|
-
</tr>
|
|
161
|
-
</tbody>
|
|
162
|
-
</table>
|
|
163
|
-
|
|
164
|
-
Internal Renderer Methods and Style
|
|
165
|
-
===================================
|
|
166
|
-
|
|
167
|
-
The default renderers that are available follow a rough structure. If
|
|
168
|
-
you plan to write a new renderer, you should think about using a
|
|
169
|
-
similar structure.
|
|
170
|
-
|
|
171
|
-
Also, it is important that you follow an Object Orientated style and
|
|
172
|
-
split up the rendering methods as much as logically possible to allow
|
|
173
|
-
other developers to extend the work by using a "psuedo subclassing"
|
|
174
|
-
method described below.
|
|
175
|
-
|
|
176
|
-
Subclassing
|
|
177
|
-
-----------
|
|
178
|
-
|
|
179
|
-
PlotKit Renderers should adopt a Javascript subclassing structure to
|
|
180
|
-
allow developers/themers to customise certain aspects of the
|
|
181
|
-
rendering. Here is an example of what is expected:
|
|
182
|
-
|
|
183
|
-
MyRenderer = function(element, layout, options) {
|
|
184
|
-
if (arguments.length > 0)
|
|
185
|
-
this.__init__(element, layout, options);
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
MyRenderer.prototype.__init__ = function(element, layout, options) {
|
|
189
|
-
....
|
|
190
|
-
};
|
|
191
|
-
|
|
192
|
-
In this case, the default javascript constructor acts only when passed
|
|
193
|
-
arguments. ``MyRenderer.prototype.__init__`` is the real
|
|
194
|
-
constructor. It is named in similar vein to Python's constructor.
|
|
195
|
-
|
|
196
|
-
For users who would like to subclass, they will need to use the
|
|
197
|
-
following snippet of code:
|
|
198
|
-
|
|
199
|
-
MyAlternateRenderer = function(element, layout. options) {
|
|
200
|
-
if (arguments.length > 0)
|
|
201
|
-
this.__init__(element, layout, options);
|
|
202
|
-
};
|
|
203
|
-
MyAlternateRenderer.prototype = new MyRenderer();
|
|
204
|
-
MyAlternateRenderer.prototype.constructor = MyAlternateRenderer;
|
|
205
|
-
MyAlternateRenderer.__super__ = MyRenderer.prototype;
|
|
206
|
-
|
|
207
|
-
MyAlternateRenderer.prototype.__init__ = function(element, layout, options) {
|
|
208
|
-
MyAlternateRenderer.__super__.__init__.call(this, element, layout, options);
|
|
209
|
-
};
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
For subclasses, they will need the following magic in order to
|
|
213
|
-
initialise their subclass. But after that, you can either override
|
|
214
|
-
``MyAlternateRenderer.prototype.__init__`` with your own
|
|
215
|
-
implementation or just leave the superclass to deal with the
|
|
216
|
-
constructor.
|
|
217
|
-
|
|
218
|
-
A more thorough example can be found in the PlotKit source for
|
|
219
|
-
``Canvas.js`` and ``SweetCanvas.js`` respectively.
|
|
220
|
-
|
|
221
|
-
Internal Renderer Properties
|
|
222
|
-
----------------------------
|
|
223
|
-
|
|
224
|
-
The bundled renderers are have the following common properties to
|
|
225
|
-
allow standard access by all subclasses:
|
|
226
|
-
|
|
227
|
-
* ``this.layout``
|
|
228
|
-
|
|
229
|
-
The PlotKit.Layout object passed by the user.
|
|
230
|
-
|
|
231
|
-
* ``this.element``
|
|
232
|
-
|
|
233
|
-
The HTML element to use, either a Canvas Element or SVG Element depending
|
|
234
|
-
on whether a Canvas Renderer or SVG Renderer is in use.
|
|
235
|
-
|
|
236
|
-
* ``this.options``
|
|
237
|
-
|
|
238
|
-
A dictionary of options that are applicable to the rendering style.
|
|
239
|
-
|
|
240
|
-
* ``this.xlabels``
|
|
241
|
-
|
|
242
|
-
A list of elements that represent the axis. Should be cleared whenever
|
|
243
|
-
``clear()`` is executed.
|
|
244
|
-
|
|
245
|
-
* ``this.ylabels``
|
|
246
|
-
|
|
247
|
-
A list of elements that represent the axis. Should be cleared whenever
|
|
248
|
-
``clear()`` is executed.
|
|
249
|
-
|
|
250
|
-
Internal Renderer Methods
|
|
251
|
-
-------------------------
|
|
252
|
-
|
|
253
|
-
* ``_renderBarChart()``
|
|
254
|
-
|
|
255
|
-
Renders only the bars of a bar chart on the element by looking at
|
|
256
|
-
``this.layout.bars`` for the bars to render. Will only be called if
|
|
257
|
-
``this.layout.style == "bars"``
|
|
258
|
-
|
|
259
|
-
* ``_renderLineChart()``
|
|
260
|
-
|
|
261
|
-
Renders only the lines of a line chart on the element by looking at
|
|
262
|
-
``this.layout.points`` for the points to render. Will only be called if
|
|
263
|
-
``this.layout.style == "line"``
|
|
264
|
-
|
|
265
|
-
* ``_renderPieChart()``
|
|
266
|
-
|
|
267
|
-
Renders only the slices of the pie in ``this.layout.slices``.
|
|
268
|
-
Will only be called if ``this.layout.style == "pie"``
|
|
269
|
-
|
|
270
|
-
* ``_renderBarAxis()``
|
|
271
|
-
|
|
272
|
-
Renders the axis for a bar chart by looking at the
|
|
273
|
-
``this.layout.xticks`` and ``this.layout.yticks``.
|
|
274
|
-
|
|
275
|
-
* ``_renderLineAxis()``
|
|
276
|
-
|
|
277
|
-
Renders the axis for a line chart by looking at the
|
|
278
|
-
``this.layout.xticks`` and ``this.layout.yticks``.
|
|
279
|
-
|
|
280
|
-
* ``_renderPieAxis()``
|
|
281
|
-
|
|
282
|
-
Renders the labels for a pie chart by looking at
|
|
283
|
-
``this.layout.xticks`` only.
|
|
284
|
-
|
|
285
|
-
* ``_renderBackground()``
|
|
286
|
-
|
|
287
|
-
Called to render the background of the chart. Should check whether
|
|
288
|
-
``this.options.drawsBackground`` is set before proceeding.
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
Events from the Chart
|
|
292
|
-
=====================
|
|
293
|
-
|
|
294
|
-
There is preliminary support for events from the chart for the Canvas
|
|
295
|
-
Renderer but the API is not stablised and subject to change. __(TODO)__.
|
|
296
|
-
|
|
297
|
-
{% endfilter %}
|
|
298
|
-
</div>
|
|
299
|
-
{% endblock %}
|