@datagrok/helm 2.3.2 → 2.3.4
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.
- package/CHANGELOG.md +20 -0
- package/dist/package-test.js +1 -1
- package/dist/package-test.js.map +1 -1
- package/dist/package.js +1 -1
- package/dist/package.js.map +1 -1
- package/package.json +4 -4
- package/src/cell-renderer.ts +5 -4
- package/src/helm-helper.ts +6 -6
- package/src/helm-monomer-placer.ts +1 -1
- package/src/helm-web-editor.ts +5 -5
- package/src/package-test.ts +0 -1
- package/src/package-utils.ts +211 -69
- package/src/package.ts +10 -71
- package/src/tests/findMonomers-tests.ts +2 -1
- package/src/tests/get-monomer-tests.ts +1 -49
- package/src/tests/helm-input-tests.ts +31 -20
- package/src/utils/get-monomer.ts +49 -1
- package/src/utils/helm-grid-cell-renderer.ts +8 -9
- package/src/utils/index.ts +2 -3
- package/src/widgets/helm-input.ts +4 -4
- package/vendor/dojo-1.10.10/dijit/BackgroundIframe.js +63 -0
- package/vendor/dojo-1.10.10/dijit/BackgroundIframe.js.uncompressed.js +116 -0
- package/vendor/dojo-1.10.10/dijit/Destroyable.js +35 -0
- package/vendor/dojo-1.10.10/dijit/Destroyable.js.uncompressed.js +83 -0
- package/vendor/dojo-1.10.10/dijit/Tooltip.js +240 -0
- package/vendor/dojo-1.10.10/dijit/Tooltip.js.uncompressed.js +612 -0
- package/vendor/dojo-1.10.10/dijit/Viewport.js +44 -0
- package/vendor/dojo-1.10.10/dijit/Viewport.js.uncompressed.js +87 -0
- package/vendor/dojo-1.10.10/dijit/WidgetSet.js +76 -0
- package/vendor/dojo-1.10.10/dijit/WidgetSet.js.uncompressed.js +247 -0
- package/vendor/dojo-1.10.10/dijit/_AttachMixin.js +94 -0
- package/vendor/dojo-1.10.10/dijit/_AttachMixin.js.uncompressed.js +238 -0
- package/vendor/dojo-1.10.10/dijit/_Contained.js +17 -0
- package/vendor/dojo-1.10.10/dijit/_Contained.js.uncompressed.js +56 -0
- package/vendor/dojo-1.10.10/dijit/_Container.js +47 -0
- package/vendor/dojo-1.10.10/dijit/_Container.js.uncompressed.js +108 -0
- package/vendor/dojo-1.10.10/dijit/_CssStateMixin.js +198 -0
- package/vendor/dojo-1.10.10/dijit/_CssStateMixin.js.uncompressed.js +372 -0
- package/vendor/dojo-1.10.10/dijit/_FocusMixin.js +11 -0
- package/vendor/dojo-1.10.10/dijit/_FocusMixin.js.uncompressed.js +66 -0
- package/vendor/dojo-1.10.10/dijit/_HasDropDown.js +188 -0
- package/vendor/dojo-1.10.10/dijit/_HasDropDown.js.uncompressed.js +472 -0
- package/vendor/dojo-1.10.10/dijit/_OnDijitClickMixin.js +8 -0
- package/vendor/dojo-1.10.10/dijit/_OnDijitClickMixin.js.uncompressed.js +31 -0
- package/vendor/dojo-1.10.10/dijit/_TemplatedMixin.js +90 -0
- package/vendor/dojo-1.10.10/dijit/_TemplatedMixin.js.uncompressed.js +205 -0
- package/vendor/dojo-1.10.10/dijit/_Widget.js +66 -0
- package/vendor/dojo-1.10.10/dijit/_Widget.js.uncompressed.js +352 -0
- package/vendor/dojo-1.10.10/dijit/_WidgetBase.js +353 -0
- package/vendor/dojo-1.10.10/dijit/_WidgetBase.js.uncompressed.js +1200 -0
- package/vendor/dojo-1.10.10/dijit/_base/focus.js +68 -0
- package/vendor/dojo-1.10.10/dijit/_base/focus.js.uncompressed.js +207 -0
- package/vendor/dojo-1.10.10/dijit/_base/manager.js +10 -0
- package/vendor/dojo-1.10.10/dijit/_base/manager.js.uncompressed.js +35 -0
- package/vendor/dojo-1.10.10/dijit/_base/place.js +52 -0
- package/vendor/dojo-1.10.10/dijit/_base/place.js.uncompressed.js +131 -0
- package/vendor/dojo-1.10.10/dijit/_base/popup.js +23 -0
- package/vendor/dojo-1.10.10/dijit/_base/popup.js.uncompressed.js +58 -0
- package/vendor/dojo-1.10.10/dijit/_base/scroll.js +6 -0
- package/vendor/dojo-1.10.10/dijit/_base/scroll.js.uncompressed.js +22 -0
- package/vendor/dojo-1.10.10/dijit/_base/sniff.js +3 -0
- package/vendor/dojo-1.10.10/dijit/_base/sniff.js.uncompressed.js +12 -0
- package/vendor/dojo-1.10.10/dijit/_base/typematic.js +3 -0
- package/vendor/dojo-1.10.10/dijit/_base/typematic.js.uncompressed.js +10 -0
- package/vendor/dojo-1.10.10/dijit/_base/wai.js +32 -0
- package/vendor/dojo-1.10.10/dijit/_base/wai.js.uncompressed.js +109 -0
- package/vendor/dojo-1.10.10/dijit/_base/window.js +6 -0
- package/vendor/dojo-1.10.10/dijit/_base/window.js.uncompressed.js +18 -0
- package/vendor/dojo-1.10.10/dijit/_base.js +4 -0
- package/vendor/dojo-1.10.10/dijit/a11y.js +109 -0
- package/vendor/dojo-1.10.10/dijit/a11y.js.uncompressed.js +191 -0
- package/vendor/dojo-1.10.10/dijit/a11yclick.js +66 -0
- package/vendor/dojo-1.10.10/dijit/a11yclick.js.uncompressed.js +139 -0
- package/vendor/dojo-1.10.10/dijit/focus.js +188 -0
- package/vendor/dojo-1.10.10/dijit/focus.js.uncompressed.js +371 -0
- package/vendor/dojo-1.10.10/dijit/form/Button.js +49 -0
- package/vendor/dojo-1.10.10/dijit/form/Button.js.uncompressed.js +130 -0
- package/vendor/dojo-1.10.10/dijit/form/ComboBox.js +4 -0
- package/vendor/dojo-1.10.10/dijit/form/ComboBox.js.uncompressed.js +27 -0
- package/vendor/dojo-1.10.10/dijit/form/ComboButton.js +21 -0
- package/vendor/dojo-1.10.10/dijit/form/ComboButton.js.uncompressed.js +86 -0
- package/vendor/dojo-1.10.10/dijit/form/DropDownButton.js +38 -0
- package/vendor/dojo-1.10.10/dijit/form/DropDownButton.js.uncompressed.js +102 -0
- package/vendor/dojo-1.10.10/dijit/form/ToggleButton.js +7 -0
- package/vendor/dojo-1.10.10/dijit/form/ToggleButton.js.uncompressed.js +26 -0
- package/vendor/dojo-1.10.10/dijit/form/_ButtonMixin.js +50 -0
- package/vendor/dojo-1.10.10/dijit/form/_ButtonMixin.js.uncompressed.js +116 -0
- package/vendor/dojo-1.10.10/dijit/form/_FormValueMixin.js +26 -0
- package/vendor/dojo-1.10.10/dijit/form/_FormValueMixin.js.uncompressed.js +81 -0
- package/vendor/dojo-1.10.10/dijit/form/_FormValueWidget.js +24 -0
- package/vendor/dojo-1.10.10/dijit/form/_FormValueWidget.js.uncompressed.js +51 -0
- package/vendor/dojo-1.10.10/dijit/form/_FormWidget.js +22 -0
- package/vendor/dojo-1.10.10/dijit/form/_FormWidget.js.uncompressed.js +67 -0
- package/vendor/dojo-1.10.10/dijit/form/_FormWidgetMixin.js +111 -0
- package/vendor/dojo-1.10.10/dijit/form/_FormWidgetMixin.js.uncompressed.js +254 -0
- package/vendor/dojo-1.10.10/dijit/form/_ToggleButtonMixin.js +32 -0
- package/vendor/dojo-1.10.10/dijit/form/_ToggleButtonMixin.js.uncompressed.js +69 -0
- package/vendor/dojo-1.10.10/dijit/hccss.js +9 -0
- package/vendor/dojo-1.10.10/dijit/hccss.js.uncompressed.js +21 -0
- package/vendor/dojo-1.10.10/dijit/layout/AccordionContainer.js +215 -0
- package/vendor/dojo-1.10.10/dijit/layout/AccordionContainer.js.uncompressed.js +550 -0
- package/vendor/dojo-1.10.10/dijit/layout/AccordionPane.js +7 -0
- package/vendor/dojo-1.10.10/dijit/layout/AccordionPane.js.uncompressed.js +25 -0
- package/vendor/dojo-1.10.10/dijit/layout/ContentPane.js +235 -0
- package/vendor/dojo-1.10.10/dijit/layout/ContentPane.js.uncompressed.js +653 -0
- package/vendor/dojo-1.10.10/dijit/layout/StackContainer.js +171 -0
- package/vendor/dojo-1.10.10/dijit/layout/StackContainer.js.uncompressed.js +411 -0
- package/vendor/dojo-1.10.10/dijit/layout/StackController.js +194 -0
- package/vendor/dojo-1.10.10/dijit/layout/StackController.js.uncompressed.js +410 -0
- package/vendor/dojo-1.10.10/dijit/layout/_ContentPaneResizeMixin.js +99 -0
- package/vendor/dojo-1.10.10/dijit/layout/_ContentPaneResizeMixin.js.uncompressed.js +236 -0
- package/vendor/dojo-1.10.10/dijit/layout/_LayoutWidget.js +47 -0
- package/vendor/dojo-1.10.10/dijit/layout/_LayoutWidget.js.uncompressed.js +190 -0
- package/vendor/dojo-1.10.10/dijit/layout/utils.js +77 -0
- package/vendor/dojo-1.10.10/dijit/layout/utils.js.uncompressed.js +151 -0
- package/vendor/dojo-1.10.10/dijit/main.js +4 -0
- package/vendor/dojo-1.10.10/dijit/main.js.uncompressed.js +16 -0
- package/vendor/dojo-1.10.10/dijit/nls/dijit-all_en-us.js +2 -0
- package/vendor/dojo-1.10.10/dijit/nls/dijit-all_en-us.js.uncompressed.js +21 -0
- package/vendor/dojo-1.10.10/dijit/nls/loading.js +2 -0
- package/vendor/dojo-1.10.10/dijit/nls/loading.js.uncompressed.js +47 -0
- package/vendor/dojo-1.10.10/dijit/place.js +142 -0
- package/vendor/dojo-1.10.10/dijit/place.js.uncompressed.js +407 -0
- package/vendor/dojo-1.10.10/dijit/popup.js +162 -0
- package/vendor/dojo-1.10.10/dijit/popup.js.uncompressed.js +441 -0
- package/vendor/dojo-1.10.10/dijit/registry.js +79 -0
- package/vendor/dojo-1.10.10/dijit/registry.js.uncompressed.js +159 -0
- package/vendor/dojo-1.10.10/dijit/selection.js +364 -0
- package/vendor/dojo-1.10.10/dijit/selection.js.uncompressed.js +525 -0
- package/vendor/dojo-1.10.10/dijit/typematic.js +96 -0
- package/vendor/dojo-1.10.10/dijit/typematic.js.uncompressed.js +211 -0
- package/vendor/dojo-1.10.10/dojo/NodeList-manipulate.js +195 -0
- package/vendor/dojo-1.10.10/dojo/NodeList-manipulate.js.uncompressed.js +761 -0
- package/vendor/dojo-1.10.10/dojo/Stateful.js +90 -0
- package/vendor/dojo-1.10.10/dojo/Stateful.js.uncompressed.js +218 -0
- package/vendor/dojo-1.10.10/dojo/_base/url.js +87 -0
- package/vendor/dojo-1.10.10/dojo/_base/url.js.uncompressed.js +109 -0
- package/vendor/dojo-1.10.10/dojo/cache.js +9 -0
- package/vendor/dojo-1.10.10/dojo/cache.js.uncompressed.js +7 -0
- package/vendor/dojo-1.10.10/dojo/colors.js +74 -0
- package/vendor/dojo-1.10.10/dojo/colors.js.uncompressed.js +232 -0
- package/vendor/dojo-1.10.10/dojo/cookie.js +48 -0
- package/vendor/dojo-1.10.10/dojo/cookie.js.uncompressed.js +98 -0
- package/vendor/dojo-1.10.10/dojo/date/stamp.js +82 -0
- package/vendor/dojo-1.10.10/dojo/date/stamp.js.uncompressed.js +144 -0
- package/vendor/dojo-1.10.10/dojo/dojo.js +7 -0
- package/vendor/dojo-1.10.10/dojo/dojo.js.uncompressed.js +18680 -0
- package/vendor/dojo-1.10.10/dojo/fx/Toggler.js +27 -0
- package/vendor/dojo-1.10.10/dojo/fx/Toggler.js.uncompressed.js +101 -0
- package/vendor/dojo-1.10.10/dojo/fx/easing.js +165 -0
- package/vendor/dojo-1.10.10/dojo/fx/easing.js.uncompressed.js +276 -0
- package/vendor/dojo-1.10.10/dojo/fx.js +271 -0
- package/vendor/dojo-1.10.10/dojo/fx.js.uncompressed.js +443 -0
- package/vendor/dojo-1.10.10/dojo/hccss.js +26 -0
- package/vendor/dojo-1.10.10/dojo/hccss.js.uncompressed.js +52 -0
- package/vendor/dojo-1.10.10/dojo/html.js +161 -0
- package/vendor/dojo-1.10.10/dojo/html.js.uncompressed.js +370 -0
- package/vendor/dojo-1.10.10/dojo/io/iframe.js +71 -0
- package/vendor/dojo-1.10.10/dojo/io/iframe.js.uncompressed.js +190 -0
- package/vendor/dojo-1.10.10/dojo/io/script.js +112 -0
- package/vendor/dojo-1.10.10/dojo/io/script.js.uncompressed.js +280 -0
- package/vendor/dojo-1.10.10/dojo/parser.js +437 -0
- package/vendor/dojo-1.10.10/dojo/parser.js.uncompressed.js +915 -0
- package/vendor/dojo-1.10.10/dojo/promise/all.js +59 -0
- package/vendor/dojo-1.10.10/dojo/promise/all.js.uncompressed.js +77 -0
- package/vendor/dojo-1.10.10/dojo/regexp.js +32 -0
- package/vendor/dojo-1.10.10/dojo/regexp.js.uncompressed.js +70 -0
- package/vendor/dojo-1.10.10/dojo/request/iframe.js +291 -0
- package/vendor/dojo-1.10.10/dojo/request/iframe.js.uncompressed.js +438 -0
- package/vendor/dojo-1.10.10/dojo/request/script.js +129 -0
- package/vendor/dojo-1.10.10/dojo/request/script.js.uncompressed.js +237 -0
- package/vendor/dojo-1.10.10/dojo/require.js +11 -0
- package/vendor/dojo-1.10.10/dojo/require.js.uncompressed.js +7 -0
- package/vendor/dojo-1.10.10/dojo/resources/blank.gif +0 -0
- package/vendor/dojo-1.10.10/dojo/string.js +67 -0
- package/vendor/dojo-1.10.10/dojo/string.js.uncompressed.js +181 -0
- package/vendor/dojo-1.10.10/dojo/touch.js +191 -0
- package/vendor/dojo-1.10.10/dojo/touch.js.uncompressed.js +468 -0
- package/vendor/dojo-1.10.10/dojo/uacss.js +36 -0
- package/vendor/dojo-1.10.10/dojo/uacss.js.uncompressed.js +85 -0
- package/vendor/dojo-1.10.10/dojo/window.js +141 -0
- package/vendor/dojo-1.10.10/dojo/window.js.uncompressed.js +241 -0
- package/vendor/dojo-1.10.10/dojox/charting/Chart.js +626 -0
- package/vendor/dojo-1.10.10/dojox/charting/Chart.js.uncompressed.js +1220 -0
- package/vendor/dojo-1.10.10/dojox/charting/Chart2D.js +5 -0
- package/vendor/dojo-1.10.10/dojox/charting/Chart2D.js.uncompressed.js +16 -0
- package/vendor/dojo-1.10.10/dojox/charting/Element.js +247 -0
- package/vendor/dojo-1.10.10/dojox/charting/Element.js.uncompressed.js +402 -0
- package/vendor/dojo-1.10.10/dojox/charting/Series.js +24 -0
- package/vendor/dojo-1.10.10/dojox/charting/Series.js.uncompressed.js +58 -0
- package/vendor/dojo-1.10.10/dojox/charting/SimpleTheme.js +191 -0
- package/vendor/dojo-1.10.10/dojox/charting/SimpleTheme.js.uncompressed.js +577 -0
- package/vendor/dojo-1.10.10/dojox/charting/Theme.js +42 -0
- package/vendor/dojo-1.10.10/dojox/charting/Theme.js.uncompressed.js +120 -0
- package/vendor/dojo-1.10.10/dojox/charting/action2d/Base.js +11 -0
- package/vendor/dojo-1.10.10/dojox/charting/action2d/Base.js.uncompressed.js +36 -0
- package/vendor/dojo-1.10.10/dojox/charting/action2d/Highlight.js +77 -0
- package/vendor/dojo-1.10.10/dojox/charting/action2d/Highlight.js.uncompressed.js +144 -0
- package/vendor/dojo-1.10.10/dojox/charting/action2d/Magnify.js +58 -0
- package/vendor/dojo-1.10.10/dojox/charting/action2d/Magnify.js.uncompressed.js +123 -0
- package/vendor/dojo-1.10.10/dojox/charting/action2d/MoveSlice.js +54 -0
- package/vendor/dojo-1.10.10/dojox/charting/action2d/MoveSlice.js.uncompressed.js +124 -0
- package/vendor/dojo-1.10.10/dojox/charting/action2d/PlotAction.js +28 -0
- package/vendor/dojo-1.10.10/dojox/charting/action2d/PlotAction.js.uncompressed.js +74 -0
- package/vendor/dojo-1.10.10/dojox/charting/action2d/Tooltip.js +116 -0
- package/vendor/dojo-1.10.10/dojox/charting/action2d/Tooltip.js.uncompressed.js +178 -0
- package/vendor/dojo-1.10.10/dojox/charting/axis2d/Base.js +24 -0
- package/vendor/dojo-1.10.10/dojox/charting/axis2d/Base.js.uncompressed.js +83 -0
- package/vendor/dojo-1.10.10/dojox/charting/axis2d/Default.js +557 -0
- package/vendor/dojo-1.10.10/dojox/charting/axis2d/Default.js.uncompressed.js +980 -0
- package/vendor/dojo-1.10.10/dojox/charting/axis2d/Invisible.js +65 -0
- package/vendor/dojo-1.10.10/dojox/charting/axis2d/Invisible.js.uncompressed.js +224 -0
- package/vendor/dojo-1.10.10/dojox/charting/axis2d/common.js +91 -0
- package/vendor/dojo-1.10.10/dojox/charting/axis2d/common.js.uncompressed.js +164 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Areas.js +7 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Areas.js.uncompressed.js +14 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Bars.js +168 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Bars.js.uncompressed.js +311 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Base.js +61 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Base.js.uncompressed.js +161 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Bubble.js +141 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Bubble.js.uncompressed.js +242 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Candlesticks.js +126 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Candlesticks.js.uncompressed.js +243 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/CartesianBase.js +108 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/CartesianBase.js.uncompressed.js +290 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/ClusteredBars.js +13 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/ClusteredBars.js.uncompressed.js +14 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/ClusteredColumns.js +13 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/ClusteredColumns.js.uncompressed.js +14 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Columns.js +153 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Columns.js.uncompressed.js +249 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Default.js +253 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Default.js.uncompressed.js +472 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Grid.js +182 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Grid.js.uncompressed.js +356 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Lines.js +6 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Lines.js.uncompressed.js +12 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Markers.js +6 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Markers.js.uncompressed.js +12 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/MarkersOnly.js +7 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/MarkersOnly.js.uncompressed.js +13 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/OHLC.js +110 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/OHLC.js.uncompressed.js +208 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Pie.js +303 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Pie.js.uncompressed.js +547 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Scatter.js +134 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Scatter.js.uncompressed.js +207 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Spider.js +299 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Spider.js.uncompressed.js +537 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Stacked.js +24 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Stacked.js.uncompressed.js +44 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedAreas.js +7 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedAreas.js.uncompressed.js +14 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedBars.js +22 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedBars.js.uncompressed.js +33 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedColumns.js +20 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedColumns.js.uncompressed.js +31 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedLines.js +6 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedLines.js.uncompressed.js +12 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/_PlotEvents.js +68 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/_PlotEvents.js.uncompressed.js +120 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/common.js +209 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/common.js.uncompressed.js +214 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/commonStacked.js +76 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/commonStacked.js.uncompressed.js +77 -0
- package/vendor/dojo-1.10.10/dojox/charting/scaler/common.js +59 -0
- package/vendor/dojo-1.10.10/dojox/charting/scaler/common.js.uncompressed.js +70 -0
- package/vendor/dojo-1.10.10/dojox/charting/scaler/linear.js +220 -0
- package/vendor/dojo-1.10.10/dojox/charting/scaler/linear.js.uncompressed.js +262 -0
- package/vendor/dojo-1.10.10/dojox/charting/scaler/primitive.js +23 -0
- package/vendor/dojo-1.10.10/dojox/charting/scaler/primitive.js.uncompressed.js +36 -0
- package/vendor/dojo-1.10.10/dojox/charting/themes/Claro.js +39 -0
- package/vendor/dojo-1.10.10/dojox/charting/themes/Claro.js.uncompressed.js +106 -0
- package/vendor/dojo-1.10.10/dojox/charting/themes/Wetland.js +5 -0
- package/vendor/dojo-1.10.10/dojox/charting/themes/Wetland.js.uncompressed.js +12 -0
- package/vendor/dojo-1.10.10/dojox/charting/themes/common.js +4 -0
- package/vendor/dojo-1.10.10/dojox/charting/themes/common.js.uncompressed.js +3 -0
- package/vendor/dojo-1.10.10/dojox/charting/widget/Legend.js +102 -0
- package/vendor/dojo-1.10.10/dojox/charting/widget/Legend.js.uncompressed.js +165 -0
- package/vendor/dojo-1.10.10/dojox/color/Palette.js +163 -0
- package/vendor/dojo-1.10.10/dojox/color/Palette.js.uncompressed.js +460 -0
- package/vendor/dojo-1.10.10/dojox/color/_base.js +174 -0
- package/vendor/dojo-1.10.10/dojox/color/_base.js.uncompressed.js +196 -0
- package/vendor/dojo-1.10.10/dojox/gfx/fx.js +297 -0
- package/vendor/dojo-1.10.10/dojox/gfx/fx.js.uncompressed.js +350 -0
- package/vendor/dojo-1.10.10/dojox/gfx/gradutils.js +63 -0
- package/vendor/dojo-1.10.10/dojox/gfx/gradutils.js.uncompressed.js +91 -0
- package/vendor/dojo-1.10.10/dojox/gfx/matrix.js +170 -0
- package/vendor/dojo-1.10.10/dojox/gfx/matrix.js.uncompressed.js +501 -0
- package/vendor/dojo-1.10.10/dojox/gfx/path.js +319 -0
- package/vendor/dojo-1.10.10/dojox/gfx/path.js.uncompressed.js +478 -0
- package/vendor/dojo-1.10.10/dojox/gfx/shape.js +459 -0
- package/vendor/dojo-1.10.10/dojox/gfx/shape.js.uncompressed.js +1091 -0
- package/vendor/dojo-1.10.10/dojox/gfx/svg.js +662 -0
- package/vendor/dojo-1.10.10/dojox/gfx/svg.js.uncompressed.js +1023 -0
- package/vendor/dojo-1.10.10/dojox/gfx/utils.js +199 -0
- package/vendor/dojo-1.10.10/dojox/gfx/utils.js.uncompressed.js +322 -0
- package/vendor/dojo-1.10.10/dojox/gfx.js +2 -0
- package/vendor/dojo-1.10.10/dojox/gfx.js.uncompressed.js +1136 -0
- package/vendor/dojo-1.10.10/dojox/lang/functional/array.js +151 -0
- package/vendor/dojo-1.10.10/dojox/lang/functional/array.js.uncompressed.js +169 -0
- package/vendor/dojo-1.10.10/dojox/lang/functional/fold.js +93 -0
- package/vendor/dojo-1.10.10/dojox/lang/functional/fold.js.uncompressed.js +125 -0
- package/vendor/dojo-1.10.10/dojox/lang/functional/lambda.js +81 -0
- package/vendor/dojo-1.10.10/dojox/lang/functional/lambda.js.uncompressed.js +132 -0
- package/vendor/dojo-1.10.10/dojox/lang/functional/object.js +54 -0
- package/vendor/dojo-1.10.10/dojox/lang/functional/object.js.uncompressed.js +78 -0
- package/vendor/dojo-1.10.10/dojox/lang/functional/reversed.js +61 -0
- package/vendor/dojo-1.10.10/dojox/lang/functional/reversed.js.uncompressed.js +77 -0
- package/vendor/dojo-1.10.10/dojox/lang/functional/scan.js +87 -0
- package/vendor/dojo-1.10.10/dojox/lang/functional/scan.js.uncompressed.js +107 -0
- package/vendor/dojo-1.10.10/dojox/lang/functional.js +4 -0
- package/vendor/dojo-1.10.10/dojox/lang/functional.js.uncompressed.js +3 -0
- package/vendor/dojo-1.10.10/dojox/lang/utils.js +86 -0
- package/vendor/dojo-1.10.10/dojox/lang/utils.js.uncompressed.js +121 -0
- package/vendor/dojo-1.10.10/dojox/main.js +4 -0
- package/vendor/dojo-1.10.10/dojox/main.js.uncompressed.js +14 -0
- package/vendor/dojo-1.10.10/dojox/storage/LocalStorageProvider.js +112 -0
- package/vendor/dojo-1.10.10/dojox/storage/LocalStorageProvider.js.uncompressed.js +208 -0
- package/vendor/dojo-1.10.10/dojox/storage/Provider.js +62 -0
- package/vendor/dojo-1.10.10/dojox/storage/Provider.js.uncompressed.js +344 -0
- package/vendor/dojo-1.10.10/dojox/storage/manager.js +110 -0
- package/vendor/dojo-1.10.10/dojox/storage/manager.js.uncompressed.js +263 -0
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
define("dojox/charting/plot2d/Candlesticks", ["dojo/_base/lang", "dojo/_base/declare", "dojo/_base/array", "dojo/has", "./CartesianBase", "./_PlotEvents", "./common",
|
|
2
|
+
"dojox/lang/functional", "dojox/lang/functional/reversed", "dojox/lang/utils", "dojox/gfx/fx"],
|
|
3
|
+
function(lang, declare, arr, has, CartesianBase, _PlotEvents, dc, df, dfr, du, fx){
|
|
4
|
+
|
|
5
|
+
var purgeGroup = dfr.lambda("item.purgeGroup()");
|
|
6
|
+
|
|
7
|
+
// Candlesticks are based on the Bars plot type; we expect the following passed
|
|
8
|
+
// as values in a series:
|
|
9
|
+
// { x?, open, close, high, low, mid? }
|
|
10
|
+
// if x is not provided, the array index is used.
|
|
11
|
+
// failing to provide the OHLC values will throw an error.
|
|
12
|
+
return declare("dojox.charting.plot2d.Candlesticks", [CartesianBase, _PlotEvents], {
|
|
13
|
+
// summary:
|
|
14
|
+
// A plot that represents typical candlesticks (financial reporting, primarily).
|
|
15
|
+
// Unlike most charts, the Candlestick expects data points to be represented by
|
|
16
|
+
// an object of the form { x?, open, close, high, low, mid? }, where both
|
|
17
|
+
// x and mid are optional parameters. If x is not provided, the index of the
|
|
18
|
+
// data array is used.
|
|
19
|
+
defaultParams: {
|
|
20
|
+
gap: 2, // gap between columns in pixels
|
|
21
|
+
animate: null // animate bars into place
|
|
22
|
+
},
|
|
23
|
+
optionalParams: {
|
|
24
|
+
minBarSize: 1, // minimal candle width in pixels
|
|
25
|
+
maxBarSize: 1, // maximal candle width in pixels
|
|
26
|
+
// theme component
|
|
27
|
+
stroke: {},
|
|
28
|
+
outline: {},
|
|
29
|
+
shadow: {},
|
|
30
|
+
fill: {},
|
|
31
|
+
font: "",
|
|
32
|
+
fontColor: ""
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
constructor: function(chart, kwArgs){
|
|
36
|
+
// summary:
|
|
37
|
+
// The constructor for a candlestick chart.
|
|
38
|
+
// chart: dojox/charting/Chart
|
|
39
|
+
// The chart this plot belongs to.
|
|
40
|
+
// kwArgs: dojox.charting.plot2d.__BarCtorArgs?
|
|
41
|
+
// An optional keyword arguments object to help define the plot.
|
|
42
|
+
this.opt = lang.clone(this.defaultParams);
|
|
43
|
+
du.updateWithObject(this.opt, kwArgs);
|
|
44
|
+
du.updateWithPattern(this.opt, kwArgs, this.optionalParams);
|
|
45
|
+
this.animate = this.opt.animate;
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
collectStats: function(series){
|
|
49
|
+
// summary:
|
|
50
|
+
// Collect all statistics for drawing this chart. Since the common
|
|
51
|
+
// functionality only assumes x and y, Candlesticks must create it's own
|
|
52
|
+
// stats (since data has no y value, but open/close/high/low instead).
|
|
53
|
+
// series: dojox.charting.Series[]
|
|
54
|
+
// The data series array to be drawn on this plot.
|
|
55
|
+
// returns: Object
|
|
56
|
+
// Returns an object in the form of { hmin, hmax, vmin, vmax }.
|
|
57
|
+
|
|
58
|
+
// we have to roll our own, since we need to use all four passed
|
|
59
|
+
// values to figure out our stats, and common only assumes x and y.
|
|
60
|
+
var stats = lang.delegate(dc.defaultStats);
|
|
61
|
+
for(var i=0; i<series.length; i++){
|
|
62
|
+
var run = series[i];
|
|
63
|
+
if(!run.data.length){ continue; }
|
|
64
|
+
var old_vmin = stats.vmin, old_vmax = stats.vmax;
|
|
65
|
+
if(!("ymin" in run) || !("ymax" in run)){
|
|
66
|
+
arr.forEach(run.data, function(val, idx){
|
|
67
|
+
if(val !== null){
|
|
68
|
+
var x = val.x || idx + 1;
|
|
69
|
+
stats.hmin = Math.min(stats.hmin, x);
|
|
70
|
+
stats.hmax = Math.max(stats.hmax, x);
|
|
71
|
+
stats.vmin = Math.min(stats.vmin, val.open, val.close, val.high, val.low);
|
|
72
|
+
stats.vmax = Math.max(stats.vmax, val.open, val.close, val.high, val.low);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
if("ymin" in run){ stats.vmin = Math.min(old_vmin, run.ymin); }
|
|
77
|
+
if("ymax" in run){ stats.vmax = Math.max(old_vmax, run.ymax); }
|
|
78
|
+
}
|
|
79
|
+
return stats; // Object
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
getSeriesStats: function(){
|
|
83
|
+
// summary:
|
|
84
|
+
// Calculate the min/max on all attached series in both directions.
|
|
85
|
+
// returns: Object
|
|
86
|
+
// {hmin, hmax, vmin, vmax} min/max in both directions.
|
|
87
|
+
var stats = this.collectStats(this.series);
|
|
88
|
+
stats.hmin -= 0.5;
|
|
89
|
+
stats.hmax += 0.5;
|
|
90
|
+
return stats; // Object
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
render: function(dim, offsets){
|
|
94
|
+
// summary:
|
|
95
|
+
// Run the calculations for any axes for this plot.
|
|
96
|
+
// dim: Object
|
|
97
|
+
// An object in the form of { width, height }
|
|
98
|
+
// offsets: Object
|
|
99
|
+
// An object of the form { l, r, t, b}.
|
|
100
|
+
// returns: dojox/charting/plot2d/Candlesticks
|
|
101
|
+
// A reference to this plot for functional chaining.
|
|
102
|
+
if(this.zoom && !this.isDataDirty()){
|
|
103
|
+
return this.performZoom(dim, offsets);
|
|
104
|
+
}
|
|
105
|
+
this.resetEvents();
|
|
106
|
+
this.dirty = this.isDirty();
|
|
107
|
+
var s;
|
|
108
|
+
if(this.dirty){
|
|
109
|
+
arr.forEach(this.series, purgeGroup);
|
|
110
|
+
this._eventSeries = {};
|
|
111
|
+
this.cleanGroup();
|
|
112
|
+
s = this.getGroup();
|
|
113
|
+
df.forEachRev(this.series, function(item){ item.cleanGroup(s); });
|
|
114
|
+
}
|
|
115
|
+
var t = this.chart.theme, f, gap, width,
|
|
116
|
+
ht = this._hScaler.scaler.getTransformerFromModel(this._hScaler),
|
|
117
|
+
vt = this._vScaler.scaler.getTransformerFromModel(this._vScaler),
|
|
118
|
+
events = this.events();
|
|
119
|
+
f = dc.calculateBarSize(this._hScaler.bounds.scale, this.opt);
|
|
120
|
+
gap = f.gap;
|
|
121
|
+
width = f.size;
|
|
122
|
+
for(var i = this.series.length - 1; i >= 0; --i){
|
|
123
|
+
var run = this.series[i];
|
|
124
|
+
if(!this.dirty && !run.dirty){
|
|
125
|
+
t.skip();
|
|
126
|
+
this._reconnectEvents(run.name);
|
|
127
|
+
continue;
|
|
128
|
+
}
|
|
129
|
+
run.cleanGroup();
|
|
130
|
+
var theme = t.next("candlestick", [this.opt, run]),
|
|
131
|
+
eventSeries = new Array(run.data.length);
|
|
132
|
+
|
|
133
|
+
if(run.hidden){
|
|
134
|
+
run.dyn.fill = theme.series.fill;
|
|
135
|
+
run.dyn.stroke = theme.series.stroke;
|
|
136
|
+
continue;
|
|
137
|
+
}
|
|
138
|
+
s = run.group;
|
|
139
|
+
|
|
140
|
+
for(var j = 0; j < run.data.length; ++j){
|
|
141
|
+
var v = run.data[j];
|
|
142
|
+
if(v !== null){
|
|
143
|
+
var finalTheme = t.addMixin(theme, "candlestick", v, true);
|
|
144
|
+
|
|
145
|
+
// calculate the points we need for OHLC
|
|
146
|
+
var x = ht(v.x || (j+0.5)) + offsets.l + gap,
|
|
147
|
+
y = dim.height - offsets.b,
|
|
148
|
+
open = vt(v.open),
|
|
149
|
+
close = vt(v.close),
|
|
150
|
+
high = vt(v.high),
|
|
151
|
+
low = vt(v.low);
|
|
152
|
+
if("mid" in v){
|
|
153
|
+
var mid = vt(v.mid);
|
|
154
|
+
}
|
|
155
|
+
if(low > high){
|
|
156
|
+
var tmp = high;
|
|
157
|
+
high = low;
|
|
158
|
+
low = tmp;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if(width >= 1){
|
|
162
|
+
// draw the line and rect, set up as a group and pass that to the events.
|
|
163
|
+
var doFill = open > close;
|
|
164
|
+
var line = { x1: width/2, x2: width/2, y1: y - high, y2: y - low },
|
|
165
|
+
rect = {
|
|
166
|
+
x: 0, y: y-Math.max(open, close),
|
|
167
|
+
width: width, height: Math.max(doFill ? open-close : close-open, 1)
|
|
168
|
+
};
|
|
169
|
+
var shape = s.createGroup();
|
|
170
|
+
shape.setTransform({dx: x, dy: 0 });
|
|
171
|
+
var inner = shape.createGroup();
|
|
172
|
+
inner.createLine(line).setStroke(finalTheme.series.stroke);
|
|
173
|
+
inner.createRect(rect).setStroke(finalTheme.series.stroke).
|
|
174
|
+
setFill(doFill ? finalTheme.series.fill : "white");
|
|
175
|
+
if("mid" in v){
|
|
176
|
+
// add the mid line.
|
|
177
|
+
inner.createLine({
|
|
178
|
+
x1: (finalTheme.series.stroke.width||1), x2: width - (finalTheme.series.stroke.width || 1),
|
|
179
|
+
y1: y - mid, y2: y - mid
|
|
180
|
+
}).setStroke(doFill ? "white" : finalTheme.series.stroke);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// TODO: double check this.
|
|
184
|
+
run.dyn.fill = finalTheme.series.fill;
|
|
185
|
+
run.dyn.stroke = finalTheme.series.stroke;
|
|
186
|
+
if(events){
|
|
187
|
+
var o = {
|
|
188
|
+
element: "candlestick",
|
|
189
|
+
index: j,
|
|
190
|
+
run: run,
|
|
191
|
+
shape: inner,
|
|
192
|
+
x: x,
|
|
193
|
+
y: y-Math.max(open, close),
|
|
194
|
+
cx: width/2,
|
|
195
|
+
cy: (y-Math.max(open, close)) + (Math.max(doFill ? open-close : close-open, 1)/2),
|
|
196
|
+
width: width,
|
|
197
|
+
height: Math.max(doFill ? open-close : close-open, 1),
|
|
198
|
+
data: v
|
|
199
|
+
};
|
|
200
|
+
this._connectEvents(o);
|
|
201
|
+
eventSeries[j] = o;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
if(this.animate){
|
|
205
|
+
this._animateCandlesticks(shape, y - low, high - low);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
this._eventSeries[run.name] = eventSeries;
|
|
210
|
+
run.dirty = false;
|
|
211
|
+
}
|
|
212
|
+
this.dirty = false;
|
|
213
|
+
// chart mirroring starts
|
|
214
|
+
if(has("dojo-bidi")){
|
|
215
|
+
this._checkOrientation(this.group, dim, offsets);
|
|
216
|
+
}
|
|
217
|
+
// chart mirroring ends
|
|
218
|
+
return this; // dojox/charting/plot2d/Candlesticks
|
|
219
|
+
},
|
|
220
|
+
|
|
221
|
+
tooltipFunc: function(o){
|
|
222
|
+
return '<table cellpadding="1" cellspacing="0" border="0" style="font-size:0.9em;">'
|
|
223
|
+
+ '<tr><td>Open:</td><td align="right"><strong>' + o.data.open + '</strong></td></tr>'
|
|
224
|
+
+ '<tr><td>High:</td><td align="right"><strong>' + o.data.high + '</strong></td></tr>'
|
|
225
|
+
+ '<tr><td>Low:</td><td align="right"><strong>' + o.data.low + '</strong></td></tr>'
|
|
226
|
+
+ '<tr><td>Close:</td><td align="right"><strong>' + o.data.close + '</strong></td></tr>'
|
|
227
|
+
+ (o.data.mid !== undefined ? '<tr><td>Mid:</td><td align="right"><strong>' + o.data.mid + '</strong></td></tr>' : '')
|
|
228
|
+
+ '</table>';
|
|
229
|
+
},
|
|
230
|
+
|
|
231
|
+
_animateCandlesticks: function(shape, voffset, vsize){
|
|
232
|
+
fx.animateTransform(lang.delegate({
|
|
233
|
+
shape: shape,
|
|
234
|
+
duration: 1200,
|
|
235
|
+
transform: [
|
|
236
|
+
{name: "translate", start: [0, voffset - (voffset/vsize)], end: [0, 0]},
|
|
237
|
+
{name: "scale", start: [1, 1/vsize], end: [1, 1]},
|
|
238
|
+
{name: "original"}
|
|
239
|
+
]
|
|
240
|
+
}, this.animate)).play();
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
});
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
//>>built
|
|
2
|
+
define("dojox/charting/plot2d/CartesianBase",["dojo/_base/lang","dojo/_base/declare","dojo/_base/connect","dojo/has","./Base","../scaler/primitive","dojox/gfx","dojox/gfx/fx","dojox/lang/utils"],function(_1,_2,_3,_4,_5,_6,_7,fx,du){
|
|
3
|
+
return _2("dojox.charting.plot2d.CartesianBase",_5,{baseParams:{hAxis:"x",vAxis:"y",labels:false,labelOffset:10,fixed:true,precision:1,labelStyle:"inside",htmlLabels:true,omitLabels:true,labelFunc:null},constructor:function(_8,_9){
|
|
4
|
+
this.axes=["hAxis","vAxis"];
|
|
5
|
+
this.zoom=null;
|
|
6
|
+
this.zoomQueue=[];
|
|
7
|
+
this.lastWindow={vscale:1,hscale:1,xoffset:0,yoffset:0};
|
|
8
|
+
this.hAxis=(_9&&_9.hAxis)||"x";
|
|
9
|
+
this.vAxis=(_9&&_9.vAxis)||"y";
|
|
10
|
+
this.series=[];
|
|
11
|
+
this.opt=_1.clone(this.baseParams);
|
|
12
|
+
du.updateWithObject(this.opt,_9);
|
|
13
|
+
},clear:function(){
|
|
14
|
+
this.inherited(arguments);
|
|
15
|
+
this._hAxis=null;
|
|
16
|
+
this._vAxis=null;
|
|
17
|
+
return this;
|
|
18
|
+
},cleanGroup:function(_a,_b){
|
|
19
|
+
this.inherited(arguments);
|
|
20
|
+
if(!_b&&this.chart._nativeClip){
|
|
21
|
+
var _c=this.chart.offsets,_d=this.chart.dim;
|
|
22
|
+
var w=Math.max(0,_d.width-_c.l-_c.r),h=Math.max(0,_d.height-_c.t-_c.b);
|
|
23
|
+
this.group.setClip({x:_c.l,y:_c.t,width:w,height:h});
|
|
24
|
+
if(!this._clippedGroup){
|
|
25
|
+
this._clippedGroup=this.group.createGroup();
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},purgeGroup:function(){
|
|
29
|
+
this.inherited(arguments);
|
|
30
|
+
this._clippedGroup=null;
|
|
31
|
+
},getGroup:function(){
|
|
32
|
+
return this._clippedGroup||this.group;
|
|
33
|
+
},setAxis:function(_e){
|
|
34
|
+
if(_e){
|
|
35
|
+
this[_e.vertical?"_vAxis":"_hAxis"]=_e;
|
|
36
|
+
}
|
|
37
|
+
return this;
|
|
38
|
+
},toPage:function(_f){
|
|
39
|
+
var ah=this._hAxis,av=this._vAxis,sh=ah.getScaler(),sv=av.getScaler(),th=sh.scaler.getTransformerFromModel(sh),tv=sv.scaler.getTransformerFromModel(sv),c=this.chart.getCoords(),o=this.chart.offsets,dim=this.chart.dim;
|
|
40
|
+
var t=function(_10){
|
|
41
|
+
var r={};
|
|
42
|
+
r.x=th(_10[ah.name])+c.x+o.l;
|
|
43
|
+
r.y=c.y+dim.height-o.b-tv(_10[av.name]);
|
|
44
|
+
return r;
|
|
45
|
+
};
|
|
46
|
+
return _f?t(_f):t;
|
|
47
|
+
},toData:function(_11){
|
|
48
|
+
var ah=this._hAxis,av=this._vAxis,sh=ah.getScaler(),sv=av.getScaler(),th=sh.scaler.getTransformerFromPlot(sh),tv=sv.scaler.getTransformerFromPlot(sv),c=this.chart.getCoords(),o=this.chart.offsets,dim=this.chart.dim;
|
|
49
|
+
var t=function(_12){
|
|
50
|
+
var r={};
|
|
51
|
+
r[ah.name]=th(_12.x-c.x-o.l);
|
|
52
|
+
r[av.name]=tv(c.y+dim.height-_12.y-o.b);
|
|
53
|
+
return r;
|
|
54
|
+
};
|
|
55
|
+
return _11?t(_11):t;
|
|
56
|
+
},isDirty:function(){
|
|
57
|
+
return this.dirty||this._hAxis&&this._hAxis.dirty||this._vAxis&&this._vAxis.dirty;
|
|
58
|
+
},createLabel:function(_13,_14,_15,_16){
|
|
59
|
+
if(this.opt.labels){
|
|
60
|
+
var x,y,_17=this.opt.labelFunc?this.opt.labelFunc.apply(this,[_14,this.opt.fixed,this.opt.precision]):this._getLabel(isNaN(_14.y)?_14:_14.y);
|
|
61
|
+
if(this.opt.labelStyle=="inside"){
|
|
62
|
+
var _18=_7._base._getTextBox(_17,{font:_16.series.font});
|
|
63
|
+
x=_15.x+_15.width/2;
|
|
64
|
+
y=_15.y+_15.height/2+_18.h/4;
|
|
65
|
+
if(_18.w>_15.width||_18.h>_15.height){
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
}else{
|
|
69
|
+
x=_15.x+_15.width/2;
|
|
70
|
+
y=_15.y-this.opt.labelOffset;
|
|
71
|
+
}
|
|
72
|
+
this.renderLabel(_13,x,y,_17,_16,this.opt.labelStyle=="inside");
|
|
73
|
+
}
|
|
74
|
+
},performZoom:function(dim,_19){
|
|
75
|
+
var vs=this._vAxis.scale||1,hs=this._hAxis.scale||1,_1a=dim.height-_19.b,_1b=this._hScaler.bounds,_1c=(_1b.from-_1b.lower)*_1b.scale,_1d=this._vScaler.bounds,_1e=(_1d.from-_1d.lower)*_1d.scale,_1f=vs/this.lastWindow.vscale,_20=hs/this.lastWindow.hscale,_21=(this.lastWindow.xoffset-_1c)/((this.lastWindow.hscale==1)?hs:this.lastWindow.hscale),_22=(_1e-this.lastWindow.yoffset)/((this.lastWindow.vscale==1)?vs:this.lastWindow.vscale),_23=this.getGroup(),_24=fx.animateTransform(_1.delegate({shape:_23,duration:1200,transform:[{name:"translate",start:[0,0],end:[_19.l*(1-_20),_1a*(1-_1f)]},{name:"scale",start:[1,1],end:[_20,_1f]},{name:"original"},{name:"translate",start:[0,0],end:[_21,_22]}]},this.zoom));
|
|
76
|
+
_1.mixin(this.lastWindow,{vscale:vs,hscale:hs,xoffset:_1c,yoffset:_1e});
|
|
77
|
+
this.zoomQueue.push(_24);
|
|
78
|
+
_3.connect(_24,"onEnd",this,function(){
|
|
79
|
+
this.zoom=null;
|
|
80
|
+
this.zoomQueue.shift();
|
|
81
|
+
if(this.zoomQueue.length>0){
|
|
82
|
+
this.zoomQueue[0].play();
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
if(this.zoomQueue.length==1){
|
|
86
|
+
this.zoomQueue[0].play();
|
|
87
|
+
}
|
|
88
|
+
return this;
|
|
89
|
+
},initializeScalers:function(dim,_25){
|
|
90
|
+
if(this._hAxis){
|
|
91
|
+
if(!this._hAxis.initialized()){
|
|
92
|
+
this._hAxis.calculate(_25.hmin,_25.hmax,dim.width);
|
|
93
|
+
}
|
|
94
|
+
this._hScaler=this._hAxis.getScaler();
|
|
95
|
+
}else{
|
|
96
|
+
this._hScaler=_6.buildScaler(_25.hmin,_25.hmax,dim.width);
|
|
97
|
+
}
|
|
98
|
+
if(this._vAxis){
|
|
99
|
+
if(!this._vAxis.initialized()){
|
|
100
|
+
this._vAxis.calculate(_25.vmin,_25.vmax,dim.height);
|
|
101
|
+
}
|
|
102
|
+
this._vScaler=this._vAxis.getScaler();
|
|
103
|
+
}else{
|
|
104
|
+
this._vScaler=_6.buildScaler(_25.vmin,_25.vmax,dim.height);
|
|
105
|
+
}
|
|
106
|
+
return this;
|
|
107
|
+
}});
|
|
108
|
+
});
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
define("dojox/charting/plot2d/CartesianBase", ["dojo/_base/lang", "dojo/_base/declare", "dojo/_base/connect", "dojo/has",
|
|
2
|
+
"./Base", "../scaler/primitive", "dojox/gfx", "dojox/gfx/fx", "dojox/lang/utils"],
|
|
3
|
+
function(lang, declare, hub, has, Base, primitive, gfx, fx, du){
|
|
4
|
+
/*=====
|
|
5
|
+
declare("dojox.charting.plot2d.__CartesianCtorArgs", dojox.charting.plot2d.__PlotCtorArgs, {
|
|
6
|
+
// hAxis: String?
|
|
7
|
+
// The horizontal axis name.
|
|
8
|
+
hAxis: "x",
|
|
9
|
+
|
|
10
|
+
// vAxis: String?
|
|
11
|
+
// The vertical axis name
|
|
12
|
+
vAxis: "y",
|
|
13
|
+
|
|
14
|
+
// labels: Boolean?
|
|
15
|
+
// For plots that support labels, whether or not to draw labels for each data item. Default is false.
|
|
16
|
+
labels: false,
|
|
17
|
+
|
|
18
|
+
// fixed: Boolean?
|
|
19
|
+
// Whether a fixed precision must be applied to data values for display. Default is true.
|
|
20
|
+
fixed: true,
|
|
21
|
+
|
|
22
|
+
// precision: Number?
|
|
23
|
+
// The precision at which to round data values for display. Default is 0.
|
|
24
|
+
precision: 1,
|
|
25
|
+
|
|
26
|
+
// labelOffset: Number?
|
|
27
|
+
// The amount in pixels by which to offset labels when using "outside" labelStyle. Default is 10.
|
|
28
|
+
labelOffset: 10,
|
|
29
|
+
|
|
30
|
+
// labelStyle: String?
|
|
31
|
+
// Options as to where to draw labels. This must be either "inside" or "outside". By default
|
|
32
|
+
// the labels are drawn "inside" the shape representing the data point (a column rectangle for a Columns plot
|
|
33
|
+
// or a marker for a Line plot for instance). When "outside" is used the labels are drawn above the data point shape.
|
|
34
|
+
labelStyle: "inside",
|
|
35
|
+
|
|
36
|
+
// htmlLabels: Boolean?
|
|
37
|
+
// Whether or not to use HTML to render slice labels. Default is true.
|
|
38
|
+
htmlLabels: true,
|
|
39
|
+
|
|
40
|
+
// omitLabels: Boolean?
|
|
41
|
+
// Whether labels that do not fit in an item render are omitted or not. This applies only when labelStyle
|
|
42
|
+
// is "inside". Default is false.
|
|
43
|
+
omitLabels: true,
|
|
44
|
+
|
|
45
|
+
// labelFunc: Function?
|
|
46
|
+
// An optional function to use to compute label text. It takes precedence over
|
|
47
|
+
// the default text when available.
|
|
48
|
+
// | function labelFunc(value, fixed, precision) {}
|
|
49
|
+
// `value` is the data value to display
|
|
50
|
+
// `fixed` is true if fixed precision must be applied.
|
|
51
|
+
// `precision` is the requested precision to be applied.
|
|
52
|
+
labelFunc: null
|
|
53
|
+
});
|
|
54
|
+
=====*/
|
|
55
|
+
|
|
56
|
+
return declare("dojox.charting.plot2d.CartesianBase", Base, {
|
|
57
|
+
baseParams: {
|
|
58
|
+
hAxis: "x",
|
|
59
|
+
vAxis: "y",
|
|
60
|
+
labels: false,
|
|
61
|
+
labelOffset: 10,
|
|
62
|
+
fixed: true,
|
|
63
|
+
precision: 1,
|
|
64
|
+
labelStyle: "inside",
|
|
65
|
+
htmlLabels: true, // use HTML to draw labels
|
|
66
|
+
omitLabels: true,
|
|
67
|
+
labelFunc: null
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
// summary:
|
|
71
|
+
// Base class for cartesian plot types.
|
|
72
|
+
constructor: function(chart, kwArgs){
|
|
73
|
+
// summary:
|
|
74
|
+
// Create a cartesian base plot for cartesian charts.
|
|
75
|
+
// chart: dojox/chart/Chart
|
|
76
|
+
// The chart this plot belongs to.
|
|
77
|
+
// kwArgs: dojox.charting.plot2d.__CartesianCtorArgs?
|
|
78
|
+
// An optional arguments object to help define the plot.
|
|
79
|
+
this.axes = ["hAxis", "vAxis"];
|
|
80
|
+
this.zoom = null;
|
|
81
|
+
this.zoomQueue = []; // zooming action task queue
|
|
82
|
+
this.lastWindow = {vscale: 1, hscale: 1, xoffset: 0, yoffset: 0};
|
|
83
|
+
this.hAxis = (kwArgs && kwArgs.hAxis) || "x";
|
|
84
|
+
this.vAxis = (kwArgs && kwArgs.vAxis) || "y";
|
|
85
|
+
this.series = [];
|
|
86
|
+
this.opt = lang.clone(this.baseParams);
|
|
87
|
+
du.updateWithObject(this.opt, kwArgs);
|
|
88
|
+
},
|
|
89
|
+
clear: function(){
|
|
90
|
+
// summary:
|
|
91
|
+
// Clear out all of the information tied to this plot.
|
|
92
|
+
// returns: dojox/charting/plot2d/CartesianBase
|
|
93
|
+
// A reference to this plot for functional chaining.
|
|
94
|
+
this.inherited(arguments);
|
|
95
|
+
this._hAxis = null;
|
|
96
|
+
this._vAxis = null;
|
|
97
|
+
return this; // dojox/charting/plot2d/CartesianBase
|
|
98
|
+
},
|
|
99
|
+
cleanGroup: function(creator, noClip){
|
|
100
|
+
this.inherited(arguments);
|
|
101
|
+
if(!noClip && this.chart._nativeClip){
|
|
102
|
+
var offsets = this.chart.offsets, dim = this.chart.dim;
|
|
103
|
+
var w = Math.max(0, dim.width - offsets.l - offsets.r),
|
|
104
|
+
h = Math.max(0, dim.height - offsets.t - offsets.b);
|
|
105
|
+
this.group.setClip({ x: offsets.l, y: offsets.t, width: w, height: h });
|
|
106
|
+
if(!this._clippedGroup){
|
|
107
|
+
this._clippedGroup = this.group.createGroup();
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
purgeGroup: function(){
|
|
112
|
+
this.inherited(arguments);
|
|
113
|
+
this._clippedGroup = null;
|
|
114
|
+
},
|
|
115
|
+
getGroup: function(){
|
|
116
|
+
return this._clippedGroup || this.group;
|
|
117
|
+
},
|
|
118
|
+
setAxis: function(axis){
|
|
119
|
+
// summary:
|
|
120
|
+
// Set an axis for this plot.
|
|
121
|
+
// axis: dojox/charting/axis2d/Base
|
|
122
|
+
// The axis to set.
|
|
123
|
+
// returns: dojox/charting/plot2d/CartesianBase
|
|
124
|
+
// A reference to this plot for functional chaining.
|
|
125
|
+
if(axis){
|
|
126
|
+
this[axis.vertical ? "_vAxis" : "_hAxis"] = axis;
|
|
127
|
+
}
|
|
128
|
+
return this; // dojox/charting/plot2d/CartesianBase
|
|
129
|
+
},
|
|
130
|
+
toPage: function(coord){
|
|
131
|
+
// summary:
|
|
132
|
+
// Compute page coordinates from plot axis data coordinates.
|
|
133
|
+
// coord: Object?
|
|
134
|
+
// The coordinates in plot axis data coordinate space. For cartesian charts that is of the following form:
|
|
135
|
+
// `{ hAxisName: 50, vAxisName: 200 }`
|
|
136
|
+
// If not provided return the transform method instead of the result of the transformation.
|
|
137
|
+
// returns: Object
|
|
138
|
+
// The resulting page pixel coordinates. That is of the following form:
|
|
139
|
+
// `{ x: 50, y: 200 }`
|
|
140
|
+
var ah = this._hAxis, av = this._vAxis,
|
|
141
|
+
sh = ah.getScaler(), sv = av.getScaler(),
|
|
142
|
+
th = sh.scaler.getTransformerFromModel(sh),
|
|
143
|
+
tv = sv.scaler.getTransformerFromModel(sv),
|
|
144
|
+
c = this.chart.getCoords(),
|
|
145
|
+
o = this.chart.offsets, dim = this.chart.dim;
|
|
146
|
+
var t = function(coord){
|
|
147
|
+
var r = {};
|
|
148
|
+
r.x = th(coord[ah.name]) + c.x + o.l;
|
|
149
|
+
r.y = c.y + dim.height - o.b - tv(coord[av.name]);
|
|
150
|
+
return r;
|
|
151
|
+
};
|
|
152
|
+
// if no coord return the function so that we can capture the current transforms
|
|
153
|
+
// and reuse them later on
|
|
154
|
+
return coord?t(coord):t; // Object
|
|
155
|
+
},
|
|
156
|
+
toData: function(coord){
|
|
157
|
+
// summary:
|
|
158
|
+
// Compute plot axis data coordinates from page coordinates.
|
|
159
|
+
// coord: Object
|
|
160
|
+
// The pixel coordinate in page coordinate space. That is of the following form:
|
|
161
|
+
// `{ x: 50, y: 200 }`
|
|
162
|
+
// If not provided return the tranform method instead of the result of the transformation.
|
|
163
|
+
// returns: Object
|
|
164
|
+
// The resulting plot axis data coordinates. For cartesian charts that is of the following form:
|
|
165
|
+
// `{ hAxisName: 50, vAxisName: 200 }`
|
|
166
|
+
var ah = this._hAxis, av = this._vAxis,
|
|
167
|
+
sh = ah.getScaler(), sv = av.getScaler(),
|
|
168
|
+
th = sh.scaler.getTransformerFromPlot(sh),
|
|
169
|
+
tv = sv.scaler.getTransformerFromPlot(sv),
|
|
170
|
+
c = this.chart.getCoords(),
|
|
171
|
+
o = this.chart.offsets, dim = this.chart.dim;
|
|
172
|
+
var t = function(coord){
|
|
173
|
+
var r = {};
|
|
174
|
+
r[ah.name] = th(coord.x - c.x - o.l);
|
|
175
|
+
r[av.name] = tv(c.y + dim.height - coord.y - o.b);
|
|
176
|
+
return r;
|
|
177
|
+
};
|
|
178
|
+
// if no coord return the function so that we can capture the current transforms
|
|
179
|
+
// and reuse them later on
|
|
180
|
+
return coord?t(coord):t; // Object
|
|
181
|
+
},
|
|
182
|
+
isDirty: function(){
|
|
183
|
+
// summary:
|
|
184
|
+
// Returns whether or not this plot needs to be rendered.
|
|
185
|
+
// returns: Boolean
|
|
186
|
+
// The state of the plot.
|
|
187
|
+
return this.dirty || this._hAxis && this._hAxis.dirty || this._vAxis && this._vAxis.dirty; // Boolean
|
|
188
|
+
},
|
|
189
|
+
createLabel: function(group, value, bbox, theme){
|
|
190
|
+
if(this.opt.labels){
|
|
191
|
+
var x, y, label = this.opt.labelFunc?this.opt.labelFunc.apply(this, [value, this.opt.fixed, this.opt.precision]):
|
|
192
|
+
this._getLabel(isNaN(value.y)?value:value.y);
|
|
193
|
+
if(this.opt.labelStyle == "inside"){
|
|
194
|
+
var lbox = gfx._base._getTextBox(label, { font: theme.series.font } );
|
|
195
|
+
x = bbox.x + bbox.width / 2;
|
|
196
|
+
y = bbox.y + bbox.height / 2 + lbox.h / 4;
|
|
197
|
+
if(lbox.w > bbox.width || lbox.h > bbox.height){
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
}else{
|
|
202
|
+
x = bbox.x + bbox.width / 2;
|
|
203
|
+
y = bbox.y - this.opt.labelOffset;
|
|
204
|
+
}
|
|
205
|
+
this.renderLabel(group, x, y, label, theme, this.opt.labelStyle == "inside");
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
performZoom: function(dim, offsets){
|
|
209
|
+
// summary:
|
|
210
|
+
// Create/alter any zooming windows on this plot.
|
|
211
|
+
// dim: Object
|
|
212
|
+
// An object of the form { width, height }.
|
|
213
|
+
// offsets: Object
|
|
214
|
+
// An object of the form { l, r, t, b }.
|
|
215
|
+
// returns: dojox/charting/plot2d/CartesianBase
|
|
216
|
+
// A reference to this plot for functional chaining.
|
|
217
|
+
|
|
218
|
+
// get current zooming various
|
|
219
|
+
var vs = this._vAxis.scale || 1,
|
|
220
|
+
hs = this._hAxis.scale || 1,
|
|
221
|
+
vOffset = dim.height - offsets.b,
|
|
222
|
+
hBounds = this._hScaler.bounds,
|
|
223
|
+
xOffset = (hBounds.from - hBounds.lower) * hBounds.scale,
|
|
224
|
+
vBounds = this._vScaler.bounds,
|
|
225
|
+
yOffset = (vBounds.from - vBounds.lower) * vBounds.scale,
|
|
226
|
+
// get incremental zooming various
|
|
227
|
+
rVScale = vs / this.lastWindow.vscale,
|
|
228
|
+
rHScale = hs / this.lastWindow.hscale,
|
|
229
|
+
rXOffset = (this.lastWindow.xoffset - xOffset)/
|
|
230
|
+
((this.lastWindow.hscale == 1)? hs : this.lastWindow.hscale),
|
|
231
|
+
rYOffset = (yOffset - this.lastWindow.yoffset)/
|
|
232
|
+
((this.lastWindow.vscale == 1)? vs : this.lastWindow.vscale),
|
|
233
|
+
|
|
234
|
+
shape = this.getGroup(),
|
|
235
|
+
anim = fx.animateTransform(lang.delegate({
|
|
236
|
+
shape: shape,
|
|
237
|
+
duration: 1200,
|
|
238
|
+
transform:[
|
|
239
|
+
{name:"translate", start:[0, 0], end: [offsets.l * (1 - rHScale), vOffset * (1 - rVScale)]},
|
|
240
|
+
{name:"scale", start:[1, 1], end: [rHScale, rVScale]},
|
|
241
|
+
{name:"original"},
|
|
242
|
+
{name:"translate", start: [0, 0], end: [rXOffset, rYOffset]}
|
|
243
|
+
]}, this.zoom));
|
|
244
|
+
|
|
245
|
+
lang.mixin(this.lastWindow, {vscale: vs, hscale: hs, xoffset: xOffset, yoffset: yOffset});
|
|
246
|
+
//add anim to zooming action queue,
|
|
247
|
+
//in order to avoid several zooming action happened at the same time
|
|
248
|
+
this.zoomQueue.push(anim);
|
|
249
|
+
//perform each anim one by one in zoomQueue
|
|
250
|
+
hub.connect(anim, "onEnd", this, function(){
|
|
251
|
+
this.zoom = null;
|
|
252
|
+
this.zoomQueue.shift();
|
|
253
|
+
if(this.zoomQueue.length > 0){
|
|
254
|
+
this.zoomQueue[0].play();
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
if(this.zoomQueue.length == 1){
|
|
258
|
+
this.zoomQueue[0].play();
|
|
259
|
+
}
|
|
260
|
+
return this; // dojox/charting/plot2d/CartesianBase
|
|
261
|
+
},
|
|
262
|
+
initializeScalers: function(dim, stats){
|
|
263
|
+
// summary:
|
|
264
|
+
// Initializes scalers using attached axes.
|
|
265
|
+
// dim: Object
|
|
266
|
+
// Size of a plot area in pixels as {width, height}.
|
|
267
|
+
// stats: Object
|
|
268
|
+
// Min/max of data in both directions as {hmin, hmax, vmin, vmax}.
|
|
269
|
+
// returns: dojox/charting/plot2d/CartesianBase
|
|
270
|
+
// A reference to this plot for functional chaining.
|
|
271
|
+
if(this._hAxis){
|
|
272
|
+
if(!this._hAxis.initialized()){
|
|
273
|
+
this._hAxis.calculate(stats.hmin, stats.hmax, dim.width);
|
|
274
|
+
}
|
|
275
|
+
this._hScaler = this._hAxis.getScaler();
|
|
276
|
+
}else{
|
|
277
|
+
this._hScaler = primitive.buildScaler(stats.hmin, stats.hmax, dim.width);
|
|
278
|
+
}
|
|
279
|
+
if(this._vAxis){
|
|
280
|
+
if(!this._vAxis.initialized()){
|
|
281
|
+
this._vAxis.calculate(stats.vmin, stats.vmax, dim.height);
|
|
282
|
+
}
|
|
283
|
+
this._vScaler = this._vAxis.getScaler();
|
|
284
|
+
}else{
|
|
285
|
+
this._vScaler = primitive.buildScaler(stats.vmin, stats.vmax, dim.height);
|
|
286
|
+
}
|
|
287
|
+
return this; // dojox/charting/plot2d/CartesianBase
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//>>built
|
|
2
|
+
define("dojox/charting/plot2d/ClusteredBars",["dojo/_base/declare","dojo/_base/array","./Bars","./common"],function(_1,_2,_3,dc){
|
|
3
|
+
return _1("dojox.charting.plot2d.ClusteredBars",_3,{getBarProperties:function(){
|
|
4
|
+
var _4=this.series.length;
|
|
5
|
+
_2.forEach(this.series,function(_5){
|
|
6
|
+
if(_5.hidden){
|
|
7
|
+
_4--;
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
var f=dc.calculateBarSize(this._vScaler.bounds.scale,this.opt,_4);
|
|
11
|
+
return {gap:f.gap,height:f.size,thickness:f.size};
|
|
12
|
+
}});
|
|
13
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
define("dojox/charting/plot2d/ClusteredBars", ["dojo/_base/declare", "dojo/_base/array", "./Bars", "./common"],
|
|
2
|
+
function(declare, array, Bars, dc){
|
|
3
|
+
|
|
4
|
+
return declare("dojox.charting.plot2d.ClusteredBars", Bars, {
|
|
5
|
+
// summary:
|
|
6
|
+
// A plot representing grouped or clustered bars (horizontal bars)
|
|
7
|
+
getBarProperties: function(){
|
|
8
|
+
var length = this.series.length;
|
|
9
|
+
array.forEach(this.series, function(serie){if(serie.hidden){length--;}});
|
|
10
|
+
var f = dc.calculateBarSize(this._vScaler.bounds.scale, this.opt, length);
|
|
11
|
+
return {gap: f.gap, height: f.size, thickness: f.size};
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//>>built
|
|
2
|
+
define("dojox/charting/plot2d/ClusteredColumns",["dojo/_base/declare","dojo/_base/array","./Columns","./common"],function(_1,_2,_3,dc){
|
|
3
|
+
return _1("dojox.charting.plot2d.ClusteredColumns",_3,{getBarProperties:function(){
|
|
4
|
+
var _4=this.series.length;
|
|
5
|
+
_2.forEach(this.series,function(_5){
|
|
6
|
+
if(_5.hidden){
|
|
7
|
+
_4--;
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
var f=dc.calculateBarSize(this._hScaler.bounds.scale,this.opt,_4);
|
|
11
|
+
return {gap:f.gap,width:f.size,thickness:f.size,clusterSize:_4};
|
|
12
|
+
}});
|
|
13
|
+
});
|