diff --git a/web/src/Gruntfile.js b/web/src/Gruntfile.js index 2faecb5d6..986d90847 100644 --- a/web/src/Gruntfile.js +++ b/web/src/Gruntfile.js @@ -22,10 +22,8 @@ module.exports = function (grunt) { '<%= concat.baseLib.dest %>', '<%= concat.utilLib.dest %>' ], - pinpointComponentJS: [ - DEST_LIB_PATH + 'js/*.js', - '!' + DEST_LIB_PATH + 'js/*.min.js' - ] + pinpointComponentJS: [ DEST_LIB_PATH + 'js/*.js', '!' + DEST_LIB_PATH + 'js/*.min.js' ], + pinpointSrc: [ DEST_LIB_PATH + 'js/*.js', '!' + DEST_LIB_PATH + 'js/*.min.js' ] }, jsdoc: { dist: { @@ -190,10 +188,21 @@ module.exports = function (grunt) { separator: '\n' }, src: [ - COMPONENT_PATH + 'infiniteCircularScroll/InfiniteCircularScroll.js' + COMPONENT_PATH + 'infinite-circular-scroll/InfiniteCircularScroll.js' ], dest: DEST_LIB_PATH + 'js/infinite-circular-scroll.js' }, + serverMap: { + options: { + stripBanner: true, + banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %> */', + separator: '\n' + }, + src: [ + COMPONENT_PATH + 'server-map2/jquery.ServerMap2.js' + ], + dest: DEST_LIB_PATH + 'js/server-map2.js' + }, pinpointComponent: { options: { stripBanner: true, @@ -201,12 +210,93 @@ module.exports = function (grunt) { separator: '\n' }, src: makePath( [ - 'js/time-slider.js', - 'js/big-scatter-chart2.js', - 'js/infinite-circular-scroll.js' + 'js/time-slider.min.js', + 'js/big-scatter-chart2.min.js', + 'js/infinite-circular-scroll.min.js', + 'js/server-map2.min.js' ], DEST_LIB_PATH ), dest: DEST_LIB_PATH + 'js/pinpoint-component.min.js' }, + pinpointSrc: { + options: { + stripBanner: true, + banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %>*/', + separator: '\n' + }, + src: makePath( [ + 'common/filters/icon-url.filter.js', + 'common/filters/application-name-to-class-name.filter.js', + 'common/services/time-slider-vo.service.js', + 'common/services/alerts.service.js', + 'common/services/progress-bar.service.js', + 'common/services/navbar-vo.service.js', + 'common/services/transaction-dao.service.js', + 'common/services/location.service.js', + 'common/services/server-map-dao.service.js', + 'common/services/agent-dao.service.js', + 'common/services/sidebar-title-vo.service.js', + 'common/services/filtered-map-util.service.js', + 'common/services/filter.config.js', + 'common/services/server-map-filter-vo.service.js', + 'common/services/alarm-ajax.service.js', + 'common/services/alarm-util.service.js', + 'common/services/alarm-broadcast.service.js', + 'common/services/server-map-hint-vo.service.js', + 'common/services/is-visible.service.js', + 'common/services/user-locales.service.js', + 'common/help/help-content-en.js', + 'common/help/help-content-ko.js', + 'common/help/help-content-template.js', + 'common/services/help-content.service.js', + 'common/services/analytics.service.js', + 'common/services/realtime-websocket.service.js', + 'common/services/preference.service.js', + 'common/services/common-ajax.service.js', + 'common/services/agent-ajax.service.js', + 'common/services/tooltip.service.js', + + 'features/navbar/navbar.directive.js', + 'features/serverMap/server-map.directive.js', + 'features/realtimeChart/realtime-chart.directive.js', + 'features/scatter/scatter.directive.js', + 'features/nodeInfoDetails/node-info-details.directive.js', + 'features/linkInfoDetails/link-info-details.directive.js', + //'features/serverList/server-list.directive.js', + 'features/agentList/agent-list.directive.js', + 'features/agentInfo/agent-info.directive.js', + 'features/timeSlider/time-slider.directive.js', + 'features/transactionTable/transaction-table.directive.js', + 'features/timeline/timeline.directive.js', + 'features/agentChartGroup/agent-chart-group.directive.js', + 'features/sidebar/title/sidebar-title.directive.js', + 'features/sidebar/filter/filter-information.directive.js', + 'features/distributedCallFlow/distributed-call-flow.directive.js', + 'features/responseTimeChart/response-time-chart.directive.js', + 'features/loadChart/load-chart.directive.js', + 'features/jvmMemoryChart/jvm-memory-chart.directive.js', + 'features/cpuLoadChart/cpu-load-chart.directive.js', + 'features/tpsChart/tps-chart.directive.js', + 'features/loading/loading.directive.js', + 'features/configuration/configuration.controller.js', + 'features/configuration/help/help.controller.js', + 'features/configuration/general/general.controller.js', + 'features/configuration/alarm/alarm-user-group.directive.js', + 'features/configuration/alarm/alarm-group-member.directive.js', + 'features/configuration/alarm/alarm-pinpoint-user.directive.js', + 'features/configuration/alarm/alarm-rule.directive.js', + 'features/realtimeChart/realtime-chart.controller.js', + + 'pages/main/main.controller.js', + 'pages/inspector/inspector.controller.js', + 'pages/transactionList/transaction-list.controller.js', + 'pages/transactionDetail/transaction-detail.controller.js', + 'pages/filteredMap/filtered-map.controller.js', + 'pages/transactionView/transaction-view.controller.js', + 'pages/scatterFullScreenMode/scatter-full-screen-mode.controller.js' + + ], 'main/webapp/' ), + dest: DEST_LIB_PATH + 'js/pinpoint.js' + }, vernderCSS: { options: { stripBanner: true, @@ -308,27 +398,69 @@ module.exports = function (grunt) { files: { 'main/webapp/lib/js/infinite-circular-scroll.min.js': 'main/webapp/lib/js/infinite-circular-scroll.js' } + }, + serverMap : { + options: { + preserveComments: false, + banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %>*/' + }, + files: { + 'main/webapp/lib/js/server-map2.min.js': 'main/webapp/lib/js/server-map2.js' + } + }, + pinpointSrc: { + options: { + preserveComments: false, + sourceMap: true, + banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %>*/' + }, + files: { + 'main/webapp/lib/js/pinpoint.min.js': 'main/webapp/lib/js/pinpoint.js' + } } }, watch: { - cssDev: { + pinpoint: { + files: makePath([ + 'styles/*.css', + 'components/time-slider/*.js', + 'components/big-scatter-chart/*.js', + 'components/infinite-circular-scroll/*.js', + 'components/server-map2/*.js', + 'common/**/*.js', + 'features/**/*.js', + 'pages/**/*.js' + ], 'main/webapp/' ), + tasks: [ 'buildPinpointCSS', 'buildPinpointComponentJS', 'buildPinpointSrc' ] + }, + pinpointCSS: { files: makePath([ '*.js' ], STYLE_PATH ), tasks: [ 'buildPinpointCSS'] }, - jsDev: { + pinpointComponent: { files: makePath([ 'time-slider/*.js', 'big-scatter-chart/*.js', - 'infiniteCircularScroll/*.js' + 'infinite-circular-scroll/*.js', + 'server-map2/*.js' ], COMPONENT_PATH), tasks: ['buildPinpointComponentJS' ] + }, + pinpointSrc: { + files: makePath([ + 'common/**/*.js', + 'features/**/*.js', + 'pages/**/*.js' + ], 'main/webapp/' ), + tasks: ['buildPinpointSrc' ] } }, jshint: { options: { sub: true, + boss: true, newcap: false, loopfunc: true }, @@ -399,10 +531,20 @@ module.exports = function (grunt) { 'concat:infiniteScroll', 'uglify:infiniteScroll' ]); + grunt.registerTask('buildServerMap', '', [ + 'concat:serverMap', + 'uglify:serverMap' + ]); + grunt.registerTask('buildPinpointSrc', 'Create pinpoint js file', [ + 'concat:pinpointSrc', + 'uglify:pinpointSrc', + 'clean:pinpointSrc' + ]); grunt.registerTask('buildAllJS', 'Create js file', [ 'buildVendorJS', - 'buildPinpointComponentJS' + 'buildPinpointComponentJS', + 'buildPinpointSrc' ]); grunt.registerTask('buildVendorJS', 'Create vendor js file', [ 'buildBaseLibJS', @@ -411,10 +553,11 @@ module.exports = function (grunt) { 'buildAngularJS', 'clean:vendorJS' ]); - grunt.registerTask('buildPinpointComponentJS', 'Create pinpoint js file', [ + grunt.registerTask('buildPinpointComponentJS', 'Create pinpoint component js file', [ 'buildTimeSlider', 'buildBigScatter', 'buildInfiniteScroll', + 'buildServerMap', 'concat:pinpointComponent', 'clean:pinpointComponentJS' ]); @@ -423,15 +566,15 @@ module.exports = function (grunt) { 'concat:vernderCSS', 'concat:pinpointCSS' ]); - grunt.registerTask('buildVendorCSS', 'Create css file', [ + grunt.registerTask('buildVendorCSS', 'Create vendor css file', [ 'concat:vernderCSS' ]); - grunt.registerTask('buildPinpointCSS', 'Create css file', [ + grunt.registerTask('buildPinpointCSS', 'Create pinpoint css file', [ 'concat:pinpointCSS' ]); - grunt.registerTask('watchDev', 'Watch js, css', [ - 'watch:jsDev', - 'watch:cssDev' + grunt.registerTask('watchDev', 'Watch your source', [ + 'jshint', + 'watch:pinpoint' ]); grunt.registerTask('jshintDev', '', [ 'jshint' diff --git a/web/src/main/webapp/common/services/common-ajax.service.js b/web/src/main/webapp/common/services/common-ajax.service.js index 49e3f5ea7..15d382b2e 100644 --- a/web/src/main/webapp/common/services/common-ajax.service.js +++ b/web/src/main/webapp/common/services/common-ajax.service.js @@ -14,30 +14,37 @@ }); pinpointApp.service( "CommonAjaxService", [ "CommonAjaxServiceConfig", "$http", function( cfg, $http ) { - + this.getSQLBind = function(url, data, cb) { - $http.post( url, data).success( function( result ) { - cb( result ); - }).error( function( error ) { - cb( error ); - }); - //jQuery.ajax({ - // type: 'POST', - // url: url, - // data: data, - // cache: false, - // dataType: 'json', - // success: function (result) { - // if (angular.isFunction(cb)) { - // cb(result); - // } + //$http({ + // "url": url, + // "method": "POST", + // "headers": { + // "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8" // }, - // error: function (xhr, status, error) { - // if (angular.isFunction(cb)) { - // cb(error); - // } - // } + // "data": data + //}).then(function(result) { + // cb( result ); + //}, function( error ) { + // cb( error ); //}); + jQuery.ajax({ + type: 'POST', + url: url, + data: data, + cache: false, + dataType: 'json', + success: function (result) { + if (angular.isFunction(cb)) { + cb(result); + } + }, + error: function (xhr, status, error) { + if (angular.isFunction(cb)) { + cb(error); + } + } + }); }; this.getServerTime = function( cb ) { diff --git a/web/src/main/webapp/common/services/user-locales.service.js b/web/src/main/webapp/common/services/user-locales.service.js index 2f7cca4b5..64fb308df 100644 --- a/web/src/main/webapp/common/services/user-locales.service.js +++ b/web/src/main/webapp/common/services/user-locales.service.js @@ -7,7 +7,7 @@ * @name UserLocalesService * @class */ - pinpointApp.factory("UserLocalesService", function( $window) { + pinpointApp.factory("UserLocalesService", [ "$window", function( $window ) { var defaultLocale = "en"; // May not be the best way to get locale. var localeCode = $window.navigator.userLanguage || $window.navigator.language; @@ -20,5 +20,5 @@ "userLocale" : localeCode, "defaultLocale" : defaultLocale }; - }); + }]); })(); \ No newline at end of file diff --git a/web/src/main/webapp/components/infiniteCircularScroll/InfiniteCircularScroll.js b/web/src/main/webapp/components/infinite-circular-scroll/InfiniteCircularScroll.js similarity index 100% rename from web/src/main/webapp/components/infiniteCircularScroll/InfiniteCircularScroll.js rename to web/src/main/webapp/components/infinite-circular-scroll/InfiniteCircularScroll.js diff --git a/web/src/main/webapp/features/serverMap/jquery.ServerMap2.js b/web/src/main/webapp/components/server-map2/jquery.ServerMap2.js similarity index 100% rename from web/src/main/webapp/features/serverMap/jquery.ServerMap2.js rename to web/src/main/webapp/components/server-map2/jquery.ServerMap2.js diff --git a/web/src/main/webapp/features/scatter/scatter.directive.js b/web/src/main/webapp/features/scatter/scatter.directive.js index 6054bc9b5..8bc3ae963 100644 --- a/web/src/main/webapp/features/scatter/scatter.directive.js +++ b/web/src/main/webapp/features/scatter/scatter.directive.js @@ -137,7 +137,7 @@ $rootScope.$broadcast( "responseTimeChartDirective.loadRealtime", applicationName, oScatterChart.getCurrentAgent(), oChartXRange.min, oChartXRange.max ); })); } else { - oScatterChart.addBubbleAndMoveAndDraw( scatterData ); + oScatterChart.addBubbleAndMoveAndDraw( oScatterChart.createDataBlock( scatterData ) ); } $window.htoScatter[application] = oScatterChart; }, 100); @@ -158,14 +158,13 @@ htScatterSet[application].scatter.resume(); htScatterSet[application].scatter.selectAgent( preferenceService.getAgentAllStr(), true); } - } else { makeNewScatter( application, w, h ); } } function showScatterWithData(application, w, h, data) { if (angular.isDefined(htScatterSet[application])) { - htScatterSet[application].scatter.addBubbleAndMoveAndDraw( data ); + htScatterSet[application].scatter.addBubbleAndMoveAndDraw( htScatterSet[application].scatter.createDataBlocK( data ) ); } else { makeNewScatter(application, w, h, data).hide(); } diff --git a/web/src/main/webapp/index.html b/web/src/main/webapp/index.html index 856f328dc..181c80a47 100644 --- a/web/src/main/webapp/index.html +++ b/web/src/main/webapp/index.html @@ -20,7 +20,6 @@ - @@ -353,77 +352,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/web/src/main/webapp/lib/js/big-scatter-chart2.min.js b/web/src/main/webapp/lib/js/big-scatter-chart2.min.js index bdf20fb43..2df98b13a 100644 --- a/web/src/main/webapp/lib/js/big-scatter-chart2.min.js +++ b/web/src/main/webapp/lib/js/big-scatter-chart2.min.js @@ -1,2 +1,2 @@ -/*! pinpoint - v1.5.2 - 2016-03-15*/!function(a,b){"use strict";function c(a,b,c,d,e){this._oExternal=d,this._AGENT_ALL=this._currentAgent=e,this._aAgentList=b,this._setOption(a),this._initVariables(),this._initManager(),this._initElements(),this._initPlugin(c),this._initInnerPlugin()}c.prototype.option=function(a,b){var c=this,d=arguments.length;if(2===d)this._option[a]=b;else{if(1!==d)return this._option;if("object"==typeof a){this._option=this._option||{};for(var e in a)c._option[e]=a[e]}else if("string"==typeof a)return this._option[a]}},c.prototype._setOption=function(a){this.option({containerId:"",sPrefix:"bigscatterchart",width:600,height:400,minX:0,maxX:100,minY:0,maxY:100,minZ:0,maxZ:1,ticksOfX:5,ticksOfY:5,bubbleSize:10,padding:{top:40,left:50,right:40,bottom:30},lineColor:"#3d3d3d",bubbleRadius:3,guideStyle:{lineWidth:1,lineDash:[1,0],globalAlpha:1,strokeStyle:"#e3e3e3"},axisLabelStyle:{"font-size":"10px","line-height":"12px",height:"20px","padding-top":"5px"},loadingStr:"Loading",noDataStr:"No Data",noDataStyle:{"font-size":"15px",color:"#000","font-weight":"bold"},bUseMouseGuideLine:!0,checkBoxImage:{checked:"data:image/gif;base64,R0lGODlhDgANANU7APf6/QBoAO31+wBEAABZABSmDfj7/kLFLM/k9CpFeCA7bBs1ZiU/cWDZQBgxYvL4/PD2/ABLAKzQ6wBTAPn8/vD3/FLPNgBzAO30/J/J6JKgu1/YPzBLfzVQhQBvAO31/EhknURgmNTn9NPm9Orz+9fc51LQNztWjfX5/e/2++72+9vh7Njp9kBbk9jp9aCvzd3r+QB3AABhAKXM6SGvFTG5IEtnoBUuXuLu+v//zP///wAAAAAAAAAAAAAAAAAAACH5BAEAADsALAAAAAAOAA0AAAaHwJ1tSCS+VrsdSMdsOmOxXUiHq1ohlFguF2vpMAYDBvYxXDaNxuWkA3gCABIgYLGYAruOTraVoWQHgTIlOxw6BDWJiIoUGjsJOg8TNJSUEw8QCTsMOiwVEQWhERUuOAw7CjoSIykDrioiEjgKOws6MzMIArsIuDgLOw4ZVsRWDkk3ycrLN0lBADs=",unchecked:"data:image/gif;base64,R0lGODlhDgANAPcbANnZ2X9/f3Nzc4eHh4ODg5GRkfDw8IqKim1tbXt7e46Ojnd3d3BwcOzs7NPT09jY2O/v7+3t7eHh4eXl5dXV1enp6d3d3Wtra5OTk/Ly8v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjEgNjQuMTQwOTQ5LCAyMDEwLzEyLzA3LTEwOjU3OjAxICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1LjEgTWFjaW50b3NoIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjYxQjZBNkRCQUVEQTExRTI5Q0M1REU5NjlFRThGRDZBIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjYxQjZBNkRDQUVEQTExRTI5Q0M1REU5NjlFRThGRDZBIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NjFCNkE2RDlBRURBMTFFMjlDQzVERTk2OUVFOEZENkEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NjFCNkE2REFBRURBMTFFMjlDQzVERTk2OUVFOEZENkEiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4B//79/Pv6+fj39vX08/Lx8O/u7ezr6uno5+bl5OPi4eDf3t3c29rZ2NfW1dTT0tHQz87NzMvKycjHxsXEw8LBwL++vby7urm4t7a1tLOysbCvrq2sq6qpqKempaSjoqGgn56dnJuamZiXlpWUk5KRkI+OjYyLiomIh4aFhIOCgYB/fn18e3p5eHd2dXRzcnFwb25tbGtqaWhnZmVkY2JhYF9eXVxbWllYV1ZVVFNSUVBPTk1MS0pJSEdGRURDQkFAPz49PDs6OTg3NjU0MzIxMC8uLSwrKikoJyYlJCMiISAfHh0cGxoZGBcWFRQTEhEQDw4NDAsKCQgHBgUEAwIBAAAh+QQBAAAbACwAAAAADgANAAAIgwA3YBhIsCCGDRsKaFjIsGGGAhsUaMhAsaJFBRsOaIDAkaMBAxwzHNgwQEOEkygbnMwwYAMBDRViypSZgcCGABom6Ny5M0OADQk0SBhKlGiGBBsWaLDAtGnTDAs2CNDw4AEAq1WvZhCwgYEGCmDDhs3AYAMCBxbTZkCA8ILbt3AvIAwIADs="},fnXAxisFormat:function(a,b,c){var d=moment(a*b+c);return d.format("MM-DD")+"
"+d.format("HH:mm:ss")},fnYAxisFormat:function(a,b,d,e){return c.Util.addComma(e+d-(a*b+d))},fOnSelect:function(){}}),this.option(a),this.option("minY",this._oExternal.loadFromStorage("scatter-y-min")||this.option("minY")),this.option("maxY",this._oExternal.loadFromStorage("scatter-y-max")||this.option("maxY"))},c.prototype._initVariables=function(){this._aBubbles=[],this._oSCManager=new c.SizeCoordinateManager(this.option()),this._bPause=!1,this._bDestroied=!1,this._bRequesting=!1,this._getContainer()},c.prototype._getContainer=function(){var a=this.option("containerId");switch(typeof a){case"string":this._$elContainer=b("#"+a);break;case"object":this._$elContainer=a;break;case"function":this._$elContainer=a()}this._$elContainer=b(this._$elContainer),this._$elContainer.css({width:this._oSCManager.getWidth(),height:this._oSCManager.getHeight(),position:"relative"}).addClass(this.option("containerClass"))},c.prototype._initManager=function(){var a=this;this._oBubbleTypeManager=new c.BubbleTypeManager(this.option(),this._oSCManager,this._$elContainer,{onChange:function(b){a._oRendererManager.toggle(b)},onSend:function(b,c){a._oExternal.sendAnalytics(b,c)}}),this._oRendererManager=new c.RendererManager(this.option(),this._oSCManager,this._aAgentList,this._$elContainer),this._oDragManager=new c.DragManager(this.option(),this._oSCManager,this._$elContainer,{onSelect:function(b,c){a.hasDataByXY(c.fromX,c.toX,c.fromY,c.toY)&&a._oExternal.onSelect(b,c)}})},c.prototype._initElements=function(){this._$elPluginArea=b("
").css({top:"0px",left:this._oSCManager.getLeftOfPluginArea()+"px",width:this._oSCManager.getPadding().right+"px",height:this._oSCManager.getHeight()+"px","z-index":510,position:"absolute"}).addClass("plugins").appendTo(this._$elContainer)},c.prototype._initPlugin=function(a){var c=this;b.each(a,function(a,b){b.initElement(c._$elContainer,c._$elPluginArea,c.option()).initEvent(c)})},c.prototype._initInnerPlugin=function(){this._oMessage=new c.MessagePlugin,this._oMessage.initElement(this._$elContainer,this._$elPluginArea,this.option()).initEvent(self)},c.prototype.fireDragEvent=function(a){this._oDragManager.triggerDrag(a)},c.prototype.selectArea=function(a,b,c){this._oExternal.onSelect(a,b,c)},c.prototype.selectType=function(a){return this._oBubbleTypeManager.selectType(a),this._oRendererManager.selectType(this._currentAgent,a),this},c.prototype.addBubbles=function(a){this._aBubbles.push(a)},c.prototype._getSumCountByType=function(a){var c=this,d={},e=this._oSCManager.getX();b.each(this.option("typeInfo"),function(a,b){d[b[0]]=0});for(var f=0;f0&&this._oMessage.hide();for(var a=0,b=this._aBubbles.length;b>a;a++)this._drawBubbles(this._aBubbles[a])},c.prototype.clear=function(){this._oRendererManager.clear(),this._aBubbles=[],this._oBubbleTypeManager.showTypeCount(this._getSumCountByType()),this._oDragManager.hide(),this._oMessage.show(this.option("noDataStr"))},c.prototype._drawBubbles=function(a){var d=this,e=this.option("typeInfo"),f=this.option("propertyIndex"),g=this.option("sPrefix");setTimeout(function(){b.each(d._aAgentList,function(b,h){for(var i=0,j=a.countByAgent(h);j>i&&!d._bDestroied;i++){var k=a.getDataByAgent(h,i),l=k[f.groupCount];if(0!==l){var m=e[k[f.type]];d._oRendererManager.drawBubble(c.Util.makeKey(h,g,m[0]),m[1],k)}}})},0)},c.prototype.addBubbleAndMoveAndDraw=function(a,b,c){if(b===!1){if(a.isEmpty())return;this._oMessage.hide()}this.addBubbles(a),this._oBubbleTypeManager.showTypeCount(this._getSumCountByType(b)),this._drawBubbles(a),this._moveChart(a,c),this._oRendererManager.updateXYAxis(),this._removeBubble()},c.prototype._moveChart=function(a,b){var c=this._oSCManager.getX(),d=a.getX(),e=this.option("chartAnimationTime");if(d.min>=c.max){var f=d.max-c.max,g=f*this._oSCManager.getPixelPerTime();this._oSCManager.setX(c.min+f,c.max+f),this._oRendererManager.moveChart(parseInt(g,10),e>b?0:e)}},c.prototype._removeBubble=function(){for(var a=this._oSCManager.getX().min,b=0;bk;k++)for(var m=this._aBubbles[k],n=0,o=m.count();o>n;n++){var p=m.getData(n),q=m.getAgentName(p);if(this._currentAgent===this._AGENT_ALL||this._currentAgent===q){var r=p[h.x],s=g[p[h.type]][0];if(c.Util.isInRange(a,b,r)&&c.Util.indexOf(j,s)>=0){var t=p[h.y];(c.Util.isInRange(d,e,t)||e===i.max&&t>e)&&f.push([m.getTransactionID(p),p[h.x],p[h.y]])}}}return f},c.prototype.getDataByRange=function(a,b,d){var e=[],f=this.option("typeInfo"),g=this.option("propertyIndex");b=parseInt(b,10),d=parseInt(d,10);for(var h=0,i=this._aBubbles.length;i>h;h++)for(var j=this._aBubbles[h],k=0,l=j.count();l>k;k++){var m=j.getData(k),n=j.getAgentName(m);if(this._currentAgent===this._AGENT_ALL||this._currentAgent===n){var o=f[m[g.type]][0];if(a===o){var p=m[g.y];("Failed"===a||c.Util.isInRange(b,d,p))&&e.push([j.getTransactionID(m),m[g.x],m[g.y]])}}}return e},c.prototype.hasDataByXY=function(a,b,d,e){var f=this.option("typeInfo"),g=this.option("propertyIndex");a=parseInt(a,10),b=parseInt(b,10),d=parseInt(d,10),e=parseInt(e,10);for(var h=this._oSCManager.getY(),i=this._oBubbleTypeManager.getVisibleType(),j=0,k=this._aBubbles.length;k>j;j++)for(var l=this._aBubbles[j],m=0,n=l.count();n>m;m++){var o=l.getData(m),p=l.getAgentName(o);if(this._currentAgent===this._AGENT_ALL||this._currentAgent===p){var q=o[g.x],r=f[o[g.type]][0];if(c.Util.isInRange(a,b,q)&&c.Util.indexOf(i,r)>=0){var s=o[g.y];if(c.Util.isInRange(d,e,s)||e===h.max&&s>e)return!0}}}return!1},c.prototype.getChartAsImage=function(a){return this._oRendererManager.getChartAsImage(a,this._oBubbleTypeManager.getElementLI())},c.prototype.drawWithDataSource=function(a){this._oDataLoadManager=a,this._oDataLoadManager.setTimeManager(this._oSCManager),this._oDataLoadManager.abort(),this._oDataLoadManager.initCallCount(),this._drawWithDataSource(),this.option("realtime")&&this._invokeLoadRealtimeData()},c.prototype._invokeLoadRealtimeData=function(){var a=this;setTimeout(function(){a._drawWithRealtimeDataSource()},this._oDataLoadManager.getRealtimeInterval())},c.prototype._drawWithDataSource=function(){var a=this;this._bPause||this._bRequesting||this._oDataLoadManager.isCompleted()||(this._oDataLoadManager.isFirstRequest()&&this._oMessage.show(this.option("loadingStr")),this._oDataLoadManager.loadData(function(){a._bRequesting=!1},function(b,c,d){var e=a.createDataBlock(b);e.isEmpty()===!1&&a.addBubbleAndMoveAndDraw(e,!1,0),c===!0?setTimeout(function(){a._drawWithDataSource()},d):a._aBubbles&&0!==a._aBubbles.length||a._oMessage.show(a.option("noDataStr"))},function(){a._showServerError(),a._oExternal.onError()},this._oSCManager.getXOfPixel(),this._oSCManager.getYOfPixel()),this._bRequesting=!0)},c.prototype._drawWithRealtimeDataSource=function(){var a=this;this._oDataLoadManager.loadRealtimeData(function(b,c,d,e){a._hideServerError(),d?(a.pause(),a.resume(e-a._oSCManager.getGapX(),e)):(a.addBubbleAndMoveAndDraw(a.createDataBlock(b),!0,c),setTimeout(function(){a._bPause===!1&&a._drawWithRealtimeDataSource()},c))},function(){a._showServerError(),a._oExternal.onError(),setTimeout(function(){a._bPause===!1&&a._drawWithRealtimeDataSource()},0)},this._oSCManager.getXOfPixel(),this._oSCManager.getYOfPixel())},c.prototype._hideServerError=function(){this._$elContainer.css({backgroundImage:"none"})},c.prototype._showServerError=function(){this._$elContainer.css({backgroundImage:"url("+this.option("errorImage")+")",backgroundRepeat:"no-repeat",backgroundPosition:"88% 21%",backgroundSize:"30px 30px"})},c.prototype.redraw=function(){this._oRendererManager.clear(),this._oRendererManager.updateXYAxis(),this.redrawBubbles()},c.prototype.abort=function(){this._bPause=!0,this._oDataLoadManager.abort()},c.prototype.pause=function(){this._bPause=!0,this.option("realtime")&&this._oRendererManager.reset()},c.prototype.resume=function(a,b){this._bPause=!1,this.option("realtime")?(this._aBubbles=[],this._oSCManager.setX(a,b,!0),this._oDataLoadManager.reset(),this._oDataLoadManager.setRealtimeFrom(b),this._oRendererManager.updateXYAxis(),this._drawWithDataSource(),this._invokeLoadRealtimeData()):this._drawWithDataSource()},c.prototype.changeRangeOfY=function(a){this._oSCManager.setY(a.min,a.max)},c.prototype.selectAgent=function(a,c){var d=this,e=a===this._AGENT_ALL,f=this.option("typeInfo"),g={};c===!0?(this._oBubbleTypeManager.selectAll(),b.each(f,function(a,b){g[b[0]]=!0})):b.each(f,function(a,b){g[b[0]]=d._oBubbleTypeManager.isChecked(b[0])}),this._currentAgent=a,this._oRendererManager.showSelectedAgent(e,a,g),this._oBubbleTypeManager.showTypeCount(this._getSumCountByType())},c.prototype.getCurrentAgent=function(){return this._currentAgent},a.BigScatterChart2=c}(window,jQuery),function(a,b){"use strict";function c(a,b,c){this._initData(a),this._splitDataByAgent(b,c)}c.prototype._initData=function(a){this._from=a.from,this._to=a.to,this._resultFrom=a.complete?a.from:a.resultFrom,this._resultTo=a.complete?a.to:a.resultTo,this._oAgentMetaInfo=a.scatter.metadata,this._aAllData=a.scatter.dotList,this._bLoadComplete=a.complete,this._oAgentData={},this._oCountOfType={}},c.prototype._splitDataByAgent=function(a,c){var d=this;this._oPropertyIndex=a,this._oTypeInfo=c,b.each(this._oAgentMetaInfo,function(a,e){var f=e[0];d._oAgentData[f]=[],d._oCountOfType[f]={},b.each(c,function(a,b){d._oCountOfType[f][b[0]]=0})});var e=Number.MAX_VALUE,f=0;b.each(this._aAllData,function(b,g){var h=d._getAgentName(g[2]+"");e=Math.min(g[1],e),f=Math.max(g[1],f),g[0]+=d._from,d._oAgentData[h].push(g),d._oCountOfType[h][c[g[a.type]+""][0]]++}),this._minX=this._bLoadComplete?this._from:this._resultFrom,this._maxX=this._bLoadComplete?this._to:this._resultTo,this._minY=e,this._maxY=f},c.prototype._getAgentName=function(a){return this._oAgentMetaInfo[a][0]},c.prototype.getDataByAgent=function(a,b){return this._oAgentData[a][b]},c.prototype.getData=function(a){return this._aAllData[a]},c.prototype.count=function(){return this._aAllData.length},c.prototype.countByAgent=function(a){return this._oAgentData[a]?this._oAgentData[a].length:0},c.prototype.getCount=function(a,b,c,d){return 2===arguments.length?this._oCountOfType[a]?this._oCountOfType[a][b]:0:this._getRealtimeCount(a,b,c,d)},c.prototype._getRealtimeCount=function(a,c,d,e){var f=this,g=0;return b.each(this._aAllData,function(b,h){a===f._getAgentName(h[f._oPropertyIndex.meta]+"")&&c===f._oTypeInfo[h[f._oPropertyIndex.type]+""][0]&&h[f._oPropertyIndex.x]>=d&&h[f._oPropertyIndex.x]<=e&&g++}),g},c.prototype.getTransactionID=function(a){var b=this._oAgentMetaInfo[a[this._oPropertyIndex.meta]+""];return b[1]+"^"+b[2]+"^"+a[this._oPropertyIndex.transactionId]},c.prototype.getAgentName=function(a){var b=this._oAgentMetaInfo[a[this._oPropertyIndex.meta]+""];return b[0]},c.prototype.getX=function(){return{min:this._minX,max:this._maxX}},c.prototype.isEmpty=function(){return 0===this._aAllData.length},a.BigScatterChart2.DataBlock=c}(window,jQuery),function(a,b){"use strict";function c(a,b,c,d){this._option=a,this._oCallback=d,this._oSCManager=b,this._$elContainer=c,this._initVariable(),this._initElement(c),this._initEvent()}var d="jquery-drag-to-select";c.prototype.option=function(a){return this._option[a]},c.prototype._initVariable=function(){},c.prototype._initElement=function(a){var c=this._oSCManager.getPadding(),d=this.option("lineColor"),e=this.option("axisLabelStyle");this._$element=b("
").css({top:"0px",left:"0px",width:this._oSCManager.getWidth()+"px",height:this._oSCManager.getHeight()+"px",cursor:"crosshair","z-index":500,position:"absolute","background-color":"rgba(0,0,0,0)"}).addClass("overlay").appendTo(a),this._welXGuideNumber=b("
").css({top:this._oSCManager.getHeight()-c.bottom+10+"px",left:"0px",color:d,width:"56px",height:"22px",border:"1px solid #ccc",display:"none",position:"absolute","text-align":"center",background:"#fff","line-height":"22px","margin-left":"-28px","border-radius":"5px"}).css(e).append(b("")).append(b("
").css({top:"-10px",left:"27px",height:"10px",position:"absolute","border-left":"1px solid red"})).appendTo(this._$element),this._welYGuideNumber=b("
").css({top:"0px",left:"0px",color:d,width:"41px",height:"22px",border:"1px solid #ccc",display:"none",position:"absolute","margin-top":"-10px","text-align":"right",background:"#fff","line-height":"22px","padding-right":"3px","border-radius":"5px","vertical-align":"middle"}).css(e).append(b("")).append(b("
").css({top:"9px",right:"-10px",width:"10px",position:"absolute","border-top":"1px solid red"})).appendTo(this._$element)},c.prototype._initEvent=function(){var a=this,b=!1;this._$element.dragToSelect({className:d,onHide:function(c){var d=a._adjustSelectBoxForChart(c);a._oCallback.onSelect(d,a._parseCoordinatesToXY(d)),a._$elDragArea=c,a._$elDragArea.hide(),a._hideGuideValue(),b=!1},onMove:function(c){return a.option("bUseMouseGuideLine")?void(a._checkMouseXYInChart(c.pageX,c.pageY)?(b||(a._showGuideValue(),b=!0),a._moveGuideValue(c.pageX,c.pageY)):(b=!1,a._hideGuideValue())):!1},onLeave:function(c){b=!1,a._hideGuideValue()}})},c.prototype._checkMouseXYInChart=function(a,b){var c=this._oSCManager.getPadding(),d=this._oSCManager.getBubbleSize(),e=this._$elContainer.offset(),f=e.left+c.left+d,g=e.left+this._$elContainer.width()-c.right-d,h=e.top+c.top+d,i=e.top+this._$elContainer.height()-c.bottom-d;return a>=f&&g>=a&&b>=h&&i>=b},c.prototype.triggerDrag=function(a){var b=this._adjustSelectBoxForChart(a);this._oCallback.onSelect(b,this._parseCoordinatesToXY(b))},c.prototype._adjustSelectBoxForChart=function(a){var b=this._oSCManager.getPadding(),c=this._oSCManager.getBubbleSize(),d=b.top+c,e=b.left+c,f=this._oSCManager.getWidth()-b.right-c,g=this._oSCManager.getHeight()-b.bottom-c,h=parseInt(a.css("left"),10),i=h+a.width(),j=parseInt(a.css("top"),10),k=j+a.height();j=Math.max(j,d),h=Math.max(h,e),i=Math.min(i,f),k=Math.min(k,g);var l={top:j,left:h,width:i-h,height:k-j};return a.animate(l,200),l},c.prototype._parseCoordinatesToXY=function(a){var b=this._oSCManager.getPadding(),c=this._oSCManager.getBubbleSize();return{fromX:this._oSCManager.parseMouseXToXData(a.left-b.left-c),toX:this._oSCManager.parseMouseXToXData(a.left+a.width-b.left-c),fromY:this._oSCManager.parseMouseYToYData(this._oSCManager.getHeight()-(b.bottom+c)-(a.top+a.height)),toY:this._oSCManager.parseMouseYToYData(this._oSCManager.getHeight()-(b.bottom+c)-a.top)}},c.prototype._showGuideValue=function(){this._welXGuideNumber.show(),this._welYGuideNumber.show()},c.prototype._moveGuideValue=function(a,b){var c=this._oSCManager.getPadding(),d=this._oSCManager.getBubbleSize(),e=this._$elContainer.offset(),f=a-e.left,g=b-e.top;this._welXGuideNumber.css("left",f).find("span").text(moment(this._oSCManager.parseMouseXToXData(f-c.left,d)).format("HH:mm:ss")),this._welYGuideNumber.css("top",g).find("span").text(BigScatterChart2.Util.addComma(this._oSCManager.parseMouseYToYData(this._oSCManager.getHeight()-g-c.bottom-d)))},c.prototype._hideGuideValue=function(){this._welXGuideNumber.hide(),this._welYGuideNumber.hide()},c.prototype.hide=function(){this._hideGuideValue(),this._$elContainer.find("."+d).hide()},a.BigScatterChart2.DragManager=c}(window,jQuery),function(a,b){"use strict";function c(a,b,c,d){this._filter=b,this._option=c,this._application=a,this._cbLoaded=d,this._initVar()}c.prototype._initVar=function(){this._callCount=0,this._bLoadCompleted=!1,this._lastLoadTime=-1},c.prototype.option=function(a){return this._option[a]},c.prototype.loadData=function(a,c,d,e,f){var g=this,h=this._oSCManager.getX();this._oAjax=b.ajax({url:this.getUrl(),data:{to:0===this._callCount?h.max:this._lastLoadTime-1,from:h.min,limit:this.option("fetchLimit"),filter:this._filter||"",application:this._application,xGroupUnit:e,yGroupUnit:f},headers:{accept:"application/json"},dataType:"json"}).done(function(a){a.exception?d():(g._callCount+=1,g._bLoadCompleted=a.complete,g._lastLoadTime=a.resultFrom,c(a,!this._bLoadCompleted,g._getIntervalTime()))}).always(function(){a()})},c.prototype.loadRealtimeData=function(a,c,d,e){var f=this,g=this._oSCManager.getX(),h=Date.now(),i=this._nextFrom||g.max,j=this._nextTo||g.max+this.option("realtimeInterval");this._oRealtimeAjax=b.ajax({url:this.getUrl(),data:{to:j,from:i,limit:this.option("fetchLimit"),filter:"",application:this._application,xGroupUnit:d,yGroupUnit:e,backwardDirection:!1},headers:{accept:"application/json"},dataType:"json"}).done(function(b){b.exception?c():(f._nextFrom=b.complete?b.to:b.resultTo,f._nextTo=f._nextFrom+f.option("realtimeInterval"),a(b,f._calcuRealtimeIntervalTime(b.currentServerTime,Date.now()-h),f._isResetRealtime(b.currentServerTime),b.currentServerTime),f._cbLoaded(f._oSCManager.getX(),f._nextFrom,f._nextTo))}).fail(function(){f.loadRealtimeData(a,c,d,e)})},c.prototype._isResetRealtime=function(a){return a-this._nextTo>=this.option("realtimeResetTimeGap")},c.prototype._calcuRealtimeIntervalTime=function(a,b){var c=parseInt(this.option("realtimeInterval"),0);if(b>c)return 0;var d=a-this._nextTo-this.option("realtimeDefaultTimeGap");return 0>d?Math.max(c-b-d,c):Math.max(c-b-d,0)},c.prototype.setRealtimeFrom=function(a){this._nextFrom=a,this._nextTo=a+this.option("realtimeInteraval")},c.prototype._getIntervalTime=function(){return this.option("useIntervalForFetching")?this.option("fetchingInterval"):0},c.prototype.getRealtimeInterval=function(){return this.option("realtimeDefaultTimeGap")},c.prototype.getUrl=function(){return this.option("url")},c.prototype.initCallCount=function(){this._callCount=0},c.prototype.isFirstRequest=function(){return 0===this._callCount},c.prototype.isCompleted=function(){return this._bLoadCompleted},c.prototype.abort=function(){this._oAjax&&this._oAjax.abort(),this._oRealtimeAjax&&this._oRealtimeAjax.abort()},c.prototype.setTimeManager=function(a){this._oSCManager=a},c.prototype.reset=function(){this._bLoadCompleted=!1,this.initCallCount()},a.BigScatterChart2.DataLoadManager=c}(window,jQuery),function(a,b){"use strict";function c(a,b,c,d){this._option=a,this._oSCManager=b,this._aAgentList=c,this._$elWrapper=d,this._initVariable(),this._makeGridCanvas(),this._makeAxisCanvas(),this._drawGridLine(),this._drawAxisLine(),this._drawAxisValue(),this.updateXYAxis(),this._makeDataCanvas()}c.prototype.option=function(a){return this._option[a]},c.prototype._initVariable=function(){this._oElScrollCanvas={},this._oScrollCtx={},this._ticksOfX=this.option("ticksOfX")-1,this._ticksOfY=this.option("ticksOfY")-1,this._aElAxisX=[],this._aElAxisY=[];var a=this.option("checkBoxImage");this._oCheckedBoxImage=new Image,this._oCheckedBoxImage.src=a.checked,this._oUncheckedBoxImage=new Image,this._oUncheckedBoxImage.src=a.unchecked},c.prototype._makeGridCanvas=function(){this._$elGuideCanvas=b("").attr({width:this._oSCManager.getWidth(),height:this._oSCManager.getHeight()}).css({top:0,"z-index":0,position:"absolute"}).append(this._getNotSupportMarkup()).appendTo(this._$elWrapper),this._oCtxGrid=this._$elGuideCanvas.get(0).getContext("2d")},c.prototype._makeAxisCanvas=function(){this._$elAxisCanvas=b("").attr({width:this._oSCManager.getWidth(),height:this._oSCManager.getHeight()}).css({top:0,"z-index":10,position:"absolute"}).append(this._getNotSupportMarkup()).appendTo(this._$elWrapper),this._oCtxAxis=this._$elAxisCanvas.get(0).getContext("2d")},c.prototype._getNotSupportMarkup=function(){return b("
Your browser does not support the canvas element, get a better one!
").css({color:"#fff",width:this._oSCManager.getWidth(),height:this._oSCManager.getHeight(),"text-align":"center","background-color":"#8b2e19"})},c.prototype._drawGridLine=function(){var a=this._oSCManager.getWidth(),b=this._oSCManager.getHeight(),c=this._oSCManager.getPadding(),d=this._oSCManager.getBubbleSize(),e=this._oSCManager.getWidthOfChartSpace()/this._ticksOfX,f=this._oSCManager.getHeightOfChartSpace()/this._ticksOfY,g=0,h=0;for(this._setStyle(this._oCtxGrid,this.option("gridAxisStyle")),g=0;g<=this._ticksOfX;g++)h=c.left+d+e*g,this._oCtxGrid.beginPath(),this._moveTo(this._oCtxGrid,h,c.top),this._lineTo(this._oCtxGrid,h,b-c.bottom),this._oCtxGrid.stroke();for(g=0;g<=this._ticksOfY;g++)h=b-(c.bottom+d+f*g),this._oCtxGrid.beginPath(),this._moveTo(this._oCtxGrid,c.left,h),this._lineTo(this._oCtxGrid,a-c.right,h),this._oCtxGrid.stroke()},c.prototype._drawAxisLine=function(){var a=this._oSCManager.getWidth(),b=this._oSCManager.getHeight(),c=this._oSCManager.getPadding(),d=this._oSCManager.getBubbleSize(),e=this.option("lineColor"),f=this.option("gridAxisStyle"),g=this._oSCManager.getWidthOfChartSpace()/this._ticksOfX,h=this._oSCManager.getHeightOfChartSpace()/this._ticksOfY,i=0,j=0;for(this._oCtxAxis.lineWidth=f.lineWidth,this._oCtxAxis.globalAlpha=1,this._oCtxAxis.lineCap="round",this._oCtxAxis.strokeStyle=e,this._oCtxAxis.beginPath(),this._moveTo(this._oCtxAxis,c.left,c.top),this._lineTo(this._oCtxAxis,c.left,b-c.bottom),this._lineTo(this._oCtxAxis,a-c.right,b-c.bottom),this._oCtxAxis.stroke(),i=0;i<=this._ticksOfX;i++)j=c.left+d+g*i,this._oCtxAxis.beginPath(),this._moveTo(this._oCtxAxis,j,b-c.bottom),this._lineTo(this._oCtxAxis,j,b-c.bottom+10),this._oCtxAxis.stroke();for(i=0;i<=this._ticksOfY;i++)j=b-(c.bottom+d+h*i),this._oCtxAxis.beginPath(),this._moveTo(this._oCtxAxis,c.left,j),this._lineTo(this._oCtxAxis,c.left-10,j),this._oCtxAxis.stroke()},c.prototype._setStyle=function(a,c){b.each(c,function(b,c){"lineDash"===b?a.setLineDash(c):a[b]=c})},c.prototype._moveTo=function(a,b,c){b%1===0&&(b+=.5),c%1===0&&(c+=.5),a.moveTo(b,c)},c.prototype._lineTo=function(a,b,c){b%1===0&&(b+=.5),c%1===0&&(c+=.5),a.lineTo(b,c)},c.prototype._drawAxisValue=function(){var a=this._oSCManager.getWidthOfChartSpace()/this._ticksOfX,c=this._oSCManager.getHeightOfChartSpace()/this._ticksOfY,d=this._oSCManager.getWidth(),e=this._oSCManager.getHeight(),f=this._oSCManager.getPadding(),g=this._oSCManager.getBubbleSize(),h=(this.option("sPrefix"),this.option("lineColor")),i=this.option("axisLabelStyle"),j=0;for(this._welCoordinate=b("
").css({top:0,width:d,height:e,cursor:"crosshair","z-index":10,position:"absolute","background-color":"rgba(0,0,0,0)"}).addClass("coordinate").appendTo(this._$elWrapper),j=0;j<=this._ticksOfX;j++)this._aElAxisX.push(b("
").css({top:e-f.bottom+10+"px",left:f.left-a/2+j*a+"px",color:h,width:a+"px",position:"absolute","text-align":"center"}).css(i).text(" "));for(j=0;j<=this._ticksOfY;j++)this._aElAxisY.push(b("
").css({top:g+j*c+f.top-10+"px",left:"0px",width:f.left-15+"px",color:h,position:"absolute","text-align":"right","vertical-align":"middle"}).css(i).text(" "));this._welCoordinate.append(this._aElAxisX).append(this._aElAxisY);var k=this.option("labelX");BigScatterChart2.Util.isString(k)&&k.length>0&&b("
").text(k).css(i).css({top:e-f.bottom+10+"px",right:0,color:h,position:"absolute","text-align":"center"}).appendTo(this._welCoordinate);var l=this.option("labelY");BigScatterChart2.Util.isString(l)&&l.length>0&&b("
").text(l).css(i).css({top:g+f.top+10+"px",left:"0px",color:h,width:f.left-15+"px",position:"absolute","text-align":"right","vertical-align":"middle"}).appendTo(this._welCoordinate)},c.prototype._makeDataCanvas=function(){var a=this,c=this._oSCManager.getBubbleSize(),d=this.option("sPrefix"),e=100,f=this.option("typeInfo"),g=this._oSCManager.getWidthOfChartSpace(),h=this._oSCManager.getHeightOfChartSpace(),i=this._oSCManager.getCanvasWidth();this._$elScroller=b("
").css({top:"0px",left:"0px",height:h+2*c+"px",position:"absolute","background-color":"gray"}).addClass("canvas-scroller"),b("
").css({top:this._oSCManager.getTopOfChartSpace()+"px",left:this._oSCManager.getLeftOfChartSpace()+c+"px",width:g+"px",height:h+2*c+"px","z-index":e++,overflow:"hidden",position:"absolute"}).addClass("canvas-wrapper").append(this._$elScroller).appendTo(this._$elWrapper),b.each(this._aAgentList,function(g,j){b.each(f,function(f,g){var k=BigScatterChart2.Util.makeKey(j,d,g[0]);a._oElScrollCanvas[k]=[b("").attr({width:i,height:h+2*c+"px","data-key":k}).css({top:"0px",left:"0px","z-index":e++,position:"absolute"}).appendTo(a._$elScroller),b("").attr({width:i,height:h+2*c+"px","data-key":k}).css({top:"0px",left:i+"px","z-index":e++,position:"absolute"}).appendTo(a._$elScroller)],a._oScrollCtx[k]=[a._oElScrollCanvas[k][0].get(0).getContext("2d"),a._oElScrollCanvas[k][1].get(0).getContext("2d")]})}),this._oScrollIndexOrder=[0,1]},c.prototype.getChartAsImage=function(a,b){return this._mergeAllDisplay(b).get(0).toDataURL("image/"+a.toLowerCase())},c.prototype.updateXYAxis=function(a,c,d,e){var f=this;b.isNumeric(a),b.isNumeric(c),b.isNumeric(d),b.isNumeric(e);var g=this.option("fnXAxisFormat"),h=this._oSCManager.getX(),i=this._oSCManager.getGapX()/this._ticksOfX;b.each(this._aElAxisX,function(a,c){b.isFunction(g)?c.html(g.call(f,i,a,h.min)):c.html((i*a+h.min).round())});var j=this.option("fnYAxisFormat"),k=this._oSCManager.getY(),l=this._oSCManager.getGapY()/this._ticksOfY;b.each(this._aElAxisY,function(a,c){b.isFunction(j)?c.html(j.call(f,l,a,k.min,k.max)):c.html(BigScatterChart2.Util.addComma(k.max+k.min-(l*a+k.min)))})},c.prototype.clear=function(){var a=this._oSCManager.getCanvasWidth(),c=this._oSCManager.getHeight();b.each(this._oScrollCtx,function(d,e){b.each(e,function(b,d){d.clearRect(0,0,a,c)})})},c.prototype.selectType=function(a,c){b.each(this._oElScrollCanvas,function(a,d){b.each(d,function(b,d){BigScatterChart2.Util.endsWith(a,c)?d.show():d.hide()})})},c.prototype.toggle=function(a){b.each(this._oElScrollCanvas,function(c,d){b.each(d,function(b,d){BigScatterChart2.Util.endsWith(c,a)&&d.toggle()})})},c.prototype.showSelectedAgent=function(a,c,d){var e=this;b.each(this._oElScrollCanvas,function(f,g){if(a){var h=e._visible(f.split("-"),d)?"show":"hide";b.each(g,function(a,b){b[h]()})}else b.each(g,function(a,b){BigScatterChart2.Util.startsWith(f,c)?b[e._visible(f.split("-"),d)?"show":"hide"]():b.hide()})})},c.prototype._visible=function(a,b){return b[a[a.length-1]]},c.prototype.drawBubble=function(a,b,c){var d=this.option("propertyIndex"),e=this.option("bubbleRadius"),f=this._oSCManager.getY(),g=(c[d.x]-this._oSCManager.getStartX())*this._oSCManager.getPixelPerTime(),h=this._oSCManager.parseYDataToYChart(BigScatterChart2.Util.getBoundaryValue(f,c[d.y]),!1),i=this._oSCManager.parseZDataToZChart(c.r||e),j=this._oSCManager.getCanvasWidth(),k=this._oScrollIndexOrder[0],l=parseInt(this._oElScrollCanvas[a][k].css("left")),m=l+j;g>m?(k=this._oScrollIndexOrder[1],g-=m):g-=l,this._oScrollCtx[a][k].beginPath(),this._oScrollCtx[a][k].fillStyle=b,this._oScrollCtx[a][k].strokeStyle=b,this._oScrollCtx[a][k].arc(g,h,i,0,2*Math.PI,!0),this._oScrollCtx[a][k].globalAlpha=.3+.1*c[d.groupCount],this._oScrollCtx[a][k].fill()},c.prototype.moveChart=function(a,c){var d=this,e=this._oSCManager.getCanvasWidth(),f=this._oSCManager.getHeight(),g=parseInt(this._$elScroller.css("left"),10)-a; +/*! pinpoint - v1.5.2 - 2016-03-17*/!function(a,b){"use strict";function c(a,b,c,d,e){this._oExternal=d,this._AGENT_ALL=this._currentAgent=e,this._aAgentList=b,this._setOption(a),this._initVariables(),this._initManager(),this._initElements(),this._initPlugin(c),this._initInnerPlugin()}c.prototype.option=function(a,b){var c=this,d=arguments.length;if(2===d)this._option[a]=b;else{if(1!==d)return this._option;if("object"==typeof a){this._option=this._option||{};for(var e in a)c._option[e]=a[e]}else if("string"==typeof a)return this._option[a]}},c.prototype._setOption=function(a){this.option({containerId:"",sPrefix:"bigscatterchart",width:600,height:400,minX:0,maxX:100,minY:0,maxY:100,minZ:0,maxZ:1,ticksOfX:5,ticksOfY:5,bubbleSize:10,padding:{top:40,left:50,right:40,bottom:30},lineColor:"#3d3d3d",bubbleRadius:3,guideStyle:{lineWidth:1,lineDash:[1,0],globalAlpha:1,strokeStyle:"#e3e3e3"},axisLabelStyle:{"font-size":"10px","line-height":"12px",height:"20px","padding-top":"5px"},loadingStr:"Loading",noDataStr:"No Data",noDataStyle:{"font-size":"15px",color:"#000","font-weight":"bold"},bUseMouseGuideLine:!0,checkBoxImage:{checked:"data:image/gif;base64,R0lGODlhDgANANU7APf6/QBoAO31+wBEAABZABSmDfj7/kLFLM/k9CpFeCA7bBs1ZiU/cWDZQBgxYvL4/PD2/ABLAKzQ6wBTAPn8/vD3/FLPNgBzAO30/J/J6JKgu1/YPzBLfzVQhQBvAO31/EhknURgmNTn9NPm9Orz+9fc51LQNztWjfX5/e/2++72+9vh7Njp9kBbk9jp9aCvzd3r+QB3AABhAKXM6SGvFTG5IEtnoBUuXuLu+v//zP///wAAAAAAAAAAAAAAAAAAACH5BAEAADsALAAAAAAOAA0AAAaHwJ1tSCS+VrsdSMdsOmOxXUiHq1ohlFguF2vpMAYDBvYxXDaNxuWkA3gCABIgYLGYAruOTraVoWQHgTIlOxw6BDWJiIoUGjsJOg8TNJSUEw8QCTsMOiwVEQWhERUuOAw7CjoSIykDrioiEjgKOws6MzMIArsIuDgLOw4ZVsRWDkk3ycrLN0lBADs=",unchecked:"data:image/gif;base64,R0lGODlhDgANAPcbANnZ2X9/f3Nzc4eHh4ODg5GRkfDw8IqKim1tbXt7e46Ojnd3d3BwcOzs7NPT09jY2O/v7+3t7eHh4eXl5dXV1enp6d3d3Wtra5OTk/Ly8v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjEgNjQuMTQwOTQ5LCAyMDEwLzEyLzA3LTEwOjU3OjAxICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1LjEgTWFjaW50b3NoIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjYxQjZBNkRCQUVEQTExRTI5Q0M1REU5NjlFRThGRDZBIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjYxQjZBNkRDQUVEQTExRTI5Q0M1REU5NjlFRThGRDZBIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NjFCNkE2RDlBRURBMTFFMjlDQzVERTk2OUVFOEZENkEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NjFCNkE2REFBRURBMTFFMjlDQzVERTk2OUVFOEZENkEiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4B//79/Pv6+fj39vX08/Lx8O/u7ezr6uno5+bl5OPi4eDf3t3c29rZ2NfW1dTT0tHQz87NzMvKycjHxsXEw8LBwL++vby7urm4t7a1tLOysbCvrq2sq6qpqKempaSjoqGgn56dnJuamZiXlpWUk5KRkI+OjYyLiomIh4aFhIOCgYB/fn18e3p5eHd2dXRzcnFwb25tbGtqaWhnZmVkY2JhYF9eXVxbWllYV1ZVVFNSUVBPTk1MS0pJSEdGRURDQkFAPz49PDs6OTg3NjU0MzIxMC8uLSwrKikoJyYlJCMiISAfHh0cGxoZGBcWFRQTEhEQDw4NDAsKCQgHBgUEAwIBAAAh+QQBAAAbACwAAAAADgANAAAIgwA3YBhIsCCGDRsKaFjIsGGGAhsUaMhAsaJFBRsOaIDAkaMBAxwzHNgwQEOEkygbnMwwYAMBDRViypSZgcCGABom6Ny5M0OADQk0SBhKlGiGBBsWaLDAtGnTDAs2CNDw4AEAq1WvZhCwgYEGCmDDhs3AYAMCBxbTZkCA8ILbt3AvIAwIADs="},fnXAxisFormat:function(a,b,c){var d=moment(a*b+c);return d.format("MM-DD")+"
"+d.format("HH:mm:ss")},fnYAxisFormat:function(a,b,d,e){return c.Util.addComma(e+d-(a*b+d))},fOnSelect:function(){}}),this.option(a),this.option("minY",this._oExternal.loadFromStorage("scatter-y-min")||this.option("minY")),this.option("maxY",this._oExternal.loadFromStorage("scatter-y-max")||this.option("maxY"))},c.prototype._initVariables=function(){this._aBubbles=[],this._oSCManager=new c.SizeCoordinateManager(this.option()),this._bPause=!1,this._bDestroied=!1,this._bRequesting=!1,this._getContainer()},c.prototype._getContainer=function(){var a=this.option("containerId");switch(typeof a){case"string":this._$elContainer=b("#"+a);break;case"object":this._$elContainer=a;break;case"function":this._$elContainer=a()}this._$elContainer=b(this._$elContainer),this._$elContainer.css({width:this._oSCManager.getWidth(),height:this._oSCManager.getHeight(),position:"relative"}).addClass(this.option("containerClass"))},c.prototype._initManager=function(){var a=this;this._oBubbleTypeManager=new c.BubbleTypeManager(this.option(),this._oSCManager,this._$elContainer,{onChange:function(b){a._oRendererManager.toggle(b)},onSend:function(b,c){a._oExternal.sendAnalytics(b,c)}}),this._oRendererManager=new c.RendererManager(this.option(),this._oSCManager,this._aAgentList,this._$elContainer),this._oDragManager=new c.DragManager(this.option(),this._oSCManager,this._$elContainer,{onSelect:function(b,c){a.hasDataByXY(c.fromX,c.toX,c.fromY,c.toY)&&a._oExternal.onSelect(b,c)}})},c.prototype._initElements=function(){this._$elPluginArea=b("
").css({top:"0px",left:this._oSCManager.getLeftOfPluginArea()+"px",width:this._oSCManager.getPadding().right+"px",height:this._oSCManager.getHeight()+"px","z-index":510,position:"absolute"}).addClass("plugins").appendTo(this._$elContainer)},c.prototype._initPlugin=function(a){var c=this;b.each(a,function(a,b){b.initElement(c._$elContainer,c._$elPluginArea,c.option()).initEvent(c)})},c.prototype._initInnerPlugin=function(){this._oMessage=new c.MessagePlugin,this._oMessage.initElement(this._$elContainer,this._$elPluginArea,this.option()).initEvent(self)},c.prototype.fireDragEvent=function(a){this._oDragManager.triggerDrag(a)},c.prototype.selectArea=function(a,b,c){this._oExternal.onSelect(a,b,c)},c.prototype.selectType=function(a){return this._oBubbleTypeManager.selectType(a),this._oRendererManager.selectType(this._currentAgent,a),this},c.prototype.addBubbles=function(a){this._aBubbles.push(a)},c.prototype._getSumCountByType=function(a){var c=this,d={},e=this._oSCManager.getX();b.each(this.option("typeInfo"),function(a,b){d[b[0]]=0});for(var f=0;f0&&this._oMessage.hide();for(var a=0,b=this._aBubbles.length;b>a;a++)this._drawBubbles(this._aBubbles[a])},c.prototype.clear=function(){this._oRendererManager.clear(),this._aBubbles=[],this._oBubbleTypeManager.showTypeCount(this._getSumCountByType()),this._oDragManager.hide(),this._oMessage.show(this.option("noDataStr"))},c.prototype._drawBubbles=function(a){var d=this,e=this.option("typeInfo"),f=this.option("propertyIndex"),g=this.option("sPrefix");setTimeout(function(){b.each(d._aAgentList,function(b,h){for(var i=0,j=a.countByAgent(h);j>i&&!d._bDestroied;i++){var k=a.getDataByAgent(h,i),l=k[f.groupCount];if(0!==l){var m=e[k[f.type]];d._oRendererManager.drawBubble(c.Util.makeKey(h,g,m[0]),m[1],k)}}})},0)},c.prototype.addBubbleAndMoveAndDraw=function(a,b,c){if(b===!1){if(a.isEmpty())return;this._oMessage.hide()}this.addBubbles(a),this._oBubbleTypeManager.showTypeCount(this._getSumCountByType(b)),this._drawBubbles(a),this._moveChart(a,c),this._oRendererManager.updateXYAxis(),this._removeBubble()},c.prototype._moveChart=function(a,b){var c=this._oSCManager.getX(),d=a.getX(),e=this.option("chartAnimationTime");if(d.min>=c.max){var f=d.max-c.max,g=f*this._oSCManager.getPixelPerTime();this._oSCManager.setX(c.min+f,c.max+f),this._oRendererManager.moveChart(parseInt(g,10),e>b?0:e)}},c.prototype._removeBubble=function(){for(var a=this._oSCManager.getX().min,b=0;bk;k++)for(var m=this._aBubbles[k],n=0,o=m.count();o>n;n++){var p=m.getData(n),q=m.getAgentName(p);if(this._currentAgent===this._AGENT_ALL||this._currentAgent===q){var r=p[h.x],s=g[p[h.type]][0];if(c.Util.isInRange(a,b,r)&&c.Util.indexOf(j,s)>=0){var t=p[h.y];(c.Util.isInRange(d,e,t)||e===i.max&&t>e)&&f.push([m.getTransactionID(p),p[h.x],p[h.y]])}}}return f},c.prototype.getDataByRange=function(a,b,d){var e=[],f=this.option("typeInfo"),g=this.option("propertyIndex");b=parseInt(b,10),d=parseInt(d,10);for(var h=0,i=this._aBubbles.length;i>h;h++)for(var j=this._aBubbles[h],k=0,l=j.count();l>k;k++){var m=j.getData(k),n=j.getAgentName(m);if(this._currentAgent===this._AGENT_ALL||this._currentAgent===n){var o=f[m[g.type]][0];if(a===o){var p=m[g.y];("Failed"===a||c.Util.isInRange(b,d,p))&&e.push([j.getTransactionID(m),m[g.x],m[g.y]])}}}return e},c.prototype.hasDataByXY=function(a,b,d,e){var f=this.option("typeInfo"),g=this.option("propertyIndex");a=parseInt(a,10),b=parseInt(b,10),d=parseInt(d,10),e=parseInt(e,10);for(var h=this._oSCManager.getY(),i=this._oBubbleTypeManager.getVisibleType(),j=0,k=this._aBubbles.length;k>j;j++)for(var l=this._aBubbles[j],m=0,n=l.count();n>m;m++){var o=l.getData(m),p=l.getAgentName(o);if(this._currentAgent===this._AGENT_ALL||this._currentAgent===p){var q=o[g.x],r=f[o[g.type]][0];if(c.Util.isInRange(a,b,q)&&c.Util.indexOf(i,r)>=0){var s=o[g.y];if(c.Util.isInRange(d,e,s)||e===h.max&&s>e)return!0}}}return!1},c.prototype.getChartAsImage=function(a){return this._oRendererManager.getChartAsImage(a,this._oBubbleTypeManager.getElementLI())},c.prototype.drawWithDataSource=function(a){this._oDataLoadManager=a,this._oDataLoadManager.setTimeManager(this._oSCManager),this._oDataLoadManager.abort(),this._oDataLoadManager.initCallCount(),this._drawWithDataSource(),this.option("realtime")&&this._invokeLoadRealtimeData()},c.prototype._invokeLoadRealtimeData=function(){var a=this;setTimeout(function(){a._drawWithRealtimeDataSource()},this._oDataLoadManager.getRealtimeInterval())},c.prototype._drawWithDataSource=function(){var a=this;this._bPause||this._bRequesting||this._oDataLoadManager.isCompleted()||(this._oDataLoadManager.isFirstRequest()&&this._oMessage.show(this.option("loadingStr")),this._oDataLoadManager.loadData(function(){a._bRequesting=!1},function(b,c,d){var e=a.createDataBlock(b);e.isEmpty()===!1&&a.addBubbleAndMoveAndDraw(e,!1,0),c===!0?setTimeout(function(){a._drawWithDataSource()},d):a._aBubbles&&0!==a._aBubbles.length||a._oMessage.show(a.option("noDataStr"))},function(){a._showServerError(),a._oExternal.onError()},this._oSCManager.getXOfPixel(),this._oSCManager.getYOfPixel()),this._bRequesting=!0)},c.prototype._drawWithRealtimeDataSource=function(){var a=this;this._oDataLoadManager.loadRealtimeData(function(b,c,d,e){a._hideServerError(),d?(a.pause(),a.resume(e-a._oSCManager.getGapX(),e)):(a.addBubbleAndMoveAndDraw(a.createDataBlock(b),!0,c),setTimeout(function(){a._bPause===!1&&a._drawWithRealtimeDataSource()},c))},function(){a._showServerError(),a._oExternal.onError(),setTimeout(function(){a._bPause===!1&&a._drawWithRealtimeDataSource()},0)},this._oSCManager.getXOfPixel(),this._oSCManager.getYOfPixel())},c.prototype._hideServerError=function(){this._$elContainer.css({backgroundImage:"none"})},c.prototype._showServerError=function(){this._$elContainer.css({backgroundImage:"url("+this.option("errorImage")+")",backgroundRepeat:"no-repeat",backgroundPosition:"88% 21%",backgroundSize:"30px 30px"})},c.prototype.redraw=function(){this._oRendererManager.clear(),this._oRendererManager.updateXYAxis(),this.redrawBubbles()},c.prototype.abort=function(){this._bPause=!0,this._oDataLoadManager.abort()},c.prototype.pause=function(){this._bPause=!0,this.option("realtime")&&this._oRendererManager.reset()},c.prototype.resume=function(a,b){this._bPause=!1,this.option("realtime")?(this._aBubbles=[],this._oSCManager.setX(a,b,!0),this._oDataLoadManager.reset(),this._oDataLoadManager.setRealtimeFrom(b),this._oRendererManager.updateXYAxis(),this._drawWithDataSource(),this._invokeLoadRealtimeData()):this._drawWithDataSource()},c.prototype.changeRangeOfY=function(a){this._oSCManager.setY(a.min,a.max)},c.prototype.selectAgent=function(a,c){var d=this,e=a===this._AGENT_ALL,f=this.option("typeInfo"),g={};c===!0?(this._oBubbleTypeManager.selectAll(),b.each(f,function(a,b){g[b[0]]=!0})):b.each(f,function(a,b){g[b[0]]=d._oBubbleTypeManager.isChecked(b[0])}),this._currentAgent=a,this._oRendererManager.showSelectedAgent(e,a,g),this._oBubbleTypeManager.showTypeCount(this._getSumCountByType())},c.prototype.getCurrentAgent=function(){return this._currentAgent},a.BigScatterChart2=c}(window,jQuery),function(a,b){"use strict";function c(a,b,c){this._initData(a),this._splitDataByAgent(b,c)}c.prototype._initData=function(a){this._from=a.from,this._to=a.to,this._resultFrom=a.complete?a.from:a.resultFrom,this._resultTo=a.complete?a.to:a.resultTo,this._oAgentMetaInfo=a.scatter.metadata,this._aAllData=a.scatter.dotList,this._bLoadComplete=a.complete,this._oAgentData={},this._oCountOfType={}},c.prototype._splitDataByAgent=function(a,c){var d=this;this._oPropertyIndex=a,this._oTypeInfo=c,b.each(this._oAgentMetaInfo,function(a,e){var f=e[0];d._oAgentData[f]=[],d._oCountOfType[f]={},b.each(c,function(a,b){d._oCountOfType[f][b[0]]=0})});var e=Number.MAX_VALUE,f=0;b.each(this._aAllData,function(b,g){var h=d._getAgentName(g[2]+"");e=Math.min(g[1],e),f=Math.max(g[1],f),g[0]+=d._from,d._oAgentData[h].push(g),d._oCountOfType[h][c[g[a.type]+""][0]]++}),this._minX=this._bLoadComplete?this._from:this._resultFrom,this._maxX=this._bLoadComplete?this._to:this._resultTo,this._minY=e,this._maxY=f},c.prototype._getAgentName=function(a){return this._oAgentMetaInfo[a][0]},c.prototype.getDataByAgent=function(a,b){return this._oAgentData[a][b]},c.prototype.getData=function(a){return this._aAllData[a]},c.prototype.count=function(){return this._aAllData.length},c.prototype.countByAgent=function(a){return this._oAgentData[a]?this._oAgentData[a].length:0},c.prototype.getCount=function(a,b,c,d){return 2===arguments.length?this._oCountOfType[a]?this._oCountOfType[a][b]:0:this._getRealtimeCount(a,b,c,d)},c.prototype._getRealtimeCount=function(a,c,d,e){var f=this,g=0;return b.each(this._aAllData,function(b,h){a===f._getAgentName(h[f._oPropertyIndex.meta]+"")&&c===f._oTypeInfo[h[f._oPropertyIndex.type]+""][0]&&h[f._oPropertyIndex.x]>=d&&h[f._oPropertyIndex.x]<=e&&g++}),g},c.prototype.getTransactionID=function(a){var b=this._oAgentMetaInfo[a[this._oPropertyIndex.meta]+""];return b[1]+"^"+b[2]+"^"+a[this._oPropertyIndex.transactionId]},c.prototype.getAgentName=function(a){var b=this._oAgentMetaInfo[a[this._oPropertyIndex.meta]+""];return b[0]},c.prototype.getX=function(){return{min:this._minX,max:this._maxX}},c.prototype.isEmpty=function(){return 0===this._aAllData.length},a.BigScatterChart2.DataBlock=c}(window,jQuery),function(a,b){"use strict";function c(a,b,c,d){this._option=a,this._oCallback=d,this._oSCManager=b,this._$elContainer=c,this._initVariable(),this._initElement(c),this._initEvent()}var d="jquery-drag-to-select";c.prototype.option=function(a){return this._option[a]},c.prototype._initVariable=function(){},c.prototype._initElement=function(a){var c=this._oSCManager.getPadding(),d=this.option("lineColor"),e=this.option("axisLabelStyle");this._$element=b("
").css({top:"0px",left:"0px",width:this._oSCManager.getWidth()+"px",height:this._oSCManager.getHeight()+"px",cursor:"crosshair","z-index":500,position:"absolute","background-color":"rgba(0,0,0,0)"}).addClass("overlay").appendTo(a),this._welXGuideNumber=b("
").css({top:this._oSCManager.getHeight()-c.bottom+10+"px",left:"0px",color:d,width:"56px",height:"22px",border:"1px solid #ccc",display:"none",position:"absolute","text-align":"center",background:"#fff","line-height":"22px","margin-left":"-28px","border-radius":"5px"}).css(e).append(b("")).append(b("
").css({top:"-10px",left:"27px",height:"10px",position:"absolute","border-left":"1px solid red"})).appendTo(this._$element),this._welYGuideNumber=b("
").css({top:"0px",left:"0px",color:d,width:"41px",height:"22px",border:"1px solid #ccc",display:"none",position:"absolute","margin-top":"-10px","text-align":"right",background:"#fff","line-height":"22px","padding-right":"3px","border-radius":"5px","vertical-align":"middle"}).css(e).append(b("")).append(b("
").css({top:"9px",right:"-10px",width:"10px",position:"absolute","border-top":"1px solid red"})).appendTo(this._$element)},c.prototype._initEvent=function(){var a=this,b=!1;this._$element.dragToSelect({className:d,onHide:function(c){var d=a._adjustSelectBoxForChart(c);a._oCallback.onSelect(d,a._parseCoordinatesToXY(d)),a._$elDragArea=c,a._$elDragArea.hide(),a._hideGuideValue(),b=!1},onMove:function(c){return a.option("bUseMouseGuideLine")?void(a._checkMouseXYInChart(c.pageX,c.pageY)?(b||(a._showGuideValue(),b=!0),a._moveGuideValue(c.pageX,c.pageY)):(b=!1,a._hideGuideValue())):!1},onLeave:function(c){b=!1,a._hideGuideValue()}})},c.prototype._checkMouseXYInChart=function(a,b){var c=this._oSCManager.getPadding(),d=this._oSCManager.getBubbleSize(),e=this._$elContainer.offset(),f=e.left+c.left+d,g=e.left+this._$elContainer.width()-c.right-d,h=e.top+c.top+d,i=e.top+this._$elContainer.height()-c.bottom-d;return a>=f&&g>=a&&b>=h&&i>=b},c.prototype.triggerDrag=function(a){var b=this._adjustSelectBoxForChart(a);this._oCallback.onSelect(b,this._parseCoordinatesToXY(b))},c.prototype._adjustSelectBoxForChart=function(a){var b=this._oSCManager.getPadding(),c=this._oSCManager.getBubbleSize(),d=b.top+c,e=b.left+c,f=this._oSCManager.getWidth()-b.right-c,g=this._oSCManager.getHeight()-b.bottom-c,h=parseInt(a.css("left"),10),i=h+a.width(),j=parseInt(a.css("top"),10),k=j+a.height();j=Math.max(j,d),h=Math.max(h,e),i=Math.min(i,f),k=Math.min(k,g);var l={top:j,left:h,width:i-h,height:k-j};return a.animate(l,200),l},c.prototype._parseCoordinatesToXY=function(a){var b=this._oSCManager.getPadding(),c=this._oSCManager.getBubbleSize();return{fromX:this._oSCManager.parseMouseXToXData(a.left-b.left-c),toX:this._oSCManager.parseMouseXToXData(a.left+a.width-b.left-c),fromY:this._oSCManager.parseMouseYToYData(this._oSCManager.getHeight()-(b.bottom+c)-(a.top+a.height)),toY:this._oSCManager.parseMouseYToYData(this._oSCManager.getHeight()-(b.bottom+c)-a.top)}},c.prototype._showGuideValue=function(){this._welXGuideNumber.show(),this._welYGuideNumber.show()},c.prototype._moveGuideValue=function(a,b){var c=this._oSCManager.getPadding(),d=this._oSCManager.getBubbleSize(),e=this._$elContainer.offset(),f=a-e.left,g=b-e.top;this._welXGuideNumber.css("left",f).find("span").text(moment(this._oSCManager.parseMouseXToXData(f-c.left,d)).format("HH:mm:ss")),this._welYGuideNumber.css("top",g).find("span").text(BigScatterChart2.Util.addComma(this._oSCManager.parseMouseYToYData(this._oSCManager.getHeight()-g-c.bottom-d)))},c.prototype._hideGuideValue=function(){this._welXGuideNumber.hide(),this._welYGuideNumber.hide()},c.prototype.hide=function(){this._hideGuideValue(),this._$elContainer.find("."+d).hide()},a.BigScatterChart2.DragManager=c}(window,jQuery),function(a,b){"use strict";function c(a,b,c,d){this._filter=b,this._option=c,this._application=a,this._cbLoaded=d,this._initVar()}c.prototype._initVar=function(){this._callCount=0,this._bLoadCompleted=!1,this._lastLoadTime=-1},c.prototype.option=function(a){return this._option[a]},c.prototype.loadData=function(a,c,d,e,f){var g=this,h=this._oSCManager.getX();this._oAjax=b.ajax({url:this.getUrl(),data:{to:0===this._callCount?h.max:this._lastLoadTime-1,from:h.min,limit:this.option("fetchLimit"),filter:this._filter||"",application:this._application,xGroupUnit:e,yGroupUnit:f},headers:{accept:"application/json"},dataType:"json"}).done(function(a){a.exception?d():(g._callCount+=1,g._bLoadCompleted=a.complete,g._lastLoadTime=a.resultFrom,c(a,!this._bLoadCompleted,g._getIntervalTime()))}).always(function(){a()})},c.prototype.loadRealtimeData=function(a,c,d,e){var f=this,g=this._oSCManager.getX(),h=Date.now(),i=this._nextFrom||g.max,j=this._nextTo||g.max+this.option("realtimeInterval");this._oRealtimeAjax=b.ajax({url:this.getUrl(),data:{to:j,from:i,limit:this.option("fetchLimit"),filter:"",application:this._application,xGroupUnit:d,yGroupUnit:e,backwardDirection:!1},headers:{accept:"application/json"},dataType:"json"}).done(function(b){b.exception?c():(f._nextFrom=b.complete?b.to:b.resultTo,f._nextTo=f._nextFrom+f.option("realtimeInterval"),a(b,f._calcuRealtimeIntervalTime(b.currentServerTime,Date.now()-h),f._isResetRealtime(b.currentServerTime),b.currentServerTime),f._cbLoaded(f._oSCManager.getX(),f._nextFrom,f._nextTo))}).fail(function(){f.loadRealtimeData(a,c,d,e)})},c.prototype._isResetRealtime=function(a){return a-this._nextTo>=this.option("realtimeResetTimeGap")},c.prototype._calcuRealtimeIntervalTime=function(a,b){var c=parseInt(this.option("realtimeInterval"),0);if(b>c)return 0;var d=a-this._nextTo-this.option("realtimeDefaultTimeGap");return 0>d?Math.max(c-b-d,c):Math.max(c-b-d,0)},c.prototype.setRealtimeFrom=function(a){this._nextFrom=a,this._nextTo=a+this.option("realtimeInteraval")},c.prototype._getIntervalTime=function(){return this.option("useIntervalForFetching")?this.option("fetchingInterval"):0},c.prototype.getRealtimeInterval=function(){return this.option("realtimeDefaultTimeGap")},c.prototype.getUrl=function(){return this.option("url")},c.prototype.initCallCount=function(){this._callCount=0},c.prototype.isFirstRequest=function(){return 0===this._callCount},c.prototype.isCompleted=function(){return this._bLoadCompleted},c.prototype.abort=function(){this._oAjax&&this._oAjax.abort(),this._oRealtimeAjax&&this._oRealtimeAjax.abort()},c.prototype.setTimeManager=function(a){this._oSCManager=a},c.prototype.reset=function(){this._bLoadCompleted=!1,this.initCallCount()},a.BigScatterChart2.DataLoadManager=c}(window,jQuery),function(a,b){"use strict";function c(a,b,c,d){this._option=a,this._oSCManager=b,this._aAgentList=c,this._$elWrapper=d,this._initVariable(),this._makeGridCanvas(),this._makeAxisCanvas(),this._drawGridLine(),this._drawAxisLine(),this._drawAxisValue(),this.updateXYAxis(),this._makeDataCanvas()}c.prototype.option=function(a){return this._option[a]},c.prototype._initVariable=function(){this._oElScrollCanvas={},this._oScrollCtx={},this._ticksOfX=this.option("ticksOfX")-1,this._ticksOfY=this.option("ticksOfY")-1,this._aElAxisX=[],this._aElAxisY=[];var a=this.option("checkBoxImage");this._oCheckedBoxImage=new Image,this._oCheckedBoxImage.src=a.checked,this._oUncheckedBoxImage=new Image,this._oUncheckedBoxImage.src=a.unchecked},c.prototype._makeGridCanvas=function(){this._$elGuideCanvas=b("").attr({width:this._oSCManager.getWidth(),height:this._oSCManager.getHeight()}).css({top:0,"z-index":0,position:"absolute"}).append(this._getNotSupportMarkup()).appendTo(this._$elWrapper),this._oCtxGrid=this._$elGuideCanvas.get(0).getContext("2d")},c.prototype._makeAxisCanvas=function(){this._$elAxisCanvas=b("").attr({width:this._oSCManager.getWidth(),height:this._oSCManager.getHeight()}).css({top:0,"z-index":10,position:"absolute"}).append(this._getNotSupportMarkup()).appendTo(this._$elWrapper),this._oCtxAxis=this._$elAxisCanvas.get(0).getContext("2d")},c.prototype._getNotSupportMarkup=function(){return b("
Your browser does not support the canvas element, get a better one!
").css({color:"#fff",width:this._oSCManager.getWidth(),height:this._oSCManager.getHeight(),"text-align":"center","background-color":"#8b2e19"})},c.prototype._drawGridLine=function(){var a=this._oSCManager.getWidth(),b=this._oSCManager.getHeight(),c=this._oSCManager.getPadding(),d=this._oSCManager.getBubbleSize(),e=this._oSCManager.getWidthOfChartSpace()/this._ticksOfX,f=this._oSCManager.getHeightOfChartSpace()/this._ticksOfY,g=0,h=0;for(this._setStyle(this._oCtxGrid,this.option("gridAxisStyle")),g=0;g<=this._ticksOfX;g++)h=c.left+d+e*g,this._oCtxGrid.beginPath(),this._moveTo(this._oCtxGrid,h,c.top),this._lineTo(this._oCtxGrid,h,b-c.bottom),this._oCtxGrid.stroke();for(g=0;g<=this._ticksOfY;g++)h=b-(c.bottom+d+f*g),this._oCtxGrid.beginPath(),this._moveTo(this._oCtxGrid,c.left,h),this._lineTo(this._oCtxGrid,a-c.right,h),this._oCtxGrid.stroke()},c.prototype._drawAxisLine=function(){var a=this._oSCManager.getWidth(),b=this._oSCManager.getHeight(),c=this._oSCManager.getPadding(),d=this._oSCManager.getBubbleSize(),e=this.option("lineColor"),f=this.option("gridAxisStyle"),g=this._oSCManager.getWidthOfChartSpace()/this._ticksOfX,h=this._oSCManager.getHeightOfChartSpace()/this._ticksOfY,i=0,j=0;for(this._oCtxAxis.lineWidth=f.lineWidth,this._oCtxAxis.globalAlpha=1,this._oCtxAxis.lineCap="round",this._oCtxAxis.strokeStyle=e,this._oCtxAxis.beginPath(),this._moveTo(this._oCtxAxis,c.left,c.top),this._lineTo(this._oCtxAxis,c.left,b-c.bottom),this._lineTo(this._oCtxAxis,a-c.right,b-c.bottom),this._oCtxAxis.stroke(),i=0;i<=this._ticksOfX;i++)j=c.left+d+g*i,this._oCtxAxis.beginPath(),this._moveTo(this._oCtxAxis,j,b-c.bottom),this._lineTo(this._oCtxAxis,j,b-c.bottom+10),this._oCtxAxis.stroke();for(i=0;i<=this._ticksOfY;i++)j=b-(c.bottom+d+h*i),this._oCtxAxis.beginPath(),this._moveTo(this._oCtxAxis,c.left,j),this._lineTo(this._oCtxAxis,c.left-10,j),this._oCtxAxis.stroke()},c.prototype._setStyle=function(a,c){b.each(c,function(b,c){"lineDash"===b?a.setLineDash(c):a[b]=c})},c.prototype._moveTo=function(a,b,c){b%1===0&&(b+=.5),c%1===0&&(c+=.5),a.moveTo(b,c)},c.prototype._lineTo=function(a,b,c){b%1===0&&(b+=.5),c%1===0&&(c+=.5),a.lineTo(b,c)},c.prototype._drawAxisValue=function(){var a=this._oSCManager.getWidthOfChartSpace()/this._ticksOfX,c=this._oSCManager.getHeightOfChartSpace()/this._ticksOfY,d=this._oSCManager.getWidth(),e=this._oSCManager.getHeight(),f=this._oSCManager.getPadding(),g=this._oSCManager.getBubbleSize(),h=(this.option("sPrefix"),this.option("lineColor")),i=this.option("axisLabelStyle"),j=0;for(this._welCoordinate=b("
").css({top:0,width:d,height:e,cursor:"crosshair","z-index":10,position:"absolute","background-color":"rgba(0,0,0,0)"}).addClass("coordinate").appendTo(this._$elWrapper),j=0;j<=this._ticksOfX;j++)this._aElAxisX.push(b("
").css({top:e-f.bottom+10+"px",left:f.left-a/2+j*a+"px",color:h,width:a+"px",position:"absolute","text-align":"center"}).css(i).text(" "));for(j=0;j<=this._ticksOfY;j++)this._aElAxisY.push(b("
").css({top:g+j*c+f.top-10+"px",left:"0px",width:f.left-15+"px",color:h,position:"absolute","text-align":"right","vertical-align":"middle"}).css(i).text(" "));this._welCoordinate.append(this._aElAxisX).append(this._aElAxisY);var k=this.option("labelX");BigScatterChart2.Util.isString(k)&&k.length>0&&b("
").text(k).css(i).css({top:e-f.bottom+10+"px",right:0,color:h,position:"absolute","text-align":"center"}).appendTo(this._welCoordinate);var l=this.option("labelY");BigScatterChart2.Util.isString(l)&&l.length>0&&b("
").text(l).css(i).css({top:g+f.top+10+"px",left:"0px",color:h,width:f.left-15+"px",position:"absolute","text-align":"right","vertical-align":"middle"}).appendTo(this._welCoordinate)},c.prototype._makeDataCanvas=function(){var a=this,c=this._oSCManager.getBubbleSize(),d=this.option("sPrefix"),e=100,f=this.option("typeInfo"),g=this._oSCManager.getWidthOfChartSpace(),h=this._oSCManager.getHeightOfChartSpace(),i=this._oSCManager.getCanvasWidth();this._$elScroller=b("
").css({top:"0px",left:"0px",height:h+2*c+"px",position:"absolute","background-color":"gray"}).addClass("canvas-scroller"),b("
").css({top:this._oSCManager.getTopOfChartSpace()+"px",left:this._oSCManager.getLeftOfChartSpace()+c+"px",width:g+"px",height:h+2*c+"px","z-index":e++,overflow:"hidden",position:"absolute"}).addClass("canvas-wrapper").append(this._$elScroller).appendTo(this._$elWrapper),b.each(this._aAgentList,function(g,j){b.each(f,function(f,g){var k=BigScatterChart2.Util.makeKey(j,d,g[0]);a._oElScrollCanvas[k]=[b("").attr({width:i,height:h+2*c+"px","data-key":k}).css({top:"0px",left:"0px","z-index":e++,position:"absolute"}).appendTo(a._$elScroller),b("").attr({width:i,height:h+2*c+"px","data-key":k}).css({top:"0px",left:i+"px","z-index":e++,position:"absolute"}).appendTo(a._$elScroller)],a._oScrollCtx[k]=[a._oElScrollCanvas[k][0].get(0).getContext("2d"),a._oElScrollCanvas[k][1].get(0).getContext("2d")]})}),this._oScrollIndexOrder=[0,1]},c.prototype.getChartAsImage=function(a,b){return this._mergeAllDisplay(b).get(0).toDataURL("image/"+a.toLowerCase())},c.prototype.updateXYAxis=function(a,c,d,e){var f=this;b.isNumeric(a),b.isNumeric(c),b.isNumeric(d),b.isNumeric(e);var g=this.option("fnXAxisFormat"),h=this._oSCManager.getX(),i=this._oSCManager.getGapX()/this._ticksOfX;b.each(this._aElAxisX,function(a,c){b.isFunction(g)?c.html(g.call(f,i,a,h.min)):c.html((i*a+h.min).round())});var j=this.option("fnYAxisFormat"),k=this._oSCManager.getY(),l=this._oSCManager.getGapY()/this._ticksOfY;b.each(this._aElAxisY,function(a,c){b.isFunction(j)?c.html(j.call(f,l,a,k.min,k.max)):c.html(BigScatterChart2.Util.addComma(k.max+k.min-(l*a+k.min)))})},c.prototype.clear=function(){var a=this._oSCManager.getCanvasWidth(),c=this._oSCManager.getHeight();b.each(this._oScrollCtx,function(d,e){b.each(e,function(b,d){d.clearRect(0,0,a,c)})})},c.prototype.selectType=function(a,c){b.each(this._oElScrollCanvas,function(a,d){b.each(d,function(b,d){BigScatterChart2.Util.endsWith(a,c)?d.show():d.hide()})})},c.prototype.toggle=function(a){b.each(this._oElScrollCanvas,function(c,d){b.each(d,function(b,d){BigScatterChart2.Util.endsWith(c,a)&&d.toggle()})})},c.prototype.showSelectedAgent=function(a,c,d){var e=this;b.each(this._oElScrollCanvas,function(f,g){if(a){var h=e._visible(f.split("-"),d)?"show":"hide";b.each(g,function(a,b){b[h]()})}else b.each(g,function(a,b){BigScatterChart2.Util.startsWith(f,c)?b[e._visible(f.split("-"),d)?"show":"hide"]():b.hide()})})},c.prototype._visible=function(a,b){return b[a[a.length-1]]},c.prototype.drawBubble=function(a,b,c){var d=this.option("propertyIndex"),e=this.option("bubbleRadius"),f=this._oSCManager.getY(),g=(c[d.x]-this._oSCManager.getStartX())*this._oSCManager.getPixelPerTime(),h=this._oSCManager.parseYDataToYChart(BigScatterChart2.Util.getBoundaryValue(f,c[d.y]),!1),i=this._oSCManager.parseZDataToZChart(c.r||e),j=this._oSCManager.getCanvasWidth(),k=this._oScrollIndexOrder[0],l=parseInt(this._oElScrollCanvas[a][k].css("left")),m=l+j;g>m?(k=this._oScrollIndexOrder[1],g-=m):g-=l,this._oScrollCtx[a][k].beginPath(),this._oScrollCtx[a][k].fillStyle=b,this._oScrollCtx[a][k].strokeStyle=b,this._oScrollCtx[a][k].arc(g,h,i,0,2*Math.PI,!0),this._oScrollCtx[a][k].globalAlpha=.3+.1*c[d.groupCount],this._oScrollCtx[a][k].fill()},c.prototype.moveChart=function(a,c){var d=this,e=this._oSCManager.getCanvasWidth(),f=this._oSCManager.getHeight(),g=parseInt(this._$elScroller.css("left"),10)-a; this._$elScroller.animate({left:g},c,function(){var a=d._oScrollIndexOrder[0],c=!1;b.each(d._oElScrollCanvas,function(a,b){Math.abs(g)>parseInt(b[d._oScrollIndexOrder[0]].css("left"))+e&&(c=!0,b[d._oScrollIndexOrder[0]].css("left",parseInt(b[d._oScrollIndexOrder[1]].css("left"))+e),d._oScrollCtx[a][d._oScrollIndexOrder[0]].clearRect(0,0,e,f))}),c&&(d._oScrollIndexOrder[0]=d._oScrollIndexOrder[1],d._oScrollIndexOrder[1]=a)})},c.prototype.reset=function(){var a=this._oSCManager.getCanvasWidth();this._$elScroller.css("left",0),this._oScrollIndexOrder=[0,1],b.each(this._oElScrollCanvas,function(c,d){b.each(d,function(b,c){c.css("left",b*a)})}),this.clear()},c.prototype._mergeAllDisplay=function(a){var c=this,d=this._oSCManager.getPadding(),e=this._oSCManager.getBubbleSize(),f=this._oSCManager.getWidth(),g=this._oSCManager.getHeight(),h=b("").attr({width:f,height:g}),i=h.get(0).getContext("2d");i.fillStyle="#FFFFFF",i.fillRect(0,0,f,g),i.drawImage(this._$elGuideCanvas.get(0),0,0),b.each(this._oElScrollCanvas,function(a,c){b.each(c,function(a,b){b.is(":visible")&&i.drawImage(b.get(0),d.left+e,d.top)})}),i.drawImage(this._$elAxisCanvas.get(0),0,0),i.textBaseline="top";var j=this._$elWrapper.offset();return i.textAlign="left",b.each(a,function(a,b){var d=b.offset(),e=d.left-j.left,f=d.top-j.top;i.font=b.css("font"),i.fillStyle=b.css("color"),i.fillText(b.text(),e+parseInt(b.css("padding-left"),10),f),b.hasClass("unchecked")?i.drawImage(c._oUncheckedBoxImage,e,f):i.drawImage(c._oCheckedBoxImage,e,f)}),i.textAlign="center",b.each(this._aElAxisX,function(a,b){i.font=b.css("font"),i.fillStyle=b.css("color"),i.fillText(b.text(),parseInt(b.css("left"),10)+b.get(0).getBoundingClientRect().width/2,parseInt(b.css("top"),10))}),i.textAlign="right",b.each(this._aElAxisY,function(a,b){i.font=b.css("font"),i.fillStyle=b.css("color"),i.fillText(b.text(),parseInt(b.css("left"),10)+b.get(0).getBoundingClientRect().width,parseInt(b.css("top"),10))}),h},a.BigScatterChart2.RendererManager=c}(window,jQuery),function(a,b){"use strict";function c(a,b,c,d){this._option=a,this._oSCManager=b,this._oCallback=d,this._initVar(),this._initElements(c),this._initEvents()}c.prototype.option=function(a){return this._option[a]},c.prototype._initVar=function(){this._oReferenceLI={},this._oReferenceSpan={}},c.prototype._initElements=function(a){var c=this,d=this._oSCManager.getPadding();this._$element=b("
").css({top:0,width:this._oSCManager.getWidth()-d.right,height:d.top,cursor:"pointer","z-index":510,position:"absolute","background-color":"rgba(0,0,0,0)"}).addClass("bubble-type"),this._$elTypeUL=b("