activeadmin_ueditor 0.2.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.
- checksums.yaml +7 -0
- data/.gitignore +56 -0
- data/Gemfile +3 -0
- data/LICENSE +21 -0
- data/LICENSE.txt +20 -0
- data/README.md +61 -0
- data/Rakefile +3 -0
- data/activeadmin_ueditor.gemspec +20 -0
- data/app/assets/javascripts/.DS_Store +0 -0
- data/app/assets/javascripts/activeadmin/.DS_Store +0 -0
- data/app/assets/javascripts/activeadmin/ueditor/.DS_Store +0 -0
- data/app/assets/javascripts/activeadmin/ueditor/ueditor.all.js +29568 -0
- data/app/assets/javascripts/activeadmin/ueditor/ueditor.all.min.js +18 -0
- data/app/assets/javascripts/activeadmin/ueditor/ueditor.config.js +414 -0
- data/app/assets/javascripts/activeadmin/ueditor_input.js +14 -0
- data/lib/activeadmin/ueditor/engine.rb +11 -0
- data/lib/activeadmin/ueditor/version.rb +7 -0
- data/lib/activeadmin/ueditor.rb +3 -0
- data/lib/activeadmin_ueditor.rb +5 -0
- data/lib/formtastic/inputs/ueditor_input.rb +16 -0
- data/public/assets/ueditor/dialogs/anchor/anchor.html +40 -0
- data/public/assets/ueditor/dialogs/attachment/attachment.css +681 -0
- data/public/assets/ueditor/dialogs/attachment/attachment.html +60 -0
- data/public/assets/ueditor/dialogs/attachment/attachment.js +754 -0
- data/public/assets/ueditor/dialogs/attachment/fileTypeImages/icon_chm.gif +0 -0
- data/public/assets/ueditor/dialogs/attachment/fileTypeImages/icon_default.png +0 -0
- data/public/assets/ueditor/dialogs/attachment/fileTypeImages/icon_doc.gif +0 -0
- data/public/assets/ueditor/dialogs/attachment/fileTypeImages/icon_exe.gif +0 -0
- data/public/assets/ueditor/dialogs/attachment/fileTypeImages/icon_jpg.gif +0 -0
- data/public/assets/ueditor/dialogs/attachment/fileTypeImages/icon_mp3.gif +0 -0
- data/public/assets/ueditor/dialogs/attachment/fileTypeImages/icon_mv.gif +0 -0
- data/public/assets/ueditor/dialogs/attachment/fileTypeImages/icon_pdf.gif +0 -0
- data/public/assets/ueditor/dialogs/attachment/fileTypeImages/icon_ppt.gif +0 -0
- data/public/assets/ueditor/dialogs/attachment/fileTypeImages/icon_psd.gif +0 -0
- data/public/assets/ueditor/dialogs/attachment/fileTypeImages/icon_rar.gif +0 -0
- data/public/assets/ueditor/dialogs/attachment/fileTypeImages/icon_txt.gif +0 -0
- data/public/assets/ueditor/dialogs/attachment/fileTypeImages/icon_xls.gif +0 -0
- data/public/assets/ueditor/dialogs/attachment/images/alignicon.gif +0 -0
- data/public/assets/ueditor/dialogs/attachment/images/alignicon.png +0 -0
- data/public/assets/ueditor/dialogs/attachment/images/bg.png +0 -0
- data/public/assets/ueditor/dialogs/attachment/images/file-icons.gif +0 -0
- data/public/assets/ueditor/dialogs/attachment/images/file-icons.png +0 -0
- data/public/assets/ueditor/dialogs/attachment/images/icons.gif +0 -0
- data/public/assets/ueditor/dialogs/attachment/images/icons.png +0 -0
- data/public/assets/ueditor/dialogs/attachment/images/image.png +0 -0
- data/public/assets/ueditor/dialogs/attachment/images/progress.png +0 -0
- data/public/assets/ueditor/dialogs/attachment/images/success.gif +0 -0
- data/public/assets/ueditor/dialogs/attachment/images/success.png +0 -0
- data/public/assets/ueditor/dialogs/background/background.css +94 -0
- data/public/assets/ueditor/dialogs/background/background.html +56 -0
- data/public/assets/ueditor/dialogs/background/background.js +376 -0
- data/public/assets/ueditor/dialogs/background/images/bg.png +0 -0
- data/public/assets/ueditor/dialogs/background/images/success.png +0 -0
- data/public/assets/ueditor/dialogs/charts/chart.config.js +65 -0
- data/public/assets/ueditor/dialogs/charts/charts.css +165 -0
- data/public/assets/ueditor/dialogs/charts/charts.html +89 -0
- data/public/assets/ueditor/dialogs/charts/charts.js +519 -0
- data/public/assets/ueditor/dialogs/charts/images/charts0.png +0 -0
- data/public/assets/ueditor/dialogs/charts/images/charts1.png +0 -0
- data/public/assets/ueditor/dialogs/charts/images/charts2.png +0 -0
- data/public/assets/ueditor/dialogs/charts/images/charts3.png +0 -0
- data/public/assets/ueditor/dialogs/charts/images/charts4.png +0 -0
- data/public/assets/ueditor/dialogs/charts/images/charts5.png +0 -0
- data/public/assets/ueditor/dialogs/emotion/emotion.css +43 -0
- data/public/assets/ueditor/dialogs/emotion/emotion.html +54 -0
- data/public/assets/ueditor/dialogs/emotion/emotion.js +186 -0
- data/public/assets/ueditor/dialogs/emotion/images/0.gif +0 -0
- data/public/assets/ueditor/dialogs/emotion/images/bface.gif +0 -0
- data/public/assets/ueditor/dialogs/emotion/images/cface.gif +0 -0
- data/public/assets/ueditor/dialogs/emotion/images/fface.gif +0 -0
- data/public/assets/ueditor/dialogs/emotion/images/jxface2.gif +0 -0
- data/public/assets/ueditor/dialogs/emotion/images/neweditor-tab-bg.png +0 -0
- data/public/assets/ueditor/dialogs/emotion/images/tface.gif +0 -0
- data/public/assets/ueditor/dialogs/emotion/images/wface.gif +0 -0
- data/public/assets/ueditor/dialogs/emotion/images/yface.gif +0 -0
- data/public/assets/ueditor/dialogs/gmap/gmap.html +89 -0
- data/public/assets/ueditor/dialogs/help/help.css +7 -0
- data/public/assets/ueditor/dialogs/help/help.html +82 -0
- data/public/assets/ueditor/dialogs/help/help.js +56 -0
- data/public/assets/ueditor/dialogs/image/image.css +894 -0
- data/public/assets/ueditor/dialogs/image/image.html +120 -0
- data/public/assets/ueditor/dialogs/image/image.js +1142 -0
- data/public/assets/ueditor/dialogs/image/images/alignicon.jpg +0 -0
- data/public/assets/ueditor/dialogs/image/images/bg.png +0 -0
- data/public/assets/ueditor/dialogs/image/images/icons.gif +0 -0
- data/public/assets/ueditor/dialogs/image/images/icons.png +0 -0
- data/public/assets/ueditor/dialogs/image/images/image.png +0 -0
- data/public/assets/ueditor/dialogs/image/images/progress.png +0 -0
- data/public/assets/ueditor/dialogs/image/images/success.gif +0 -0
- data/public/assets/ueditor/dialogs/image/images/success.png +0 -0
- data/public/assets/ueditor/dialogs/insertframe/insertframe.html +98 -0
- data/public/assets/ueditor/dialogs/internal.js +81 -0
- data/public/assets/ueditor/dialogs/link/link.html +126 -0
- data/public/assets/ueditor/dialogs/map/map.html +135 -0
- data/public/assets/ueditor/dialogs/map/show.html +118 -0
- data/public/assets/ueditor/dialogs/music/music.css +30 -0
- data/public/assets/ueditor/dialogs/music/music.html +32 -0
- data/public/assets/ueditor/dialogs/music/music.js +192 -0
- data/public/assets/ueditor/dialogs/preview/preview.html +40 -0
- data/public/assets/ueditor/dialogs/scrawl/images/addimg.png +0 -0
- data/public/assets/ueditor/dialogs/scrawl/images/brush.png +0 -0
- data/public/assets/ueditor/dialogs/scrawl/images/delimg.png +0 -0
- data/public/assets/ueditor/dialogs/scrawl/images/delimgH.png +0 -0
- data/public/assets/ueditor/dialogs/scrawl/images/empty.png +0 -0
- data/public/assets/ueditor/dialogs/scrawl/images/emptyH.png +0 -0
- data/public/assets/ueditor/dialogs/scrawl/images/eraser.png +0 -0
- data/public/assets/ueditor/dialogs/scrawl/images/redo.png +0 -0
- data/public/assets/ueditor/dialogs/scrawl/images/redoH.png +0 -0
- data/public/assets/ueditor/dialogs/scrawl/images/scale.png +0 -0
- data/public/assets/ueditor/dialogs/scrawl/images/scaleH.png +0 -0
- data/public/assets/ueditor/dialogs/scrawl/images/size.png +0 -0
- data/public/assets/ueditor/dialogs/scrawl/images/undo.png +0 -0
- data/public/assets/ueditor/dialogs/scrawl/images/undoH.png +0 -0
- data/public/assets/ueditor/dialogs/scrawl/scrawl.css +72 -0
- data/public/assets/ueditor/dialogs/scrawl/scrawl.html +95 -0
- data/public/assets/ueditor/dialogs/scrawl/scrawl.js +671 -0
- data/public/assets/ueditor/dialogs/searchreplace/searchreplace.html +102 -0
- data/public/assets/ueditor/dialogs/searchreplace/searchreplace.js +164 -0
- data/public/assets/ueditor/dialogs/snapscreen/snapscreen.html +58 -0
- data/public/assets/ueditor/dialogs/spechars/spechars.html +21 -0
- data/public/assets/ueditor/dialogs/spechars/spechars.js +57 -0
- data/public/assets/ueditor/dialogs/table/dragicon.png +0 -0
- data/public/assets/ueditor/dialogs/table/edittable.css +84 -0
- data/public/assets/ueditor/dialogs/table/edittable.html +64 -0
- data/public/assets/ueditor/dialogs/table/edittable.js +237 -0
- data/public/assets/ueditor/dialogs/table/edittd.html +61 -0
- data/public/assets/ueditor/dialogs/table/edittip.html +33 -0
- data/public/assets/ueditor/dialogs/template/config.js +42 -0
- data/public/assets/ueditor/dialogs/template/images/bg.gif +0 -0
- data/public/assets/ueditor/dialogs/template/images/pre0.png +0 -0
- data/public/assets/ueditor/dialogs/template/images/pre1.png +0 -0
- data/public/assets/ueditor/dialogs/template/images/pre2.png +0 -0
- data/public/assets/ueditor/dialogs/template/images/pre3.png +0 -0
- data/public/assets/ueditor/dialogs/template/images/pre4.png +0 -0
- data/public/assets/ueditor/dialogs/template/template.css +18 -0
- data/public/assets/ueditor/dialogs/template/template.html +26 -0
- data/public/assets/ueditor/dialogs/template/template.js +53 -0
- data/public/assets/ueditor/dialogs/video/images/bg.png +0 -0
- data/public/assets/ueditor/dialogs/video/images/center_focus.jpg +0 -0
- data/public/assets/ueditor/dialogs/video/images/file-icons.gif +0 -0
- data/public/assets/ueditor/dialogs/video/images/file-icons.png +0 -0
- data/public/assets/ueditor/dialogs/video/images/icons.gif +0 -0
- data/public/assets/ueditor/dialogs/video/images/icons.png +0 -0
- data/public/assets/ueditor/dialogs/video/images/image.png +0 -0
- data/public/assets/ueditor/dialogs/video/images/left_focus.jpg +0 -0
- data/public/assets/ueditor/dialogs/video/images/none_focus.jpg +0 -0
- data/public/assets/ueditor/dialogs/video/images/progress.png +0 -0
- data/public/assets/ueditor/dialogs/video/images/right_focus.jpg +0 -0
- data/public/assets/ueditor/dialogs/video/images/success.gif +0 -0
- data/public/assets/ueditor/dialogs/video/images/success.png +0 -0
- data/public/assets/ueditor/dialogs/video/video.css +635 -0
- data/public/assets/ueditor/dialogs/video/video.html +86 -0
- data/public/assets/ueditor/dialogs/video/video.js +791 -0
- data/public/assets/ueditor/dialogs/webapp/webapp.html +53 -0
- data/public/assets/ueditor/dialogs/wordimage/fClipboard_ueditor.swf +0 -0
- data/public/assets/ueditor/dialogs/wordimage/imageUploader.swf +0 -0
- data/public/assets/ueditor/dialogs/wordimage/tangram.js +1495 -0
- data/public/assets/ueditor/dialogs/wordimage/wordimage.html +111 -0
- data/public/assets/ueditor/dialogs/wordimage/wordimage.js +157 -0
- data/public/assets/ueditor/lang/en/en.js +684 -0
- data/public/assets/ueditor/lang/en/images/addimage.png +0 -0
- data/public/assets/ueditor/lang/en/images/alldeletebtnhoverskin.png +0 -0
- data/public/assets/ueditor/lang/en/images/alldeletebtnupskin.png +0 -0
- data/public/assets/ueditor/lang/en/images/background.png +0 -0
- data/public/assets/ueditor/lang/en/images/button.png +0 -0
- data/public/assets/ueditor/lang/en/images/copy.png +0 -0
- data/public/assets/ueditor/lang/en/images/deletedisable.png +0 -0
- data/public/assets/ueditor/lang/en/images/deleteenable.png +0 -0
- data/public/assets/ueditor/lang/en/images/listbackground.png +0 -0
- data/public/assets/ueditor/lang/en/images/localimage.png +0 -0
- data/public/assets/ueditor/lang/en/images/music.png +0 -0
- data/public/assets/ueditor/lang/en/images/rotateleftdisable.png +0 -0
- data/public/assets/ueditor/lang/en/images/rotateleftenable.png +0 -0
- data/public/assets/ueditor/lang/en/images/rotaterightdisable.png +0 -0
- data/public/assets/ueditor/lang/en/images/rotaterightenable.png +0 -0
- data/public/assets/ueditor/lang/en/images/upload.png +0 -0
- data/public/assets/ueditor/lang/zh-cn/images/copy.png +0 -0
- data/public/assets/ueditor/lang/zh-cn/images/localimage.png +0 -0
- data/public/assets/ueditor/lang/zh-cn/images/music.png +0 -0
- data/public/assets/ueditor/lang/zh-cn/images/upload.png +0 -0
- data/public/assets/ueditor/lang/zh-cn/zh-cn.js +669 -0
- data/public/assets/ueditor/themes/default/css/ueditor.css +1903 -0
- data/public/assets/ueditor/themes/default/css/ueditor.min.css +8 -0
- data/public/assets/ueditor/themes/default/dialogbase.css +100 -0
- data/public/assets/ueditor/themes/default/images/anchor.gif +0 -0
- data/public/assets/ueditor/themes/default/images/arrow.png +0 -0
- data/public/assets/ueditor/themes/default/images/arrow_down.png +0 -0
- data/public/assets/ueditor/themes/default/images/arrow_up.png +0 -0
- data/public/assets/ueditor/themes/default/images/button-bg.gif +0 -0
- data/public/assets/ueditor/themes/default/images/cancelbutton.gif +0 -0
- data/public/assets/ueditor/themes/default/images/charts.png +0 -0
- data/public/assets/ueditor/themes/default/images/cursor_h.gif +0 -0
- data/public/assets/ueditor/themes/default/images/cursor_h.png +0 -0
- data/public/assets/ueditor/themes/default/images/cursor_v.gif +0 -0
- data/public/assets/ueditor/themes/default/images/cursor_v.png +0 -0
- data/public/assets/ueditor/themes/default/images/dialog-title-bg.png +0 -0
- data/public/assets/ueditor/themes/default/images/filescan.png +0 -0
- data/public/assets/ueditor/themes/default/images/highlighted.gif +0 -0
- data/public/assets/ueditor/themes/default/images/icons-all.gif +0 -0
- data/public/assets/ueditor/themes/default/images/icons.gif +0 -0
- data/public/assets/ueditor/themes/default/images/icons.png +0 -0
- data/public/assets/ueditor/themes/default/images/loaderror.png +0 -0
- data/public/assets/ueditor/themes/default/images/loading.gif +0 -0
- data/public/assets/ueditor/themes/default/images/lock.gif +0 -0
- data/public/assets/ueditor/themes/default/images/neweditor-tab-bg.png +0 -0
- data/public/assets/ueditor/themes/default/images/pagebreak.gif +0 -0
- data/public/assets/ueditor/themes/default/images/scale.png +0 -0
- data/public/assets/ueditor/themes/default/images/sortable.png +0 -0
- data/public/assets/ueditor/themes/default/images/spacer.gif +0 -0
- data/public/assets/ueditor/themes/default/images/sparator_v.png +0 -0
- data/public/assets/ueditor/themes/default/images/table-cell-align.png +0 -0
- data/public/assets/ueditor/themes/default/images/tangram-colorpicker.png +0 -0
- data/public/assets/ueditor/themes/default/images/toolbar_bg.png +0 -0
- data/public/assets/ueditor/themes/default/images/unhighlighted.gif +0 -0
- data/public/assets/ueditor/themes/default/images/upload.png +0 -0
- data/public/assets/ueditor/themes/default/images/videologo.gif +0 -0
- data/public/assets/ueditor/themes/default/images/word.gif +0 -0
- data/public/assets/ueditor/themes/default/images/wordpaste.png +0 -0
- data/public/assets/ueditor/themes/iframe.css +1 -0
- data/public/assets/ueditor/third-party/SyntaxHighlighter/shCore.js +3655 -0
- data/public/assets/ueditor/third-party/SyntaxHighlighter/shCoreDefault.css +1 -0
- data/public/assets/ueditor/third-party/codemirror/codemirror.css +104 -0
- data/public/assets/ueditor/third-party/codemirror/codemirror.js +3581 -0
- data/public/assets/ueditor/third-party/highcharts/adapters/mootools-adapter.js +13 -0
- data/public/assets/ueditor/third-party/highcharts/adapters/mootools-adapter.src.js +313 -0
- data/public/assets/ueditor/third-party/highcharts/adapters/prototype-adapter.js +15 -0
- data/public/assets/ueditor/third-party/highcharts/adapters/prototype-adapter.src.js +316 -0
- data/public/assets/ueditor/third-party/highcharts/adapters/standalone-framework.js +17 -0
- data/public/assets/ueditor/third-party/highcharts/adapters/standalone-framework.src.js +583 -0
- data/public/assets/ueditor/third-party/highcharts/highcharts-more.js +50 -0
- data/public/assets/ueditor/third-party/highcharts/highcharts-more.src.js +2430 -0
- data/public/assets/ueditor/third-party/highcharts/highcharts.js +283 -0
- data/public/assets/ueditor/third-party/highcharts/highcharts.src.js +16974 -0
- data/public/assets/ueditor/third-party/highcharts/modules/annotations.js +7 -0
- data/public/assets/ueditor/third-party/highcharts/modules/annotations.src.js +401 -0
- data/public/assets/ueditor/third-party/highcharts/modules/canvas-tools.js +133 -0
- data/public/assets/ueditor/third-party/highcharts/modules/canvas-tools.src.js +3113 -0
- data/public/assets/ueditor/third-party/highcharts/modules/data.js +17 -0
- data/public/assets/ueditor/third-party/highcharts/modules/data.src.js +582 -0
- data/public/assets/ueditor/third-party/highcharts/modules/drilldown.js +11 -0
- data/public/assets/ueditor/third-party/highcharts/modules/drilldown.src.js +447 -0
- data/public/assets/ueditor/third-party/highcharts/modules/exporting.js +22 -0
- data/public/assets/ueditor/third-party/highcharts/modules/exporting.src.js +709 -0
- data/public/assets/ueditor/third-party/highcharts/modules/funnel.js +12 -0
- data/public/assets/ueditor/third-party/highcharts/modules/funnel.src.js +289 -0
- data/public/assets/ueditor/third-party/highcharts/modules/heatmap.js +1 -0
- data/public/assets/ueditor/third-party/highcharts/modules/heatmap.src.js +53 -0
- data/public/assets/ueditor/third-party/highcharts/modules/map.js +27 -0
- data/public/assets/ueditor/third-party/highcharts/modules/map.src.js +1002 -0
- data/public/assets/ueditor/third-party/highcharts/modules/no-data-to-display.js +12 -0
- data/public/assets/ueditor/third-party/highcharts/modules/no-data-to-display.src.js +128 -0
- data/public/assets/ueditor/third-party/highcharts/themes/dark-blue.js +254 -0
- data/public/assets/ueditor/third-party/highcharts/themes/dark-green.js +255 -0
- data/public/assets/ueditor/third-party/highcharts/themes/gray.js +257 -0
- data/public/assets/ueditor/third-party/highcharts/themes/grid.js +103 -0
- data/public/assets/ueditor/third-party/highcharts/themes/skies.js +89 -0
- data/public/assets/ueditor/third-party/jquery-1.10.2.js +9789 -0
- data/public/assets/ueditor/third-party/jquery-1.10.2.min.js +6 -0
- data/public/assets/ueditor/third-party/jquery-1.10.2.min.map +1 -0
- data/public/assets/ueditor/third-party/snapscreen/UEditorSnapscreen.exe +0 -0
- data/public/assets/ueditor/third-party/video-js/font/vjs.eot +0 -0
- data/public/assets/ueditor/third-party/video-js/font/vjs.svg +65 -0
- data/public/assets/ueditor/third-party/video-js/font/vjs.ttf +0 -0
- data/public/assets/ueditor/third-party/video-js/font/vjs.woff +0 -0
- data/public/assets/ueditor/third-party/video-js/video-js.css +766 -0
- data/public/assets/ueditor/third-party/video-js/video-js.min.css +5 -0
- data/public/assets/ueditor/third-party/video-js/video-js.swf +0 -0
- data/public/assets/ueditor/third-party/video-js/video.dev.js +7108 -0
- data/public/assets/ueditor/third-party/video-js/video.js +129 -0
- data/public/assets/ueditor/third-party/webuploader/Uploader.swf +0 -0
- data/public/assets/ueditor/third-party/webuploader/webuploader.css +28 -0
- data/public/assets/ueditor/third-party/webuploader/webuploader.custom.js +5670 -0
- data/public/assets/ueditor/third-party/webuploader/webuploader.custom.min.js +2 -0
- data/public/assets/ueditor/third-party/webuploader/webuploader.flashonly.js +4176 -0
- data/public/assets/ueditor/third-party/webuploader/webuploader.flashonly.min.js +2 -0
- data/public/assets/ueditor/third-party/webuploader/webuploader.html5only.js +5559 -0
- data/public/assets/ueditor/third-party/webuploader/webuploader.html5only.min.js +2 -0
- data/public/assets/ueditor/third-party/webuploader/webuploader.js +6733 -0
- data/public/assets/ueditor/third-party/webuploader/webuploader.min.js +2 -0
- data/public/assets/ueditor/third-party/webuploader/webuploader.withoutimage.js +4593 -0
- data/public/assets/ueditor/third-party/webuploader/webuploader.withoutimage.min.js +2 -0
- data/public/assets/ueditor/third-party/xss.min.js +1 -0
- data/public/assets/ueditor/third-party/zeroclipboard/ZeroClipboard.js +1256 -0
- data/public/assets/ueditor/third-party/zeroclipboard/ZeroClipboard.min.js +9 -0
- data/public/assets/ueditor/third-party/zeroclipboard/ZeroClipboard.swf +0 -0
- data/public/assets/ueditor/ueditor.parse.js +1022 -0
- data/public/assets/ueditor/ueditor.parse.min.js +7 -0
- data/screenshot.png +0 -0
- metadata +343 -0
|
@@ -0,0 +1,583 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Highcharts JS v3.0.6 (2013-10-04)
|
|
3
|
+
*
|
|
4
|
+
* Standalone Highcharts Framework
|
|
5
|
+
*
|
|
6
|
+
* License: MIT License
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
/*global Highcharts */
|
|
11
|
+
var HighchartsAdapter = (function () {
|
|
12
|
+
|
|
13
|
+
var UNDEFINED,
|
|
14
|
+
doc = document,
|
|
15
|
+
emptyArray = [],
|
|
16
|
+
timers = [],
|
|
17
|
+
timerId,
|
|
18
|
+
Fx;
|
|
19
|
+
|
|
20
|
+
Math.easeInOutSine = function (t, b, c, d) {
|
|
21
|
+
return -c / 2 * (Math.cos(Math.PI * t / d) - 1) + b;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Extend given object with custom events
|
|
28
|
+
*/
|
|
29
|
+
function augment(obj) {
|
|
30
|
+
function removeOneEvent(el, type, fn) {
|
|
31
|
+
el.removeEventListener(type, fn, false);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function IERemoveOneEvent(el, type, fn) {
|
|
35
|
+
fn = el.HCProxiedMethods[fn.toString()];
|
|
36
|
+
el.detachEvent('on' + type, fn);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function removeAllEvents(el, type) {
|
|
40
|
+
var events = el.HCEvents,
|
|
41
|
+
remove,
|
|
42
|
+
types,
|
|
43
|
+
len,
|
|
44
|
+
n;
|
|
45
|
+
|
|
46
|
+
if (el.removeEventListener) {
|
|
47
|
+
remove = removeOneEvent;
|
|
48
|
+
} else if (el.attachEvent) {
|
|
49
|
+
remove = IERemoveOneEvent;
|
|
50
|
+
} else {
|
|
51
|
+
return; // break on non-DOM events
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
if (type) {
|
|
56
|
+
types = {};
|
|
57
|
+
types[type] = true;
|
|
58
|
+
} else {
|
|
59
|
+
types = events;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
for (n in types) {
|
|
63
|
+
if (events[n]) {
|
|
64
|
+
len = events[n].length;
|
|
65
|
+
while (len--) {
|
|
66
|
+
remove(el, n, events[n][len]);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (!obj.HCExtended) {
|
|
73
|
+
Highcharts.extend(obj, {
|
|
74
|
+
HCExtended: true,
|
|
75
|
+
|
|
76
|
+
HCEvents: {},
|
|
77
|
+
|
|
78
|
+
bind: function (name, fn) {
|
|
79
|
+
var el = this,
|
|
80
|
+
events = this.HCEvents,
|
|
81
|
+
wrappedFn;
|
|
82
|
+
|
|
83
|
+
// handle DOM events in modern browsers
|
|
84
|
+
if (el.addEventListener) {
|
|
85
|
+
el.addEventListener(name, fn, false);
|
|
86
|
+
|
|
87
|
+
// handle old IE implementation
|
|
88
|
+
} else if (el.attachEvent) {
|
|
89
|
+
|
|
90
|
+
wrappedFn = function (e) {
|
|
91
|
+
fn.call(el, e);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
if (!el.HCProxiedMethods) {
|
|
95
|
+
el.HCProxiedMethods = {};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// link wrapped fn with original fn, so we can get this in removeEvent
|
|
99
|
+
el.HCProxiedMethods[fn.toString()] = wrappedFn;
|
|
100
|
+
|
|
101
|
+
el.attachEvent('on' + name, wrappedFn);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
if (events[name] === UNDEFINED) {
|
|
106
|
+
events[name] = [];
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
events[name].push(fn);
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
unbind: function (name, fn) {
|
|
113
|
+
var events,
|
|
114
|
+
index;
|
|
115
|
+
|
|
116
|
+
if (name) {
|
|
117
|
+
events = this.HCEvents[name] || [];
|
|
118
|
+
if (fn) {
|
|
119
|
+
index = HighchartsAdapter.inArray(fn, events);
|
|
120
|
+
if (index > -1) {
|
|
121
|
+
events.splice(index, 1);
|
|
122
|
+
this.HCEvents[name] = events;
|
|
123
|
+
}
|
|
124
|
+
if (this.removeEventListener) {
|
|
125
|
+
removeOneEvent(this, name, fn);
|
|
126
|
+
} else if (this.attachEvent) {
|
|
127
|
+
IERemoveOneEvent(this, name, fn);
|
|
128
|
+
}
|
|
129
|
+
} else {
|
|
130
|
+
removeAllEvents(this, name);
|
|
131
|
+
this.HCEvents[name] = [];
|
|
132
|
+
}
|
|
133
|
+
} else {
|
|
134
|
+
removeAllEvents(this);
|
|
135
|
+
this.HCEvents = {};
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
|
|
139
|
+
trigger: function (name, args) {
|
|
140
|
+
var events = this.HCEvents[name] || [],
|
|
141
|
+
target = this,
|
|
142
|
+
len = events.length,
|
|
143
|
+
i,
|
|
144
|
+
preventDefault,
|
|
145
|
+
fn;
|
|
146
|
+
|
|
147
|
+
// Attach a simple preventDefault function to skip default handler if called
|
|
148
|
+
preventDefault = function () {
|
|
149
|
+
args.defaultPrevented = true;
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
for (i = 0; i < len; i++) {
|
|
153
|
+
fn = events[i];
|
|
154
|
+
|
|
155
|
+
// args is never null here
|
|
156
|
+
if (args.stopped) {
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
args.preventDefault = preventDefault;
|
|
161
|
+
args.target = target;
|
|
162
|
+
args.type = name; // #2297
|
|
163
|
+
|
|
164
|
+
// If the event handler return false, prevent the default handler from executing
|
|
165
|
+
if (fn.call(this, args) === false) {
|
|
166
|
+
args.preventDefault();
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
return obj;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
return {
|
|
178
|
+
/**
|
|
179
|
+
* Initialize the adapter. This is run once as Highcharts is first run.
|
|
180
|
+
*/
|
|
181
|
+
init: function (pathAnim) {
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Compatibility section to add support for legacy IE. This can be removed if old IE
|
|
185
|
+
* support is not needed.
|
|
186
|
+
*/
|
|
187
|
+
if (!doc.defaultView) {
|
|
188
|
+
this._getStyle = function (el, prop) {
|
|
189
|
+
var val;
|
|
190
|
+
if (el.style[prop]) {
|
|
191
|
+
return el.style[prop];
|
|
192
|
+
} else {
|
|
193
|
+
if (prop === 'opacity') {
|
|
194
|
+
prop = 'filter';
|
|
195
|
+
}
|
|
196
|
+
/*jslint unparam: true*/
|
|
197
|
+
val = el.currentStyle[prop.replace(/\-(\w)/g, function (a, b) { return b.toUpperCase(); })];
|
|
198
|
+
if (prop === 'filter') {
|
|
199
|
+
val = val.replace(
|
|
200
|
+
/alpha\(opacity=([0-9]+)\)/,
|
|
201
|
+
function (a, b) {
|
|
202
|
+
return b / 100;
|
|
203
|
+
}
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
/*jslint unparam: false*/
|
|
207
|
+
return val === '' ? 1 : val;
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
this.adapterRun = function (elem, method) {
|
|
211
|
+
var alias = { width: 'clientWidth', height: 'clientHeight' }[method];
|
|
212
|
+
|
|
213
|
+
if (alias) {
|
|
214
|
+
elem.style.zoom = 1;
|
|
215
|
+
return elem[alias] - 2 * parseInt(HighchartsAdapter._getStyle(elem, 'padding'), 10);
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
if (!Array.prototype.forEach) {
|
|
221
|
+
this.each = function (arr, fn) { // legacy
|
|
222
|
+
var i = 0,
|
|
223
|
+
len = arr.length;
|
|
224
|
+
for (; i < len; i++) {
|
|
225
|
+
if (fn.call(arr[i], arr[i], i, arr) === false) {
|
|
226
|
+
return i;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
if (!Array.prototype.indexOf) {
|
|
233
|
+
this.inArray = function (item, arr) {
|
|
234
|
+
var len,
|
|
235
|
+
i = 0;
|
|
236
|
+
|
|
237
|
+
if (arr) {
|
|
238
|
+
len = arr.length;
|
|
239
|
+
|
|
240
|
+
for (; i < len; i++) {
|
|
241
|
+
if (arr[i] === item) {
|
|
242
|
+
return i;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
return -1;
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
if (!Array.prototype.filter) {
|
|
252
|
+
this.grep = function (elements, callback) {
|
|
253
|
+
var ret = [],
|
|
254
|
+
i = 0,
|
|
255
|
+
length = elements.length;
|
|
256
|
+
|
|
257
|
+
for (; i < length; i++) {
|
|
258
|
+
if (!!callback(elements[i], i)) {
|
|
259
|
+
ret.push(elements[i]);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
return ret;
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
//--- End compatibility section ---
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Start of animation specific code
|
|
272
|
+
*/
|
|
273
|
+
Fx = function (elem, options, prop) {
|
|
274
|
+
this.options = options;
|
|
275
|
+
this.elem = elem;
|
|
276
|
+
this.prop = prop;
|
|
277
|
+
};
|
|
278
|
+
Fx.prototype = {
|
|
279
|
+
|
|
280
|
+
update: function () {
|
|
281
|
+
var styles,
|
|
282
|
+
paths = this.paths,
|
|
283
|
+
elem = this.elem,
|
|
284
|
+
elemelem = elem.element; // if destroyed, it is null
|
|
285
|
+
|
|
286
|
+
// Animating a path definition on SVGElement
|
|
287
|
+
if (paths && elemelem) {
|
|
288
|
+
elem.attr('d', pathAnim.step(paths[0], paths[1], this.now, this.toD));
|
|
289
|
+
|
|
290
|
+
// Other animations on SVGElement
|
|
291
|
+
} else if (elem.attr) {
|
|
292
|
+
if (elemelem) {
|
|
293
|
+
elem.attr(this.prop, this.now);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
// HTML styles
|
|
297
|
+
} else {
|
|
298
|
+
styles = {};
|
|
299
|
+
styles[elem] = this.now + this.unit;
|
|
300
|
+
Highcharts.css(elem, styles);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
if (this.options.step) {
|
|
304
|
+
this.options.step.call(this.elem, this.now, this);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
},
|
|
308
|
+
custom: function (from, to, unit) {
|
|
309
|
+
var self = this,
|
|
310
|
+
t = function (gotoEnd) {
|
|
311
|
+
return self.step(gotoEnd);
|
|
312
|
+
},
|
|
313
|
+
i;
|
|
314
|
+
|
|
315
|
+
this.startTime = +new Date();
|
|
316
|
+
this.start = from;
|
|
317
|
+
this.end = to;
|
|
318
|
+
this.unit = unit;
|
|
319
|
+
this.now = this.start;
|
|
320
|
+
this.pos = this.state = 0;
|
|
321
|
+
|
|
322
|
+
t.elem = this.elem;
|
|
323
|
+
|
|
324
|
+
if (t() && timers.push(t) === 1) {
|
|
325
|
+
timerId = setInterval(function () {
|
|
326
|
+
|
|
327
|
+
for (i = 0; i < timers.length; i++) {
|
|
328
|
+
if (!timers[i]()) {
|
|
329
|
+
timers.splice(i--, 1);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
if (!timers.length) {
|
|
334
|
+
clearInterval(timerId);
|
|
335
|
+
}
|
|
336
|
+
}, 13);
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
|
|
340
|
+
step: function (gotoEnd) {
|
|
341
|
+
var t = +new Date(),
|
|
342
|
+
ret,
|
|
343
|
+
done,
|
|
344
|
+
options = this.options,
|
|
345
|
+
i;
|
|
346
|
+
|
|
347
|
+
if (this.elem.stopAnimation) {
|
|
348
|
+
ret = false;
|
|
349
|
+
|
|
350
|
+
} else if (gotoEnd || t >= options.duration + this.startTime) {
|
|
351
|
+
this.now = this.end;
|
|
352
|
+
this.pos = this.state = 1;
|
|
353
|
+
this.update();
|
|
354
|
+
|
|
355
|
+
this.options.curAnim[this.prop] = true;
|
|
356
|
+
|
|
357
|
+
done = true;
|
|
358
|
+
for (i in options.curAnim) {
|
|
359
|
+
if (options.curAnim[i] !== true) {
|
|
360
|
+
done = false;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
if (done) {
|
|
365
|
+
if (options.complete) {
|
|
366
|
+
options.complete.call(this.elem);
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
ret = false;
|
|
370
|
+
|
|
371
|
+
} else {
|
|
372
|
+
var n = t - this.startTime;
|
|
373
|
+
this.state = n / options.duration;
|
|
374
|
+
this.pos = options.easing(n, 0, 1, options.duration);
|
|
375
|
+
this.now = this.start + ((this.end - this.start) * this.pos);
|
|
376
|
+
this.update();
|
|
377
|
+
ret = true;
|
|
378
|
+
}
|
|
379
|
+
return ret;
|
|
380
|
+
}
|
|
381
|
+
};
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* The adapter animate method
|
|
385
|
+
*/
|
|
386
|
+
this.animate = function (el, prop, opt) {
|
|
387
|
+
var start,
|
|
388
|
+
unit = '',
|
|
389
|
+
end,
|
|
390
|
+
fx,
|
|
391
|
+
args,
|
|
392
|
+
name;
|
|
393
|
+
|
|
394
|
+
el.stopAnimation = false; // ready for new
|
|
395
|
+
|
|
396
|
+
if (typeof opt !== 'object' || opt === null) {
|
|
397
|
+
args = arguments;
|
|
398
|
+
opt = {
|
|
399
|
+
duration: args[2],
|
|
400
|
+
easing: args[3],
|
|
401
|
+
complete: args[4]
|
|
402
|
+
};
|
|
403
|
+
}
|
|
404
|
+
if (typeof opt.duration !== 'number') {
|
|
405
|
+
opt.duration = 400;
|
|
406
|
+
}
|
|
407
|
+
opt.easing = Math[opt.easing] || Math.easeInOutSine;
|
|
408
|
+
opt.curAnim = Highcharts.extend({}, prop);
|
|
409
|
+
|
|
410
|
+
for (name in prop) {
|
|
411
|
+
fx = new Fx(el, opt, name);
|
|
412
|
+
end = null;
|
|
413
|
+
|
|
414
|
+
if (name === 'd') {
|
|
415
|
+
fx.paths = pathAnim.init(
|
|
416
|
+
el,
|
|
417
|
+
el.d,
|
|
418
|
+
prop.d
|
|
419
|
+
);
|
|
420
|
+
fx.toD = prop.d;
|
|
421
|
+
start = 0;
|
|
422
|
+
end = 1;
|
|
423
|
+
} else if (el.attr) {
|
|
424
|
+
start = el.attr(name);
|
|
425
|
+
} else {
|
|
426
|
+
start = parseFloat(HighchartsAdapter._getStyle(el, name)) || 0;
|
|
427
|
+
if (name !== 'opacity') {
|
|
428
|
+
unit = 'px';
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
if (!end) {
|
|
433
|
+
end = parseFloat(prop[name]);
|
|
434
|
+
}
|
|
435
|
+
fx.custom(start, end, unit);
|
|
436
|
+
}
|
|
437
|
+
};
|
|
438
|
+
},
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Internal method to return CSS value for given element and property
|
|
442
|
+
*/
|
|
443
|
+
_getStyle: function (el, prop) {
|
|
444
|
+
return window.getComputedStyle(el).getPropertyValue(prop);
|
|
445
|
+
},
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* Downloads a script and executes a callback when done.
|
|
449
|
+
* @param {String} scriptLocation
|
|
450
|
+
* @param {Function} callback
|
|
451
|
+
*/
|
|
452
|
+
getScript: function (scriptLocation, callback) {
|
|
453
|
+
// We cannot assume that Assets class from mootools-more is available so instead insert a script tag to download script.
|
|
454
|
+
var head = doc.getElementsByTagName('head')[0],
|
|
455
|
+
script = doc.createElement('script');
|
|
456
|
+
|
|
457
|
+
script.type = 'text/javascript';
|
|
458
|
+
script.src = scriptLocation;
|
|
459
|
+
script.onload = callback;
|
|
460
|
+
|
|
461
|
+
head.appendChild(script);
|
|
462
|
+
},
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* Return the index of an item in an array, or -1 if not found
|
|
466
|
+
*/
|
|
467
|
+
inArray: function (item, arr) {
|
|
468
|
+
return arr.indexOf ? arr.indexOf(item) : emptyArray.indexOf.call(arr, item);
|
|
469
|
+
},
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* A direct link to adapter methods
|
|
474
|
+
*/
|
|
475
|
+
adapterRun: function (elem, method) {
|
|
476
|
+
return parseInt(HighchartsAdapter._getStyle(elem, method), 10);
|
|
477
|
+
},
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* Filter an array
|
|
481
|
+
*/
|
|
482
|
+
grep: function (elements, callback) {
|
|
483
|
+
return emptyArray.filter.call(elements, callback);
|
|
484
|
+
},
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* Map an array
|
|
488
|
+
*/
|
|
489
|
+
map: function (arr, fn) {
|
|
490
|
+
var results = [], i = 0, len = arr.length;
|
|
491
|
+
|
|
492
|
+
for (; i < len; i++) {
|
|
493
|
+
results[i] = fn.call(arr[i], arr[i], i, arr);
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
return results;
|
|
497
|
+
},
|
|
498
|
+
|
|
499
|
+
offset: function (el) {
|
|
500
|
+
var left = 0,
|
|
501
|
+
top = 0;
|
|
502
|
+
|
|
503
|
+
while (el) {
|
|
504
|
+
left += el.offsetLeft;
|
|
505
|
+
top += el.offsetTop;
|
|
506
|
+
el = el.offsetParent;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
return {
|
|
510
|
+
left: left,
|
|
511
|
+
top: top
|
|
512
|
+
};
|
|
513
|
+
},
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* Add an event listener
|
|
517
|
+
*/
|
|
518
|
+
addEvent: function (el, type, fn) {
|
|
519
|
+
augment(el).bind(type, fn);
|
|
520
|
+
},
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* Remove event added with addEvent
|
|
524
|
+
*/
|
|
525
|
+
removeEvent: function (el, type, fn) {
|
|
526
|
+
augment(el).unbind(type, fn);
|
|
527
|
+
},
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* Fire an event on a custom object
|
|
531
|
+
*/
|
|
532
|
+
fireEvent: function (el, type, eventArguments, defaultFunction) {
|
|
533
|
+
var e;
|
|
534
|
+
|
|
535
|
+
if (doc.createEvent && (el.dispatchEvent || el.fireEvent)) {
|
|
536
|
+
e = doc.createEvent('Events');
|
|
537
|
+
e.initEvent(type, true, true);
|
|
538
|
+
e.target = el;
|
|
539
|
+
|
|
540
|
+
Highcharts.extend(e, eventArguments);
|
|
541
|
+
|
|
542
|
+
if (el.dispatchEvent) {
|
|
543
|
+
el.dispatchEvent(e);
|
|
544
|
+
} else {
|
|
545
|
+
el.fireEvent(type, e);
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
} else if (el.HCExtended === true) {
|
|
549
|
+
eventArguments = eventArguments || {};
|
|
550
|
+
el.trigger(type, eventArguments);
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
if (eventArguments && eventArguments.defaultPrevented) {
|
|
554
|
+
defaultFunction = null;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
if (defaultFunction) {
|
|
558
|
+
defaultFunction(eventArguments);
|
|
559
|
+
}
|
|
560
|
+
},
|
|
561
|
+
|
|
562
|
+
washMouseEvent: function (e) {
|
|
563
|
+
return e;
|
|
564
|
+
},
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
/**
|
|
568
|
+
* Stop running animation
|
|
569
|
+
*/
|
|
570
|
+
stop: function (el) {
|
|
571
|
+
el.stopAnimation = true;
|
|
572
|
+
},
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* Utility for iterating over an array. Parameters are reversed compared to jQuery.
|
|
576
|
+
* @param {Array} arr
|
|
577
|
+
* @param {Function} fn
|
|
578
|
+
*/
|
|
579
|
+
each: function (arr, fn) { // modern browsers
|
|
580
|
+
return Array.prototype.forEach.call(arr, fn);
|
|
581
|
+
}
|
|
582
|
+
};
|
|
583
|
+
}());
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Highcharts JS v3.0.6 (2013-10-04)
|
|
3
|
+
|
|
4
|
+
(c) 2009-2013 Torstein Hønsi
|
|
5
|
+
|
|
6
|
+
License: www.highcharts.com/license
|
|
7
|
+
*/
|
|
8
|
+
(function(j,C){function J(a,b,c){this.init.call(this,a,b,c)}function K(a,b,c){a.call(this,b,c);if(this.chart.polar)this.closeSegment=function(a){var c=this.xAxis.center;a.push("L",c[0],c[1])},this.closedStacks=!0}function L(a,b){var c=this.chart,d=this.options.animation,g=this.group,f=this.markerGroup,e=this.xAxis.center,i=c.plotLeft,n=c.plotTop;if(c.polar){if(c.renderer.isSVG)if(d===!0&&(d={}),b){if(c={translateX:e[0]+i,translateY:e[1]+n,scaleX:0.001,scaleY:0.001},g.attr(c),f)f.attrSetters=g.attrSetters,
|
|
9
|
+
f.attr(c)}else c={translateX:i,translateY:n,scaleX:1,scaleY:1},g.animate(c,d),f&&f.animate(c,d),this.animate=null}else a.call(this,b)}var P=j.arrayMin,Q=j.arrayMax,s=j.each,F=j.extend,p=j.merge,R=j.map,r=j.pick,v=j.pInt,m=j.getOptions().plotOptions,h=j.seriesTypes,x=j.extendClass,M=j.splat,o=j.wrap,N=j.Axis,u=j.Tick,z=j.Series,q=h.column.prototype,t=Math,D=t.round,A=t.floor,S=t.max,w=function(){};F(J.prototype,{init:function(a,b,c){var d=this,g=d.defaultOptions;d.chart=b;if(b.angular)g.background=
|
|
10
|
+
{};d.options=a=p(g,a);(a=a.background)&&s([].concat(M(a)).reverse(),function(a){var b=a.backgroundColor,a=p(d.defaultBackgroundOptions,a);if(b)a.backgroundColor=b;a.color=a.backgroundColor;c.options.plotBands.unshift(a)})},defaultOptions:{center:["50%","50%"],size:"85%",startAngle:0},defaultBackgroundOptions:{shape:"circle",borderWidth:1,borderColor:"silver",backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"#FFF"],[1,"#DDD"]]},from:Number.MIN_VALUE,innerRadius:0,to:Number.MAX_VALUE,
|
|
11
|
+
outerRadius:"105%"}});var G=N.prototype,u=u.prototype,T={getOffset:w,redraw:function(){this.isDirty=!1},render:function(){this.isDirty=!1},setScale:w,setCategories:w,setTitle:w},O={isRadial:!0,defaultRadialGaugeOptions:{labels:{align:"center",x:0,y:null},minorGridLineWidth:0,minorTickInterval:"auto",minorTickLength:10,minorTickPosition:"inside",minorTickWidth:1,plotBands:[],tickLength:10,tickPosition:"inside",tickWidth:2,title:{rotation:0},zIndex:2},defaultRadialXOptions:{gridLineWidth:1,labels:{align:null,
|
|
12
|
+
distance:15,x:0,y:null},maxPadding:0,minPadding:0,plotBands:[],showLastLabel:!1,tickLength:0},defaultRadialYOptions:{gridLineInterpolation:"circle",labels:{align:"right",x:-3,y:-2},plotBands:[],showLastLabel:!1,title:{x:4,text:null,rotation:90}},setOptions:function(a){this.options=p(this.defaultOptions,this.defaultRadialOptions,a)},getOffset:function(){G.getOffset.call(this);this.chart.axisOffset[this.side]=0},getLinePath:function(a,b){var c=this.center,b=r(b,c[2]/2-this.offset);return this.chart.renderer.symbols.arc(this.left+
|
|
13
|
+
c[0],this.top+c[1],b,b,{start:this.startAngleRad,end:this.endAngleRad,open:!0,innerR:0})},setAxisTranslation:function(){G.setAxisTranslation.call(this);if(this.center&&(this.transA=this.isCircular?(this.endAngleRad-this.startAngleRad)/(this.max-this.min||1):this.center[2]/2/(this.max-this.min||1),this.isXAxis))this.minPixelPadding=this.transA*this.minPointOffset+(this.reversed?(this.endAngleRad-this.startAngleRad)/4:0)},beforeSetTickPositions:function(){this.autoConnect&&(this.max+=this.categories&&
|
|
14
|
+
1||this.pointRange||this.closestPointRange||0)},setAxisSize:function(){G.setAxisSize.call(this);if(this.isRadial)this.center=this.pane.center=h.pie.prototype.getCenter.call(this.pane),this.len=this.width=this.height=this.isCircular?this.center[2]*(this.endAngleRad-this.startAngleRad)/2:this.center[2]/2},getPosition:function(a,b){if(!this.isCircular)b=this.translate(a),a=this.min;return this.postTranslate(this.translate(a),r(b,this.center[2]/2)-this.offset)},postTranslate:function(a,b){var c=this.chart,
|
|
15
|
+
d=this.center,a=this.startAngleRad+a;return{x:c.plotLeft+d[0]+Math.cos(a)*b,y:c.plotTop+d[1]+Math.sin(a)*b}},getPlotBandPath:function(a,b,c){var d=this.center,g=this.startAngleRad,f=d[2]/2,e=[r(c.outerRadius,"100%"),c.innerRadius,r(c.thickness,10)],i=/%$/,n,l=this.isCircular;this.options.gridLineInterpolation==="polygon"?d=this.getPlotLinePath(a).concat(this.getPlotLinePath(b,!0)):(l||(e[0]=this.translate(a),e[1]=this.translate(b)),e=R(e,function(a){i.test(a)&&(a=v(a,10)*f/100);return a}),c.shape===
|
|
16
|
+
"circle"||!l?(a=-Math.PI/2,b=Math.PI*1.5,n=!0):(a=g+this.translate(a),b=g+this.translate(b)),d=this.chart.renderer.symbols.arc(this.left+d[0],this.top+d[1],e[0],e[0],{start:a,end:b,innerR:r(e[1],e[0]-e[2]),open:n}));return d},getPlotLinePath:function(a,b){var c=this.center,d=this.chart,g=this.getPosition(a),f,e,i;this.isCircular?i=["M",c[0]+d.plotLeft,c[1]+d.plotTop,"L",g.x,g.y]:this.options.gridLineInterpolation==="circle"?(a=this.translate(a))&&(i=this.getLinePath(0,a)):(f=d.xAxis[0],i=[],a=this.translate(a),
|
|
17
|
+
c=f.tickPositions,f.autoConnect&&(c=c.concat([c[0]])),b&&(c=[].concat(c).reverse()),s(c,function(c,b){e=f.getPosition(c,a);i.push(b?"L":"M",e.x,e.y)}));return i},getTitlePosition:function(){var a=this.center,b=this.chart,c=this.options.title;return{x:b.plotLeft+a[0]+(c.x||0),y:b.plotTop+a[1]-{high:0.5,middle:0.25,low:0}[c.align]*a[2]+(c.y||0)}}};o(G,"init",function(a,b,c){var k;var d=b.angular,g=b.polar,f=c.isX,e=d&&f,i,n;n=b.options;var l=c.pane||0;if(d){if(F(this,e?T:O),i=!f)this.defaultRadialOptions=
|
|
18
|
+
this.defaultRadialGaugeOptions}else if(g)F(this,O),this.defaultRadialOptions=(i=f)?this.defaultRadialXOptions:p(this.defaultYAxisOptions,this.defaultRadialYOptions);a.call(this,b,c);if(!e&&(d||g)){a=this.options;if(!b.panes)b.panes=[];this.pane=(k=b.panes[l]=b.panes[l]||new J(M(n.pane)[l],b,this),l=k);l=l.options;b.inverted=!1;n.chart.zoomType=null;this.startAngleRad=b=(l.startAngle-90)*Math.PI/180;this.endAngleRad=n=(r(l.endAngle,l.startAngle+360)-90)*Math.PI/180;this.offset=a.offset||0;if((this.isCircular=
|
|
19
|
+
i)&&c.max===C&&n-b===2*Math.PI)this.autoConnect=!0}});o(u,"getPosition",function(a,b,c,d,g){var f=this.axis;return f.getPosition?f.getPosition(c):a.call(this,b,c,d,g)});o(u,"getLabelPosition",function(a,b,c,d,g,f,e,i,n){var l=this.axis,k=f.y,h=f.align,j=(l.translate(this.pos)+l.startAngleRad+Math.PI/2)/Math.PI*180%360;l.isRadial?(a=l.getPosition(this.pos,l.center[2]/2+r(f.distance,-25)),f.rotation==="auto"?d.attr({rotation:j}):k===null&&(k=v(d.styles.lineHeight)*0.9-d.getBBox().height/2),h===null&&
|
|
20
|
+
(h=l.isCircular?j>20&&j<160?"left":j>200&&j<340?"right":"center":"center",d.attr({align:h})),a.x+=f.x,a.y+=k):a=a.call(this,b,c,d,g,f,e,i,n);return a});o(u,"getMarkPath",function(a,b,c,d,g,f,e){var i=this.axis;i.isRadial?(a=i.getPosition(this.pos,i.center[2]/2+d),b=["M",b,c,"L",a.x,a.y]):b=a.call(this,b,c,d,g,f,e);return b});m.arearange=p(m.area,{lineWidth:1,marker:null,threshold:null,tooltip:{pointFormat:'<span style="color:{series.color}">{series.name}</span>: <b>{point.low}</b> - <b>{point.high}</b><br/>'},
|
|
21
|
+
trackByArea:!0,dataLabels:{verticalAlign:null,xLow:0,xHigh:0,yLow:0,yHigh:0}});h.arearange=j.extendClass(h.area,{type:"arearange",pointArrayMap:["low","high"],toYData:function(a){return[a.low,a.high]},pointValKey:"low",getSegments:function(){var a=this;s(a.points,function(b){if(!a.options.connectNulls&&(b.low===null||b.high===null))b.y=null;else if(b.low===null&&b.high!==null)b.y=b.high});z.prototype.getSegments.call(this)},translate:function(){var a=this.yAxis;h.area.prototype.translate.apply(this);
|
|
22
|
+
s(this.points,function(b){var c=b.low,d=b.high,g=b.plotY;d===null&&c===null?b.y=null:c===null?(b.plotLow=b.plotY=null,b.plotHigh=a.translate(d,0,1,0,1)):d===null?(b.plotLow=g,b.plotHigh=null):(b.plotLow=g,b.plotHigh=a.translate(d,0,1,0,1))})},getSegmentPath:function(a){var b,c=[],d=a.length,g=z.prototype.getSegmentPath,f,e;e=this.options;var i=e.step;for(b=HighchartsAdapter.grep(a,function(a){return a.plotLow!==null});d--;)f=a[d],f.plotHigh!==null&&c.push({plotX:f.plotX,plotY:f.plotHigh});a=g.call(this,
|
|
23
|
+
b);if(i)i===!0&&(i="left"),e.step={left:"right",center:"center",right:"left"}[i];c=g.call(this,c);e.step=i;e=[].concat(a,c);c[0]="L";this.areaPath=this.areaPath.concat(a,c);return e},drawDataLabels:function(){var a=this.data,b=a.length,c,d=[],g=z.prototype,f=this.options.dataLabels,e,i=this.chart.inverted;if(f.enabled||this._hasPointLabels){for(c=b;c--;)e=a[c],e.y=e.high,e.plotY=e.plotHigh,d[c]=e.dataLabel,e.dataLabel=e.dataLabelUpper,e.below=!1,i?(f.align="left",f.x=f.xHigh):f.y=f.yHigh;g.drawDataLabels.apply(this,
|
|
24
|
+
arguments);for(c=b;c--;)e=a[c],e.dataLabelUpper=e.dataLabel,e.dataLabel=d[c],e.y=e.low,e.plotY=e.plotLow,e.below=!0,i?(f.align="right",f.x=f.xLow):f.y=f.yLow;g.drawDataLabels.apply(this,arguments)}},alignDataLabel:h.column.prototype.alignDataLabel,getSymbol:h.column.prototype.getSymbol,drawPoints:w});m.areasplinerange=p(m.arearange);h.areasplinerange=x(h.arearange,{type:"areasplinerange",getPointSpline:h.spline.prototype.getPointSpline});m.columnrange=p(m.column,m.arearange,{lineWidth:1,pointRange:null});
|
|
25
|
+
h.columnrange=x(h.arearange,{type:"columnrange",translate:function(){var a=this,b=a.yAxis,c;q.translate.apply(a);s(a.points,function(d){var g=d.shapeArgs,f=a.options.minPointLength,e;d.plotHigh=c=b.translate(d.high,0,1,0,1);d.plotLow=d.plotY;e=c;d=d.plotY-c;d<f&&(f-=d,d+=f,e-=f/2);g.height=d;g.y=e})},trackerGroups:["group","dataLabels"],drawGraph:w,pointAttrToOptions:q.pointAttrToOptions,drawPoints:q.drawPoints,drawTracker:q.drawTracker,animate:q.animate,getColumnMetrics:q.getColumnMetrics});m.gauge=
|
|
26
|
+
p(m.line,{dataLabels:{enabled:!0,y:15,borderWidth:1,borderColor:"silver",borderRadius:3,style:{fontWeight:"bold"},verticalAlign:"top",zIndex:2},dial:{},pivot:{},tooltip:{headerFormat:""},showInLegend:!1});u={type:"gauge",pointClass:j.extendClass(j.Point,{setState:function(a){this.state=a}}),angular:!0,drawGraph:w,fixedBox:!0,trackerGroups:["group","dataLabels"],translate:function(){var a=this.yAxis,b=this.options,c=a.center;this.generatePoints();s(this.points,function(d){var g=p(b.dial,d.dial),f=
|
|
27
|
+
v(r(g.radius,80))*c[2]/200,e=v(r(g.baseLength,70))*f/100,i=v(r(g.rearLength,10))*f/100,n=g.baseWidth||3,l=g.topWidth||1,k=a.startAngleRad+a.translate(d.y,null,null,null,!0);b.wrap===!1&&(k=Math.max(a.startAngleRad,Math.min(a.endAngleRad,k)));k=k*180/Math.PI;d.shapeType="path";d.shapeArgs={d:g.path||["M",-i,-n/2,"L",e,-n/2,f,-l/2,f,l/2,e,n/2,-i,n/2,"z"],translateX:c[0],translateY:c[1],rotation:k};d.plotX=c[0];d.plotY=c[1]})},drawPoints:function(){var a=this,b=a.yAxis.center,c=a.pivot,d=a.options,g=
|
|
28
|
+
d.pivot,f=a.chart.renderer;s(a.points,function(c){var b=c.graphic,g=c.shapeArgs,l=g.d,k=p(d.dial,c.dial);b?(b.animate(g),g.d=l):c.graphic=f[c.shapeType](g).attr({stroke:k.borderColor||"none","stroke-width":k.borderWidth||0,fill:k.backgroundColor||"black",rotation:g.rotation}).add(a.group)});c?c.animate({translateX:b[0],translateY:b[1]}):a.pivot=f.circle(0,0,r(g.radius,5)).attr({"stroke-width":g.borderWidth||0,stroke:g.borderColor||"silver",fill:g.backgroundColor||"black"}).translate(b[0],b[1]).add(a.group)},
|
|
29
|
+
animate:function(a){var b=this;if(!a)s(b.points,function(a){var d=a.graphic;d&&(d.attr({rotation:b.yAxis.startAngleRad*180/Math.PI}),d.animate({rotation:a.shapeArgs.rotation},b.options.animation))}),b.animate=null},render:function(){this.group=this.plotGroup("group","series",this.visible?"visible":"hidden",this.options.zIndex,this.chart.seriesGroup);h.pie.prototype.render.call(this);this.group.clip(this.chart.clipRect)},setData:h.pie.prototype.setData,drawTracker:h.column.prototype.drawTracker};h.gauge=
|
|
30
|
+
j.extendClass(h.line,u);m.boxplot=p(m.column,{fillColor:"#FFFFFF",lineWidth:1,medianWidth:2,states:{hover:{brightness:-0.3}},threshold:null,tooltip:{pointFormat:'<span style="color:{series.color};font-weight:bold">{series.name}</span><br/>Maximum: {point.high}<br/>Upper quartile: {point.q3}<br/>Median: {point.median}<br/>Lower quartile: {point.q1}<br/>Minimum: {point.low}<br/>'},whiskerLength:"50%",whiskerWidth:2});h.boxplot=x(h.column,{type:"boxplot",pointArrayMap:["low","q1","median","q3","high"],
|
|
31
|
+
toYData:function(a){return[a.low,a.q1,a.median,a.q3,a.high]},pointValKey:"high",pointAttrToOptions:{fill:"fillColor",stroke:"color","stroke-width":"lineWidth"},drawDataLabels:w,translate:function(){var a=this.yAxis,b=this.pointArrayMap;h.column.prototype.translate.apply(this);s(this.points,function(c){s(b,function(b){c[b]!==null&&(c[b+"Plot"]=a.translate(c[b],0,1,0,1))})})},drawPoints:function(){var a=this,b=a.points,c=a.options,d=a.chart.renderer,g,f,e,i,n,l,k,h,j,m,o,H,p,E,I,q,w,t,v,u,z,y,x=a.doQuartiles!==
|
|
32
|
+
!1,B=parseInt(a.options.whiskerLength,10)/100;s(b,function(b){j=b.graphic;z=b.shapeArgs;o={};E={};q={};y=b.color||a.color;if(b.plotY!==C)if(g=b.pointAttr[b.selected?"selected":""],w=z.width,t=A(z.x),v=t+w,u=D(w/2),f=A(x?b.q1Plot:b.lowPlot),e=A(x?b.q3Plot:b.lowPlot),i=A(b.highPlot),n=A(b.lowPlot),o.stroke=b.stemColor||c.stemColor||y,o["stroke-width"]=r(b.stemWidth,c.stemWidth,c.lineWidth),o.dashstyle=b.stemDashStyle||c.stemDashStyle,E.stroke=b.whiskerColor||c.whiskerColor||y,E["stroke-width"]=r(b.whiskerWidth,
|
|
33
|
+
c.whiskerWidth,c.lineWidth),q.stroke=b.medianColor||c.medianColor||y,q["stroke-width"]=r(b.medianWidth,c.medianWidth,c.lineWidth),k=o["stroke-width"]%2/2,h=t+u+k,m=["M",h,e,"L",h,i,"M",h,f,"L",h,n,"z"],x&&(k=g["stroke-width"]%2/2,h=A(h)+k,f=A(f)+k,e=A(e)+k,t+=k,v+=k,H=["M",t,e,"L",t,f,"L",v,f,"L",v,e,"L",t,e,"z"]),B&&(k=E["stroke-width"]%2/2,i+=k,n+=k,p=["M",h-u*B,i,"L",h+u*B,i,"M",h-u*B,n,"L",h+u*B,n]),k=q["stroke-width"]%2/2,l=D(b.medianPlot)+k,I=["M",t,l,"L",v,l,"z"],j)b.stem.animate({d:m}),B&&
|
|
34
|
+
b.whiskers.animate({d:p}),x&&b.box.animate({d:H}),b.medianShape.animate({d:I});else{b.graphic=j=d.g().add(a.group);b.stem=d.path(m).attr(o).add(j);if(B)b.whiskers=d.path(p).attr(E).add(j);if(x)b.box=d.path(H).attr(g).add(j);b.medianShape=d.path(I).attr(q).add(j)}})}});m.errorbar=p(m.boxplot,{color:"#000000",grouping:!1,linkedTo:":previous",tooltip:{pointFormat:m.arearange.tooltip.pointFormat},whiskerWidth:null});h.errorbar=x(h.boxplot,{type:"errorbar",pointArrayMap:["low","high"],toYData:function(a){return[a.low,
|
|
35
|
+
a.high]},pointValKey:"high",doQuartiles:!1,getColumnMetrics:function(){return this.linkedParent&&this.linkedParent.columnMetrics||h.column.prototype.getColumnMetrics.call(this)}});m.waterfall=p(m.column,{lineWidth:1,lineColor:"#333",dashStyle:"dot",borderColor:"#333"});h.waterfall=x(h.column,{type:"waterfall",upColorProp:"fill",pointArrayMap:["low","y"],pointValKey:"y",init:function(a,b){b.stacking=!0;h.column.prototype.init.call(this,a,b)},translate:function(){var a=this.options,b=this.yAxis,c,d,
|
|
36
|
+
g,f,e,i,n,l,k;c=a.threshold;a=a.borderWidth%2/2;h.column.prototype.translate.apply(this);l=c;g=this.points;for(d=0,c=g.length;d<c;d++){f=g[d];e=f.shapeArgs;i=this.getStack(d);k=i.points[this.index];if(isNaN(f.y))f.y=this.yData[d];n=S(l,l+f.y)+k[0];e.y=b.translate(n,0,1);f.isSum||f.isIntermediateSum?(e.y=b.translate(k[1],0,1),e.height=b.translate(k[0],0,1)-e.y):l+=i.total;e.height<0&&(e.y+=e.height,e.height*=-1);f.plotY=e.y=D(e.y)-a;e.height=D(e.height);f.yBottom=e.y+e.height}},processData:function(a){var b=
|
|
37
|
+
this.yData,c=this.points,d,g=b.length,f=this.options.threshold||0,e,i,h,l,k,j;i=e=h=l=f;for(j=0;j<g;j++)k=b[j],d=c&&c[j]?c[j]:{},k==="sum"||d.isSum?b[j]=i:k==="intermediateSum"||d.isIntermediateSum?(b[j]=e,e=f):(i+=k,e+=k),h=Math.min(i,h),l=Math.max(i,l);z.prototype.processData.call(this,a);this.dataMin=h;this.dataMax=l},toYData:function(a){if(a.isSum)return"sum";else if(a.isIntermediateSum)return"intermediateSum";return a.y},getAttribs:function(){h.column.prototype.getAttribs.apply(this,arguments);
|
|
38
|
+
var a=this.options,b=a.states,c=a.upColor||this.color,a=j.Color(c).brighten(0.1).get(),d=p(this.pointAttr),g=this.upColorProp;d[""][g]=c;d.hover[g]=b.hover.upColor||a;d.select[g]=b.select.upColor||c;s(this.points,function(a){if(a.y>0&&!a.color)a.pointAttr=d,a.color=c})},getGraphPath:function(){var a=this.data,b=a.length,c=D(this.options.lineWidth+this.options.borderWidth)%2/2,d=[],g,f,e;for(e=1;e<b;e++)f=a[e].shapeArgs,g=a[e-1].shapeArgs,f=["M",g.x+g.width,g.y+c,"L",f.x,g.y+c],a[e-1].y<0&&(f[2]+=
|
|
39
|
+
g.height,f[5]+=g.height),d=d.concat(f);return d},getExtremes:w,getStack:function(a){var b=this.yAxis.stacks,c=this.stackKey;this.processedYData[a]<this.options.threshold&&(c="-"+c);return b[c][a]},drawGraph:z.prototype.drawGraph});m.bubble=p(m.scatter,{dataLabels:{inside:!0,style:{color:"white",textShadow:"0px 0px 3px black"},verticalAlign:"middle"},marker:{lineColor:null,lineWidth:1},minSize:8,maxSize:"20%",tooltip:{pointFormat:"({point.x}, {point.y}), Size: {point.z}"},turboThreshold:0,zThreshold:0});
|
|
40
|
+
h.bubble=x(h.scatter,{type:"bubble",pointArrayMap:["y","z"],trackerGroups:["group","dataLabelsGroup"],pointAttrToOptions:{stroke:"lineColor","stroke-width":"lineWidth",fill:"fillColor"},applyOpacity:function(a){var b=this.options.marker,c=r(b.fillOpacity,0.5),a=a||b.fillColor||this.color;c!==1&&(a=j.Color(a).setOpacity(c).get("rgba"));return a},convertAttribs:function(){var a=z.prototype.convertAttribs.apply(this,arguments);a.fill=this.applyOpacity(a.fill);return a},getRadii:function(a,b,c,d){var g,
|
|
41
|
+
f,e,i=this.zData,h=[];for(f=0,g=i.length;f<g;f++)e=b-a,e=e>0?(i[f]-a)/(b-a):0.5,h.push(t.ceil(c+e*(d-c))/2);this.radii=h},animate:function(a){var b=this.options.animation;if(!a)s(this.points,function(a){var d=a.graphic,a=a.shapeArgs;d&&a&&(d.attr("r",1),d.animate({r:a.r},b))}),this.animate=null},translate:function(){var a,b=this.data,c,d,g=this.radii;h.scatter.prototype.translate.call(this);for(a=b.length;a--;)c=b[a],d=g?g[a]:0,c.negative=c.z<(this.options.zThreshold||0),d>=this.minPxSize/2?(c.shapeType=
|
|
42
|
+
"circle",c.shapeArgs={x:c.plotX,y:c.plotY,r:d},c.dlBox={x:c.plotX-d,y:c.plotY-d,width:2*d,height:2*d}):c.shapeArgs=c.plotY=c.dlBox=C},drawLegendSymbol:function(a,b){var c=v(a.itemStyle.fontSize)/2;b.legendSymbol=this.chart.renderer.circle(c,a.baseline-c,c).attr({zIndex:3}).add(b.legendGroup);b.legendSymbol.isMarker=!0},drawPoints:h.column.prototype.drawPoints,alignDataLabel:h.column.prototype.alignDataLabel});N.prototype.beforePadding=function(){var a=this,b=this.len,c=this.chart,d=0,g=b,f=this.isXAxis,
|
|
43
|
+
e=f?"xData":"yData",i=this.min,h={},j=t.min(c.plotWidth,c.plotHeight),k=Number.MAX_VALUE,m=-Number.MAX_VALUE,o=this.max-i,p=b/o,q=[];this.tickPositions&&(s(this.series,function(b){var c=b.options;if(b.type==="bubble"&&b.visible&&(a.allowZoomOutside=!0,q.push(b),f))s(["minSize","maxSize"],function(a){var b=c[a],d=/%$/.test(b),b=v(b);h[a]=d?j*b/100:b}),b.minPxSize=h.minSize,b=b.zData,b.length&&(k=t.min(k,t.max(P(b),c.displayNegative===!1?c.zThreshold:-Number.MAX_VALUE)),m=t.max(m,Q(b)))}),s(q,function(a){var b=
|
|
44
|
+
a[e],c=b.length,j;f&&a.getRadii(k,m,h.minSize,h.maxSize);if(o>0)for(;c--;)j=a.radii[c],d=Math.min((b[c]-i)*p-j,d),g=Math.max((b[c]-i)*p+j,g)}),q.length&&o>0&&r(this.options.min,this.userMin)===C&&r(this.options.max,this.userMax)===C&&(g-=b,p*=(b+d-g)/b,this.min+=d/p,this.max+=g/p))};var y=z.prototype,m=j.Pointer.prototype;y.toXY=function(a){var b,c=this.chart;b=a.plotX;var d=a.plotY;a.rectPlotX=b;a.rectPlotY=d;a.clientX=(b/Math.PI*180+this.xAxis.pane.options.startAngle)%360;b=this.xAxis.postTranslate(a.plotX,
|
|
45
|
+
this.yAxis.len-d);a.plotX=a.polarPlotX=b.x-c.plotLeft;a.plotY=a.polarPlotY=b.y-c.plotTop};y.orderTooltipPoints=function(a){if(this.chart.polar&&(a.sort(function(a,c){return a.clientX-c.clientX}),a[0]))a[0].wrappedClientX=a[0].clientX+360,a.push(a[0])};o(h.area.prototype,"init",K);o(h.areaspline.prototype,"init",K);o(h.spline.prototype,"getPointSpline",function(a,b,c,d){var g,f,e,i,h,j,k;if(this.chart.polar){g=c.plotX;f=c.plotY;a=b[d-1];e=b[d+1];this.connectEnds&&(a||(a=b[b.length-2]),e||(e=b[1]));
|
|
46
|
+
if(a&&e)i=a.plotX,h=a.plotY,b=e.plotX,j=e.plotY,i=(1.5*g+i)/2.5,h=(1.5*f+h)/2.5,e=(1.5*g+b)/2.5,k=(1.5*f+j)/2.5,b=Math.sqrt(Math.pow(i-g,2)+Math.pow(h-f,2)),j=Math.sqrt(Math.pow(e-g,2)+Math.pow(k-f,2)),i=Math.atan2(h-f,i-g),h=Math.atan2(k-f,e-g),k=Math.PI/2+(i+h)/2,Math.abs(i-k)>Math.PI/2&&(k-=Math.PI),i=g+Math.cos(k)*b,h=f+Math.sin(k)*b,e=g+Math.cos(Math.PI+k)*j,k=f+Math.sin(Math.PI+k)*j,c.rightContX=e,c.rightContY=k;d?(c=["C",a.rightContX||a.plotX,a.rightContY||a.plotY,i||g,h||f,g,f],a.rightContX=
|
|
47
|
+
a.rightContY=null):c=["M",g,f]}else c=a.call(this,b,c,d);return c});o(y,"translate",function(a){a.call(this);if(this.chart.polar&&!this.preventPostTranslate)for(var a=this.points,b=a.length;b--;)this.toXY(a[b])});o(y,"getSegmentPath",function(a,b){var c=this.points;if(this.chart.polar&&this.options.connectEnds!==!1&&b[b.length-1]===c[c.length-1]&&c[0].y!==null)this.connectEnds=!0,b=[].concat(b,[c[0]]);return a.call(this,b)});o(y,"animate",L);o(q,"animate",L);o(y,"setTooltipPoints",function(a,b){this.chart.polar&&
|
|
48
|
+
F(this.xAxis,{tooltipLen:360});return a.call(this,b)});o(q,"translate",function(a){var b=this.xAxis,c=this.yAxis.len,d=b.center,g=b.startAngleRad,f=this.chart.renderer,e,h;this.preventPostTranslate=!0;a.call(this);if(b.isRadial){b=this.points;for(h=b.length;h--;)e=b[h],a=e.barX+g,e.shapeType="path",e.shapeArgs={d:f.symbols.arc(d[0],d[1],c-e.plotY,null,{start:a,end:a+e.pointWidth,innerR:c-r(e.yBottom,c)})},this.toXY(e)}});o(q,"alignDataLabel",function(a,b,c,d,g,f){if(this.chart.polar){a=b.rectPlotX/
|
|
49
|
+
Math.PI*180;if(d.align===null)d.align=a>20&&a<160?"left":a>200&&a<340?"right":"center";if(d.verticalAlign===null)d.verticalAlign=a<45||a>315?"bottom":a>135&&a<225?"top":"middle";y.alignDataLabel.call(this,b,c,d,g,f)}else a.call(this,b,c,d,g,f)});o(m,"getIndex",function(a,b){var c,d=this.chart,g;d.polar?(g=d.xAxis[0].center,c=b.chartX-g[0]-d.plotLeft,d=b.chartY-g[1]-d.plotTop,c=180-Math.round(Math.atan2(c,d)/Math.PI*180)):c=a.call(this,b);return c});o(m,"getCoordinates",function(a,b){var c=this.chart,
|
|
50
|
+
d={xAxis:[],yAxis:[]};c.polar?s(c.axes,function(a){var f=a.isXAxis,e=a.center,h=b.chartX-e[0]-c.plotLeft,e=b.chartY-e[1]-c.plotTop;d[f?"xAxis":"yAxis"].push({axis:a,value:a.translate(f?Math.PI-Math.atan2(h,e):Math.sqrt(Math.pow(h,2)+Math.pow(e,2)),!0)})}):d=a.call(this,b);return d})})(Highcharts);
|