diff --git a/Gruntfile.js b/Gruntfile.js index 572fa1cb7..1fafc5f3e 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -79,15 +79,6 @@ module.exports = function (grunt) { ], dest: "dist/router.js" }, - chartJs: { - src: [ - "src/addons/chart/chart.js", - "src/addons/chart/chart.combine.js", - "src/addons/chart/factory.charts.js", - "src/addons/chart/**/*.js" - ], - dest: "dist/chart.js" - }, coreCss: { src: ["src/css/core/**/*.css", "src/css/theme/**/*.css"], dest: "dist/core.css" @@ -157,6 +148,8 @@ module.exports = function (grunt) { "src/core/proto/array.js", "src/core/proto/number.js", "src/core/proto/string.js", + "src/core/proto/date.js", + "src/core/proto/function.js", "src/core/base.js", "src/core/ob.js", "src/core/alias.js", diff --git a/dist/bundle.js b/dist/bundle.js index 20b12566b..f3922569a 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -12322,7 +12322,7 @@ BI.OB = function (config) { if (BI.isFunction(this.props)) { props = this.props(config); } - this.options = ($ || _).extend(this._defaultConfig(config), props, config); + this.options = (window.$ || window._).extend(this._defaultConfig(config), props, config); this._init(); this._initRef(); }; @@ -12343,7 +12343,7 @@ _.extend(BI.OB.prototype, { _initListeners: function () { var self = this; if (this.options.listeners != null) { - $.each(this.options.listeners, function (i, lis) { + _.each(this.options.listeners, function (lis) { (lis.target ? lis.target : self)[lis.once ? "once" : "on"] (lis.eventName, _.bind(lis.action, self)); }); @@ -12366,7 +12366,7 @@ _.extend(BI.OB.prototype, { }, _getEvents: function () { - if (!$.isArray(this.events)) { + if (!_.isArray(this.events)) { this.events = []; } return this.events; @@ -12380,7 +12380,7 @@ _.extend(BI.OB.prototype, { on: function (eventName, fn) { eventName = eventName.toLowerCase(); var fns = this._getEvents()[eventName]; - if (!$.isArray(fns)) { + if (!_.isArray(fns)) { fns = []; this._getEvents()[eventName] = fns; } @@ -12412,9 +12412,9 @@ _.extend(BI.OB.prototype, { delete this._getEvents()[eventName]; } else { var fns = this._getEvents()[eventName]; - if ($.isArray(fns)) { + if (_.isArray(fns)) { var newFns = []; - $.each(fns, function (idx, ifn) { + _.each(fns, function (ifn) { if (ifn != fn) { newFns.push(ifn); } @@ -20929,7 +20929,6 @@ $(function () { /** Adds the number of days array to the Date object. */ Date._MD = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; }); - /** Constants used for time computations */ Date.SECOND = 1000; Date.MINUTE = 60 * Date.SECOND; @@ -20955,7 +20954,7 @@ Date.prototype.getMonthDays = function (month) { return 29; } return Date._MD[month]; - + }; /** @@ -21415,7 +21414,7 @@ Date.getDate = function () { return new Date(utc + Date.timeZone);// + Pool.timeZone.offset); } return dt; - + }; Date.getTime = function () { @@ -21463,7 +21462,7 @@ Date.getTime = function () { return dt.getTime() - Date.timeZone - dt.getTimezoneOffset() * 60000; } return dt.getTime(); - + }; /* * 给jQuery.Event对象添加的工具方法 diff --git a/dist/bundle.min.js b/dist/bundle.min.js index 6fe4d9537..7e06acb4b 100644 --- a/dist/bundle.min.js +++ b/dist/bundle.min.js @@ -2,7 +2,7 @@ function accAdd(a,b){var c,d,e,f;try{c=a.toString().split(".")[1].length}catch(g){c=0}try{d=b.toString().split(".")[1].length}catch(g){d=0}if(f=Math.abs(c-d),e=Math.pow(10,Math.max(c,d)),f>0){var h=Math.pow(10,f);c>d?(a=Number(a.toString().replace(".","")),b=Number(b.toString().replace(".",""))*h):(a=Number(a.toString().replace(".",""))*h,b=Number(b.toString().replace(".","")))}else a=Number(a.toString().replace(".","")),b=Number(b.toString().replace(".",""));return(a+b)/e}function accSub(a,b){var c,d,e,f;try{c=a.toString().split(".")[1].length}catch(g){c=0}try{d=b.toString().split(".")[1].length}catch(g){d=0}return e=Math.pow(10,Math.max(c,d)),f=c>=d?c:d,((a*e-b*e)/e).toFixed(f)}function accMul(a,b){var c=0,d=a.toString(),e=b.toString();try{c+=d.split(".")[1].length}catch(f){}try{c+=e.split(".")[1].length}catch(f){}return Number(d.replace(".",""))*Number(e.replace(".",""))/Math.pow(10,c)}function accDiv(arg1,arg2){var t1=0,t2=0,r1,r2;try{t1=arg1.toString().split(".")[1].length}catch(e){}try{t2=arg2.toString().split(".")[1].length}catch(e){}with(Math)return r1=Number(arg1.toString().replace(".","")),r2=Number(arg2.toString().replace(".","")),t2>t1?r1/r2*pow(10,t2-t1):r1/r2/pow(10,t1-t2)}!function(a,b){function c(a){var b=a.length,c=ia.type(a);return!ia.isWindow(a)&&(!(1!==a.nodeType||!b)||("array"===c||"function"!==c&&(0===b||"number"==typeof b&&b>0&&b-1 in a)))}function d(a){var b=xa[a]={};return ia.each(a.match(ka)||[],function(a,c){b[c]=!0}),b}function e(a,c,d,e){if(ia.acceptData(a)){var f,g,h=ia.expando,i="string"==typeof c,j=a.nodeType,k=j?ia.cache:a,l=j?a[h]:a[h]&&h;if(l&&k[l]&&(e||k[l].data)||!i||d!==b)return l||(j?a[h]=l=_.pop()||ia.guid++:l=h),k[l]||(k[l]={},j||(k[l].toJSON=ia.noop)),"object"!=typeof c&&"function"!=typeof c||(e?k[l]=ia.extend(k[l],c):k[l].data=ia.extend(k[l].data,c)),f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[ia.camelCase(c)]=d),i?(g=f[c],null==g&&(g=f[ia.camelCase(c)])):g=f,g}}function f(a,b,c){if(ia.acceptData(a)){var d,e,f,g=a.nodeType,i=g?ia.cache:a,j=g?a[ia.expando]:ia.expando;if(i[j]){if(b&&(f=c?i[j]:i[j].data)){ia.isArray(b)?b=b.concat(ia.map(b,ia.camelCase)):b in f?b=[b]:(b=ia.camelCase(b),b=b in f?[b]:b.split(" "));for(d=0,e=b.length;d=0===c})}function m(a){var b=Ua.split("|"),c=a.createDocumentFragment();if(c.createElement)for(;b.length;)c.createElement(b.pop());return c}function n(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function o(a){var b=a.getAttributeNode("type");return a.type=(b&&b.specified)+"/"+a.type,a}function p(a){var b=eb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function q(a,b){for(var c,d=0;null!=(c=a[d]);d++)ia._data(c,"globalEval",!b||ia._data(b[d],"globalEval"))}function r(a,b){if(1===b.nodeType&&ia.hasData(a)){var c,d,e,f=ia._data(a),g=ia._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d").css("cssText","display:block !important")).appendTo(b.documentElement),b=(jb[0].contentWindow||jb[0].contentDocument).document,b.write(""),b.close(),c=C(a,b),jb.detach()),ub[a]=c),c}function C(a,b){var c=ia(b.createElement(a)).appendTo(b.body),d=ia.css(c[0],"display");return c.remove(),d}function D(a,b,c,d){var e;if(ia.isArray(b))ia.each(b,function(b,e){c||Ab.test(a)?d(a,e):D(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==ia.type(b))d(a,b);else for(e in b)D(a+"["+e+"]",b[e],c,d)}function E(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(ka)||[];if(ia.isFunction(c))for(;d=f[e++];)"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function F(a,b,c,d){function e(h){var i;return f[h]=!0,ia.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||g||f[j]?g?!(i=j):void 0:(b.dataTypes.unshift(j),e(j),!1)}),i}var f={},g=a===Rb;return e(b.dataTypes[0])||!f["*"]&&e("*")}function G(a,c){var d,e,f=ia.ajaxSettings.flatOptions||{};for(e in c)c[e]!==b&&((f[e]?a:d||(d={}))[e]=c[e]);return d&&ia.extend(!0,a,d),a}function H(a,c,d){var e,f,g,h,i=a.contents,j=a.dataTypes,k=a.responseFields;for(h in k)h in d&&(c[k[h]]=d[h]);for(;"*"===j[0];)j.shift(),f===b&&(f=a.mimeType||c.getResponseHeader("Content-Type"));if(f)for(h in i)if(i[h]&&i[h].test(f)){j.unshift(h);break}if(j[0]in d)g=j[0];else{for(h in d){if(!j[0]||a.converters[h+" "+j[0]]){g=h;break}e||(e=h)}g=g||e}if(g)return g!==j[0]&&j.unshift(g),d[g]}function I(a,b){var c,d,e,f,g={},h=0,i=a.dataTypes.slice(),j=i[0];if(a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i[1])for(e in a.converters)g[e.toLowerCase()]=a.converters[e];for(;d=i[++h];)if("*"!==d){if("*"!==j&&j!==d){if(e=g[j+" "+d]||g["* "+d],!e)for(c in g)if(f=c.split(" "),f[1]===d&&(e=g[j+" "+f[0]]||g["* "+f[0]])){e===!0?e=g[c]:g[c]!==!0&&(d=f[0],i.splice(h--,0,d));break}if(e!==!0)if(e&&a["throws"])b=e(b);else try{b=e(b)}catch(k){return{state:"parsererror",error:e?k:"No conversion from "+j+" to "+d}}}j=d}return{state:"success",data:b}}function J(){try{return new a.XMLHttpRequest}catch(b){}}function K(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function L(){return setTimeout(function(){$b=b}),$b=ia.now()}function M(a,b){ia.each(b,function(b,c){for(var d=(ec[b]||[]).concat(ec["*"]),e=0,f=d.length;e)[^>]*|#([\w-]*))$/,na=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,oa=/^[\],:{}\s]*$/,pa=/(?:^|:|,)(?:\s*\[)+/g,qa=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,ra=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,sa=/^-ms-/,ta=/-([\da-z])/gi,ua=function(a,b){return b.toUpperCase()},va=function(a){(W.addEventListener||"load"===a.type||"complete"===W.readyState)&&(wa(),ia.ready())},wa=function(){W.addEventListener?(W.removeEventListener("DOMContentLoaded",va,!1),a.removeEventListener("load",va,!1)):(W.detachEvent("onreadystatechange",va),a.detachEvent("onload",va))};ia.fn=ia.prototype={jquery:aa,constructor:ia,init:function(a,c,d){var e,f;if(!a)return this;if("string"==typeof a){if(e="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:ma.exec(a),!e||!e[1]&&c)return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a);if(e[1]){if(c=c instanceof ia?c[0]:c,ia.merge(this,ia.parseHTML(e[1],c&&c.nodeType?c.ownerDocument||c:W,!0)),na.test(e[1])&&ia.isPlainObject(c))for(e in c)ia.isFunction(this[e])?this[e](c[e]):this.attr(e,c[e]);return this}if(f=W.getElementById(e[2]),f&&f.parentNode){if(f.id!==e[2])return d.find(a);this.length=1,this[0]=f}return this.context=W,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):ia.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),ia.makeArray(a,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return da.call(this)},get:function(a){return null==a?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a){var b=ia.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return ia.each(this,a,b)},ready:function(a){return ia.ready.promise().done(a),this},slice:function(){return this.pushStack(da.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c0||(T.resolveWith(W,[ia]),ia.fn.trigger&&ia(W).trigger("ready").off("ready"))}},isFunction:function(a){return"function"===ia.type(a)},isArray:Array.isArray||function(a){return"array"===ia.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return null==a?String(a):"object"==typeof a||"function"==typeof a?$[fa.call(a)]||"object":typeof a},isPlainObject:function(a){if(!a||"object"!==ia.type(a)||a.nodeType||ia.isWindow(a))return!1;try{if(a.constructor&&!ga.call(a,"constructor")&&!ga.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||ga.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||W;var d=na.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=ia.buildFragment([a],b,e),e&&ia(e).remove(),ia.merge([],d.childNodes))},parseJSON:function(b){return a.JSON&&a.JSON.parse?a.JSON.parse(b):null===b?b:"string"==typeof b&&(b=ia.trim(b),b&&oa.test(b.replace(qa,"@").replace(ra,"]").replace(pa,"")))?new Function("return "+b)():void ia.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||"string"!=typeof c)return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return d&&d.documentElement&&!d.getElementsByTagName("parsererror").length||ia.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&ia.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(sa,"ms-").replace(ta,ua)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,d){var e,f=0,g=a.length,h=c(a);if(d){if(h)for(;f-1;)j.splice(d,1),c&&(d<=g&&g--,d<=h&&h--)}),this},has:function(a){return a?ia.inArray(a,j)>-1:!(!j||!j.length)},empty:function(){return j=[],this},disable:function(){return j=k=e=b,this},disabled:function(){return!j},lock:function(){return k=b,e||m.disable(),this},locked:function(){return!k},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],!j||f&&!k||(c?k.push(b):l(b)),this},fire:function(){return m.fireWith(this,arguments),this},fired:function(){return!!f}};return m},ia.extend({Deferred:function(a){var b=[["resolve","done",ia.Callbacks("once memory"),"resolved"],["reject","fail",ia.Callbacks("once memory"),"rejected"],["notify","progress",ia.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return ia.Deferred(function(c){ia.each(b,function(b,f){var g=f[0],h=ia.isFunction(a[b])&&a[b];e[f[1]](function(){var a=h&&h.apply(this,arguments);a&&ia.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[g+"With"](this===d?c.promise():this,h?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?ia.extend(a,d):d}},e={};return d.pipe=d.then,ia.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b,c,d,e=0,f=da.call(arguments),g=f.length,h=1!==g||a&&ia.isFunction(a.promise)?g:0,i=1===h?a:ia.Deferred(),j=function(a,c,d){return function(e){c[a]=this,d[a]=arguments.length>1?da.call(arguments):e,d===b?i.notifyWith(c,d):--h||i.resolveWith(c,d)}};if(g>1)for(b=new Array(g),c=new Array(g),d=new Array(g);e
a",c=l.getElementsByTagName("*"),d=l.getElementsByTagName("a")[0],!c||!d||!c.length)return{};f=W.createElement("select"),h=f.appendChild(W.createElement("option")),e=l.getElementsByTagName("input")[0],d.style.cssText="top:1px;float:left;opacity:.5",b={getSetAttribute:"t"!==l.className,leadingWhitespace:3===l.firstChild.nodeType,tbody:!l.getElementsByTagName("tbody").length,htmlSerialize:!!l.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:"/a"===d.getAttribute("href"),opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:!!e.value,optSelected:h.selected,enctype:!!W.createElement("form").enctype,html5Clone:"<:nav>"!==W.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===W.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},e.checked=!0,b.noCloneChecked=e.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!h.disabled;try{delete l.test}catch(m){b.deleteExpando=!1}e=W.createElement("input"),e.setAttribute("value",""),b.input=""===e.getAttribute("value"),e.value="t",e.setAttribute("type","radio"),b.radioValue="t"===e.value,e.setAttribute("checked","t"),e.setAttribute("name","t"),g=W.createDocumentFragment(),g.appendChild(e),b.appendChecked=e.checked,b.checkClone=g.cloneNode(!0).cloneNode(!0).lastChild.checked,l.attachEvent&&(l.attachEvent("onclick",function(){b.noCloneEvent=!1}),l.cloneNode(!0).click());for(k in{submit:!0,change:!0,focusin:!0})l.setAttribute(i="on"+k,"t"),b[k+"Bubbles"]=i in a||l.attributes[i].expando===!1;return l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",b.clearCloneStyle="content-box"===l.style.backgroundClip,ia(function(){var c,d,e,f="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",g=W.getElementsByTagName("body")[0];g&&(c=W.createElement("div"),c.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",g.appendChild(c).appendChild(l),l.innerHTML="
t
",e=l.getElementsByTagName("td"),e[0].style.cssText="padding:0;margin:0;border:0;display:none",j=0===e[0].offsetHeight,e[0].style.display="",e[1].style.display="none",b.reliableHiddenOffsets=j&&0===e[0].offsetHeight,l.innerHTML="",l.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",b.boxSizing=4===l.offsetWidth,b.doesNotIncludeMarginInBodyOffset=1!==g.offsetTop,a.getComputedStyle&&(b.pixelPosition="1%"!==(a.getComputedStyle(l,null)||{}).top,b.boxSizingReliable="4px"===(a.getComputedStyle(l,null)||{width:"4px"}).width,d=l.appendChild(W.createElement("div")),d.style.cssText=l.style.cssText=f,d.style.marginRight=d.style.width="0",l.style.width="1px",b.reliableMarginRight=!parseFloat((a.getComputedStyle(d,null)||{}).marginRight)),typeof l.style.zoom!==V&&(l.innerHTML="",l.style.cssText=f+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=3===l.offsetWidth,l.style.display="block",l.innerHTML="
",l.firstChild.style.width="5px",b.shrinkWrapBlocks=3!==l.offsetWidth,b.inlineBlockNeedsLayout&&(g.style.zoom=1)),g.removeChild(c),c=l=e=d=null)}),c=f=g=h=d=e=null,b}();var ya=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,za=/([A-Z])/g;ia.extend({cache:{},expando:"jQuery"+(aa+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?ia.cache[a[ia.expando]]:a[ia.expando],!!a&&!h(a)},data:function(a,b,c){return e(a,b,c)},removeData:function(a,b){return f(a,b)},_data:function(a,b,c){return e(a,b,c,!0)},_removeData:function(a,b){return f(a,b,!0)},acceptData:function(a){if(a.nodeType&&1!==a.nodeType&&9!==a.nodeType)return!1;var b=a.nodeName&&ia.noData[a.nodeName.toLowerCase()];return!b||b!==!0&&a.getAttribute("classid")===b}}),ia.fn.extend({data:function(a,c){var d,e,f=this[0],h=0,i=null;if(a===b){if(this.length&&(i=ia.data(f),1===f.nodeType&&!ia._data(f,"parsedAttrs"))){for(d=f.attributes;h1,null,!0)},removeData:function(a){return this.each(function(){ia.removeData(this,a)})}}),ia.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=ia._data(a,b),c&&(!d||ia.isArray(c)?d=ia._data(a,b,ia.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=ia.queue(a,b),d=c.length,e=c.shift(),f=ia._queueHooks(a,b),g=function(){ia.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),f.cur=e,e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return ia._data(a,c)||ia._data(a,c,{empty:ia.Callbacks("once memory").add(function(){ia._removeData(a,b+"queue"),ia._removeData(a,c)})})}}),ia.fn.extend({queue:function(a,c){var d=2;return"string"!=typeof a&&(c=a,a="fx",d--),arguments.length1)},removeAttr:function(a){return this.each(function(){ia.removeAttr(this,a)})},prop:function(a,b){return ia.access(this,ia.prop,a,b,arguments.length>1)},removeProp:function(a){return a=ia.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g=0,h=this.length,i="string"==typeof a&&a;if(ia.isFunction(a))return this.each(function(b){ia(this).addClass(a.call(this,b,this.className))});if(i)for(b=(a||"").match(ka)||[];g=0;)d=d.replace(" "+e+" "," ");c.className=a?ia.trim(d):""}return this},toggleClass:function(a,b){var c=typeof a,d="boolean"==typeof b;return ia.isFunction(a)?this.each(function(c){ia(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if("string"===c)for(var e,f=0,g=ia(this),h=b,i=a.match(ka)||[];e=i[f++];)h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e);else c!==V&&"boolean"!==c||(this.className&&ia._data(this,"__className__",this.className),this.className=this.className||a===!1?"":ia._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;c=0)return!0;return!1},val:function(a){var c,d,e,f=this[0];{if(arguments.length)return e=ia.isFunction(a),this.each(function(c){var f,g=ia(this);1===this.nodeType&&(f=e?a.call(this,c,g.val()):a,null==f?f="":"number"==typeof f?f+="":ia.isArray(f)&&(f=ia.map(f,function(a){return null==a?"":a+""})),d=ia.valHooks[this.type]||ia.valHooks[this.nodeName.toLowerCase()],d&&"set"in d&&d.set(this,f,"value")!==b||(this.value=f))});if(f)return d=ia.valHooks[f.type]||ia.valHooks[f.nodeName.toLowerCase()],d&&"get"in d&&(c=d.get(f,"value"))!==b?c:(c=f.value,"string"==typeof c?c.replace(Da,""):null==c?"":c)}}}),ia.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||e<0,g=f?null:[],h=f?e+1:d.length,i=e<0?h:f?e:0;i=0}),c.length||(a.selectedIndex=-1),c}}},attr:function(a,c,d){var e,f,g,h=a.nodeType;if(a&&3!==h&&8!==h&&2!==h)return typeof a.getAttribute===V?ia.prop(a,c,d):(f=1!==h||!ia.isXMLDoc(a),f&&(c=c.toLowerCase(),e=ia.attrHooks[c]||(Ga.test(c)?Ba:Aa)),d===b?e&&f&&"get"in e&&null!==(g=e.get(a,c))?g:(typeof a.getAttribute!==V&&(g=a.getAttribute(c)),null==g?b:g):null!==d?e&&f&&"set"in e&&(g=e.set(a,d,c))!==b?g:(a.setAttribute(c,d+""),d):void ia.removeAttr(a,c))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(ka);if(f&&1===a.nodeType)for(;c=f[e++];)d=ia.propFix[c]||c, Ga.test(c)?!Ia&&Ha.test(c)?a[ia.camelCase("default-"+c)]=a[d]=!1:a[d]=!1:ia.attr(a,c,""),a.removeAttribute(Ia?c:d)},attrHooks:{type:{set:function(a,b){if(!ia.support.radioValue&&"radio"===b&&ia.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,f,g,h=a.nodeType;if(a&&3!==h&&8!==h&&2!==h)return g=1!==h||!ia.isXMLDoc(a),g&&(c=ia.propFix[c]||c,f=ia.propHooks[c]),d!==b?f&&"set"in f&&(e=f.set(a,d,c))!==b?e:a[c]=d:f&&"get"in f&&null!==(e=f.get(a,c))?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):Ea.test(a.nodeName)||Fa.test(a.nodeName)&&a.href?0:b}}}}),Ba={get:function(a,c){var d=ia.prop(a,c),e="boolean"==typeof d&&a.getAttribute(c),f="boolean"==typeof d?Ja&&Ia?null!=e:Ha.test(c)?a[ia.camelCase("default-"+c)]:!!e:a.getAttributeNode(c);return f&&f.value!==!1?c.toLowerCase():b},set:function(a,b,c){return b===!1?ia.removeAttr(a,c):Ja&&Ia||!Ha.test(c)?a.setAttribute(!Ia&&ia.propFix[c]||c,c):a[ia.camelCase("default-"+c)]=a[c]=!0,c}},Ja&&Ia||(ia.attrHooks.value={get:function(a,c){var d=a.getAttributeNode(c);return ia.nodeName(a,"input")?a.defaultValue:d&&d.specified?d.value:b},set:function(a,b,c){return ia.nodeName(a,"input")?void(a.defaultValue=b):Aa&&Aa.set(a,b,c)}}),Ia||(Aa=ia.valHooks.button={get:function(a,c){var d=a.getAttributeNode(c);return d&&("id"===c||"name"===c||"coords"===c?""!==d.value:d.specified)?d.value:b},set:function(a,c,d){var e=a.getAttributeNode(d);return e||a.setAttributeNode(e=a.ownerDocument.createAttribute(d)),e.value=c+="","value"===d||c===a.getAttribute(d)?c:b}},ia.attrHooks.contenteditable={get:Aa.get,set:function(a,b,c){Aa.set(a,""!==b&&b,c)}},ia.each(["width","height"],function(a,b){ia.attrHooks[b]=ia.extend(ia.attrHooks[b],{set:function(a,c){if(""===c)return a.setAttribute(b,"auto"),c}})})),ia.support.hrefNormalized||(ia.each(["href","src","width","height"],function(a,c){ia.attrHooks[c]=ia.extend(ia.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return null==d?b:d}})}),ia.each(["href","src"],function(a,b){ia.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}})),ia.support.style||(ia.attrHooks.style={get:function(a){return a.style.cssText||b},set:function(a,b){return a.style.cssText=b+""}}),ia.support.optSelected||(ia.propHooks.selected=ia.extend(ia.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),ia.support.enctype||(ia.propFix.enctype="encoding"),ia.support.checkOn||ia.each(["radio","checkbox"],function(){ia.valHooks[this]={get:function(a){return null===a.getAttribute("value")?"on":a.value}}}),ia.each(["radio","checkbox"],function(){ia.valHooks[this]=ia.extend(ia.valHooks[this],{set:function(a,b){if(ia.isArray(b))return a.checked=ia.inArray(ia(a).val(),b)>=0}})});var Ka=/^(?:input|select|textarea)$/i,La=/^key/,Ma=/^(?:mouse|contextmenu)|click/,Na=/^(?:focusinfocus|focusoutblur)$/,Oa=/^([^.]*)(?:\.(.+)|)$/;ia.event={global:{},add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q,r=ia._data(a);if(r){for(d.handler&&(j=d,d=j.handler,f=j.selector),d.guid||(d.guid=ia.guid++),(h=r.events)||(h=r.events={}),(l=r.handle)||(l=r.handle=function(a){return typeof ia===V||a&&ia.event.triggered===a.type?b:ia.event.dispatch.apply(l.elem,arguments)},l.elem=a),c=(c||"").match(ka)||[""],i=c.length;i--;)g=Oa.exec(c[i])||[],o=q=g[1],p=(g[2]||"").split(".").sort(),k=ia.event.special[o]||{},o=(f?k.delegateType:k.bindType)||o,k=ia.event.special[o]||{},m=ia.extend({type:o,origType:q,data:e,handler:d,guid:d.guid,selector:f,needsContext:f&&ia.expr.match.needsContext.test(f),namespace:p.join(".")},j),(n=h[o])||(n=h[o]=[],n.delegateCount=0,k.setup&&k.setup.call(a,e,p,l)!==!1||(a.addEventListener?a.addEventListener(o,l,!1):a.attachEvent&&a.attachEvent("on"+o,l))),k.add&&(k.add.call(a,m),m.handler.guid||(m.handler.guid=d.guid)),f?n.splice(n.delegateCount++,0,m):n.push(m),ia.event.global[o]=!0;a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=ia.hasData(a)&&ia._data(a);if(q&&(k=q.events)){for(b=(b||"").match(ka)||[""],j=b.length;j--;)if(h=Oa.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){for(l=ia.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=k[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;f--;)g=m[f],!e&&p!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||ia.removeEvent(a,n,q.handle),delete k[n])}else for(n in k)ia.event.remove(a,n+b[j],c,d,!0);ia.isEmptyObject(k)&&(delete q.handle,ia._removeData(a,"events"))}},trigger:function(c,d,e,f){var g,h,i,j,k,l,m,n=[e||W],o=ga.call(c,"type")?c.type:c,p=ga.call(c,"namespace")?c.namespace.split("."):[];if(i=l=e=e||W,3!==e.nodeType&&8!==e.nodeType&&!Na.test(o+ia.event.triggered)&&(o.indexOf(".")>=0&&(p=o.split("."),o=p.shift(),p.sort()),h=o.indexOf(":")<0&&"on"+o,c=c[ia.expando]?c:new ia.Event(o,"object"==typeof c&&c),c.isTrigger=!0,c.namespace=p.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,c.result=b,c.target||(c.target=e),d=null==d?[c]:ia.makeArray(d,[c]),k=ia.event.special[o]||{},f||!k.trigger||k.trigger.apply(e,d)!==!1)){if(!f&&!k.noBubble&&!ia.isWindow(e)){for(j=k.delegateType||o,Na.test(j+o)||(i=i.parentNode);i;i=i.parentNode)n.push(i),l=i;l===(e.ownerDocument||W)&&n.push(l.defaultView||l.parentWindow||a)}for(m=0;(i=n[m++])&&!c.isPropagationStopped();)c.type=m>1?j:k.bindType||o,g=(ia._data(i,"events")||{})[c.type]&&ia._data(i,"handle"),g&&g.apply(i,d),g=h&&i[h],g&&ia.acceptData(i)&&g.apply&&g.apply(i,d)===!1&&c.preventDefault();if(c.type=o,!f&&!c.isDefaultPrevented()&&(!k._default||k._default.apply(e.ownerDocument,d)===!1)&&("click"!==o||!ia.nodeName(e,"a"))&&ia.acceptData(e)&&h&&e[o]&&!ia.isWindow(e)){l=e[h],l&&(e[h]=null),ia.event.triggered=o;try{e[o]()}catch(q){}ia.event.triggered=b,l&&(e[h]=l)}return c.result}},dispatch:function(a){a=ia.event.fix(a);var c,d,e,f,g,h=[],i=da.call(arguments),j=(ia._data(this,"events")||{})[a.type]||[],k=ia.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){for(h=ia.event.handlers.call(this,a,j),c=0;(f=h[c++])&&!a.isPropagationStopped();)for(a.currentTarget=f.elem,g=0;(e=f.handlers[g++])&&!a.isImmediatePropagationStopped();)if(!a.namespace_re||a.namespace_re.test(e.namespace)){a.handleObj=e,a.data=e.data;var l=(ia.event.special[e.origType]||{}).handle||e.handler;l.apply&&(d=l.apply(f.elem,i)),d!==b&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation())}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,c){var d,e,f,g,h=[],i=c.delegateCount,j=a.target;if(i&&j.nodeType&&(!a.button||"click"!==a.type))for(;j!=this;j=j.parentNode||this)if(1===j.nodeType&&(j.disabled!==!0||"click"!==a.type)){for(f=[],g=0;g=0:ia.find(d,this,null,[j]).length),f[d]&&f.push(e);f.length&&h.push({elem:j,handlers:f})}return iy.cacheLength&&delete a[b.shift()],a[c]=d}}function e(a){return a[N]=!0,a}function f(a){var b=F.createElement("div");try{return a(b)}catch(c){return!1}finally{b=null}}function g(a,b,c,d){var e,f,g,h,i,j,k,n,o,p;if((b?b.ownerDocument||b:O)!==F&&E(b),b=b||F,c=c||[],!a||"string"!=typeof a)return c;if(1!==(h=b.nodeType)&&9!==h)return[];if(!H&&!d){if(e=pa.exec(a))if(g=e[1]){if(9===h){if(f=b.getElementById(g),!f||!f.parentNode)return c;if(f.id===g)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(g))&&L(b,f)&&f.id===g)return c.push(f),c}else{if(e[2])return Z.apply(c,$.call(b.getElementsByTagName(a),0)),c;if((g=e[3])&&P.getByClassName&&b.getElementsByClassName)return Z.apply(c,$.call(b.getElementsByClassName(g),0)),c}if(P.qsa&&!I.test(a)){if(k=!0,n=N,o=b,p=9===h&&a,1===h&&"object"!==b.nodeName.toLowerCase()){for(j=l(a),(k=b.getAttribute("id"))?n=k.replace(sa,"\\$&"):b.setAttribute("id",n),n="[id='"+n+"'] ",i=j.length;i--;)j[i]=n+m(j[i]);o=na.test(a)&&b.parentNode||b,p=j.join(",")}if(p)try{return Z.apply(c,$.call(o.querySelectorAll(p),0)),c}catch(q){}finally{k||b.removeAttribute("id")}}}return u(a.replace(ga,"$1"),b,c,d)}function h(a,b){var c=b&&a,d=c&&(~b.sourceIndex||W)-(~a.sourceIndex||W);if(d)return d;if(c)for(;c=c.nextSibling;)if(c===b)return-1;return a?1:-1}function i(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function j(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function k(a){return e(function(b){return b=+b,e(function(c,d){for(var e,f=a([],c.length,b),g=f.length;g--;)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function l(a,b){var c,d,e,f,h,i,j,k=T[a+" "];if(k)return b?0:k.slice(0);for(h=a,i=[],j=y.preFilter;h;){c&&!(d=ha.exec(h))||(d&&(h=h.slice(d[0].length)||h),i.push(e=[])),c=!1,(d=ja.exec(h))&&(c=d.shift(),e.push({value:c,type:d[0].replace(ga," ")}),h=h.slice(c.length));for(f in y.filter)!(d=ma[f].exec(h))||j[f]&&!(d=j[f](d))||(c=d.shift(),e.push({value:c,type:f,matches:d}),h=h.slice(c.length));if(!c)break}return b?h.length:h?g.error(a):T(a,i).slice(0)}function m(a){for(var b=0,c=a.length,d="";b1?function(b,c,d){for(var e=a.length;e--;)if(!a[e](b,c,d))return!1;return!0}:a[0]}function p(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;h-1&&(e[j]=!(g[j]=l))}}else s=p(s===g?s.splice(o,s.length):s),f?f(null,g,s,i):Z.apply(g,s)})}function r(a){for(var b,c,d,e=a.length,f=y.relative[a[0].type],g=f||y.relative[" "],h=f?1:0,i=n(function(a){return a===b},g,!0),j=n(function(a){return _.call(b,a)>-1},g,!0),k=[function(a,c,d){return!f&&(d||c!==D)||((b=c).nodeType?i(a,c,d):j(a,c,d))}];h1&&o(k),h>1&&m(a.slice(0,h-1)).replace(ga,"$1"),c,h0,f=a.length>0,h=function(e,h,i,j,k){var l,m,n,o=[],q=0,r="0",s=e&&[],t=null!=k,u=D,v=e||f&&y.find.TAG("*",k&&h.parentNode||h),w=Q+=null==u?1:Math.random()||.1;for(t&&(D=h!==F&&h,x=c);null!=(l=v[r]);r++){if(f&&l){for(m=0;n=a[m++];)if(n(l,h,i)){j.push(l);break}t&&(Q=w,x=++c)}d&&((l=!n&&l)&&q--,e&&s.push(l))}if(q+=r,d&&r!==q){for(m=0;n=b[m++];)n(s,o,h,i);if(e){if(q>0)for(;r--;)s[r]||o[r]||(o[r]=Y.call(j));o=p(o)}Z.apply(j,o),t&&!e&&o.length>0&&q+b.length>1&&g.uniqueSort(j)}return t&&(Q=w,D=u),s};return d?e(h):h}function t(a,b,c){for(var d=0,e=b.length;d2&&"ID"===(g=f[0]).type&&9===b.nodeType&&!H&&y.relative[f[1].type]){if(b=y.find.ID(g.matches[0].replace(ua,va),b)[0],!b)return c;a=a.slice(f.shift().value.length)}for(e=ma.needsContext.test(a)?0:f.length;e--&&(g=f[e],!y.relative[h=g.type]);)if((i=y.find[h])&&(d=i(g.matches[0].replace(ua,va),na.test(f[0].type)&&b.parentNode||b))){if(f.splice(e,1),a=d.length&&m(f),!a)return Z.apply(c,$.call(d,0)),c;break}}return B(a,j)(d,b,H,c,na.test(a)),c}function v(){}var w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N="sizzle"+-new Date,O=a.document,P={},Q=0,R=0,S=d(),T=d(),U=d(),V=typeof b,W=1<<31,X=[],Y=X.pop,Z=X.push,$=X.slice,_=X.indexOf||function(a){for(var b=0,c=this.length;b+~])"+aa+"*"),ka=new RegExp(fa),la=new RegExp("^"+ca+"$"),ma={ID:new RegExp("^#("+ba+")"),CLASS:new RegExp("^\\.("+ba+")"),NAME:new RegExp("^\\[name=['\"]?("+ba+")['\"]?\\]"),TAG:new RegExp("^("+ba.replace("w","w*")+")"),ATTR:new RegExp("^"+ea),PSEUDO:new RegExp("^"+fa),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+aa+"*(even|odd|(([+-]|)(\\d*)n|)"+aa+"*(?:([+-]|)"+aa+"*(\\d+)|))"+aa+"*\\)|)","i"),needsContext:new RegExp("^"+aa+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+aa+"*((?:-\\d)?\\d*)"+aa+"*\\)|)(?=[^-]|$)","i")},na=/[\x20\t\r\n\f]*[+~]/,oa=/^[^{]+\{\s*\[native code/,pa=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,qa=/^(?:input|select|textarea|button)$/i,ra=/^h\d$/i,sa=/'|\\/g,ta=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,ua=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,va=function(a,b){var c="0x"+b-65536;return c!==c?b:c<0?String.fromCharCode(c+65536):String.fromCharCode(c>>10|55296,1023&c|56320)};try{$.call(O.documentElement.childNodes,0)[0].nodeType}catch(wa){$=function(a){for(var b,c=[];b=this[a++];)c.push(b);return c}}A=g.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},E=g.setDocument=function(a){var d=a?a.ownerDocument||a:O;return d!==F&&9===d.nodeType&&d.documentElement?(F=d,G=d.documentElement,H=A(d),P.tagNameNoComments=f(function(a){return a.appendChild(d.createComment("")),!a.getElementsByTagName("*").length}),P.attributes=f(function(a){a.innerHTML="";var b=typeof a.lastChild.getAttribute("multiple");return"boolean"!==b&&"string"!==b}),P.getByClassName=f(function(a){return a.innerHTML="",!(!a.getElementsByClassName||!a.getElementsByClassName("e").length)&&(a.lastChild.className="e",2===a.getElementsByClassName("e").length)}),P.getByName=f(function(a){a.id=N+0,a.innerHTML="
",G.insertBefore(a,G.firstChild);var b=d.getElementsByName&&d.getElementsByName(N).length===2+d.getElementsByName(N+0).length;return P.getIdNotName=!d.getElementById(N),G.removeChild(a),b}),y.attrHandle=f(function(a){return a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!==V&&"#"===a.firstChild.getAttribute("href")})?{}:{href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}},P.getIdNotName?(y.find.ID=function(a,b){if(typeof b.getElementById!==V&&!H){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},y.filter.ID=function(a){var b=a.replace(ua,va);return function(a){return a.getAttribute("id")===b}}):(y.find.ID=function(a,c){if(typeof c.getElementById!==V&&!H){var d=c.getElementById(a);return d?d.id===a||typeof d.getAttributeNode!==V&&d.getAttributeNode("id").value===a?[d]:b:[]}},y.filter.ID=function(a){var b=a.replace(ua,va);return function(a){var c=typeof a.getAttributeNode!==V&&a.getAttributeNode("id");return c&&c.value===b}}),y.find.TAG=P.tagNameNoComments?function(a,b){if(typeof b.getElementsByTagName!==V)return b.getElementsByTagName(a)}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){for(;c=f[e++];)1===c.nodeType&&d.push(c);return d}return f},y.find.NAME=P.getByName&&function(a,b){if(typeof b.getElementsByName!==V)return b.getElementsByName(name)},y.find.CLASS=P.getByClassName&&function(a,b){if(typeof b.getElementsByClassName!==V&&!H)return b.getElementsByClassName(a)},J=[],I=[":focus"],(P.qsa=c(d.querySelectorAll))&&(f(function(a){a.innerHTML="",a.querySelectorAll("[selected]").length||I.push("\\["+aa+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||I.push(":checked")}),f(function(a){a.innerHTML="",a.querySelectorAll("[i^='']").length&&I.push("[*^$]="+aa+"*(?:\"\"|'')"),a.querySelectorAll(":enabled").length||I.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),I.push(",.*:")})),(P.matchesSelector=c(K=G.matchesSelector||G.mozMatchesSelector||G.webkitMatchesSelector||G.oMatchesSelector||G.msMatchesSelector))&&f(function(a){P.disconnectedMatch=K.call(a,"div"),K.call(a,"[s!='']:x"),J.push("!=",fa)}),I=new RegExp(I.join("|")),J=new RegExp(J.join("|")),L=c(G.contains)||G.compareDocumentPosition?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1},M=G.compareDocumentPosition?function(a,b){var c;return a===b?(C=!0,0):(c=b.compareDocumentPosition&&a.compareDocumentPosition&&a.compareDocumentPosition(b))?1&c||a.parentNode&&11===a.parentNode.nodeType?a===d||L(O,a)?-1:b===d||L(O,b)?1:0:4&c?-1:1:a.compareDocumentPosition?-1:1}:function(a,b){var c,e=0,f=a.parentNode,g=b.parentNode,i=[a],j=[b];if(a===b)return C=!0,0;if(!f||!g)return a===d?-1:b===d?1:f?-1:g?1:0;if(f===g)return h(a,b);for(c=a;c=c.parentNode;)i.unshift(c);for(c=b;c=c.parentNode;)j.unshift(c);for(;i[e]===j[e];)e++;return e?h(i[e],j[e]):i[e]===O?-1:j[e]===O?1:0},C=!1,[0,0].sort(M),P.detectDuplicates=C,F):F},g.matches=function(a,b){return g(a,null,null,b)},g.matchesSelector=function(a,b){if((a.ownerDocument||a)!==F&&E(a),b=b.replace(ta,"='$1']"),P.matchesSelector&&!H&&(!J||!J.test(b))&&!I.test(b))try{var c=K.call(a,b);if(c||P.disconnectedMatch||a.document&&11!==a.document.nodeType)return c}catch(d){}return g(b,F,null,[a]).length>0},g.contains=function(a,b){return(a.ownerDocument||a)!==F&&E(a),L(a,b)},g.attr=function(a,b){var c;return(a.ownerDocument||a)!==F&&E(a),H||(b=b.toLowerCase()),(c=y.attrHandle[b])?c(a):H||P.attributes?a.getAttribute(b):((c=a.getAttributeNode(b))||a.getAttribute(b))&&a[b]===!0?b:c&&c.specified?c.value:null},g.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},g.uniqueSort=function(a){var b,c=[],d=1,e=0;if(C=!P.detectDuplicates,a.sort(M),C){for(;b=a[d];d++)b===a[d-1]&&(e=c.push(d));for(;e--;)a.splice(c[e],1)}return a},z=g.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(1===e||9===e||11===e){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=z(a)}else if(3===e||4===e)return a.nodeValue}else for(;b=a[d];d++)c+=z(b);return c},y=g.selectors={cacheLength:50,createPseudo:e,match:ma,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ua,va),a[3]=(a[4]||a[5]||"").replace(ua,va),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||g.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&g.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return ma.CHILD.test(a[0])?null:(a[4]?a[2]=a[4]:c&&ka.test(c)&&(b=l(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){return"*"===a?function(){return!0}:(a=a.replace(ua,va).toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=S[a+" "];return b||(b=new RegExp("(^|"+aa+")"+a+"("+aa+"|$)"))&&S(a,function(a){return b.test(a.className||typeof a.getAttribute!==V&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=g.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){for(;p;){for(l=b;l=l[p];)if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){for(k=q[N]||(q[N]={}),j=k[a]||[],n=j[0]===Q&&j[1],m=j[0]===Q&&j[2],l=n&&q.childNodes[n];l=++n&&l&&l[p]||(m=n=0)||o.pop();)if(1===l.nodeType&&++m&&l===b){k[a]=[Q,n,m];break}}else if(s&&(j=(b[N]||(b[N]={}))[a])&&j[0]===Q)m=j[1];else for(;(l=++n&&l&&l[p]||(m=n=0)||o.pop())&&((h?l.nodeName.toLowerCase()!==r:1!==l.nodeType)||!++m||(s&&((l[N]||(l[N]={}))[a]=[Q,m]),l!==b)););return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,d=y.pseudos[a]||y.setFilters[a.toLowerCase()]||g.error("unsupported pseudo: "+a);return d[N]?d(b):d.length>1?(c=[a,a,"",b],y.setFilters.hasOwnProperty(a.toLowerCase())?e(function(a,c){for(var e,f=d(a,b),g=f.length;g--;)e=_.call(a,f[g]),a[e]=!(c[e]=f[g])}):function(a){return d(a,0,c)}):d}},pseudos:{not:e(function(a){var b=[],c=[],d=B(a.replace(ga,"$1"));return d[N]?e(function(a,b,c,e){for(var f,g=d(a,null,e,[]),h=a.length;h--;)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:e(function(a){return function(b){return g(a,b).length>0}}),contains:e(function(a){return function(b){return(b.textContent||b.innerText||z(b)).indexOf(a)>-1}}),lang:e(function(a){return la.test(a||"")||g.error("unsupported lang: "+a),a=a.replace(ua,va).toLowerCase(),function(b){var c;do if(c=H?b.getAttribute("xml:lang")||b.getAttribute("lang"):b.lang)return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===G},focus:function(a){return a===F.activeElement&&(!F.hasFocus||F.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeName>"@"||3===a.nodeType||4===a.nodeType)return!1;return!0},parent:function(a){return!y.pseudos.empty(a)},header:function(a){return ra.test(a.nodeName)},input:function(a){return qa.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||b.toLowerCase()===a.type)},first:k(function(){return[0]}),last:k(function(a,b){return[b-1]}),eq:k(function(a,b,c){return[c<0?c+b:c]}),even:k(function(a,b){for(var c=0;c=0;)a.push(d);return a}),gt:k(function(a,b,c){for(var d=c<0?c+b:c;++d1?ia.unique(c):c),c.selector=(this.selector?this.selector+" ":"")+a,c},has:function(a){var b,c=ia(a,this),d=c.length;return this.filter(function(){for(b=0;b=0:ia.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=Sa.test(a)||"string"!=typeof a?ia(a,b||this.context):0;d-1:ia.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}return this.pushStack(f.length>1?ia.unique(f):f)},index:function(a){return a?"string"==typeof a?ia.inArray(this[0],ia(a)):ia.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){var c="string"==typeof a?ia(a,b):ia.makeArray(a&&a.nodeType?[a]:a),d=ia.merge(this.get(),c);return this.pushStack(ia.unique(d))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}}),ia.fn.andSelf=ia.fn.addBack,ia.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return ia.dir(a,"parentNode")},parentsUntil:function(a,b,c){return ia.dir(a,"parentNode",c)},next:function(a){return k(a,"nextSibling")},prev:function(a){return k(a,"previousSibling")},nextAll:function(a){return ia.dir(a,"nextSibling")},prevAll:function(a){return ia.dir(a,"previousSibling")},nextUntil:function(a,b,c){return ia.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return ia.dir(a,"previousSibling",c)},siblings:function(a){return ia.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return ia.sibling(a.firstChild)},contents:function(a){return ia.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:ia.merge([],a.childNodes)}},function(a,b){ia.fn[a]=function(c,d){var e=ia.map(this,b,c);return Pa.test(a)||(d=c),d&&"string"==typeof d&&(e=ia.filter(d,e)),e=this.length>1&&!Ta[a]?ia.unique(e):e,this.length>1&&Qa.test(a)&&(e=e.reverse()),this.pushStack(e)}}),ia.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),1===b.length?ia.find.matchesSelector(b[0],a)?[b[0]]:[]:ia.find.matches(a,b)},dir:function(a,c,d){for(var e=[],f=a[c];f&&9!==f.nodeType&&(d===b||1!==f.nodeType||!ia(f).is(d));)1===f.nodeType&&e.push(f),f=f[c];return e},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}});var Ua="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Va=/ jQuery\d+="(?:null|\d+)"/g,Wa=new RegExp("<(?:"+Ua+")[\\s/>]","i"),Xa=/^\s+/,Ya=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Za=/<([\w:]+)/,$a=/\s*$/g,gb={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:ia.support.htmlSerialize?[0,"",""]:[1,"X
","
"]},hb=m(W),ib=hb.appendChild(W.createElement("div"));gb.optgroup=gb.option,gb.tbody=gb.tfoot=gb.colgroup=gb.caption=gb.thead,gb.th=gb.td,ia.fn.extend({text:function(a){return ia.access(this,function(a){return a===b?ia.text(this):this.empty().append((this[0]&&this[0].ownerDocument||W).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(ia.isFunction(a))return this.each(function(b){ia(this).wrapAll(a.call(this,b))});if(this[0]){var b=ia(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){for(var a=this;a.firstChild&&1===a.firstChild.nodeType;)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return ia.isFunction(a)?this.each(function(b){ia(this).wrapInner(a.call(this,b))}):this.each(function(){var b=ia(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=ia.isFunction(a);return this.each(function(c){ia(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){ia.nodeName(this,"body")||ia(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.insertBefore(a,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,!1,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=0;null!=(c=this[d]);d++)(!a||ia.filter(a,[c]).length>0)&&(b||1!==c.nodeType||ia.cleanData(t(c)),c.parentNode&&(b&&ia.contains(c.ownerDocument,c)&&q(t(c,"script")),c.parentNode.removeChild(c)));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){for(1===a.nodeType&&ia.cleanData(t(a,!1));a.firstChild;)a.removeChild(a.firstChild);a.options&&ia.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return ia.clone(this,a,b)})},html:function(a){return ia.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return 1===c.nodeType?c.innerHTML.replace(Va,""):b;if("string"==typeof a&&!ab.test(a)&&(ia.support.htmlSerialize||!Wa.test(a))&&(ia.support.leadingWhitespace||!Xa.test(a))&&!gb[(Za.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ya,"<$1>");try{for(;d")?f=a.cloneNode(!0):(ib.innerHTML=a.outerHTML,ib.removeChild(f=ib.firstChild)),!(ia.support.noCloneEvent&&ia.support.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||ia.isXMLDoc(a)))for(d=t(f),h=t(a),g=0;null!=(e=h[g]);++g)d[g]&&s(e,d[g]);if(b)if(c)for(h=h||t(a),d=d||t(f),g=0;null!=(e=h[g]);g++)r(e,d[g]);else r(a,f);return d=t(f,"script"),d.length>0&&q(d,!i&&t(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,l=a.length,n=m(b),o=[],p=0;p")+k[2],e=k[0];e--;)h=h.lastChild;if(!ia.support.leadingWhitespace&&Xa.test(f)&&o.push(b.createTextNode(Xa.exec(f)[0])),!ia.support.tbody)for(f="table"!==i||$a.test(f)?""!==k[1]||$a.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;e--;)ia.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j);for(ia.merge(o,h.childNodes),h.textContent="";h.firstChild;)h.removeChild(h.firstChild);h=n.lastChild}else o.push(b.createTextNode(f));for(h&&n.removeChild(h),ia.support.appendChecked||ia.grep(t(o,"input"),u),p=0;f=o[p++];)if((!d||ia.inArray(f,d)===-1)&&(g=ia.contains(f.ownerDocument,f),h=t(n.appendChild(f),"script"),g&&q(h),c))for(e=0;f=h[e++];)db.test(f.type||"")&&c.push(f);return h=null,n},cleanData:function(a,b){for(var c,d,e,f,g=0,h=ia.expando,i=ia.cache,j=ia.support.deleteExpando,k=ia.event.special;null!=(c=a[g]);g++)if((b||ia.acceptData(c))&&(e=c[h],f=e&&i[e])){if(f.events)for(d in f.events)k[d]?ia.event.remove(c,d):ia.removeEvent(c,d,f.handle);i[e]&&(delete i[e],j?delete c[h]:typeof c.removeAttribute!==V?c.removeAttribute(h):c[h]=null,_.push(e))}}});var jb,kb,lb,mb=/alpha\([^)]*\)/i,nb=/opacity\s*=\s*([^)]*)/,ob=/^(top|right|bottom|left)$/,pb=/^(none|table(?!-c[ea]).+)/,qb=/^margin/,rb=new RegExp("^("+ja+")(.*)$","i"),sb=new RegExp("^("+ja+")(?!px)[a-z%]+$","i"),tb=new RegExp("^([+-])=("+ja+")","i"),ub={BODY:"block"},vb={position:"absolute",visibility:"hidden",display:"block"},wb={letterSpacing:0,fontWeight:400},xb=["Top","Right","Bottom","Left"],yb=["Webkit","O","Moz","ms"];ia.fn.extend({css:function(a,c){return ia.access(this,function(a,c,d){var e,f,g={},h=0;if(ia.isArray(c)){for(f=kb(a),e=c.length;h1)},show:function(){return x(this,!0)},hide:function(){return x(this)},toggle:function(a){var b="boolean"==typeof a;return this.each(function(){(b?a:w(this))?ia(this).show():ia(this).hide()})}}),ia.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=lb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":ia.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var f,g,h,i=ia.camelCase(c),j=a.style;if(c=ia.cssProps[i]||(ia.cssProps[i]=v(j,i)),h=ia.cssHooks[c]||ia.cssHooks[i],d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];if(g=typeof d,"string"===g&&(f=tb.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(ia.css(a,c)),g="number"),!(null==d||"number"===g&&isNaN(d)||("number"!==g||ia.cssNumber[i]||(d+="px"),ia.support.clearCloneStyle||""!==d||0!==c.indexOf("background")||(j[c]="inherit"),h&&"set"in h&&(d=h.set(a,d,e))===b)))try{j[c]=d}catch(k){}}},css:function(a,c,d,e){var f,g,h,i=ia.camelCase(c);return c=ia.cssProps[i]||(ia.cssProps[i]=v(a.style,i)),h=ia.cssHooks[c]||ia.cssHooks[i],h&&"get"in h&&(g=h.get(a,!0,d)),g===b&&(g=lb(a,c,e)),"normal"===g&&c in wb&&(g=wb[c]),""===d||d?(f=parseFloat(g),d===!0||ia.isNumeric(f)?f||0:g):g},swap:function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e}}),a.getComputedStyle?(kb=function(b){return a.getComputedStyle(b,null)},lb=function(a,c,d){var e,f,g,h=d||kb(a),i=h?h.getPropertyValue(c)||h[c]:b,j=a.style;return h&&(""!==i||ia.contains(a.ownerDocument,a)||(i=ia.style(a,c)),sb.test(i)&&qb.test(c)&&(e=j.width,f=j.minWidth,g=j.maxWidth,j.minWidth=j.maxWidth=j.width=i,i=h.width,j.width=e,j.minWidth=f,j.maxWidth=g)),i}):W.documentElement.currentStyle&&(kb=function(a){return a.currentStyle},lb=function(a,c,d){var e,f,g,h=d||kb(a),i=h?h[c]:b,j=a.style;return null==i&&j&&j[c]&&(i=j[c]),sb.test(i)&&!ob.test(c)&&(e=j.left,f=a.runtimeStyle,g=f&&f.left,g&&(f.left=a.currentStyle.left),j.left="fontSize"===c?"1em":i,i=j.pixelLeft+"px",j.left=e,g&&(f.left=g)),""===i?"auto":i}),ia.each(["height","width"],function(a,b){ia.cssHooks[b]={get:function(a,c,d){if(c)return 0===a.offsetWidth&&pb.test(ia.css(a,"display"))?ia.swap(a,vb,function(){return A(a,b,d)}):A(a,b,d)},set:function(a,c,d){var e=d&&kb(a);return y(a,c,d?z(a,b,d,ia.support.boxSizing&&"border-box"===ia.css(a,"boxSizing",!1,e),e):0)}}}),ia.support.opacity||(ia.cssHooks.opacity={get:function(a,b){return nb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=ia.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===ia.trim(f.replace(mb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=mb.test(f)?f.replace(mb,e):f+" "+e)}}),ia(function(){ia.support.reliableMarginRight||(ia.cssHooks.marginRight={get:function(a,b){if(b)return ia.swap(a,{display:"inline-block"},lb,[a,"marginRight"])}}),!ia.support.pixelPosition&&ia.fn.position&&ia.each(["top","left"],function(a,b){ia.cssHooks[b]={get:function(a,c){if(c)return c=lb(a,b),sb.test(c)?ia(a).position()[b]+"px":c}}})}),ia.expr&&ia.expr.filters&&(ia.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!ia.support.reliableHiddenOffsets&&"none"===(a.style&&a.style.display||ia.css(a,"display"))},ia.expr.filters.visible=function(a){return!ia.expr.filters.hidden(a)}),ia.each({margin:"",padding:"",border:"Width"},function(a,b){ia.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];d<4;d++)e[a+xb[d]+b]=f[d]||f[d-2]||f[0];return e}},qb.test(a)||(ia.cssHooks[a+b].set=y)});var zb=/%20/g,Ab=/\[\]$/,Bb=/\r?\n/g,Cb=/^(?:submit|button|image|reset|file)$/i,Db=/^(?:input|select|textarea|keygen)/i;ia.fn.extend({serialize:function(){return ia.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=ia.prop(this,"elements");return a?ia.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!ia(this).is(":disabled")&&Db.test(this.nodeName)&&!Cb.test(a)&&(this.checked||!bb.test(a))}).map(function(a,b){var c=ia(this).val();return null==c?null:ia.isArray(c)?ia.map(c,function(a){return{name:b.name,value:a.replace(Bb,"\r\n")}}):{name:b.name,value:c.replace(Bb,"\r\n")}}).get()}}),ia.param=function(a,c){var d,e=[],f=function(a,b){b=ia.isFunction(b)?b():null==b?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(c===b&&(c=ia.ajaxSettings&&ia.ajaxSettings.traditional),ia.isArray(a)||a.jquery&&!ia.isPlainObject(a))ia.each(a,function(){f(this.name,this.value)});else for(d in a)D(d,a[d],c,f);return e.join("&").replace(zb,"+")},ia.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){ia.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),ia.fn.hover=function(a,b){return this.mouseenter(a).mouseleave(b||a)};var Eb,Fb,Gb=ia.now(),Hb=/\?/,Ib=/#.*$/,Jb=/([?&])_=[^&]*/,Kb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Lb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Mb=/^(?:GET|HEAD)$/,Nb=/^\/\//,Ob=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Pb=ia.fn.load,Qb={},Rb={},Sb="*/".concat("*");try{Fb=X.href}catch(Tb){Fb=W.createElement("a"),Fb.href="",Fb=Fb.href}Eb=Ob.exec(Fb.toLowerCase())||[],ia.fn.load=function(a,c,d){if("string"!=typeof a&&Pb)return Pb.apply(this,arguments);var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),ia.isFunction(c)?(d=c,c=b):c&&"object"==typeof c&&(g="POST"),h.length>0&&ia.ajax({url:a,type:g,dataType:"html",data:c}).done(function(a){f=arguments,h.html(e?ia("
").append(ia.parseHTML(a)).find(e):a)}).complete(d&&function(a,b){h.each(d,f||[a.responseText,b,a])}),this},ia.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){ia.fn[b]=function(a){return this.on(b,a)}}),ia.each(["get","post"],function(a,c){ia[c]=function(a,d,e,f){return ia.isFunction(d)&&(f=f||e,e=d,d=b),ia.ajax({url:a,type:c,dataType:f,data:d,success:e})}}),ia.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Fb,type:"GET",isLocal:Lb.test(Eb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Sb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":ia.parseJSON,"text xml":ia.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?G(G(a,ia.ajaxSettings),b):G(ia.ajaxSettings,a)},ajaxPrefilter:E(Qb),ajaxTransport:E(Rb),ajax:function(a,c){function d(a,c,d,e){var f,l,s,t,v,x=c;2!==u&&(u=2,i&&clearTimeout(i),k=b,h=e||"",w.readyState=a>0?4:0,d&&(t=H(m,w,d)),a>=200&&a<300||304===a?(m.ifModified&&(v=w.getResponseHeader("Last-Modified"),v&&(ia.lastModified[g]=v),v=w.getResponseHeader("etag"),v&&(ia.etag[g]=v)),204===a?(f=!0,x="nocontent"):304===a?(f=!0,x="notmodified"):(f=I(m,t),x=f.state,l=f.data,s=f.error,f=!s)):(s=x,!a&&x||(x="error",a<0&&(a=0))),w.status=a,w.statusText=(c||x)+"",f?p.resolveWith(n,[l,x,w]):p.rejectWith(n,[w,x,s]),w.statusCode(r),r=b,j&&o.trigger(f?"ajaxSuccess":"ajaxError",[w,m,f?l:s]),q.fireWith(n,[w,x]),j&&(o.trigger("ajaxComplete",[w,m]),--ia.active||ia.event.trigger("ajaxStop")))}"object"==typeof a&&(c=a,a=b),c=c||{};var e,f,g,h,i,j,k,l,m=ia.ajaxSetup({},c),n=m.context||m,o=m.context&&(n.nodeType||n.jquery)?ia(n):ia.event,p=ia.Deferred(),q=ia.Callbacks("once memory"),r=m.statusCode||{},s={},t={},u=0,v="canceled",w={readyState:0,getResponseHeader:function(a){var b;if(2===u){if(!l)for(l={};b=Kb.exec(h);)l[b[1].toLowerCase()]=b[2];b=l[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===u?h:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return u||(a=t[c]=t[c]||a,s[a]=b),this},overrideMimeType:function(a){return u||(m.mimeType=a),this},statusCode:function(a){var b;if(a)if(u<2)for(b in a)r[b]=[r[b],a[b]];else w.always(a[w.status]);return this},abort:function(a){var b=a||v;return k&&k.abort(b),d(0,b),this}};if(p.promise(w).complete=q.add,w.success=w.done,w.error=w.fail,m.url=((a||m.url||Fb)+"").replace(Ib,"").replace(Nb,Eb[1]+"//"),m.type=c.method||c.type||m.method||m.type,m.dataTypes=ia.trim(m.dataType||"*").toLowerCase().match(ka)||[""],null==m.crossDomain&&(e=Ob.exec(m.url.toLowerCase()),m.crossDomain=!(!e||e[1]===Eb[1]&&e[2]===Eb[2]&&(e[3]||("http:"===e[1]?80:443))==(Eb[3]||("http:"===Eb[1]?80:443)))),m.data&&m.processData&&"string"!=typeof m.data&&(m.data=ia.param(m.data,m.traditional)),F(Qb,m,c,w),2===u)return w;j=m.global,j&&0===ia.active++&&ia.event.trigger("ajaxStart"),m.type=m.type.toUpperCase(),m.hasContent=!Mb.test(m.type),g=m.url,m.hasContent||(m.data&&(g=m.url+=(Hb.test(g)?"&":"?")+m.data,delete m.data),m.cache===!1&&(m.url=Jb.test(g)?g.replace(Jb,"$1_="+Gb++):g+(Hb.test(g)?"&":"?")+"_="+Gb++)),m.ifModified&&(ia.lastModified[g]&&w.setRequestHeader("If-Modified-Since",ia.lastModified[g]),ia.etag[g]&&w.setRequestHeader("If-None-Match",ia.etag[g])),(m.data&&m.hasContent&&m.contentType!==!1||c.contentType)&&w.setRequestHeader("Content-Type",m.contentType),w.setRequestHeader("Accept",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+("*"!==m.dataTypes[0]?", "+Sb+"; q=0.01":""):m.accepts["*"]);for(f in m.headers)w.setRequestHeader(f,m.headers[f]);if(m.beforeSend&&(m.beforeSend.call(n,w,m)===!1||2===u))return w.abort();v="abort";for(f in{success:1,error:1,complete:1})w[f](m[f]);if(k=F(Rb,m,c,w)){w.readyState=1,j&&o.trigger("ajaxSend",[w,m]),m.async&&m.timeout>0&&(i=setTimeout(function(){w.abort("timeout")},m.timeout));try{u=1,k.send(s,d)}catch(x){if(!(u<2))throw x;d(-1,x)}}else d(-1,"No Transport");return w},getScript:function(a,c){return ia.get(a,b,c,"script")},getJSON:function(a,b,c){return ia.get(a,b,c,"json")}}),ia.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return ia.globalEval(a),a}}}),ia.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),ia.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=W.head||ia("head")[0]||W.documentElement;return{send:function(b,e){c=W.createElement("script"),c.async=!0,a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,b){(b||!c.readyState||/loaded|complete/.test(c.readyState))&&(c.onload=c.onreadystatechange=null,c.parentNode&&c.parentNode.removeChild(c),c=null,b||e(200,"success"))},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(b,!0)}}}});var Ub=[],Vb=/(=)\?(?=&|$)|\?\?/;ia.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Ub.pop()||ia.expando+"_"+Gb++;return this[a]=!0,a}}),ia.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.jsonp!==!1&&(Vb.test(c.url)?"url":"string"==typeof c.data&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vb.test(c.data)&&"data");if(i||"jsonp"===c.dataTypes[0])return f=c.jsonpCallback=ia.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,i?c[i]=c[i].replace(Vb,"$1"+f):c.jsonp!==!1&&(c.url+=(Hb.test(c.url)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||ia.error(f+" was not called"),h[0]},c.dataTypes[0]="json",g=a[f],a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,Ub.push(f)),h&&ia.isFunction(g)&&g(h[0]),h=g=b}),"script"});var Wb,Xb,Yb=0,Zb=a.ActiveXObject&&function(){var a;for(a in Wb)Wb[a](b,!0)};ia.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&J()||K()}:J,Xb=ia.ajaxSettings.xhr(),ia.support.cors=!!Xb&&"withCredentials"in Xb,Xb=ia.support.ajax=!!Xb,Xb&&ia.ajaxTransport(function(c){if(!c.crossDomain||ia.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();if(c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async),c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),c.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l;try{if(d&&(e||4===i.readyState))if(d=b,g&&(i.onreadystatechange=ia.noop,Zb&&delete Wb[g]),e)4!==i.readyState&&i.abort();else{l={},h=i.status,j=i.getAllResponseHeaders(),"string"==typeof i.responseText&&(l.text=i.responseText);try{k=i.statusText}catch(m){k=""}h||!c.isLocal||c.crossDomain?1223===h&&(h=204):h=l.text?200:404}}catch(n){e||f(-1,n)}l&&f(h,k,l,j)},c.async?4===i.readyState?setTimeout(d):(g=++Yb,Zb&&(Wb||(Wb={},ia(a).unload(Zb)),Wb[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(b,!0)}}}});var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp("^(?:([+-])=|)("+ja+")([a-z%]*)$","i"),cc=/queueHooks$/,dc=[P],ec={"*":[function(a,b){var c,d,e=this.createTween(a,b),f=bc.exec(b),g=e.cur(),h=+g||0,i=1,j=20;if(f){if(c=+f[2],d=f[3]||(ia.cssNumber[a]?"":"px"),"px"!==d&&h){h=ia.css(e.elem,a,!0)||c||1;do i=i||".5",h/=i,ia.style(e.elem,a,h+d);while(i!==(i=e.cur()/g)&&1!==i&&--j)}e.unit=d,e.start=h,e.end=f[1]?h+(f[1]+1)*c:c}return e}]};ia.Animation=ia.extend(N,{tweener:function(a,b){ia.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;d-1,l={},m={};k?(m=g.position(),e=m.top,f=m.left):(e=parseFloat(i)||0,f=parseFloat(j)||0),ia.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(l.top=b.top-h.top+e),null!=b.left&&(l.left=b.left-h.left+f),"using"in b?b.using.call(a,l):g.css(l)}},ia.fn.extend({position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===ia.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),ia.nodeName(a[0],"html")||(c=a.offset()),c.top+=ia.css(a[0],"borderTopWidth",!0),c.left+=ia.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-ia.css(d,"marginTop",!0),left:b.left-c.left-ia.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||W.documentElement;a&&!ia.nodeName(a,"html")&&"static"===ia.css(a,"position");)a=a.offsetParent;return a||W.documentElement})}}),ia.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);ia.fn[a]=function(e){return ia.access(this,function(a,e,f){var g=S(a);return f===b?g?c in g?g[c]:g.document.documentElement[e]:a[e]:void(g?g.scrollTo(d?ia(g).scrollLeft():f,d?f:ia(g).scrollTop()):a[e]=f)},a,e,arguments.length,null)}}),ia.each({Height:"height",Width:"width"},function(a,c){ia.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){ia.fn[e]=function(e,f){var g=arguments.length&&(d||"boolean"!=typeof e),h=d||(e===!0||f===!0?"margin":"border");return ia.access(this,function(c,d,e){var f;return ia.isWindow(c)?c.document.documentElement["client"+a]:9===c.nodeType?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?ia.css(c,d,h):ia.style(c,d,e,h)},c,g?e:b,g,null)}})}),a.jQuery=a.$=ia,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return ia})}(window),function(){function a(a){function b(b,c,d,e,f,g){for(;f>=0&&f0?0:h-1;return arguments.length<3&&(e=c[g?g[i]:i],i+=a),b(c,d,e,g,i,h)}}function b(a){return function(b,c,d){c=t(c,d);for(var e=null!=b&&b.length,f=a>0?0:e-1;f>=0&&f=0&&b<=w};r.each=r.forEach=function(a,b,c){b=s(b,c);var d,e;if(x(a))for(d=0,e=a.length;d=0},r.invoke=function(a,b){var c=j.call(arguments,2),d=r.isFunction(b);return r.map(a,function(a){var e=d?b:a[b];return null==e?e:e.apply(a,c)})},r.pluck=function(a,b){return r.map(a,r.property(b))},r.where=function(a,b){return r.filter(a,r.matcher(b))},r.findWhere=function(a,b){return r.find(a,r.matcher(b))},r.max=function(a,b,c){var d,e,f=-(1/0),g=-(1/0);if(null==b&&null!=a){a=x(a)?a:r.values(a);for(var h=0,i=a.length;hf&&(f=d)}else b=t(b,c),r.each(a,function(a,c,d){e=b(a,c,d),(e>g||e===-(1/0)&&f===-(1/0))&&(f=a,g=e)});return f},r.min=function(a,b,c){var d,e,f=1/0,g=1/0;if(null==b&&null!=a){a=x(a)?a:r.values(a);for(var h=0,i=a.length;hd||void 0===c)return 1;if(c=0;)if(a[d]===b)return d;return-1},r.findIndex=b(1),r.findLastIndex=b(-1),r.sortedIndex=function(a,b,c,d){c=t(c,d,1);for(var e=c(b),f=0,g=a.length;fb?(g&&(clearTimeout(g),g=null),h=j,f=a.apply(d,e),g||(d=e=null)):g||c.trailing===!1||(g=setTimeout(i,k)),f}},r.debounce=function(a,b,c){var d,e,f,g,h,i=function(){var j=r.now()-g;j=0?d=setTimeout(i,b-j):(d=null,c||(h=a.apply(f,e),d||(f=e=null)))};return function(){f=this,e=arguments,g=r.now();var j=c&&!d;return d||(d=setTimeout(i,b)),j&&(h=a.apply(f,e),f=e=null),h}},r.wrap=function(a,b){return r.partial(b,a)},r.negate=function(a){return function(){return!a.apply(this,arguments)}},r.compose=function(){var a=arguments,b=a.length-1;return function(){for(var c=b,d=a[b].apply(this,arguments);c--;)d=a[c].call(this,d);return d}},r.after=function(a,b){return function(){if(--a<1)return b.apply(this,arguments)}},r.before=function(a,b){var c;return function(){return--a>0&&(c=b.apply(this,arguments)),a<=1&&(b=null),c}},r.once=r.partial(r.before,2);var B=!{toString:null}.propertyIsEnumerable("toString"),C=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];r.keys=function(a){if(!r.isObject(a))return[];if(n)return n(a);var b=[];for(var d in a)r.has(a,d)&&b.push(d);return B&&c(a,b),b},r.allKeys=function(a){if(!r.isObject(a))return[];var b=[];for(var d in a)b.push(d);return B&&c(a,b),b},r.values=function(a){for(var b=r.keys(a),c=b.length,d=Array(c),e=0;e":">",'"':""","'":"'","`":"`"},F=r.invert(E),G=function(a){var b=function(b){return a[b]},c="(?:"+r.keys(a).join("|")+")",d=RegExp(c),e=RegExp(c,"g");return function(a){return a=null==a?"":""+a,d.test(a)?a.replace(e,b):a}};r.escape=G(E),r.unescape=G(F),r.result=function(a,b,c){var d=null==a?void 0:a[b];return void 0===d&&(d=c),r.isFunction(d)?d.call(a):d};var H=0;r.uniqueId=function(a){var b=++H+"";return a?a+b:b},r.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var I=/(.)^/,J={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},K=/\\|'|\r|\n|\u2028|\u2029/g,L=function(a){return"\\"+J[a]};r.template=function(a,b,c){!b&&c&&(b=c),b=r.defaults({},b,r.templateSettings);var d=RegExp([(b.escape||I).source,(b.interpolate||I).source,(b.evaluate||I).source].join("|")+"|$","g"),e=0,f="__p+='";a.replace(d,function(b,c,d,g,h){return f+=a.slice(e,h).replace(K,L),e=h+b.length,c?f+="'+\n((__t=("+c+"))==null?'':_.escape(__t))+\n'":d?f+="'+\n((__t=("+d+"))==null?'':__t)+\n'":g&&(f+="';\n"+g+"\n__p+='"),b}),f+="';\n",b.variable||(f="with(obj||{}){\n"+f+"}\n"),f="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+f+"return __p;\n";try{var g=new Function(b.variable||"obj","_",f)}catch(h){throw h.source=f,h}var i=function(a){return g.call(this,a,r)},j=b.variable||"obj";return i.source="function("+j+"){\n"+f+"}",i},r.chain=function(a){var b=r(a);return b._chain=!0,b};var M=function(a,b){return a._chain?r(b).chain():b};r.mixin=function(a){r.each(r.functions(a),function(b){var c=r[b]=a[b];r.prototype[b]=function(){var a=[this._wrapped];return i.apply(a,arguments),M(this,c.apply(r,a))}})},r.mixin(r),r.each(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var b=f[a];r.prototype[a]=function(){var c=this._wrapped;return b.apply(c,arguments),"shift"!==a&&"splice"!==a||0!==c.length||delete c[0],M(this,c)}}),r.each(["concat","join","slice"],function(a){var b=f[a];r.prototype[a]=function(){return M(this,b.apply(this._wrapped,arguments))}}),r.prototype.value=function(){return this._wrapped},r.prototype.valueOf=r.prototype.toJSON=r.prototype.value,r.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return r})}.call(this),null==window.BI&&(window.BI={}),window.BI||(window.BI={}),!function(a){var b=function(a,b){return function(c,d,e){return a.call(b,d,c,e)}},c=function(a){return function(){return _[a].apply(_,arguments)}},d=function(a){return function(){var c=Array.prototype.slice.call(arguments,0);return c[1]=_.isFunction(c[1])?b(c[1],c[2]):c[1],_[a].apply(_,c)}};_.extend(BI,{i18nText:function(a){var b=BI.i18n&&BI.i18n[a]||"";b||(b=a);var c=arguments.length;if(c>1)for(var d=1;d=0;c--)a=BI.map(a,function(a,d){return BI.extend({},b[c],{items:[BI.extend({},b[c].el,{el:d})]})});return a},formatEL:function(a){return a&&!a.type&&a.el?a:{el:a}},stripEL:function(a){return a.type&&a||a.el||a},trans2Element:function(a){return BI.map(a,function(a,b){return b.element})}}),_.each(["where","findWhere","contains","invoke","pluck","shuffle","sample","toArray","size"],function(a){BI[a]=c(a)}),_.each(["each","map","reduce","reduceRight","find","filter","reject","every","all","some","any","max","min","sortBy","groupBy","indexBy","countBy","partition"],function(a){BI[a]=d(a)}),_.extend(BI,{clamp:function(a,b,c){return ac&&(a=c),a},count:function(a,b,c){var d;if(c)for(d=a;d=0;d--)b(d,a[d],a);return!1},backAny:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(b(d,a[d],a))return!0;return!1},backEvery:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(!b(d,a[d],a))return!1;return!0},backFindKey:function(a,b,c){b=BI.iteratee(b,c);for(var d,e=_.keys(a),f=e.length-1;f>=0;f--)if(d=e[f],b(a[d],d,a))return d},backFind:function(a,b,c){var d;if(d=BI.isArray(a)?BI.findLastIndex(a,b,c):BI.backFindKey(a,b,c),void 0!==d&&d!==-1)return a[d]},remove:function(a,b,c){var d=BI.isFunction(b);b=d||BI.isArray(b)?b:[b];var e;if(BI.isArray(a))for(e=0;e(2147483646-a.charAt(d).charCodeAt(0)+c.charCodeAt(0))/26)return 0;return b},int2Abc:function(a){var b=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],c=a,d="";if(0===a)return"";for(;0!==c;){var e=c%26;0===e&&(e=26),d=b[e-1]+d,c=(c-e)/26}return d}}),_.each(["first","initial","last","rest","compact","flatten","without","union","intersection","difference","zip","unzip","object","indexOf","lastIndexOf","sortedIndex","range"],function(a){BI[a]=c(a)}),_.each(["findIndex","findLastIndex"],function(a){BI[a]=d(a)}),_.extend(BI,{makeArray:function(a,b){for(var c=[],d=0;d0},isCapitalEqual:function(a,b){return a=BI.isNull(a)?a:(""+a).toLowerCase(),b=BI.isNull(b)?b:(""+b).toLowerCase(),BI.isEqual(a,b)},isWidthOrHeight:function(a){return"number"==typeof a?a>=0:"string"==typeof a?/^\d{1,3}%$/.exec(a)||"auto"==a||/^\d+px$/.exec(a):void 0},isNotNull:function(a){return!BI.isNull(a)},isNull:function(a){return"undefined"==typeof a||null===a},isPlainObject:function(){return $.isPlainObject.apply($,arguments)},isEmptyArray:function(a){return BI.isArray(a)&&BI.isEmpty(a)},isNotEmptyArray:function(a){return BI.isArray(a)&&!BI.isEmpty(a)},isEmptyObject:function(a){return BI.isEqual(a,{})},isNotEmptyObject:function(a){return BI.isPlainObject(a)&&!BI.isEmptyObject(a)},isEmptyString:function(a){return BI.isString(a)&&0===a.length},isNotEmptyString:function(a){return BI.isString(a)&&!BI.isEmptyString(a)},isWindow:function(){return $.isWindow.apply($,arguments)}}),_.extend(BI,{deepClone:function(b){if(null===b||b===a)return b;var c=Object.prototype.toString.call(b);if("[object Date]"===c)return Date.getDate(b.getTime());var d,e;if("[object Array]"===c)for(d=b.length,e=[];d--;)e[d]=BI.deepClone(b[d]);else if("[object Object]"===c&&b.constructor===Object){e={};for(var d in b)BI.has(b,d)&&(e[d]=BI.deepClone(b[d]))}return e||b},isDeepMatch:function(a,b){var c=BI.keys(b),d=c.length;if(null==a)return!d;for(var e=Object(a),f=0;f10;)c=(parseInt(c.substring(0,10))+parseInt(c.substring(10,c.length),10)).toString();c=(f*c+g)%h;for(var j="",k="",d=0;d10;)c=(parseInt(c.substring(0,10),10)+parseInt(c.substring(10,c.length),10)).toString();c=(g*c+h)%i;for(var k="",l="",d=0;d=0&&b<=w};r.each=r.forEach=function(a,b,c){b=s(b,c);var d,e;if(x(a))for(d=0,e=a.length;d=0},r.invoke=function(a,b){var c=j.call(arguments,2),d=r.isFunction(b);return r.map(a,function(a){var e=d?b:a[b];return null==e?e:e.apply(a,c)})},r.pluck=function(a,b){return r.map(a,r.property(b))},r.where=function(a,b){return r.filter(a,r.matcher(b))},r.findWhere=function(a,b){return r.find(a,r.matcher(b))},r.max=function(a,b,c){var d,e,f=-(1/0),g=-(1/0);if(null==b&&null!=a){a=x(a)?a:r.values(a);for(var h=0,i=a.length;hf&&(f=d)}else b=t(b,c),r.each(a,function(a,c,d){e=b(a,c,d),(e>g||e===-(1/0)&&f===-(1/0))&&(f=a,g=e)});return f},r.min=function(a,b,c){var d,e,f=1/0,g=1/0;if(null==b&&null!=a){a=x(a)?a:r.values(a);for(var h=0,i=a.length;hd||void 0===c)return 1;if(c=0;)if(a[d]===b)return d;return-1},r.findIndex=b(1),r.findLastIndex=b(-1),r.sortedIndex=function(a,b,c,d){c=t(c,d,1);for(var e=c(b),f=0,g=a.length;fb?(g&&(clearTimeout(g),g=null),h=j,f=a.apply(d,e),g||(d=e=null)):g||c.trailing===!1||(g=setTimeout(i,k)),f}},r.debounce=function(a,b,c){var d,e,f,g,h,i=function(){var j=r.now()-g;j=0?d=setTimeout(i,b-j):(d=null,c||(h=a.apply(f,e),d||(f=e=null)))};return function(){f=this,e=arguments,g=r.now();var j=c&&!d;return d||(d=setTimeout(i,b)),j&&(h=a.apply(f,e),f=e=null),h}},r.wrap=function(a,b){return r.partial(b,a)},r.negate=function(a){return function(){return!a.apply(this,arguments)}},r.compose=function(){var a=arguments,b=a.length-1;return function(){for(var c=b,d=a[b].apply(this,arguments);c--;)d=a[c].call(this,d);return d}},r.after=function(a,b){return function(){if(--a<1)return b.apply(this,arguments)}},r.before=function(a,b){var c;return function(){return--a>0&&(c=b.apply(this,arguments)),a<=1&&(b=null),c}},r.once=r.partial(r.before,2);var B=!{toString:null}.propertyIsEnumerable("toString"),C=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];r.keys=function(a){if(!r.isObject(a))return[];if(n)return n(a);var b=[];for(var d in a)r.has(a,d)&&b.push(d);return B&&c(a,b),b},r.allKeys=function(a){if(!r.isObject(a))return[];var b=[];for(var d in a)b.push(d);return B&&c(a,b),b},r.values=function(a){for(var b=r.keys(a),c=b.length,d=Array(c),e=0;e":">",'"':""","'":"'","`":"`"},F=r.invert(E),G=function(a){var b=function(b){return a[b]},c="(?:"+r.keys(a).join("|")+")",d=RegExp(c),e=RegExp(c,"g");return function(a){return a=null==a?"":""+a,d.test(a)?a.replace(e,b):a}};r.escape=G(E),r.unescape=G(F),r.result=function(a,b,c){var d=null==a?void 0:a[b];return void 0===d&&(d=c),r.isFunction(d)?d.call(a):d};var H=0;r.uniqueId=function(a){var b=++H+"";return a?a+b:b},r.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var I=/(.)^/,J={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},K=/\\|'|\r|\n|\u2028|\u2029/g,L=function(a){return"\\"+J[a]};r.template=function(a,b,c){!b&&c&&(b=c),b=r.defaults({},b,r.templateSettings);var d=RegExp([(b.escape||I).source,(b.interpolate||I).source,(b.evaluate||I).source].join("|")+"|$","g"),e=0,f="__p+='";a.replace(d,function(b,c,d,g,h){return f+=a.slice(e,h).replace(K,L),e=h+b.length,c?f+="'+\n((__t=("+c+"))==null?'':_.escape(__t))+\n'":d?f+="'+\n((__t=("+d+"))==null?'':__t)+\n'":g&&(f+="';\n"+g+"\n__p+='"),b}),f+="';\n",b.variable||(f="with(obj||{}){\n"+f+"}\n"),f="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+f+"return __p;\n";try{var g=new Function(b.variable||"obj","_",f)}catch(h){throw h.source=f,h}var i=function(a){return g.call(this,a,r)},j=b.variable||"obj";return i.source="function("+j+"){\n"+f+"}",i},r.chain=function(a){var b=r(a);return b._chain=!0,b};var M=function(a,b){return a._chain?r(b).chain():b};r.mixin=function(a){r.each(r.functions(a),function(b){var c=r[b]=a[b];r.prototype[b]=function(){var a=[this._wrapped];return i.apply(a,arguments),M(this,c.apply(r,a))}})},r.mixin(r),r.each(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var b=f[a];r.prototype[a]=function(){var c=this._wrapped;return b.apply(c,arguments),"shift"!==a&&"splice"!==a||0!==c.length||delete c[0],M(this,c)}}),r.each(["concat","join","slice"],function(a){var b=f[a];r.prototype[a]=function(){return M(this,b.apply(this._wrapped,arguments))}}),r.prototype.value=function(){return this._wrapped},r.prototype.valueOf=r.prototype.toJSON=r.prototype.value,r.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return r})}.call(this),null==window.BI&&(window.BI={}),window.BI||(window.BI={}),!function(a){var b=function(a,b){return function(c,d,e){return a.call(b,d,c,e)}},c=function(a){return function(){return _[a].apply(_,arguments)}},d=function(a){return function(){var c=Array.prototype.slice.call(arguments,0);return c[1]=_.isFunction(c[1])?b(c[1],c[2]):c[1],_[a].apply(_,c)}};_.extend(BI,{i18nText:function(a){var b=BI.i18n&&BI.i18n[a]||"";b||(b=a);var c=arguments.length;if(c>1)for(var d=1;d=0;c--)a=BI.map(a,function(a,d){return BI.extend({},b[c],{items:[BI.extend({},b[c].el,{el:d})]})});return a},formatEL:function(a){return a&&!a.type&&a.el?a:{el:a}},stripEL:function(a){return a.type&&a||a.el||a},trans2Element:function(a){return BI.map(a,function(a,b){return b.element})}}),_.each(["where","findWhere","contains","invoke","pluck","shuffle","sample","toArray","size"],function(a){BI[a]=c(a)}),_.each(["each","map","reduce","reduceRight","find","filter","reject","every","all","some","any","max","min","sortBy","groupBy","indexBy","countBy","partition"],function(a){BI[a]=d(a)}),_.extend(BI,{clamp:function(a,b,c){return ac&&(a=c),a},count:function(a,b,c){var d;if(c)for(d=a;d=0;d--)b(d,a[d],a);return!1},backAny:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(b(d,a[d],a))return!0;return!1},backEvery:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(!b(d,a[d],a))return!1;return!0},backFindKey:function(a,b,c){b=BI.iteratee(b,c);for(var d,e=_.keys(a),f=e.length-1;f>=0;f--)if(d=e[f],b(a[d],d,a))return d},backFind:function(a,b,c){var d;if(d=BI.isArray(a)?BI.findLastIndex(a,b,c):BI.backFindKey(a,b,c),void 0!==d&&d!==-1)return a[d]},remove:function(a,b,c){var d=BI.isFunction(b);b=d||BI.isArray(b)?b:[b];var e;if(BI.isArray(a))for(e=0;e(2147483646-a.charAt(d).charCodeAt(0)+c.charCodeAt(0))/26)return 0;return b},int2Abc:function(a){var b=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],c=a,d="";if(0===a)return"";for(;0!==c;){var e=c%26;0===e&&(e=26),d=b[e-1]+d,c=(c-e)/26}return d}}),_.each(["first","initial","last","rest","compact","flatten","without","union","intersection","difference","zip","unzip","object","indexOf","lastIndexOf","sortedIndex","range"],function(a){BI[a]=c(a)}),_.each(["findIndex","findLastIndex"],function(a){BI[a]=d(a)}),_.extend(BI,{makeArray:function(a,b){for(var c=[],d=0;d0},isCapitalEqual:function(a,b){return a=BI.isNull(a)?a:(""+a).toLowerCase(),b=BI.isNull(b)?b:(""+b).toLowerCase(),BI.isEqual(a,b)},isWidthOrHeight:function(a){return"number"==typeof a?a>=0:"string"==typeof a?/^\d{1,3}%$/.exec(a)||"auto"==a||/^\d+px$/.exec(a):void 0},isNotNull:function(a){return!BI.isNull(a)},isNull:function(a){return"undefined"==typeof a||null===a},isPlainObject:function(){return $.isPlainObject.apply($,arguments)},isEmptyArray:function(a){return BI.isArray(a)&&BI.isEmpty(a)},isNotEmptyArray:function(a){return BI.isArray(a)&&!BI.isEmpty(a)},isEmptyObject:function(a){return BI.isEqual(a,{})},isNotEmptyObject:function(a){return BI.isPlainObject(a)&&!BI.isEmptyObject(a)},isEmptyString:function(a){return BI.isString(a)&&0===a.length},isNotEmptyString:function(a){return BI.isString(a)&&!BI.isEmptyString(a)},isWindow:function(){return $.isWindow.apply($,arguments)}}),_.extend(BI,{deepClone:function(b){if(null===b||b===a)return b;var c=Object.prototype.toString.call(b);if("[object Date]"===c)return Date.getDate(b.getTime());var d,e;if("[object Array]"===c)for(d=b.length,e=[];d--;)e[d]=BI.deepClone(b[d]);else if("[object Object]"===c&&b.constructor===Object){e={};for(var d in b)BI.has(b,d)&&(e[d]=BI.deepClone(b[d]))}return e||b},isDeepMatch:function(a,b){var c=BI.keys(b),d=c.length;if(null==a)return!d;for(var e=Object(a),f=0;f10;)c=(parseInt(c.substring(0,10))+parseInt(c.substring(10,c.length),10)).toString();c=(f*c+g)%h;for(var j="",k="",d=0;d10;)c=(parseInt(c.substring(0,10),10)+parseInt(c.substring(10,c.length),10)).toString();c=(g*c+h)%i;for(var k="",l="",d=0;d127&&d<2048?(b+=String.fromCharCode(d>>6|192),b+=String.fromCharCode(63&d|128)):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128),b+=String.fromCharCode(63&d|128))}return b},c=function(a){for(var b="",c=0,d=0,e=0,f=0;c191&&d<224?(f=a.charCodeAt(c+1),b+=String.fromCharCode((31&d)<<6|63&f),c+=2):(f=a.charCodeAt(c+1),e=a.charCodeAt(c+2),b+=String.fromCharCode((15&d)<<12|(63&f)<<6|63&e),c+=3);return b};_.extend(BI,{encode:function(c){var d,e,f,g,h,i,j,k="",l=0;for(c=b(c);l>2,h=(3&d)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k=k+a.charAt(g)+a.charAt(h)+a.charAt(i)+a.charAt(j);return k},decode:function(b){var d,e,f,g,h,i,j,k="",l=0;for(b=b.replace(/[^A-Za-z0-9\+\/\=]/g,"");l>4,e=(15&h)<<4|i>>2,f=(3&i)<<6|j,k+=String.fromCharCode(d),64!=i&&(k+=String.fromCharCode(e)),64!=j&&(k+=String.fromCharCode(f));return k=c(k)}})}(),BI.Cache={_prefix:"bi",setUsername:function(a){localStorage.setItem(BI.Cache._prefix+".username",(a+""||"").toUpperCase())},getUsername:function(){return localStorage.getItem(BI.Cache._prefix+".username")||""},_getKeyPrefix:function(){return BI.Cache.getUsername()+"."+BI.Cache._prefix+"."},_generateKey:function(a){return BI.Cache._getKeyPrefix()+(a||"")},getItem:function(a){return localStorage.getItem(BI.Cache._generateKey(a))},setItem:function(a,b){localStorage.setItem(BI.Cache._generateKey(a),b)},removeItem:function(a){localStorage.removeItem(BI.Cache._generateKey(a))},clear:function(){for(var a=localStorage.length;a>=0;a--){var b=localStorage.key(a);b&&0===b.indexOf(BI.Cache._getKeyPrefix())&&localStorage.removeItem(b)}},keys:function(){for(var a=[],b=localStorage.length;b>=0;b--){var c=localStorage.key(b);if(c){var d=BI.Cache._getKeyPrefix();0===c.indexOf(d)&&(a[a.length]=c.substring(d.length))}}return a},addCookie:function(a,b,c,d){var e=a+"="+escape(b);if(d&&d>0){var f=new Date;f.setTime(f.getTime()+3600*d*1e3),e=e+"; expires="+f.toGMTString()}c&&(e=e+"; path="+c),document.cookie=e},getCookie:function(a){var b,c=new RegExp("(^| )"+a+"=([^;]*)(;|$)");return(b=document.cookie.match(c))?unescape(b[2]):null},deleteCookie:function(a,b){var c=new Date;c.setTime(c.getTime()-1e4);var d=a+"=v; expires="+c.toGMTString();b&&(d=d+"; path="+b),document.cookie=d}},BI.CellSizeAndPositionManager=function(a,b,c){this._cellSizeGetter=b,this._cellCount=a,this._estimatedCellSize=c,this._cellSizeAndPositionData={},this._lastMeasuredIndex=-1},BI.CellSizeAndPositionManager.prototype={constructor:BI.CellSizeAndPositionManager,configure:function(a,b){this._cellCount=a,this._estimatedCellSize=b},getCellCount:function(){return this._cellCount},getEstimatedCellSize:function(){return this._estimatedCellSize},getLastMeasuredIndex:function(){return this._lastMeasuredIndex},getSizeAndPositionOfCell:function(a){if(!(a<0||a>=this._cellCount)){if(a>this._lastMeasuredIndex){for(var b=this.getSizeAndPositionOfLastMeasuredCell(),c=b.offset+b.size,d=this._lastMeasuredIndex+1;d<=a;d++){var e=this._cellSizeGetter(d);null==e||isNaN(e)||(this._cellSizeAndPositionData[d]={offset:c,size:e},c+=e)}this._lastMeasuredIndex=a}return this._cellSizeAndPositionData[a]}},getSizeAndPositionOfLastMeasuredCell:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}},getTotalSize:function(){var a=this.getSizeAndPositionOfLastMeasuredCell();return a.offset+a.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize},getUpdatedOffsetForIndex:function(a,b,c,d){var e,f=this.getSizeAndPositionOfCell(d),g=f.offset,h=g-b+f.size;switch(a){case"start":e=g;break;case"end":e=h;break;case"center":e=g-(b-f.size)/2;break;default:e=Math.max(h,Math.min(g,c))}var i=this.getTotalSize();return Math.max(0,Math.min(i-b,e))},getVisibleCellRange:function(a,b){var c=this.getTotalSize();if(0===c)return{};var d=b+a,e=this._findNearestCell(b),f=this.getSizeAndPositionOfCell(e);b=f.offset+f.size;for(var g=e;bc&&(a=d-1)}if(b>0)return b-1},_exponentialSearch:function(a,b){for(var c=1;a=a?this._binarySearch(c,0,a):this._exponentialSearch(c,a)}}},BI.ScalingCellSizeAndPositionManager=function(a,b,c,d){this._cellSizeAndPositionManager=new BI.CellSizeAndPositionManager(a,b,c),this._maxScrollSize=d||1e7},BI.ScalingCellSizeAndPositionManager.prototype={constructor:BI.ScalingCellSizeAndPositionManager,configure:function(){this._cellSizeAndPositionManager.configure.apply(this._cellSizeAndPositionManager,arguments)},getCellCount:function(){return this._cellSizeAndPositionManager.getCellCount()},getEstimatedCellSize:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()},getLastMeasuredIndex:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()},getOffsetAdjustment:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize(),e=this._getOffsetPercentage(a,b,d);return Math.round(e*(d-c))},getSizeAndPositionOfCell:function(a){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(a)},getSizeAndPositionOfLastMeasuredCell:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()},getTotalSize:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())},getUpdatedOffsetForIndex:function(a,b,c,d){c=this._safeOffsetToOffset(b,c);var e=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex(a,b,c,d);return this._offsetToSafeOffset(b,e)},getVisibleCellRange:function(a,b){return b=this._safeOffsetToOffset(a,b),this._cellSizeAndPositionManager.getVisibleCellRange(a,b)},resetCell:function(a){this._cellSizeAndPositionManager.resetCell(a)},_getOffsetPercentage:function(a,b,c){return c<=a?0:b/(c-a)},_offsetToSafeOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,c);return Math.round(e*(d-a))},_safeOffsetToOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,d);return Math.round(e*(c-a))}},!function(){var a="YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJPFYYNWJJTMYHZWZHFLZPPQHGSCYYYNJQYXXGJHHSDSJNKKTMOMLCRXYPSNQSECCQZGGLLYJLMYZZSECYKYYHQWJSSGGYXYZYJWWKDJHYCHMYXJTLXJYQBYXZLDWRDJRWYSRLDZJPCBZJJBRCFTLECZSTZFXXZHTRQHYBDLYCZSSYMMRFMYQZPWWJJYFCRWFDFZQPYDDWYXKYJAWJFFXYPSFTZYHHYZYSWCJYXSCLCXXWZZXNBGNNXBXLZSZSBSGPYSYZDHMDZBQBZCWDZZYYTZHBTSYYBZGNTNXQYWQSKBPHHLXGYBFMJEBJHHGQTJCYSXSTKZHLYCKGLYSMZXYAL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H",20256:"ZC",20282:"SC",20285:"QJG",20291:"TD",20314:"YD",20315:"BF",20340:"NE",20375:"TD",20389:"YJ",20391:"CZ",20415:"PB",20446:"YS",20447:"SQ",20504:"TC",20608:"KG",20854:"QJ",20857:"ZC",20911:"PF",20985:"AW",21032:"PB",21048:"XQ",21049:"SC",21089:"YS",21119:"JC",21242:"SB",21273:"SC",21305:"YP",21306:"QO",21330:"ZC",21333:"SDC",21345:"QK",21378:"CA",21397:"SC",21414:"XS",21442:"SC",21477:"JG",21480:"TD",21484:"ZS",21494:"YX",21505:"YX",21512:"HG",21523:"XH",21537:"PB",21542:"PF",21549:"KH",21571:"E",21574:"DA",21588:"TD",21589:"O",21618:"ZC",21621:"KHA",21632:"ZJ",21654:"KG",21679:"LKG",21683:"KH",21710:"A",21719:"YH",21734:"WOE",21769:"A",21780:"WN",21804:"XH",21834:"A",21899:"ZD",21903:"RN",21908:"WO",21939:"ZC",21956:"SA",21964:"YA",21970:"TD",22003:"A",22031:"JG",22040:"XS",22060:"ZC",22066:"ZC",22079:"MH",22129:"XJ",22179:"XA",22237:"NJ",22244:"TD",22280:"JQ",22300:"YH",22313:"XW",22331:"YQ",22343:"YJ",22351:"PH",22395:"DC",22412:"TD",22484:"PB",22500:"PB",22534:"ZD",22549:"DH",22561:"PB",22612:"TD",22771:"KQ",22831:"HB",22841:"JG",22855:"QJ",22865:"XQ",23013:"ML",23081:"WM",23487:"SX",23558:"QJ",23561:"YW",23586:"YW",23614:"YW",23615:"SN",23631:"PB",23646:"ZS",23663:"ZT",23673:"YG",23762:"TD",23769:"ZS",23780:"QJ",23884:"QK",24055:"XH",24113:"DC",24162:"ZC",24191:"GA",24273:"QJ",24324:"NL",24377:"TD",24378:"QJ",24439:"PF",24554:"ZS",24683:"TD",24694:"WE",24733:"LK",24925:"TN",25094:"ZG",25100:"XQ",25103:"XH",25153:"PB",25170:"PB",25179:"KG",25203:"PB",25240:"ZS",25282:"FB",25303:"NA",25324:"KG",25341:"ZY",25373:"WZ",25375:"XJ",25384:"A",25457:"A",25528:"SD",25530:"SC",25552:"TD",25774:"ZC",25874:"ZC",26044:"YW",26080:"WM",26292:"PB",26333:"PB",26355:"ZY",26366:"CZ",26397:"ZC",26399:"QJ",26415:"ZS",26451:"SB",26526:"ZC",26552:"JG",26561:"TD",26588:"JG",26597:"CZ",26629:"ZS",26638:"YL",26646:"XQ",26653:"KG",26657:"XJ",26727:"HG",26894:"ZC",26937:"ZS",26946:"ZC",26999:"KJ",27099:"KJ",27449:"YQ",27481:"XS",27542:"ZS",27663:"ZS",27748:"TS",27784:"SC",27788:"ZD",27795:"TD",27812:"O",27850:"PB",27852:"MB",27895:"SL",27898:"PL",27973:"QJ",27981:"KH",27986:"HX",27994:"XJ",28044:"YC",28065:"WG",28177:"SM",28267:"QJ",28291:"KH",28337:"ZQ",28463:"TL",28548:"DC",28601:"TD",28689:"PB",28805:"JG",28820:"QG",28846:"PB",28952:"TD",28975:"ZC",29100:"A",29325:"QJ",29575:"SL",29602:"FB",30010:"TD",30044:"CX",30058:"PF",30091:"YSP",30111:"YN",30229:"XJ",30427:"SC",30465:"SX",30631:"YQ",30655:"QJ",30684:"QJG",30707:"SD",30729:"XH",30796:"LG",30917:"PB",31074:"NM",31085:"JZ",31109:"SC",31181:"ZC",31192:"MLB",31293:"JQ",31400:"YX",31584:"YJ",31896:"ZN",31909:"ZY",31995:"XJ",32321:"PF",32327:"ZY",32418:"HG",32420:"XQ",32421:"HG",32438:"LG",32473:"GJ",32488:"TD",32521:"QJ",32527:"PB",32562:"ZSQ",32564:"JZ",32735:"ZD",32793:"PB",33071:"PF",33098:"XL",33100:"YA",33152:"PB",33261:"CX",33324:"BP",33333:"TD",33406:"YA",33426:"WM",33432:"PB",33445:"JG",33486:"ZN",33493:"TS",33507:"QJ",33540:"QJ",33544:"ZC",33564:"XQ",33617:"YT",33632:"QJ",33636:"XH",33637:"YX",33694:"WG",33705:"PF",33728:"YW",33882:"SR",34067:"WM",34074:"YW",34121:"QJ",34255:"ZC",34259:"XL",34425:"JH",34430:"XH",34485:"KH",34503:"YS",34532:"HG",34552:"XS",34558:"YE",34593:"ZL",34660:"YQ",34892:"XH",34928:"SC",34999:"QJ",35048:"PB",35059:"SC",35098:"ZC",35203:"TQ",35265:"JX",35299:"JX",35782:"SZ",35828:"YS",35830:"E",35843:"TD",35895:"YG",35977:"MH",36158:"JG",36228:"QJ",36426:"XQ",36466:"DC",36710:"JC",36711:"ZYG",36767:"PB",36866:"SK",36951:"YW",37034:"YX",37063:"XH",37218:"ZC",37325:"ZC",38063:"PB",38079:"TD",38085:"QY",38107:"DC",38116:"TD",38123:"YD",38224:"HG",38241:"XTC",38271:"ZC",38415:"YE",38426:"KH",38461:"YD",38463:"AE",38466:"PB",38477:"XJ",38518:"YT",38551:"WK",38585:"ZC",38704:"XS",38739:"LJ",38761:"GJ",38808:"SQ",39048:"JG",39049:"XJ",39052:"HG",39076:"CZ",39271:"XT",39534:"TD",39552:"TD",39584:"PB",39647:"SB",39730:"LG",39748:"TPB",40109:"ZQ",40479:"ND",40516:"HG",40536:"HG",40583:"QJ",40765:"YQ",40784:"QJ",40840:"YK",40863:"QJG"},c=function(c){var d=c.charCodeAt(0);return d>40869||d<19968?c:b[d]?b[d]:a.charAt(d-19968)},d=function(a){for(var b,c=[""],d=0,e=a.length;d div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',b=document.head||document.getElementsByTagName("head")[0],d=document.createElement("style");d.type="text/css",d.styleSheet?d.styleSheet.cssText=a:d.appendChild(document.createTextNode(a)),b.appendChild(d),c=!0}},v=function(a,c){b?(a.__resizeTriggers__||("static"===getComputedStyle(a).position&&(a.style.position="relative"),u(),a.__resizeLast__={},a.__resizeListeners__=[],(a.__resizeTriggers__=document.createElement("div")).className="resize-triggers",a.__resizeTriggers__.innerHTML='
',a.appendChild(a.__resizeTriggers__),f(a),a.addEventListener("scroll",h,!0),l&&a.__resizeTriggers__.addEventListener(l,function(b){b.animationName===r&&f(a)})),a.__resizeListeners__.push(c)):a.attachEvent("onresize",c)},w=function(a,c){b?(a.__resizeListeners__.splice(a.__resizeListeners__.indexOf(c),1),a.__resizeListeners__.length||(a.removeEventListener("scroll",h,!0),a.__resizeTriggers__=!a.removeChild(a.__resizeTriggers__))):a.detachEvent("onresize",c)};BI.ResizeDetector={addResizeListener:function(a,b){return v(a.element[0],b),function(){w(a.element[0],b)}},removeResizeListener:function(a,b){w(a.element[0],b)}}}(),function(){function a(a,b){return a0&&(this._items[0]=b,this._sinkDown(0)),a}},push:function(a){this._items[this._size++]=a,this._bubbleUp(this._size-1)},size:function(){return this._size},peek:function(){if(0!==this._size)return this._items[0]},_heapify:function(){for(var a=Math.floor((this._size+1)/2);a>=0;a--)this._sinkDown(a)},_bubbleUp:function(a){for(var b=this._items[a];a>0;){var c=Math.floor((a+1)/2)-1,d=this._items[c];if(this._comparator(d,b))return;this._items[c]=b,this._items[a]=d,a=c}},_sinkDown:function(a){for(var b=this._items[a];;){var c=2*(a+1)-1,d=2*(a+1),e=-1;if(cc?c:b},b=5,c={index:0,offset:0,position:0,contentHeight:0};BI.TableScrollHelper=function(a,b,c,d){this._rowOffsets=BI.PrefixIntervalTree.uniform(a,b),this._storedHeights=new Array(a);for(var e=0;e=0&&c>=a-b;){var d=this._updateRowHeight(c);this._position+=d,c--}},_updateRowHeight:function(a){if(a<0||a>=this._rowCount)return 0;var b=this._rowHeightGetter(a);if(b!==this._storedHeights[a]){var c=b-this._storedHeights[a];return this._rowOffsets.set(a,b),this._storedHeights[a]=b,this._contentHeight+=c,c}return 0},getRowPosition:function(a){return this._updateRowHeight(a),this._rowOffsets.sumUntil(a)},scrollBy:function(b){if(0===this._rowCount)return c;var d=this._rowOffsets.greatestLowerBound(this._position);d=a(d,0,Math.max(this._rowCount-1,0));var e=this._rowOffsets.sumUntil(d),f=d,g=this._position,h=this._updateRowHeight(f);0!==e&&(g+=h);var i=this._storedHeights[f]-(g-e);if(b>=0)for(;b>0&&f0&&f>=0;)if(b=0){var k=this._updateRowHeight(f);j=this._storedHeights[f],g+=k}}var l=this._contentHeight-this._viewportHeight;g=a(g,0,l),this._position=g;var m=this._rowOffsets.greatestLowerBound(g);m=a(m,0,Math.max(this._rowCount-1,0)),e=this._rowOffsets.sumUntil(m);var n=e-g;return this._updateHeightsInViewport(m,n),this._updateHeightsAboveViewport(m),{index:m,offset:n,position:this._position,contentHeight:this._contentHeight}},_getRowAtEndPosition:function(a){this._updateRowHeight(a);for(var b=a,c=this._storedHeights[b];c=0;)b--,b>=0&&(this._updateRowHeight(b),c+=this._storedHeights[b]);var d=this._rowOffsets.sumTo(a)-this._viewportHeight;return d<0&&(d=0),d},scrollTo:function(b){if(0===this._rowCount)return c;if(b<=0)return this._position=0,this._updateHeightsInViewport(0,0),{index:0,offset:0,position:this._position,contentHeight:this._contentHeight};if(b>=this._contentHeight-this._viewportHeight){var d=this._rowCount-1;b=this._getRowAtEndPosition(d)}this._position=b;var e=this._rowOffsets.greatestLowerBound(b);e=a(e,0,Math.max(this._rowCount-1,0));var f=this._rowOffsets.sumUntil(e),g=f-b;return this._updateHeightsInViewport(e,g),this._updateHeightsAboveViewport(e),{index:e,offset:g,position:this._position,contentHeight:this._contentHeight}},scrollToRow:function(b,c){b=a(b,0,Math.max(this._rowCount-1,0)),c=a(c,-this._storedHeights[b],0);var d=this._rowOffsets.sumUntil(b);return this.scrollTo(d-c)},scrollRowIntoView:function(b){b=a(b,0,Math.max(this._rowCount-1,0));var c=this._rowOffsets.sumUntil(b),d=c+this._storedHeights[b];if(c=a&&e<=b)return null;var f;a-d>e-b?(f=d,this._smallValues.pop()):(f=e,this._largeValues.pop());var g=this._valueToPositionMap[f];return delete this._valueToPositionMap[f],this._valueToPositionMap[c]=g,this._pushToHeaps(g,c),g},_pushToHeaps:function(a,b){var c={position:a,value:b};this._smallValues.push(c),this._largeValues.push(c)},_cleanHeaps:function(){this._cleanHeap(this._smallValues),this._cleanHeap(this._largeValues);var a=Math.min(this._smallValues.size(),this._largeValues.size()),b=Math.max(this._smallValues.size(),this._largeValues.size());b>10*a&&this._recreateHeaps()},_recreateHeaps:function(){for(var a=this._smallValues.size()b.value}},!function(){BI.LinkHashMap=function(){this.array=[],this.map={}},BI.LinkHashMap.prototype={constructor:BI.LinkHashMap,has:function(a){return a in this.map},add:function(a,b){"undefined"!=typeof a&&(a in this.map?this.map[a]=b:(this.array.push(a),this.map[a]=b))},remove:function(a){if(a in this.map){delete this.map[a];for(var b=0;b>5]|=128<>>9<<4)+14]=b;for(var c=1732584193,d=-271733879,e=-1732584194,f=271733878,g=0;g16&&(c=this.core_md5(c,a.length*this.chrsz));for(var d=Array(16),e=Array(16),f=0;f<16;f++)d[f]=909522486^c[f],e[f]=1549556828^c[f];var g=this.core_md5(d.concat(this.str2binl(b)),512+b.length*this.chrsz);return this.core_md5(e.concat(g),640)},a.prototype.safe_add=function(a,b){var c=(65535&a)+(65535&b),d=(a>>16)+(b>>16)+(c>>16);return d<<16|65535&c},a.prototype.bit_rol=function(a,b){return a<>>32-b},a.prototype.str2binl=function(a){for(var b=Array(),c=(1<>5]|=(a.charCodeAt(d/this.chrsz)&c)<>2]>>d%4*8+4&15)+b.charAt(a[d>>2]>>d%4*8&15);return c},a.prototype.binl2b64=function(a){for(var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c="",d=0;d<4*a.length;d+=3)for(var e=(a[d>>2]>>8*(d%4)&255)<<16|(a[d+1>>2]>>8*((d+1)%4)&255)<<8|a[d+2>>2]>>8*((d+2)%4)&255,f=0;f<4;f++)c+=8*d+6*f>32*a.length?this.b64pad:b.charAt(e>>6*(3-f)&63);return c},BI.MD5=new a}(),function(){var a=function(a){return Math.floor(a/2)},b=window.Int32Array||function(a){for(var b=[],c=a-1;c>=0;--c)b[c]=0;return b},c=function(a){for(var b=1;b0;--d)this._heap[d]=this._heap[2*d]+this._heap[2*d+1]},BI.PrefixIntervalTree.prototype={constructor:BI.PrefixIntervalTree,set:function(b,c){var d=this._half+b;for(this._heap[d]=c,d=a(d);0!==d;d=a(d))this._heap[d]=this._heap[2*d]+this._heap[2*d+1]},get:function(a){var b=this._half+a;return this._heap[b]},getSize:function(){return this._size},sumUntil:function(b){if(0===b)return 0;for(var c=this._half+b-1,d=this._heap[c];1!==c;c=a(c))c%2===1&&(d+=this._heap[c-1]);return d},sumTo:function(a){return this.sumUntil(a+1)},sum:function(a,b){return this.sumUntil(b)-this.sumUntil(a)},greatestLowerBound:function(a){if(a<0)return-1;var b=1;if(this._heap[b]<=a)return this._size;for(;b=0;--d)c[d]=b;return new BI.PrefixIntervalTree(c)},BI.PrefixIntervalTree.empty=function(a){return BI.PrefixIntervalTree.uniform(a,0)}}(),!function(){BI.Queue=function(a){this.capacity=a,this.array=[]},BI.Queue.prototype={constructor:BI.Queue,contains:function(a){return this.array.contains(a)},indexOf:function(a){return this.array.contains(a)},getElementByIndex:function(a){return this.array[a]},push:function(a){this.array.push(a),this.capacity&&this.array.length>this.capacity&&this.array.shift()},pop:function(){this.array.pop()},shift:function(){this.array.shift()},unshift:function(a){this.array.unshift(a),this.capacity&&this.array.length>this.capacity&&this.array.pop()},remove:function(a){this.array.remove(a)},splice:function(){this.array.splice.apply(this.array,arguments)},slice:function(){this.array.slice.apply(this.array,arguments)},size:function(){return this.array.length},each:function(a,b){var b=b||window,a=a||null;if(null!=a&&"function"==typeof a)for(var c=0;cc?c:a},b=6,c=10;BI.TableRowBuffer=function(d,e,f,g){this._bufferSet=new BI.IntegerBufferSet,this._defaultRowHeight=e,this._viewportRowsBegin=0,this._viewportRowsEnd=0,this._maxVisibleRowCount=Math.ceil(f/e)+1,this._bufferRowsCount=a(Math.floor(this._maxVisibleRowCount/2),b,c),this._rowsCount=d,this._rowHeightGetter=g,this._rows=[],this._viewportHeight=f},BI.TableRowBuffer.prototype={constructor:BI.TableRowBuffer,getRowsWithUpdatedBuffer:function(){for(var a=2*this._bufferRowsCount,b=Math.max(this._viewportRowsBegin-this._bufferRowsCount,0);b0;)this._addRowToBuffer(b,this._viewportRowsBegin,this._viewportRowsEnd-1),b++,a--;return this._rows},getRows:function(a,b){var c=b,d=c,e=a,f=Math.min(a+this._maxVisibleRowCount,this._rowsCount);for(this._viewportRowsBegin=a;e=f&&(d=this._bufferSet.replaceFurthestValuePosition(b,c,a)),null===d?(d=this._bufferSet.getNewPositionForValue(a),this._rows[d]=a):this._rows[d]=a}}}(),function(){BI.Tree=function(){this.root=new BI.Node(BI.UUID())},BI.Tree.prototype={constructor:BI.Tree,addNode:function(a,b,c){BI.isNull(b)?this.root.addChild(a,c):BI.isNull(a)?this.root.addChild(b,c):a.addChild(b,c)},isRoot:function(a){return a===this.root},getRoot:function(){return this.root},clear:function(){this.root.clear()},initTree:function(a){var b=this;this.clear();var c=[];for(BI.each(a,function(a,d){var e=new BI.Node(d);e.set("data",d),b.addNode(e),c.push(e)});!BI.isEmpty(c);){var d=c.shift(),e=d.get("data");BI.each(e.children,function(a,e){var f=new BI.Node(e);f.set("data",e),c.push(f),b.addNode(d,f)})}},_toJSON:function(a){var b=this,c=[];return BI.each(a.getChildren(),function(a,d){c.push(b._toJSON(d))}),BI.extend({id:a.id},BI.deepClone(a.get("data")),c.length>0?{children:c}:{})},toJSON:function(a){var b=this,c=[];return BI.each((a||this.root).getChildren(),function(a,d){c.push(b._toJSON(d))}),c},_toJSONWithNode:function(a){var b=this,c=[];return BI.each(a.getChildren(),function(a,d){c.push(b._toJSONWithNode(d))}),BI.extend({id:a.id},BI.deepClone(a.get("data")),{node:a},c.length>0?{children:c}:{})},toJSONWithNode:function(a){var b=this,c=[];return BI.each((a||this.root).getChildren(),function(a,d){c.push(b._toJSONWithNode(d))}),c},search:function(a,b,c){if(!(a instanceof BI.Node))return arguments.callee.apply(this,[this.root,a,b]);var d=this,e=null;return BI.isNull(b)?null:BI.isEqual(a[c||"id"],b)?a:(BI.any(a.getChildren(),function(a,f){if(e=d.search(f,b,c),null!==e)return!0}),e)},_traverse:function(a,b){var c=[];for(c.push(a);!BI.isEmpty(c);){var d=c.shift(),e=b&&b(d);if(e===!1)break;e!==!0&&null!=d&&(c=c.concat(d.getChildren()))}},traverse:function(a){this._traverse(this.root,a)},_recursion:function(a,b,c){var d=this;return BI.every(a.getChildren(),function(a,e){var f=BI.clone(b);f.push(e.id);var g=c&&c(e,f);return g!==!1&&(g===!0||d._recursion(e,f,c))})},recursion:function(a){this._recursion(this.root,[],a)},inOrderTraverse:function(a){this._inOrderTraverse(this.root,a)},_inOrderTraverse:function(a,b){null!=a&&(this._inOrderTraverse(a.getLeft()),b&&b(a),this._inOrderTraverse(a.getRight()))},nrInOrderTraverse:function(a){for(var b=[],c=this.root;null!=c||!BI.isEmpty(b);){for(;null!=c;)b.push(c),c=c.getLeft();c=b.pop(),a&&a(c),c=c.getRight()}},preOrderTraverse:function(a){this._preOrderTraverse(this.root,a)},_preOrderTraverse:function(a,b){null!=a&&(b&&b(a),this._preOrderTraverse(a.getLeft()),this._preOrderTraverse(a.getRight()))},nrPreOrderTraverse:function(a){for(var b=[],c=this.root;null!=c||!BI.isEmpty(b);){for(;null!=c;)a&&a(c),b.push(c),c=c.getLeft();c=b.pop(),c=c.getRight()}},postOrderTraverse:function(a){this._postOrderTraverse(this.root,a)},_postOrderTraverse:function(a,b){null!=a&&(this._postOrderTraverse(a.getLeft()),this._postOrderTraverse(a.getRight()),b&&b(a))},nrPostOrderTraverse:function(a){for(var b=[],c=this.root,d=null;null!=c||!BI.isEmpty(b);){for(;null!=c;)b.push(c),c=c.getLeft();c=BI.last(b),null==c.getRight()||c.getRight()==d?(a&&a(c),c=b.pop(),d=c,c=null):c=c.getRight()}}},BI.Node=function(a){BI.isObject(a)?BI.extend(this,a):this.id=a,this.clear.apply(this,arguments)},BI.Node.prototype={constructor:BI.Node,set:function(a,b){return BI.isObject(a)?void BI.extend(this,a):void(this[a]=b)},get:function(a){return this[a]},isLeaf:function(){return BI.isEmpty(this.children)},getChildren:function(){return this.children},getChildrenLength:function(){return this.children.length},getFirstChild:function(){return BI.first(this.children)},getLastChild:function(){return BI.last(this.children)},setLeft:function(a){this.left=a},getLeft:function(){return this.left},setRight:function(a){this.right=a},getRight:function(){return this.right},setParent:function(a){this.parent=a},getParent:function(){return this.parent},getChild:function(a){return this.children[a]},getChildIndex:function(a){return BI.findIndex(this.children,function(b,c){return c.get("id")===a})},removeChild:function(a){this.removeChildByIndex(this.getChildIndex(a))},removeChildByIndex:function(a){var b=this.getChild(a-1),c=this.getChild(a+1);null!=b&&b.setRight(c||null),null!=c&&c.setLeft(b||null), this.children.splice(a,1)},removeAllChilds:function(){this.children=[]},addChild:function(a,b){var c=null;c=BI.isUndefined(b)?this.children.length-1:b-1,a.setParent(this),c>=0&&(this.getChild(c)&&this.getChild(c).setRight(a),a.setLeft(this.getChild(c))),BI.isUndefined(b)?this.children.push(a):this.children.splice(b,0,a)},equals:function(a){return this===a||this.id===a.id},clear:function(){this.parent=null,this.left=null,this.right=null,this.children=[]}},BI.extend(BI.Tree,{transformToArrayFormat:function(a,b){if(!a)return[];var c=[];if(BI.isArray(a))for(var d=0,e=a.length;d=this.x&&a<=this.x+this.w&&b>=this.y&&b<=this.y+this.h)},getPosition:function(){var a=[];return a.push(this.x+this.w/2),a.push(this.y+this.h/2),a}},BI.BehaviorFactory={createBehavior:function(a,b){var c;switch(a){case"highlight":c=BI.HighlightBehavior;break;case"redmark":c=BI.RedMarkBehavior}return new c(b)}},BI.Behavior=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.Behavior.superclass._defaultConfig.apply(this,arguments),{rule:function(){return!0}})},_init:function(){BI.Behavior.superclass._init.apply(this,arguments)},doBehavior:function(){}}),BI.Layout=BI.inherit(BI.Widget,{props:function(){return{scrollable:null,scrollx:!1,scrolly:!1,items:[]}},render:function(){this._init4Margin(),this._init4Scroll()},_init4Margin:function(){this.options.top&&this.element.css("top",this.options.top),this.options.left&&this.element.css("left",this.options.left),this.options.bottom&&this.element.css("bottom",this.options.bottom),this.options.right&&this.element.css("right",this.options.right)},_init4Scroll:function(){switch(this.options.scrollable){case!0:this.element.css("overflow","auto");break;case!1:this.element.css("overflow","hidden")}this.options.scrollx&&this.element.css({"overflow-x":"auto","overflow-y":"hidden"}),this.options.scrolly&&this.element.css({"overflow-x":"hidden","overflow-y":"auto"})},_mountChildren:function(){var a=this,b=document.createDocumentFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&this.element.append(b)},_getChildName:function(a){return a+""},_addElement:function(a,b){var c,d=this;return this.hasWidget(this._getChildName(a))?c=this.getWidgetByName(this._getChildName(a)):(c=BI.createWidget(b,this),c.on(BI.Events.DESTROY,function(){BI.each(d._children,function(a,b){b===c&&(BI.remove(d._children,b),d.removeItemAt(0|a))})}),this.addWidget(this._getChildName(a),c)),c},_getOptions:function(a){return a instanceof BI.Widget&&(a=a.options),a=BI.stripEL(a),a instanceof BI.Widget&&(a=a.options),a},_compare:function(a,b){function c(a,b,e,f){if(a===b)return 0!==a||1/a===1/b;if(null==a||null==b)return a===b;var g=Object.prototype.toString.call(a);switch(g){case"[object RegExp]":case"[object String]":return""+a==""+b;case"[object Number]":return+a!==+a?+b!==+b:0===+a?1/+a===1/b:+a===+b;case"[object Date]":case"[object Boolean]":return+a===+b}var h="[object Array]"===g;if(!h){if(BI.isFunction(a)&&BI.isFunction(b))return!0;a=d._getOptions(a),b=d._getOptions(b)}e=e||[],f=f||[];for(var i=e.length;i--;)if(e[i]===a)return f[i]===b;if(e.push(a),f.push(b),h){if(i=a.length,i!==b.length)return!1;for(;i--;)if(!c(a[i],b[i],e,f))return!1}else{var j,k=_.keys(a);if(i=k.length,_.keys(b).length!==i)return!1;for(;i--;)if(j=k[i],!_.has(b,j)||!c(a[j],b[j],e,f))return!1}return e.pop(),f.pop(),!0}var d=this;return c(a,b)},_getWrapper:function(){return this.element},_addItemAt:function(a,b){for(var c=this.options.items.length;c>a;c--)this._children[this._getChildName(c)]=this._children[this._getChildName(c-1)];delete this._children[this._getChildName(a)],this.options.items.splice(a,0,b)},_removeItemAt:function(a){for(var b=a;bthis.options.items.length)){this._addItemAt(a,b);var c=this._addElement(a,b);return a>0?this._children[this._getChildName(a-1)].element.after(c.element):c.element.prependTo(this._getWrapper()),c._mount(),c}},removeItemAt:function(a){a=BI.isArray(a)?a:[a];for(var b=[],c=[],d={},e=0,f=this.options.items.length;ethis.options.items.length-1)return!1;var c=this._children[this._getChildName(a)];return c.shouldUpdate?c.shouldUpdate(this._getOptions(b))===!0:null},updateItemAt:function(a,b){if(!(a<0||a>this.options.items.length-1)){var c,d=this._children[this._getChildName(a)];if(c=d.update(this._getOptions(b)))return c;var e=this._children[this._getChildName(a)];delete this._children[this._getChildName(a)],this.options.items.splice(a,1);var f=this._addElement(a,b);this.options.items.splice(a,0,b),this._children[this._getChildName(a)]=f,a>0?this._children[this._getChildName(a-1)].element.after(f.element):f.element.prependTo(this._getWrapper()),e._destroy(),f._mount()}},addItems:function(a){var b=this,c=this.options,d=document.createDocumentFragment(),e=[];BI.each(a,function(a,f){var g=b._addElement(c.items.length,f);b._children[b._getChildName(c.items.length)]=g,c.items.push(f),e.push(g),d.appendChild(g.element[0])}),this._getWrapper().append(d),BI.each(e,function(a,b){b._mount()})},prependItems:function(a){var b=this;a=a||[];for(var c=document.createDocumentFragment(),d=[],e=a.length-1;e>=0;e--){this._addItemAt(0,a[e]);var f=this._addElement(0,a[e]);b._children[b._getChildName(0)]=f,this.options.items.unshift(a[e]),d.push(f),c.appendChild(f.element[0])}this._getWrapper().prepend(c),BI.each(d,function(a,b){b._mount()})},getValue:function(){var a,b=this,c=[];return BI.each(this.options.items,function(d){if(a=b._children[b._getChildName(d)]){var e=a.getValue();e=BI.isArray(e)?e:[e],c=c.concat(e)}}),c},setValue:function(a){var b,c=this;BI.each(this.options.items,function(d){(b=c._children[c._getChildName(d)])&&b.setValue(a)})},setText:function(a){var b,c=this;BI.each(this.options.items,function(d){(b=c._children[c._getChildName(d)])&&b.setText(a)})},patchItem:function(a,b,c){var d=this.shouldUpdateItem(c,b);if(d===!0||null===d&&!this._compare(a,b))return this.updateItemAt(c,b)},updateChildren:function(a,b){function c(a,b,c,d){return a=j._getOptions(a),b=j._getOptions(b),BI.isKey(a.key)?a.key===b.key:c>=0?c===d:void 0}function d(a,b){var c=j._getOptions(a),d=null==c.key?b:c.key;return s[d]=j._addElement(d,a)}function e(a,b,c,e){for(;c<=e;++c){var f=d(b[c],c);g(f,a,!1,c)}}function f(a,b,c){for(;b<=c;++b){var d=j._getOptions(a[b]),e=null==d.key?b:d.key;s[e]._destroy()}}function g(a,b,c,d){a=j._getOptions(a),b=b&&j._getOptions(b);var e=BI.isKey(a.key)?a.key:d;if(b&&s[b.key]){var f,g=BI.isKey(b.key)?b.key:d;f=c?s[g].element.next():s[g].element,f.length>0?f.before(s[e].element):j._getWrapper().append(s[e].element)}else j._getWrapper().append(s[e].element)}var h,i,j=this,k=0,l=0,m=a.length-1,n=a[0],o=a[m],p=b.length-1,q=b[0],r=b[p],s={};for(BI.each(a,function(a,b){b=j._getOptions(b);var c=null==b.key?a:b.key;BI.isKey(c)&&(s[c]=j._children[j._getChildName(a)])});k<=m&&l<=p;)if(BI.isNull(n))n=a[++k];else if(BI.isNull(o))o=a[--m];else if(c(n,q,k,l))i=this.patchItem(n,q,k)||i,s[null==n.key?this._getChildName(k):n.key]=this._children[this._getChildName(k)],n=a[++k],q=b[++l];else if(c(o,r,m,p))i=this.patchItem(o,r,m)||i,s[null==o.key?this._getChildName(m):o.key]=this._children[this._getChildName(m)],o=a[--m],r=b[--p];else if(c(n,r))i=this.patchItem(n,r,k)||i,s[null==n.key?this._getChildName(k):n.key]=this._children[this._getChildName(k)],g(n,o,!0),n=a[++k],r=b[--p];else if(c(o,q))i=this.patchItem(o,q,m)||i,s[null==o.key?this._getChildName(m):o.key]=this._children[this._getChildName(m)],g(o,n),o=a[--m],q=b[++l];else{var t=d(q);g(t,n),q=b[++l]}return k>m?(h=BI.isNull(b[p+1])?null:b[p+1].elm,e(h,b,l,p)):l>p&&f(a,k,m),this._children={},BI.each(b,function(a,b){var c=j._getOptions(b),d=null==c.key?a:c.key;s[d]._mount(),j._children[j._getChildName(a)]=s[d]}),i},update:function(a){var b=this.options,c=a.items||[],d=this.updateChildren(b.items,c);return this.options.items=c,d},stroke:function(a){var b=this;BI.each(a,function(a,c){c&&b._addElement(a,c)})},removeWidget:function(a){var b;BI.isWidget(a)?BI.each(this._children,function(c,d){d===a&&(b=c)}):b=a,b&&this._removeItemAt(0|b)},empty:function(){BI.Layout.superclass.empty.apply(this,arguments),this.options.items=[]},destroy:function(){BI.Layout.superclass.destroy.apply(this,arguments),this.options.items=[]},populate:function(a){this.options;return a=a||[],this._isMounted?void this.update({items:a}):(this.options.items=a,void this.stroke(a))},resize:function(){}}),BI.shortcut("bi.layout",BI.Layout),BI.Plugin=BI.Plugin||{},!function(){var a={},b={},c={};BI.extend(BI.Plugin,{getWidget:function(b,d){if(c[b])for(var e=c[b].length-1;e>=0;e--)c[b][e](d);if(a[b])for(var f,e=a[b].length-1;e>=0;e--)if(f=a[b][e](d))return f;return d},configWidget:function(a,b){c[a]||(c[a]=[]),c[a].push(b)},registerWidget:function(b,c){a[b]||(a[b]=[]),a[b].length>0&&console.log("组件已经注册过了!"),a[b].push(c)},relieveWidget:function(b){delete a[b]},getObject:function(a,c){if(b[a])for(var d,e=0,f=b[a].length;e0&&console.log("对象已经注册过了!"),b[a].push(c)},relieveObject:function(a){delete b[a]}})}(),BI.Action=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.Action.superclass._defaultConfig.apply(this,arguments),{src:null,tar:null})},_init:function(){BI.Action.superclass._init.apply(this,arguments)},actionPerformed:function(a,b,c){},actionBack:function(a,b,c){}}),BI.ActionFactory={createAction:function(a,b){var c;switch(a){case"show":c=BI.ShowAction}return new c(b)}},BI.ShowAction=BI.inherit(BI.Action,{_defaultConfig:function(){return BI.extend(BI.ShowAction.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.ShowAction.superclass._init.apply(this,arguments)},actionPerformed:function(a,b,c){b=b||this.options.tar,b.setVisible(!0),c&&c()},actionBack:function(a,b,c){a=a||this.options.tar,a.setVisible(!1),c&&c()}}),BI.PopoverSection=BI.inherit(BI.Widget,{_init:function(){BI.PopoverSection.superclass._init.apply(this,arguments)},rebuildNorth:function(a){return!0},rebuildCenter:function(a){},rebuildSouth:function(a){return!1},close:function(){this.fireEvent(BI.PopoverSection.EVENT_CLOSE)},end:function(){}}),BI.PopoverSection.EVENT_CLOSE="EVENT_CLOSE",function(){function isEmpty(a){var b=""===a||null===a||void 0===a;return b}function isInvalidDate(a){return"Invalid Date"==a||"NaN"==a}function _eFormat(a,b){var c=b.indexOf("E"),d=b.substr(0,c),e=b.substr(c+1);if(/^[0\.-]+$/.test(a))a=BI._numberFormat(0,d)+"E"+BI._numberFormat(0,e);else{var f=a<0;f&&(a=a.substr(1));var g=(d.split(".")[0]||"").length,h=a.indexOf(".");h<0&&(h=a.length);var i=0;a=a.replace(".","");for(var j=a.length;i="1")break}var l=h-i-g,m=a.substr(i,g),n=i+g-a.length;if(n>0)for(var o=0;o-1)return a>=0?_numberFormat(a+"",b.substring(0,c)):_numberFormat(-a+"",b.substr(c+1));if(+a<0&&"-"!==b.charAt(0))return _numberFormat(-a+"","-"+b);var d=a.split("."),e=b.split("."),f=d[0]||"",g=e[0]||"",h=d[1]||"",i=e[1]||"";if(/[%‰]$/.test(b)){var j=/[%]$/.test(b)?"00":"000";h+=j,f+=h.substr(0,j.length),f=f.replace(/^0+/gi,""),h=h.substr(j.length).replace(/0+$/gi,"")}var k=_dealWithRight(h,i);k.leftPlus&&(f=parseInt(f)+1+"",f=isNaN(f)?"1":f),k=k.num;var l=_dealWithLeft(f,g);return/[0-9]/.test(l)||(l+="0"),/[0-9]/.test(k)?l+"."+k:l+k}function _dealWithRight(a,b){for(var c="",d=0,e=0,f=b.length;e4){j.leftPlus=!0;var k=c.match(/^[0-9]+/);if(k){var l=k[0],m=l.length,n=parseInt(l)+1+"";n.length>m?n=n.substr(1):(n=String.leftPad(n,m,"0"),j.leftPlus=!1),c=c.replace(/^[0-9]+/,n)}}return j.num=c,j}function _dealWithLeft(a,b){for(var c="",d=a.length-1,e=-1,f=-1,g=b.length-1;g>=0;g--){var h=b.charAt(g),i=a.charAt(d);switch(h){case"0":isEmpty(i)&&(i="0"),f=-1,c=i+c,d--;break;case"#":f=g,c=i+c,d--;break;case",":if(!isEmpty(i)){var j=b.match(/,[#0]+/);j&&(e=j[0].length-1),c=","+c}break;default:c=h+c}}if(f>-1){var k=a.substr(0,d+1);c=c.substr(0,f)+k+c.substr(f)}if(e>0){var l=c.match(/[0-9]+,/);if(l){l=l[0];for(var m="",n=l.length-1-e;n>=0;n-=e)m=l.substr(n,e)+","+m;var o=l.substr(0,n+e);isEmpty(o)||(m=o+","+m)}c=c.replace(/[0-9]+,/,m)}return c}window.BI||(window.BI={}),BI.cjkEncode=function(a){if("string"!=typeof a)return a;for(var b="",c=0;c=128||91===d||93===d?"["+d.toString(16)+"]":a.charAt(c)}return b},BI.cjkDecode=function(text){if(null==text)return"";if(!isNaN(text)||text.indexOf("[")==-1)return text;for(var newText="",i=0;ii+1){var subText=text.substring(i+1,rightIdx);subText.length>0&&(ch=String.fromCharCode(eval("0x"+subText))),i=rightIdx}}newText+=ch}return newText},BI.htmlEncode=function(a){return null==a?"":String(a).replace(/&/g,"&").replace(/\"/g,""").replace(//g,">").replace(/\s/g," ")},BI.htmlDecode=function(a){return null==a?"":String(a).replace(/&/g,"&").replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">").replace(/ /g," ")},BI.cjkEncodeDO=function(a){if(BI.isPlainObject(a)){var b={};return _.each(a,function(a,c){"string"!=typeof a&&(a=BI.jsonEncode(a)),c=BI.cjkEncode(c),b[c]=BI.cjkEncode(a)}),b}return a},BI.jsonEncode=function(a){var b=!!{}.hasOwnProperty,c={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},d=function(a){return/["\\\x00-\x1f]/.test(a)?'"'+a.replace(/([\x00-\x1f\\"])/g,function(a,b){var d=c[b];return d?d:(d=b.charCodeAt(),"\\u00"+Math.floor(d/16).toString(16)+(d%16).toString(16))})+'"':'"'+a+'"'},e=function(a){var b,c,d,e=["["],f=a.length;for(c=0;c2?Date._MN[b.getMonth()]:d<2?b.getMonth()+1:String.leftPad(b.getMonth()+1+"",2,"0");break;case"d":c=d>1?String.leftPad(b.getDate()+"",2,"0"):b.getDate();break;case"h":var f=b.getHours()%12;0===f&&(f=12),c=d>1?String.leftPad(f+"",2,"0"):f;break;case"H":c=d>1?String.leftPad(b.getHours()+"",2,"0"):b.getHours();break;case"m":c=d>1?String.leftPad(b.getMinutes()+"",2,"0"):b.getMinutes();break;case"s":c=d>1?String.leftPad(b.getSeconds()+"",2,"0"):b.getSeconds();break;case"a":c=b.getHours()<12?"am":"pm";break;case"z":c=b.getTimezone();break;default:c=a.str}return c}if(!a)return"";var d=b.length,e="";if(d>0){for(var f=b.charAt(0),g=0,h=f,i=1;i 0 && self.element.height() > 0) { - self.vanCharts.resize(); - } - }, 30); - BI.ResizeDetector.addResizeListener(this, function (e) { - self._resizer(); - }); - }, - - resize: function () { - if (this.isSetOptions === true) { - this._resizer(); - } - }, - - magnify: function () { - this.vanCharts.refreshRestore(); - }, - - populate: function (items, options) { - var self = this, o = this.options; - o.items = items; - this.config = options || {}; - this.config.series = o.items; - - var setOptions = function () { - self.vanCharts.setOptions(self.config); - self.isSetOptions = true; - }; - BI.nextTick(setOptions); - } -}); -BI.Chart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.chart", BI.Chart);/** - * 图表控件 - * @class BI.CombineChart - * @extends BI.Widget - */ -BI.CombineChart = BI.inherit(BI.Widget, { - - _defaultConfig: function () { - return BI.extend(BI.CombineChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-combine-chart", - items: [], - xAxis: [{type: "category"}], - yAxis: [{type: "value"}], - types: [[], []], - popupItemsGetter: BI.emptyFn, - formatConfig: BI.emptyFn - }); - }, - - _init: function () { - BI.CombineChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - - // 图可配置属性 - this.CombineChart = BI.createWidget({ - type: "bi.chart", - element: this.element - }); - this.CombineChart.on(BI.Chart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.CombineChart.EVENT_CHANGE, obj); - }); - - if (BI.isNotEmptyArray(o.items)) { - this.populate(o.items); - } - }, - - _formatItems: function (items) { - var result = [], self = this, o = this.options; - var yAxisIndex = 0; - BI.each(items, function (i, belongAxisItems) { - var combineItems = BI.ChartCombineFormatItemFactory.combineItems(o.types[i], belongAxisItems); - BI.each(combineItems, function (j, axisItems) { - if (BI.isArray(axisItems)) { - result = BI.concat(result, axisItems); - } else { - result.push(BI.extend(axisItems, {yAxis: yAxisIndex})); - } - }); - if (BI.isNotEmptyArray(combineItems)) { - yAxisIndex++; - } - }); - var config = BI.ChartCombineFormatItemFactory.combineConfig(); - config.plotOptions.click = function () { - var data = BI.clone(this.options); - data.toolTipRect = this.getTooltipRect(); - var items = o.popupItemsGetter(data); - if (items && items.length === 1) { - self.fireEvent(BI.CombineChart.EVENT_ITEM_CLICK, BI.extend({}, items[0], data)); - } - if (items && items.length > 1) { - self._createPopup(items, data.toolTipRect, data); - } - self.fireEvent(BI.CombineChart.EVENT_CHANGE, data); - }; - return [result, config]; - }, - - _createPopup: function (items, rect, opt) { - var self = this; - if (this.combo) { - this.combo.destroy(); - } - this._doDestroy = true; - this.combo = BI.createWidget({ - type: "bi.combo", - direction: "bottom", - isNeedAdjustWidth: false, - popup: { - el: BI.createWidget({ - type: "bi.vertical", - cls: "bi-linkage-list", - items: BI.map(items, function (i, item) { - return { - el: BI.extend({ - type: "bi.text_button", - cls: "bi-linkage-list-item", - height: 30, - handler: function () { - self.fireEvent(BI.CombineChart.EVENT_ITEM_CLICK, BI.extend({}, item, opt)); - self.combo.destroy(); - }, - hgap: 10 - }, item) - }; - }) - }) - }, - width: 0 - }); - BI.createWidget({ - type: "bi.absolute", - element: this.element, - items: [{ - el: this.combo, - top: rect.y, - left: rect.x - }] - }); - this.combo.element.hover(function () { - self._doDestroy = false; - }, function () { - self._doDestroy = true; - self._debounce2Destroy(); - }); - this._debounce2Destroy = BI.debounce(BI.bind(destroyCombo, this.combo), 3000); - this.combo.showView(); - this._debounce2Destroy(); - - function destroyCombo () { - if (self._doDestroy) { - this.destroy(); - } - } - }, - - setTypes: function (types) { - this.options.types = types || [[]]; - }, - - populate: function (items, types) { - var o = this.options; - if (BI.isNotNull(types)) { - this.setTypes(types); - } - var opts = this._formatItems(items); - BI.extend(opts[1], { - xAxis: o.xAxis, - yAxis: o.yAxis - }); - var result = o.formatConfig(opts[1], opts[0]) || opts; - this.CombineChart.populate(result[0], result[1]); - }, - - resize: function () { - this.CombineChart.resize(); - }, - - magnify: function () { - this.CombineChart.magnify(); - } -}); -BI.CombineChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.CombineChart.EVENT_ITEM_CLICK = "EVENT_ITEM_CLICK"; -BI.shortcut("bi.combine_chart", BI.CombineChart);BI.ChartCombineFormatItemFactory = { - combineItems: function (types, items) { - var calItems = BI.values(items); - return BI.map(calItems, function (idx, item) { - return BI.ChartCombineFormatItemFactory.formatItems(types[idx], item); - }); - }, - - formatItems: function (type, items) { - var item = {}; - switch (type) { - case BICst.WIDGET.BAR: - case BICst.WIDGET.ACCUMULATE_BAR: - case BICst.WIDGET.COMPARE_BAR: - item = BI.extend({type: "bar"}, items); - break; - case BICst.WIDGET.BUBBLE: - item = BI.extend({type: "bubble"}, items); - break; - case BICst.WIDGET.FORCE_BUBBLE: - item = BI.extend({type: "forceBubble"}, items); - break; - case BICst.WIDGET.SCATTER: - item = BI.extend({type: "scatter"}, items); - break; - case BICst.WIDGET.AXIS: - case BICst.WIDGET.ACCUMULATE_AXIS: - case BICst.WIDGET.PERCENT_ACCUMULATE_AXIS: - case BICst.WIDGET.COMPARE_AXIS: - case BICst.WIDGET.FALL_AXIS: - item = BI.extend({type: "column"}, items); - break; - case BICst.WIDGET.LINE: - item = BI.extend({type: "line"}, items); - break; - case BICst.WIDGET.AREA: - case BICst.WIDGET.ACCUMULATE_AREA: - case BICst.WIDGET.COMPARE_AREA: - case BICst.WIDGET.RANGE_AREA: - case BICst.WIDGET.PERCENT_ACCUMULATE_AREA: - item = BI.extend({type: "area"}, items); - break; - case BICst.WIDGET.DONUT: - item = BI.extend({type: "pie"}, items); - break; - case BICst.WIDGET.RADAR: - case BICst.WIDGET.ACCUMULATE_RADAR: - item = BI.extend({type: "radar"}, items); - break; - case BICst.WIDGET.PIE: - item = BI.extend({type: "pie"}, items); - break; - case BICst.WIDGET.DASHBOARD: - item = BI.extend({type: "gauge"}, items); - break; - case BICst.WIDGET.MAP: - item = BI.extend({type: "areaMap"}, items); - break; - case BICst.WIDGET.GIS_MAP: - item = BI.extend({type: "pointMap"}, items); - break; - default: - item = BI.extend({type: "column"}, items); - break; - } - return item; - }, - - combineConfig: function () { - return { - title: "", - chartType: "column", - plotOptions: { - rotatable: false, - startAngle: 0, - borderRadius: 0, - endAngle: 360, - innerRadius: "0.0%", - layout: "horizontal", - hinge: "rgb(101,107,109)", - dataLabels: { - autoAdjust: true, - style: {fontFamily: "inherit", color: "inherit", fontSize: "12px"}, - formatter: { - identifier: "${VALUE}", - valueFormat: this._contentFormat2Decimal, - seriesFormat: this._contentFormat, - percentFormat: this._contentFormatPercentage, - categoryFormat: this._contentFormat, - XFormat: this._contentFormat2Decimal, - YFormat: this._contentFormat2Decimal, - sizeFormat: this._contentFormat2Decimal - }, - align: "outside", - enabled: false - }, - percentageLabel: { - formatter: { - identifier: "${PERCENT}", - valueFormat: this._contentFormat2Decimal, - seriesFormat: this._contentFormat, - percentFormat: this._contentFormatPercentage, - categoryFormat: this._contentFormat - }, - style: { - fontFamily: "inherit", color: "inherit", fontSize: "12px" - }, - align: "bottom", - enabled: true - }, - valueLabel: { - formatter: { - identifier: "${SERIES}${VALUE}", - valueFormat: this._contentFormat2Decimal, - seriesFormat: this._contentFormat, - percentFormat: this._contentFormatPercentage, - categoryFormat: this._contentFormat - }, - backgroundColor: "rgb(255,255,0)", - style: { - fontFamily: "inherit", color: "inherit", fontSize: "12px" - }, - align: "inside", - enabled: true - }, - hingeBackgroundColor: "rgb(220,242,249)", - seriesLabel: { - formatter: { - identifier: "${CATEGORY}", - valueFormat: this._contentFormat2Decimal, - seriesFormat: this._contentFormat, - percentFormat: this._contentFormatPercentage, - categoryFormat: this._contentFormat - }, - style: { - fontFamily: "inherit", color: "inherit", fontSize: "12px" - }, - align: "bottom", - enabled: true - }, - paneBackgroundColor: "rgb(252,252,252)", - needle: "rgb(229,113,90)", - large: false, - connectNulls: false, - shadow: true, - curve: false, - sizeBy: "area", - tooltip: { - formatter: { - identifier: "${SERIES}${X}${Y}${SIZE}{CATEGORY}${SERIES}${VALUE}", - valueFormat: this._contentFormat2Decimal, - seriesFormat: this._contentFormat, - percentFormat: this._contentFormatPercentage, - categoryFormat: this._contentFormat, - XFormat: this._contentFormat2Decimal, - sizeFormat: this._contentFormat2Decimal, - YFormat: this._contentFormat2Decimal - }, - shared: false, - padding: 5, - backgroundColor: "rgba(0,0,0,0.4980392156862745)", - borderColor: "rgb(0,0,0)", - shadow: false, - borderRadius: 2, - borderWidth: 0, - follow: false, - enabled: true, - animation: true, - style: { - fontFamily: "Microsoft YaHei, Hiragino Sans GB W3", - color: "#c4c6c6", - fontSize: "12px", - fontWeight: "" - } - }, - maxSize: 80, - fillColorOpacity: 0.5, - step: false, - force: false, - minSize: 15, - displayNegative: true, - categoryGap: "16.0%", - borderColor: "rgb(255,255,255)", - borderWidth: 1, - gap: "22.0%", - animation: true, - lineWidth: 2, - bubble: { - large: false, - connectNulls: false, - shadow: true, - curve: false, - sizeBy: "area", - maxSize: 80, - minSize: 15, - lineWidth: 0, - animation: true, - fillColorOpacity: 0.699999988079071, - marker: { - symbol: "circle", - radius: 28.39695010101295, - enabled: true - } - } - }, - dTools: { - enabled: false, - style: { - fontFamily: "Microsoft YaHei, Hiragino Sans GB W3", - color: "#1a1a1a", - fontSize: "12px" - }, - backgroundColor: "white" - }, - dataSheet: { - enabled: false, - borderColor: "rgb(0,0,0)", - borderWidth: 1, - formatter: this._contentFormat2Decimal, - style: { - fontFamily: "inherit", color: "inherit", fontSize: "12px" - } - }, - borderColor: "rgb(238,238,238)", - shadow: false, - legend: { - borderColor: "rgb(204,204,204)", - borderRadius: 0, - shadow: false, - borderWidth: 0, - visible: true, - style: { - fontFamily: "inherit", color: "inherit", fontSize: "12px" - }, - position: "right", - enabled: false - }, - rangeLegend: { - range: { - min: 0, - color: [ - [ - 0, - "rgb(182,226,255)" - ], - [ - 0.5, - "rgb(109,196,255)" - ], - [ - 1, - "rgb(36,167,255)" - ] - ], - max: 266393 - }, - enabled: false - }, - zoom: {zoomType: "xy", zoomTool: {visible: false, resize: true, from: "", to: ""}}, - plotBorderColor: "rgba(255,255,255,0)", - tools: { - hidden: false, - toImage: {enabled: false}, - sort: {enabled: false}, - fullScreen: {enabled: false}, - refresh: { - enabled: false - } - }, - plotBorderWidth: 0, - style: "normal", - colors: ["rgb(99,178,238)", "rgb(118,218,145)"], - borderRadius: 0, - borderWidth: 0, - plotShadow: false, - plotBorderRadius: 0 - }; - }, - - _contentFormat: function () { - return BI.contentFormat(arguments[0], ""); - }, - - _contentFormat2Decimal: function () { - return BI.contentFormat(arguments[0], "#.##;-#.##"); - }, - - _contentFormatPercentage: function () { - return BI.contentFormat(arguments[0], "#.##%;-#.##%"); - } -};/** - * 图表控件 - * @class BI.AbstractChart - * @extends BI.Widget - */ -BI.AbstractChart = BI.inherit(BI.Widget, { - - constants: { - LEFT_AXIS: 0, - RIGHT_AXIS: 1, - RIGHT_AXIS_SECOND: 2, - X_AXIS: 3, - ROTATION: -90, - NORMAL: 1, - LEGEND_BOTTOM: 4, - ZERO2POINT: 2, - ONE2POINT: 3, - TWO2POINT: 4, - MINLIMIT: 1e-5, - LEGEND_HEIGHT: 80, - LEGEND_WIDTH: "30.0%", - FIX_COUNT: 6, - STYLE_NORMAL: 21, - NO_PROJECT: 16, - DASHBOARD_AXIS: 4, - ONE_POINTER: 1, - MULTI_POINTER: 2, - HALF_DASHBOARD: 9, - PERCENT_DASHBOARD: 10, - PERCENT_SCALE_SLOT: 11, - VERTICAL_TUBE: 12, - HORIZONTAL_TUBE: 13, - LNG_FIRST: 3, - LAT_FIRST: 4, - themeColor: "#65bce7", - autoCustom: 1, - POLYGON: 7, - AUTO_CUSTOM: 1, - AUTO: 1, - NOT_SHOW: 2, - LINE_WIDTH: 1, - NUM_SEPARATORS: false, - FONT_STYLE: { - fontFamily: "inherit", - color: "inherit", - fontSize: "12px" - } - }, - - _defaultConfig: function () { - return BI.extend(BI.AbstractChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-abstract-chart", - popupItemsGetter: BI.emptyFn - }); - }, - - _init: function () { - BI.AbstractChart.superclass._init.apply(this, arguments); - }, - - /** - * 格式化坐标轴数量级及其所影响的系列的各项属性 - * @param config 配置信息 - * @param items 系列数据 - * @param type 坐标轴数量级 - * @param position 坐标轴位置 - * @param formatter 系列tooltip格式化内容 - */ - formatNumberLevelInYaxis: function (config, items, type, position, formatter, isPercentChart) { - var magnify = this.calcMagnify(type); - BI.each(items, function (idx, item) { - BI.each(item.data, function (id, da) { - if (position === item.yAxis) { - if (BI.isNotNull(da.y) && !BI.isNumber(da.y)) { - da.y = BI.parseFloat(da.y); - } - if (BI.isNotNull(da.y)) { - da.y = BI.contentFormat(BI.parseFloat(da.y.div(magnify).toFixed(4)), "#.####;-#.####"); - } - } - }); - if (position === item.yAxis) { - item.tooltip = BI.deepClone(config.plotOptions.tooltip); - item.tooltip.formatter.valueFormat = formatter; - if(isPercentChart) { - item.tooltip.formatter.percentFormat = formatter; - item.tooltip.formatter.identifier = "${CATEGORY}${SERIES}${PERCENT}"; - } - } - }); - }, - - formatNumberLevelInXaxis: function (items, type) { - var magnify = this.calcMagnify(type); - BI.each(items, function (idx, item) { - BI.each(item.data, function (id, da) { - if (BI.isNotNull(da.x) && !BI.isNumber(da.x)) { - da.x = BI.parseFloat(da.x); - } - if (BI.isNotNull(da.x)) { - da.x = BI.contentFormat(BI.parseFloat(da.x.div(magnify).toFixed(4)), "#.####;-#.####"); - } - }); - }); - }, - - formatXYDataWithMagnify: function (number, magnify) { - if (BI.isNull(number)) { - return null; - } - if (!BI.isNumber(number)) { - number = BI.parseFloat(number); - } - return BI.contentFormat(BI.parseFloat(number.div(magnify).toFixed(4)), "#.####;-#.####"); - }, - - calcMagnify: function (type) { - var magnify = 1; - switch (type) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - case BICst.TARGET_STYLE.NUM_LEVEL.PERCENT: - magnify = 1; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - magnify = 10000; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - magnify = 1000000; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - magnify = 100000000; - break; - } - return magnify; - }, - - formatChartLegend: function (config, chartLegend) { - switch (chartLegend) { - case BICst.CHART_LEGENDS.BOTTOM: - config.legend.enabled = true; - config.legend.position = "bottom"; - config.legend.maxHeight = this.constants.LEGEND_HEIGHT; - break; - case BICst.CHART_LEGENDS.RIGHT: - config.legend.enabled = true; - config.legend.position = "right"; - config.legend.maxWidth = this.constants.LEGEND_WIDTH; - break; - case BICst.CHART_LEGENDS.NOT_SHOW: - default: - config.legend.enabled = false; - break; - } - }, - - getXYAxisUnit: function (numberLevelType, axis_unit) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - return (BI.isEmptyString(unit) && BI.isEmptyString(axis_unit)) ? unit : "(" + unit + axis_unit + ")"; - }, - - formatTickInXYaxis: function (type, number_level, separators, isCompareBar) { - var formatter = "#.##"; - switch (type) { - case this.constants.NORMAL: - formatter = "#.##"; - if (separators) { - formatter = "#,###.##"; - } - break; - case this.constants.ZERO2POINT: - formatter = "#0"; - if (separators) { - formatter = "#,###"; - } - break; - case this.constants.ONE2POINT: - formatter = "#0.0"; - if (separators) { - formatter = "#,###.0"; - } - break; - case this.constants.TWO2POINT: - formatter = "#0.00"; - if (separators) { - formatter = "#,###.00"; - } - break; - } - if (number_level === BICst.TARGET_STYLE.NUM_LEVEL.PERCENT) { - formatter += "%"; - } - formatter += ";-" + formatter; - if(isCompareBar) { - return function () { - arguments[0] = arguments[0] > 0 ? arguments[0] : (-1) * arguments[0]; - return BI.contentFormat(arguments[0], formatter); - }; - } - return function () { - return BI.contentFormat(arguments[0], formatter); - }; - }, - - formatDataLabel: function (state, items, config, style) { - var self = this; - if (state === true) { - BI.each(items, function (idx, item) { - item.dataLabels = { - align: "outside", - autoAdjust: true, - style: style, - enabled: true, - formatter: { - identifier: "${VALUE}", - valueFormat: config.yAxis[item.yAxis].formatter - } - }; - }); - } - }, - - formatDataLabelForAxis: function (state, items, format, style, isPercentChart) { - var self = this; - if (state === true) { - BI.each(items, function (idx, item) { - item.dataLabels = { - align: "outside", - autoAdjust: true, - style: style, - enabled: true, - formatter: { - identifier: "${VALUE}", - valueFormat: format - } - }; - if(isPercentChart) { - item.dataLabels.formatter.identifier = "${PERCENT}"; - item.dataLabels.formatter.percentFormat = format; - } - }); - } - }, - - setFontStyle: function (fontStyle, config) { - if (config.dataSheet) { - config.dataSheet.style = fontStyle; - } - config.xAxis[0].title.style = fontStyle; - config.xAxis[0].labelStyle = fontStyle; - config.legend.style = fontStyle; - BI.each(config.yAxis, function (idx, axis) { - axis.labelStyle = fontStyle; - axis.title.style = fontStyle; - }); - }, - - _formatItems: function (items) { - return items; - }, - - populate: function (items, options) { - }, - - resize: function () { - }, - - magnify: function () { - } -}); - -BI.AbstractChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.AbstractChart.EVENT_ITEM_CLICK = "EVENT_ITEM_CLICK"; -/** - * 图表控件 - * @class BI.AccumulateAreaChart - * @extends BI.Widget - */ -BI.AccumulateAreaChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.AccumulateAreaChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-accumulate-area-chart" - }); - }, - - _init: function () { - BI.AccumulateAreaChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - - this.xAxis = [{ - type: "category", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE - }]; - this.yAxis = []; - - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - xAxis: this.xAxis, - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.AccumulateAreaChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this; - - config.colors = this.config.chartColor; - config.style = formatChartStyle(this.config.chartStyle); - formatChartLineStyle(this.config.chartLineType); - formatCordon(this.config.cordon); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.plotOptions.connectNulls = this.config.nullContinue; - config.dataSheet.enabled = this.config.showDataTable; - config.xAxis[0].showLabel = !config.dataSheet.enabled; - config.zoom.zoomTool.enabled = this.config.showZoom; - if (this.config.showZoom === true) { - delete config.dataSheet; - delete config.zoom.zoomType; - } - - config.yAxis = this.yAxis; - BI.each(config.yAxis, function (idx, axis) { - var unit = ""; - switch (axis.axisIndex) { - case self.constants.LEFT_AXIS: - unit = self.getXYAxisUnit(self.config.leftYAxisNumberLevel, self.config.leftYAxisUnit); - axis.title.text = self.config.showLeftYAxisTitle === true ? self.config.leftYAxisTitle + unit : unit; - axis.title.rotation = self.constants.ROTATION; - BI.extend(axis, { - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - reversed: self.config.leftYAxisReversed, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: self.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(self.config.leftYAxisStyle, self.config.leftYAxisNumberLevel, self.config.numSeparators) - }); - self.formatNumberLevelInYaxis(config, items, self.config.leftYAxisNumberLevel, idx, axis.formatter, self.config.numSeparators); - - break; - case self.constants.RIGHT_AXIS: - unit = self.getXYAxisUnit(self.config.rightYAxisNumberLevel, self.config.rightYAxisUnit); - axis.title.text = self.config.showRightYAxisTitle === true ? self.config.rightYAxisTitle + unit : unit; - axis.title.rotation = self.constants.ROTATION; - BI.extend(axis, { - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - reversed: self.config.rightYAxisReversed, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: self.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(self.config.rightYAxisStyle, self.config.rightYAxisNumberLevel, self.config.rightNumSeparators) - }); - self.formatNumberLevelInYaxis(config, items, self.config.rightYAxisNumberLevel, idx, axis.formatter, self.config.rightNumSeparators); - break; - } - }); - - config.xAxis[0].title.align = "center"; - config.xAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle : ""; - BI.extend(config.xAxis[0], { - lineWidth: this.config.lineWidth, - enableTick: this.config.enableTick, - labelRotation: this.config.textDirection, - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - maxHeight: "40%" - }); - - config.chartType = "area"; - - // 为了给数据标签加个%,还要遍历所有的系列,唉 - this.formatDataLabel(config.plotOptions.dataLabels.enabled, items, config, this.config.chartFont); - - // 全局样式的图表文字 - this.setFontStyle(this.config.chartFont, config); - - return [items, config]; - - function formatChartStyle (v) { - switch (v) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function formatChartLineStyle (v) { - switch (v) { - case BICst.CHART_SHAPE.RIGHT_ANGLE: - config.plotOptions.curve = false; - config.plotOptions.step = true; - break; - case BICst.CHART_SHAPE.CURVE: - config.plotOptions.curve = true; - config.plotOptions.step = false; - break; - case BICst.CHART_SHAPE.NORMAL: - default: - config.plotOptions.curve = false; - config.plotOptions.step = false; - break; - } - } - - function formatCordon (cordon) { - BI.each(cordon, function (idx, cor) { - if (idx === 0 && self.xAxis.length > 0) { - var magnify = self.calcMagnify(self.config.xAxisNumberLevel); - self.xAxis[0].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "top" - } - }); - }); - } - if (idx > 0 && self.yAxis.length >= idx) { - var magnify = 1; - switch (idx - 1) { - case self.constants.LEFT_AXIS: - magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS: - magnify = self.calcMagnify(self.config.rightYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS_SECOND: - magnify = self.calcMagnify(self.config.rightYAxisSecondNumberLevel); - break; - } - self.yAxis[idx - 1].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "left" - } - }); - }); - } - }); - } - }, - - _formatItems: function (items) { - return BI.map(items, function (idx, item) { - var i = BI.UUID(); - return BI.map(item, function (id, it) { - return BI.extend({}, it, {stack: i}); - }); - }); - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - leftYAxisTitle: options.leftYAxisTitle || "", - rightYAxisTitle: options.rightYAxisTitle || "", - chartColor: options.chartColor || [], - chartStyle: options.chartStyle || c.STYLE_NORMAL, - chartLineType: options.chartLineType || c.NORMAL, - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - rightYAxisStyle: options.rightYAxisStyle || c.NORMAL, - showXAxisTitle: options.showXAxisTitle || false, - showLeftYAxisTitle: options.showLeftYAxisTitle || false, - showRightYAxisTitle: options.showRightYAxisTitle || false, - leftYAxisReversed: options.leftYAxisReversed || false, - rightYAxisReversed: options.rightYAxisReversed || false, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - rightYAxisNumberLevel: options.rightYAxisNumberLevel || c.NORMAL, - xAxisUnit: options.xAxisUnit || "", - leftYAxisUnit: options.leftYAxisUnit || "", - rightYAxisUnit: options.rightYAxisUnit || "", - xAxisTitle: options.xAxisTitle || "", - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showDataTable: options.showDataTable || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - showZoom: options.showZoom || false, - textDirection: options.textDirection || 0, - cordon: options.cordon || [], - lineWidth: BI.isNull(options.lineWidth) ? 1 : options.lineWidth, - showLabel: BI.isNull(options.showLabel) ? true : options.showLabel, - enableTick: BI.isNull(options.enableTick) ? true : options.enableTick, - enableMinorTick: BI.isNull(options.enableMinorTick) ? true : options.enableMinorTick, - numSeparators: options.numSeparators || false, - rightNumSeparators: options.rightNumSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE, - nullContinue: options.nullContinue || false - }; - this.options.items = items; - this.yAxis = []; - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.AREA); - }); - types.push(type); - }); - BI.each(types, function (idx, type) { - if (BI.isEmptyArray(type)) { - return; - } - var newYAxis = { - type: "value", - title: { - style: self.constants.FONT_STYLE - }, - labelStyle: self.constants.FONT_STYLE, - position: idx > 0 ? "right" : "left", - lineWidth: 1, - axisIndex: idx, - gridLineWidth: 0 - }; - self.yAxis.push(newYAxis); - }); - this.combineChart.populate(this._formatItems(items), types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.AccumulateAreaChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.accumulate_area_chart", BI.AccumulateAreaChart);/** - * 图表控件 - * @class BI.AccumulateAxisChart - * @extends BI.Widget - */ -BI.AccumulateAxisChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.AccumulateAxisChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-accumulate-axis-chart" - }); - }, - - _init: function () { - BI.AccumulateAxisChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.xAxis = [{ - type: "category", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE - }]; - this.yAxis = []; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - xAxis: this.xAxis, - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.AccumulateAxisChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this, o = this.options; - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - formatCordon(); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.dataSheet.enabled = this.config.showDataTable; - config.xAxis[0].showLabel = !config.dataSheet.enabled; - config.zoom.zoomTool.enabled = this.config.showZoom; - if (this.config.showZoom === true) { - delete config.dataSheet; - delete config.zoom.zoomType; - } - - config.yAxis = this.yAxis; - BI.each(config.yAxis, function (idx, axis) { - switch (axis.axisIndex) { - case self.constants.LEFT_AXIS: - axis.title.text = getTitleText(self.config.leftYAxisNumberLevel, self.constants.LEFT_AXIS, self.config.showLeftYAxisTitle, self.config.leftYAxisTitle); - axis.title.rotation = self.constants.ROTATION; - BI.extend(axis, { - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - reversed: self.config.leftYAxisReversed, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: self.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(self.config.leftYAxisStyle, self.config.leftYAxisNumberLevel, self.config.numSeparators) - }); - self.formatNumberLevelInYaxis(config, items, self.config.leftYAxisNumberLevel, idx, axis.formatter); - break; - case self.constants.RIGHT_AXIS: - axis.title.text = getTitleText(self.config.rightYAxisNumberLevel, self.constants.RIGHT_AXIS, self.config.showRightYAxisTitle, self.config.rightYAxisTitle); - axis.title.rotation = self.constants.ROTATION; - BI.extend(axis, { - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - reversed: self.config.rightYAxisReversed, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: self.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(self.config.rightYAxisStyle, self.config.rightYAxisNumberLevel, self.config.rightNumSeparators) - }); - self.formatNumberLevelInYaxis(config, items, self.config.rightYAxisNumberLevel, idx, axis.formatter); - break; - } - }); - - config.xAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle : ""; - config.xAxis[0].title.align = "center"; - BI.extend(config.xAxis[0], { - lineWidth: self.config.lineWidth, - enableTick: self.config.enableTick, - labelRotation: this.config.textDirection, - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - maxHeight: "40%" - }); - - config.chartType = "column"; - - // 为了给数据标签加个%,还要遍历所有的系列,唉 - this.formatDataLabel(config.plotOptions.dataLabels.enabled, items, config, this.config.chartFont); - - // 全局样式的图表文字 - this.setFontStyle(this.config.chartFont, config); - - return [items, config]; - - function formatCordon () { - BI.each(self.config.cordon, function (idx, cor) { - if (idx === 0 && self.xAxis.length > 0) { - var magnify = self.calcMagnify(self.config.xAxisNumberLevel); - self.xAxis[0].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "top" - } - }); - }); - } - if (idx > 0 && self.yAxis.length >= idx) { - var magnify = 1; - switch (idx - 1) { - case self.constants.LEFT_AXIS: - magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS: - magnify = self.calcMagnify(self.config.rightYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS_SECOND: - magnify = self.calcMagnify(self.config.rightYAxisSecondNumberLevel); - break; - } - self.yAxis[idx - 1].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "left" - } - }); - }); - } - }); - } - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function getTitleText (numberLevelType, position, show, title) { - var unit = ""; - - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - if (position === self.constants.X_AXIS) { - self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit); - } - if (position === self.constants.LEFT_AXIS) { - self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit); - } - if (position === self.constants.RIGHT_AXIS) { - self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit); - } - - unit = unit === "" ? unit : "(" + unit + ")"; - - return show === true ? title + unit : unit; - } - }, - - _formatItems: function (items) { - return BI.map(items, function (idx, item) { - var i = BI.UUID(); - return BI.map(item, function (id, it) { - return BI.extend({}, it, {stack: i}); - }); - }); - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - leftYAxisTitle: options.leftYAxisTitle || "", - rightYAxisTitle: options.rightYAxisTitle || "", - chartColor: options.chartColor || [], - chartStyle: options.chartStyle || c.STYLE_NORMAL, - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - rightYAxisStyle: options.rightYAxisStyle || c.NORMAL, - showXAxisTitle: options.showXAxisTitle || false, - showLeftYAxisTitle: options.showLeftYAxisTitle || false, - showRightYAxisTitle: options.showRightYAxisTitle || false, - leftYAxisReversed: options.leftYAxisReversed || false, - rightYAxisReversed: options.rightYAxisReversed || false, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - rightYAxisNumberLevel: options.rightYAxisNumberLevel || c.NORMAL, - xAxisUnit: options.xAxisUnit || "", - leftYAxisUnit: options.leftYAxisUnit || "", - rightYAxisUnit: options.rightYAxisUnit || "", - xAxisTitle: options.xAxisTitle || "", - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showDataTable: options.showDataTable || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - showZoom: options.showZoom || false, - textDirection: options.textDirection || 0, - cordon: options.cordon || [], - lineWidth: BI.isNull(options.lineWidth) ? 1 : options.lineWidth, - showLabel: BI.isNull(options.showLabel) ? true : options.showLabel, - enableTick: BI.isNull(options.enableTick) ? true : options.enableTick, - enableMinorTick: BI.isNull(options.enableMinorTick) ? true : options.enableMinorTick, - numSeparators: options.numSeparators || false, - rightNumSeparators: options.rightNumSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE - }; - this.options.items = items; - this.yAxis = []; - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.AXIS); - }); - types.push(type); - }); - BI.each(types, function (idx, type) { - if (BI.isEmptyArray(type)) { - return; - } - var newYAxis = { - type: "value", - title: { - style: self.constants.FONT_STYLE - }, - labelStyle: self.constants.FONT_STYLE, - position: idx > 0 ? "right" : "left", - lineWidth: 1, - axisIndex: idx, - gridLineWidth: 0 - }; - self.yAxis.push(newYAxis); - }); - this.combineChart.populate(this._formatItems(items), types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.AccumulateAxisChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.accumulate_axis_chart", BI.AccumulateAxisChart);/** - * 图表控件 - * @class BI.AccumulateBarChart - * @extends BI.Widget - */ -BI.AccumulateBarChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.AccumulateBarChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-accumulate-bar-chart" - }); - }, - - _init: function () { - BI.AccumulateBarChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.xAxis = [{ - type: "value", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - formatter: function () { - return this > 0 ? this : (-1) * this; - }, - gridLineWidth: 0 - }]; - this.yAxis = [{ - type: "category", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - gridLineWidth: 0, - position: "left" - }]; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - xAxis: this.xAxis, - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.AccumulateBarChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this; - var unit = getXYAxisUnit(this.config.xAxisNumberLevel, this.constants.LEFT_AXIS); - var xTitle = getXYAxisUnit(this.config.leftYAxisNumberLevel, this.constants.X_AXIS); - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - formatCordon(); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - - config.yAxis = this.yAxis; - config.yAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle + unit : unit; - config.yAxis[0].title.rotation = this.constants.ROTATION; - BI.extend(config.yAxis[0], { - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - labelRotation: this.config.textDirection, - lineWidth: this.config.lineWidth, - enableTick: this.config.enableTick, - maxWidth: "40%" - }); - - self.formatNumberLevelInXaxis(items, this.config.leftYAxisNumberLevel); - config.xAxis[0].title.text = this.config.showLeftYAxisTitle === true ? this.config.leftYAxisTitle + xTitle : xTitle; - config.xAxis[0].title.align = "center"; - BI.extend(config.xAxis[0], { - formatter: self.formatTickInXYaxis(this.config.leftYAxisStyle, self.config.leftYAxisNumberLevel, self.config.numSeparators), - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - showLabel: this.config.showLabel, - enableTick: this.config.enableTick, - lineWidth: this.config.lineWidth, - enableMinorTick: this.config.enableMinorTick - }); - config.chartType = "bar"; - // 为了给数据标签加个%,还要遍历所有的系列,唉 - this.formatDataLabelForAxis(config.plotOptions.dataLabels.enabled, items, config.xAxis[0].formatter, this.config.chartFont); - - config.plotOptions.tooltip.formatter.valueFormat = config.xAxis[0].formatter; - - // 全局样式的图表文字 - this.setFontStyle(this.config.chartFont, config); - - return [items, config]; - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function formatCordon () { - BI.each(self.config.cordon, function (idx, cor) { - if (idx === 0 && self.xAxis.length > 0) { - var magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - self.xAxis[0].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "top" - } - }); - }); - } - if (idx > 0 && self.yAxis.length >= idx) { - var magnify = 1; - switch (idx - 1) { - case self.constants.LEFT_AXIS: - magnify = self.calcMagnify(self.config.xAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS: - magnify = self.calcMagnify(self.config.rightYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS_SECOND: - magnify = self.calcMagnify(self.config.rightYAxisSecondNumberLevel); - break; - } - self.yAxis[idx - 1].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "left" - } - }); - }); - } - }); - } - - function getXYAxisUnit (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - if (position === self.constants.X_AXIS) { - self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit); - } - if (position === self.constants.LEFT_AXIS) { - self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit); - } - if (position === self.constants.RIGHT_AXIS) { - self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit); - } - return unit === "" ? unit : "(" + unit + ")"; - } - }, - - _formatItems: function (items) { - BI.each(items, function (idx, item) { - var stackId = BI.UUID(); - BI.each(item, function (id, it) { - it.stack = stackId; - BI.each(it.data, function (i, t) { - var tmp = t.x; - t.x = t.y; - t.y = tmp; - }); - }); - }); - return items; - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - leftYAxisTitle: options.leftYAxisTitle || "", - chartColor: options.chartColor || [], - chartStyle: options.chartStyle || c.STYLE_NORMAL, - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - xAxisStyle: options.xAxisStyle || c.NORMAL, - showXAxisTitle: options.showXAxisTitle || false, - showLeftYAxisTitle: options.showLeftYAxisTitle || false, - leftYAxisReversed: options.leftYAxisReversed || false, - xAxisNumberLevel: options.xAxisNumberLevel || c.NORMAL, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - xAxisUnit: options.xAxisUnit || "", - leftYAxisUnit: options.leftYAxisUnit || "", - xAxisTitle: options.xAxisTitle || "", - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showDataTable: options.showDataTable || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - showZoom: options.showZoom || false, - textDirection: options.textDirection || 0, - cordon: options.cordon || [], - minimalist_model: options.minimalist_model || false, - lineWidth: BI.isNull(options.lineWidth) ? 1 : options.lineWidth, - showLabel: BI.isNull(options.showLabel) ? true : options.showLabel, - enableTick: BI.isNull(options.enableTick) ? true : options.enableTick, - enableMinorTick: BI.isNull(options.enableMinorTick) ? true : options.enableMinorTick, - numSeparators: options.numSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE - }; - this.options.items = items; - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.BAR); - }); - types.push(type); - }); - this.combineChart.populate(this._formatItems(items), types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.AccumulateBarChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.accumulate_bar_chart", BI.AccumulateBarChart);/** - * 图表控件 - * @class BI.AccumulateRadarChart - * @extends BI.Widget - */ -BI.AccumulateRadarChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.AccumulateRadarChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-accumulate-radar-chart" - }); - }, - - _init: function () { - BI.AccumulateRadarChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.radiusAxis = [{ - type: "value", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - formatter: function () { - return this > 0 ? this : (-1) * this; - }, - gridLineWidth: 0, - position: "bottom" - }]; - - this.angleAxis = [{ - type: "category", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE - }]; - - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.AccumulateRadarChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatItems: function (items) { - return BI.map(items, function (idx, item) { - var i = BI.UUID(); - return BI.map(item, function (id, it) { - return BI.extend({}, it, {stack: i}); - }); - }); - }, - - _formatConfig: function (config, items) { - var self = this; - - delete config.zoom; - - var title = getXYAxisUnit(this.config.leftYAxisNumberLevel, this.constants.LEFT_AXIS); - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - formatChartRadarStyle(); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.plotOptions.connectNulls = this.config.nullContinue; - - config.radiusAxis = this.radiusAxis; - config.angleAxis = this.angleAxis; - config.radiusAxis[0].formatter = self.formatTickInXYaxis(this.config.leftYAxisStyle, this.config.leftYAxisNumberLevel, this.config.numSeparators); - formatNumberLevelInYaxis(this.config.leftYAxisNumberLevel, this.constants.LEFT_AXIS, config.radiusAxis[0].formatter); - config.radiusAxis[0].title.text = this.config.showLeftYAxisTitle === true ? this.config.leftYAxisTitle + title : title; - config.radiusAxis[0].gridLineWidth = this.config.showGridLine === true ? 1 : 0; - config.chartType = "radar"; - config.plotOptions.columnType = true; - delete config.xAxis; - delete config.yAxis; - // 为了给数据标签加个%,还要遍历所有的系列,唉 - this.formatDataLabelForAxis(config.plotOptions.dataLabels.enabled, items, config.radiusAxis[0].formatter, this.config.chartFont); - - // 全局样式的图表文字 - config.radiusAxis[0].labelStyle = config.radiusAxis[0].title.style = this.config.chartFont; - config.angleAxis[0].labelStyle = config.angleAxis[0].title.style = this.config.chartFont; - config.legend.style = this.config.chartFont; - - return [items, config]; - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function formatChartRadarStyle () { - switch (self.config.chartRadarType) { - case BICst.CHART_SHAPE.POLYGON: - config.plotOptions.shape = "polygon"; - break; - case BICst.CHART_SHAPE.CIRCLE: - config.plotOptions.shape = "circle"; - break; - } - } - - function formatNumberLevelInYaxis (type, position, formatter) { - var magnify = self.calcMagnify(type); - BI.each(items, function (idx, item) { - BI.each(item.data, function (id, da) { - if (position === item.yAxis) { - da.y = self.formatXYDataWithMagnify(da.y, magnify); - } - }); - }); - config.plotOptions.tooltip.formatter.valueFormat = formatter; - } - - function getXYAxisUnit (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - if (position === self.constants.X_AXIS) { - self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit); - } - if (position === self.constants.LEFT_AXIS) { - self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit); - } - if (position === self.constants.RIGHT_AXIS) { - self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit); - } - return unit === "" ? unit : "(" + unit + ")"; - } - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - chartRadarType: options.chartRadarType || c.NORMAL, - chartColor: options.chartColor || [], - chartStyle: options.chartStyle || c.STYLE_NORMAL, - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - cordon: options.cordon || [], - numSeparators: options.numSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE, - nullContinue: options.nullContinue || false - }; - this.options.items = items; - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.RADAR); - }); - types.push(type); - }); - this.combineChart.populate(this._formatItems(items), types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.AccumulateRadarChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.accumulate_radar_chart", BI.AccumulateRadarChart);/** - * 图表控件 - * @class BI.AreaChart - * @extends BI.Widget - */ -BI.AreaChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.AreaChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-area-chart" - }); - }, - - _init: function () { - BI.AreaChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.xAxis = [{ - type: "category", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - position: "bottom", - gridLineWidth: 0 - }]; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - xAxis: this.xAxis, - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.AreaChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this; - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - formatChartLineStyle(); - formatCordon(); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.plotOptions.connectNulls = this.config.nullContinue; - config.dataSheet.enabled = this.config.showDataTable; - config.xAxis[0].showLabel = !config.dataSheet.enabled; - config.zoom.zoomTool.enabled = this.config.showZoom; - if (this.config.showZoom === true) { - delete config.dataSheet; - delete config.zoom.zoomType; - } - - config.yAxis = this.yAxis; - BI.each(config.yAxis, function (idx, axis) { - var title = ""; - switch (axis.axisIndex) { - case self.constants.LEFT_AXIS: - title = getXYAxisUnit(self.config.leftYAxisNumberLevel, self.constants.LEFT_AXIS); - axis.title.text = self.config.showLeftYAxisTitle === true ? self.config.leftYAxisTitle + title : title; - axis.title.rotation = self.constants.ROTATION; - BI.extend(axis, { - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - reversed: self.config.leftYAxisReversed, - enableMinorTick: self.config.enableMinorTick, - formatter: self.formatTickInXYaxis(self.config.leftYAxisStyle, self.config.leftYAxisNumberLevel, self.config.numSeparators), - gridLineWidth: self.config.showGridLine === true ? 1 : 0 - }); - self.formatNumberLevelInYaxis(config, items, self.config.leftYAxisNumberLevel, idx, axis.formatter); - break; - case self.constants.RIGHT_AXIS: - title = getXYAxisUnit(self.config.rightYAxisNumberLevel, self.constants.RIGHT_AXIS); - axis.title.text = self.config.showRightYAxisTitle === true ? self.config.rightYAxisTitle + title : title; - axis.title.rotation = self.constants.ROTATION; - BI.extend(axis, { - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - reversed: self.config.rightYAxisReversed, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: self.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(self.config.rightYAxisStyle, self.config.rightYAxisNumberLevel, self.config.rightNumSeparators) - }); - self.formatNumberLevelInYaxis(config, items, self.config.rightYAxisNumberLevel, idx, axis.formatter); - break; - } - }); - - config.xAxis[0].title.align = "center"; - config.xAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle : ""; - BI.extend(config.xAxis[0], { - lineWidth: this.config.lineWidth, - enableTick: this.config.enableTick, - labelRotation: this.config.textDirection, - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - maxHeight: "40%" - }); - - config.chartType = "area"; - - // 为了给数据标签加个%,还要遍历所有的系列,唉 - this.formatDataLabel(config.plotOptions.dataLabels.enabled, items, config, this.config.chartFont); - - // 全局样式的图表文字 - this.setFontStyle(this.config.chartFont, config); - - return [items, config]; - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function formatCordon () { - BI.each(self.config.cordon, function (idx, cor) { - if (idx === 0 && self.xAxis.length > 0) { - var magnify = self.calcMagnify(self.config.xAxisNumberLevel); - self.xAxis[0].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "top" - } - }); - }); - } - if (idx > 0 && self.yAxis.length >= idx) { - var magnify = 1; - switch (idx - 1) { - case self.constants.LEFT_AXIS: - magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS: - magnify = self.calcMagnify(self.config.rightYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS_SECOND: - magnify = self.calcMagnify(self.config.rightYAxisSecondNumberLevel); - break; - } - self.yAxis[idx - 1].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "left" - } - }); - }); - } - }); - } - - function formatChartLineStyle () { - switch (self.config.chartLineType) { - case BICst.CHART_SHAPE.RIGHT_ANGLE: - config.plotOptions.curve = false; - config.plotOptions.step = true; - break; - case BICst.CHART_SHAPE.CURVE: - config.plotOptions.curve = true; - config.plotOptions.step = false; - break; - case BICst.CHART_SHAPE.NORMAL: - default: - config.plotOptions.curve = false; - config.plotOptions.step = false; - break; - } - } - - function getXYAxisUnit (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - if (position === self.constants.X_AXIS) { - self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit); - } - if (position === self.constants.LEFT_AXIS) { - self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit); - } - if (position === self.constants.RIGHT_AXIS) { - self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit); - } - return unit === "" ? unit : "(" + unit + ")"; - } - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - leftYAxisTitle: options.leftYAxisTitle || "", - rightYAxisTitle: options.rightYAxisTitle || "", - rightYAxisSecondTitle: options.rightYAxisSecondTitle || "", - chartLineType: options.chartLineType || c.NORMAL, - chartColor: options.chartColor || [], - chartStyle: options.chartStyle || c.NORMAL, - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - rightYAxisStyle: options.rightYAxisStyle || c.NORMAL, - rightYAxisSecondStyle: options.rightYAxisSecondStyle || c.NORMAL, - showXAxisTitle: options.showXAxisTitle || false, - showLeftYAxisTitle: options.showLeftYAxisTitle || false, - showRightYAxisTitle: options.showRightYAxisTitle || false, - showRightYAxisSecondTitle: options.showRightYAxisSecondTitle || false, - leftYAxisReversed: options.leftYAxisReversed || false, - rightYAxisReversed: options.rightYAxisReversed || false, - rightYAxisSecondReversed: options.rightYAxisSecondReversed || false, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - rightYAxisNumberLevel: options.rightYAxisNumberLevel || c.NORMAL, - rightYAxisSecondNumberLevel: options.rightYAxisSecondNumberLevel || c.NORMAL, - xAxisUnit: options.xAxisUnit || "", - leftYAxisUnit: options.leftYAxisUnit || "", - rightYAxisUnit: options.rightYAxisUnit || "", - rightYAxisSecondUnit: options.rightYAxisSecondUnit || "", - xAxisTitle: options.xAxisTitle || "", - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showDataTable: options.showDataTable || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - showZoom: options.showZoom || false, - textDirection: options.textDirection || 0, - cordon: options.cordon || [], - lineWidth: BI.isNull(options.lineWidth) ? 1 : options.lineWidth, - showLabel: BI.isNull(options.showLabel) ? true : options.showLabel, - enableTick: BI.isNull(options.enableTick) ? true : options.enableTick, - enableMinorTick: BI.isNull(options.enableMinorTick) ? true : options.enableMinorTick, - numSeparators: options.numSeparators || false, - rightNumSeparators: options.rightNumSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE, - nullContinue: options.nullContinue || false - }; - this.options.items = items; - - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.AREA); - }); - types.push(type); - }); - - this.yAxis = []; - BI.each(types, function (idx, type) { - if (BI.isEmptyArray(type)) { - return; - } - var newYAxis = { - type: "value", - title: { - style: self.constants.FONT_STYLE - }, - labelStyle: self.constants.FONT_STYLE, - position: idx > 0 ? "right" : "left", - lineWidth: 1, - axisIndex: idx, - gridLineWidth: 0 - }; - self.yAxis.push(newYAxis); - }); - - this.combineChart.populate(items, types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.AreaChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.area_chart", BI.AreaChart);/** - * 图表控件 柱状 - * @class BI.AxisChart - * @extends BI.Widget - * leftYxis 左值轴属性 - * rightYxis 右值轴属性 - * xAxis 分类轴属性 - */ -BI.AxisChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.AxisChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-axis-chart" - }); - }, - - _init: function () { - BI.AxisChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.xAxis = [{ - type: "category", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - position: "bottom", - gridLineWidth: 0 - }]; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - xAxis: this.xAxis, - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.AxisChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this, o = this.options; - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - formatCordon(); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.plotOptions.connectNulls = this.config.nullContinue; - config.dataSheet.enabled = this.config.showDataTable; - config.xAxis[0].showLabel = !config.dataSheet.enabled; - config.zoom.zoomTool.enabled = this.config.showZoom; - if (this.config.showZoom === true) { - delete config.dataSheet; - delete config.zoom.zoomType; - } - - config.yAxis = this.yAxis; - BI.each(config.yAxis, function (idx, axis) { - var title; - switch (axis.axisIndex) { - case self.constants.LEFT_AXIS: - title = getXYAxisUnit(self.config.leftYAxisNumberLevel, self.constants.LEFT_AXIS); - axis.title.text = self.config.showLeftYAxisTitle === true ? self.config.leftYAxisTitle + title : title; - axis.title.rotation = self.constants.ROTATION; - BI.extend(axis, { - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - reversed: self.config.leftYAxisReversed, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: self.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(self.config.leftYAxisStyle, self.config.leftYAxisNumberLevel, self.config.numSeparators) - }); - self.formatNumberLevelInYaxis(config, items, self.config.leftYAxisNumberLevel, idx, axis.formatter); - break; - case self.constants.RIGHT_AXIS: - title = getXYAxisUnit(self.config.rightYAxisNumberLevel, self.constants.RIGHT_AXIS); - axis.title.text = self.config.showRightYAxisTitle === true ? self.config.rightYAxisTitle + title : title; - axis.title.rotation = self.constants.ROTATION; - BI.extend(axis, { - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - reversed: self.config.rightYAxisReversed, - enableMinorTIck: self.config.enableMinorTick, - formatter: self.formatTickInXYaxis(self.config.rightYAxisStyle, self.config.rightYAxisNumberLevel, self.config.rightNumSeparators), - gridLineWidth: self.config.showGridLine === true ? 1 : 0 - }); - self.formatNumberLevelInYaxis(config, items, self.config.rightYAxisNumberLevel, idx, axis.formatter); - break; - } - }); - - config.xAxis[0].title.align = "center"; - config.xAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle : ""; - BI.extend(config.xAxis[0], { - lineWidth: this.config.lineWidth, - enableTick: this.config.enableTick, - labelRotation: this.config.textDirection, - enableMinorTick: this.config.enableMinorTick, - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - maxHeight: "40%" - }); - - var lineItem = []; - var otherItem = []; - BI.each(items, function (idx, item) { - if (item.type === "line") { - lineItem.push(item); - } else { - otherItem.push(item); - } - }); - - // 为了给数据标签加个%,还要遍历所有的系列,唉 - this.formatDataLabel(config.plotOptions.dataLabels.enabled, items, config, this.config.chartFont); - - // 全局样式的图表文字 - this.setFontStyle(this.config.chartFont, config); - - return [BI.concat(otherItem, lineItem), config]; - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function formatCordon () { - BI.each(self.config.cordon, function (idx, cor) { - if (idx === 0 && self.xAxis.length > 0) { - var magnify = self.calcMagnify(self.config.xAxisNumberLevel); - self.xAxis[0].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "top" - } - }); - }); - } - if (idx > 0 && self.yAxis.length >= idx) { - var magnify = 1; - switch (idx - 1) { - case self.constants.LEFT_AXIS: - magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS: - magnify = self.calcMagnify(self.config.rightYAxisNumberLevel); - break; - } - self.yAxis[idx - 1].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "left" - } - }); - }); - } - }); - } - - function getXYAxisUnit (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - if (position === self.constants.X_AXIS) { - self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit); - } - if (position === self.constants.LEFT_AXIS) { - self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit); - } - if (position === self.constants.RIGHT_AXIS) { - self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit); - } - return unit === "" ? unit : "(" + unit + ")"; - } - }, - - populate: function (items, options, types) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - leftYAxisTitle: options.leftYAxisTitle || "", - rightYAxisTitle: options.rightYAxisTitle || "", - chartColor: options.chartColor || [], - chartStyle: options.chartStyle || c.NORMAL, - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - rightYAxisStyle: options.rightYAxisStyle || c.NORMAL, - showXAxisTitle: options.showXAxisTitle || false, - showLeftYAxisTitle: options.showLeftYAxisTitle || false, - showRightYAxisTitle: options.showRightYAxisTitle || false, - leftYAxisReversed: options.leftYAxisReversed || false, - rightYAxisReversed: options.rightYAxisReversed || false, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - rightYAxisNumberLevel: options.rightYAxisNumberLevel || c.NORMAL, - xAxisUnit: options.xAxisUnit || "", - leftYAxisUnit: options.leftYAxisUnit || "", - rightYAxisUnit: options.rightYAxisUnit || "", - xAxisTitle: options.xAxisTitle || "", - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showDataTable: options.showDataTable || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - showZoom: options.showZoom || false, - textDirection: options.textDirection || 0, - cordon: options.cordon || [], - lineWidth: BI.isNull(options.lineWidth) ? 1 : options.lineWidth, - showLabel: BI.isNull(options.showLabel) ? true : options.showLabel, - enableTick: BI.isNull(options.enableTick) ? true : options.enableTick, - enableMinorTick: BI.isNull(options.enableMinorTick) ? true : options.enableMinorTick, - numSeparators: options.numSeparators || false, - rightNumSeparators: options.rightNumSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE, - nullContinue: true - }; - this.options.items = items; - - this.yAxis = []; - BI.each(types, function (idx, type) { - if (BI.isEmptyArray(type)) { - return; - } - var newYAxis = { - type: "value", - title: { - style: self.constants.FONT_STYLE - }, - labelStyle: self.constants.FONT_STYLE, - position: idx > 0 ? "right" : "left", - lineWidth: 1, - axisIndex: idx, - gridLineWidth: 0 - }; - self.yAxis.push(newYAxis); - }); - - this.combineChart.populate(items, types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.AxisChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.axis_chart", BI.AxisChart);/** - * 图表控件 - * @class BI.BarChart - * @extends BI.Widget - */ -BI.BarChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.BarChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-bar-chart" - }); - }, - - _init: function () { - BI.BarChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.xAxis = [{ - type: "value", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - formatter: function () { - return this > 0 ? this : (-1) * this; - }, - gridLineWidth: 0 - }]; - this.yAxis = [{ - type: "category", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - gridLineWidth: 0, - position: "left" - }]; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - xAxis: this.xAxis, - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - var tmp = obj.x; - obj.x = obj.y; - obj.y = tmp; - self.fireEvent(BI.BarChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this; - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - formatCordon(); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - - // 分类轴 - config.yAxis = this.yAxis; - config.yAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle : ""; - config.yAxis[0].title.rotation = this.constants.ROTATION; - BI.extend(config.yAxis[0], { - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - labelRotation: this.config.textDirection, - enableTick: this.config.enableTick, - lineWidth: this.config.lineWidth, - maxWidth: "40%" - }); - - // 值轴 - self.formatNumberLevelInXaxis(items, this.config.leftYAxisNumberLevel); - config.xAxis[0].title.text = getXAxisTitle(this.config.leftYAxisNumberLevel, this.constants.X_AXIS); - config.xAxis[0].title.align = "center"; - BI.extend(config.xAxis[0], { - formatter: self.formatTickInXYaxis(this.config.leftYAxisStyle, this.config.leftYAxisNumberLevel, this.config.numSeparators), - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - enableTick: this.config.enableTick, - showLabel: this.config.showLabel, - lineWidth: this.config.lineWidth, - enableMinorTick: this.config.enableMinorTick - }); - config.chartType = "bar"; - - this.formatDataLabelForAxis(config.plotOptions.dataLabels.enabled, items, config.xAxis[0].formatter, this.config.chartFont); - - config.plotOptions.tooltip.formatter.valueFormat = config.xAxis[0].formatter; - - // 全局样式的图表文字 - this.setFontStyle(this.config.chartFont, config); - - return [items, config]; - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function formatCordon () { - BI.each(self.config.cordon, function (idx, cor) { - if (idx === 0 && self.xAxis.length > 0) { - var magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - self.xAxis[0].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "top" - } - }); - }); - } - if (idx > 0 && self.yAxis.length >= idx) { - var magnify = 1; - switch (idx - 1) { - case self.constants.LEFT_AXIS: - magnify = self.calcMagnify(self.config.xAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS: - magnify = self.calcMagnify(self.config.rightYAxisNumberLevel); - break; - } - self.yAxis[idx - 1].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "left" - } - }); - }); - } - }); - } - - function getXAxisTitle (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - if (position === self.constants.X_AXIS) { - self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit); - } - if (position === self.constants.LEFT_AXIS) { - self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit); - } - unit = unit === "" ? unit : "(" + unit + ")"; - - return self.config.showLeftYAxisTitle === true ? self.config.leftYAxisTitle + unit : unit; - } - }, - - _formatItems: function (items) { - BI.each(items, function (idx, item) { - BI.each(item, function (id, it) { - BI.each(it.data, function (i, t) { - var tmp = t.x; - t.x = t.y; - t.y = tmp; - }); - }); - }); - return items; - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - leftYAxisTitle: options.leftYAxisTitle || "", - chartColor: options.chartColor || [], - chartStyle: options.chartStyle || c.STYLE_NORMAL, - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - xAxisStyle: options.xAxisStyle || c.NORMAL, - showXAxisTitle: options.showXAxisTitle || false, - showLeftYAxisTitle: options.showLeftYAxisTitle || false, - leftYAxisReversed: options.leftYAxisReversed || false, - xAxisNumberLevel: options.xAxisNumberLevel || c.NORMAL, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - xAxisUnit: options.xAxisUnit || "", - leftYAxisUnit: options.leftYAxisUnit || "", - xAxisTitle: options.xAxisTitle || "", - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - showZoom: options.showZoom || false, - textDirection: options.textDirection || 0, - cordon: options.cordon || [], - lineWidth: BI.isNull(options.lineWidth) ? 1 : options.lineWidth, - showLabel: BI.isNull(options.showLabel) ? true : options.showLabel, - enableTick: BI.isNull(options.enableTick) ? true : options.enableTick, - enableMinorTick: BI.isNull(options.enableMinorTick) ? true : options.enableMinorTick, - numSeparators: options.numSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE - }; - this.options.items = items; - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.BAR); - }); - types.push(type); - }); - this.combineChart.populate(this._formatItems(items), types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.BarChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.bar_chart", BI.BarChart);/** - * 图表控件 - * @class BI.BubbleChart - * @extends BI.Widget - */ -BI.BubbleChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.BubbleChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-bubble-chart" - }); - }, - - _init: function () { - BI.BubbleChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.xAxis = [{ - type: "value", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - position: "bottom", - gridLineWidth: 0 - }]; - this.yAxis = [{ - type: "value", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - position: "left", - gridLineWidth: 0 - }]; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - xAxis: this.xAxis, - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.BubbleChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this, o = this.options; - delete config.zoom; - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - formatCordon(); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.plotOptions.dataLabels.formatter.identifier = "${X}${Y}${SIZE}"; - config.plotOptions.shadow = this.config.bubbleStyle !== this.constants.NO_PROJECT; - config.yAxis = this.yAxis; - - config.yAxis[0].formatter = self.formatTickInXYaxis(this.config.leftYAxisStyle, this.config.leftYAxisNumberLevel, this.config.numSeparators); - formatNumberLevelInYaxis(this.config.leftYAxisNumberLevel, this.constants.LEFT_AXIS); - config.yAxis[0].title.text = getXYAxisUnit(this.config.leftYAxisNumberLevel, this.constants.LEFT_AXIS); - config.yAxis[0].title.text = this.config.showLeftYAxisTitle === true ? this.config.leftYAxisTitle + config.yAxis[0].title.text : config.yAxis[0].title.text; - config.yAxis[0].gridLineWidth = this.config.showGridLine === true ? 1 : 0; - config.yAxis[0].lineWidth = 1; - config.yAxis[0].title.rotation = this.constants.ROTATION; - config.yAxis[0].maxWidth = "40%"; - - config.xAxis[0].formatter = self.formatTickInXYaxis(this.config.xAxisStyle, this.config.xAxisNumberLevel, this.config.rightNumSeparators); - self.formatNumberLevelInXaxis(items, this.config.xAxisNumberLevel); - config.xAxis[0].title.text = getXYAxisUnit(this.config.xAxisNumberLevel, this.constants.X_AXIS); - config.xAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle + config.xAxis[0].title.text : config.xAxis[0].title.text; - config.xAxis[0].title.align = "center"; - config.xAxis[0].gridLineWidth = this.config.showGridLine === true ? 1 : 0; - config.xAxis[0].maxHeith = "40%"; - config.chartType = "bubble"; - - if (BI.isNotEmptyArray(this.config.tooltip)) { - config.plotOptions.bubble.tooltip = { - useHtml: true, - style: { - color: "RGB(184, 184, 184)" - }, - formatter: function () { - var y = self.formatTickInXYaxis(self.config.leftYAxisStyle, self.config.leftYAxisNumberLevel, self.config.numSeparators)(this.y); - var x = self.formatTickInXYaxis(self.config.xAxisStyle, self.config.xAxisNumberLevel, self.config.rightNumSeparators)(this.x); - return this.seriesName + "
(X)" + self.config.tooltip[0] + ":" + x + "
(Y)" + self.config.tooltip[1] - + ":" + y + "
(" + BI.i18nText("BI-Size") + ")" + self.config.tooltip[2] + ":" + this.size + "
"; - } - }; - } - - // 为了给数据标签加个%,还要遍历所有的系列,唉 - if (config.plotOptions.dataLabels.enabled === true) { - BI.each(items, function (idx, item) { - item.dataLabels = { - style: self.config.chartFont, - align: "outside", - autoAdjust: true, - enabled: true, - formatter: { - identifier: "${X}${Y}${SIZE}", - XFormat: function () { - return BI.contentFormat(arguments[0], "#.##;-#.##"); - }, - YFormat: function () { - return BI.contentFormat(arguments[0], "#.##;-#.##"); - }, - sizeFormat: function () { - return BI.contentFormat(arguments[0], "#.##;-#.##"); - } - } - }; - item.dataLabels.formatter.XFormat = config.xAxis[0].formatter; - item.dataLabels.formatter.YFormat = config.yAxis[0].formatter; - }); - } - - // 全局样式图表文字 - config.yAxis[0].title.style = config.yAxis[0].labelStyle = this.config.chartFont; - config.xAxis[0].title.style = config.xAxis[0].labelStyle = this.config.chartFont; - config.legend.style = this.config.chartFont; - - return [items, config]; - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function formatCordon () { - BI.each(self.config.cordon, function (idx, cor) { - if (idx === 0 && self.xAxis.length > 0) { - var magnify = self.calcMagnify(self.config.xAxisNumberLevel); - self.xAxis[0].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "top" - } - }); - }); - } - if (idx > 0 && self.yAxis.length >= idx) { - var magnify = 1; - switch (idx - 1) { - case self.constants.LEFT_AXIS: - magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS: - magnify = self.calcMagnify(self.config.rightYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS_SECOND: - magnify = self.calcMagnify(self.config.rightYAxisSecondNumberLevel); - break; - } - self.yAxis[idx - 1].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "left" - } - }); - }); - } - }); - } - - function formatNumberLevelInYaxis (type, position) { - var magnify = self.calcMagnify(type); - BI.each(items, function (idx, item) { - BI.each(item.data, function (id, da) { - if (position === item.yAxis) { - da.y = self.formatXYDataWithMagnify(da.y, magnify); - } - }); - }); - if (type === BICst.TARGET_STYLE.NUM_LEVEL.PERCENT) { - // config.plotOptions.tooltip.formatter.valueFormat = "function(){return window.FR ? FR.contentFormat(arguments[0], '#0%') : arguments[0]}"; - } - } - - function getXYAxisUnit (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - if (position === self.constants.X_AXIS) { - self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit); - } - if (position === self.constants.LEFT_AXIS) { - self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit); - } - if (position === self.constants.RIGHT_AXIS) { - self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit); - } - return unit === "" ? unit : "(" + unit + ")"; - } - }, - - _formatItems: function (items) { - BI.each(items, function (idx, item) { - BI.each(item, function (id, it) { - BI.each(it.data, function (i, da) { - var data = da.size; - da.size = BI.contentFormat(data, "#.##;-#.##"); - }); - }); - }); - return items; - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - leftYAxisTitle: options.leftYAxisTitle || "", - chartColor: options.chartColor || [], - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - xAxisStyle: options.xAxisStyle || c.NORMAL, - showXAxisTitle: options.showXAxisTitle || false, - showLeftYAxisTitle: options.showLeftYAxisTitle || false, - xAxisNumberLevel: options.xAxisNumberLevel || c.NORMAL, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - xAxisUnit: options.xAxisUnit || "", - leftYAxisUnit: options.leftYAxisUnit || "", - xAxisTitle: options.xAxisTitle || "", - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - cordon: options.cordon || [], - tooltip: options.tooltip || [], - bubbleStyle: options.bubbleStyle || c.NO_PROJECT, - numSeparators: options.numSeparators || false, - rightNumSeparators: options.rightNumSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE - }; - this.options.items = items; - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.BUBBLE); - }); - types.push(type); - }); - this.combineChart.populate(this._formatItems(items), types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.BubbleChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.bubble_chart", BI.BubbleChart); -/** - * 图表控件 - * @class BI.CompareAreaChart - * @extends BI.Widget - */ -BI.CompareAreaChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.CompareAreaChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-compare-area-chart" - }); - }, - - _init: function () { - BI.CompareAreaChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.xAxis = [{ - type: "category", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - position: "bottom", - gridLineWidth: 0 - }]; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - xAxis: this.xAxis, - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.CompareAreaChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this; - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - formatChartLineStyle(); - formatCordon(); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.plotOptions.connectNulls = this.config.nullContinue; - config.dataSheet.enabled = this.config.showDataTable; - config.xAxis[0].showLabel = !config.dataSheet.enabled; - config.zoom.zoomTool.enabled = this.config.showZoom; - if (this.config.showZoom === true) { - delete config.dataSheet; - delete config.zoom.zoomType; - } - - config.yAxis = this.yAxis; - BI.each(config.yAxis, function (idx, axis) { - var title = ""; - switch (axis.axisIndex) { - case self.constants.LEFT_AXIS: - title = getXYAxisUnit(self.config.leftYAxisNumberLevel, self.constants.LEFT_AXIS); - axis.title.rotation = self.constants.ROTATION; - axis.title.text = self.config.showLeftYAxisTitle === true ? self.config.leftYAxisTitle + title : title; - BI.extend(axis, { - reversed: false, - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: self.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(self.config.leftYAxisStyle, self.config.leftYAxisNumberLevel, self.config.numSeparators) - }); - formatNumberLevelInYaxis(self.config.leftYAxisNumberLevel, idx, axis.formatter); - break; - case self.constants.RIGHT_AXIS: - title = getXYAxisUnit(self.config.rightYAxisNumberLevel, self.constants.RIGHT_AXIS); - axis.title.rotation = self.constants.ROTATION; - axis.title.text = self.config.showRightYAxisTitle === true ? self.config.rightYAxisTitle + title : title; - BI.extend(axis, { - reversed: true, - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: self.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(self.config.rightYAxisStyle, self.config.rightYAxisNumberLevel, self.config.rightNumSeparators) - }); - formatNumberLevelInYaxis(self.config.rightYAxisNumberLevel, idx, axis.formatter); - break; - } - var res = _calculateValueNiceDomain(0, self.maxes[idx]); - axis.max = res[1].mul(2); - axis.min = res[0].mul(2); - axis.tickInterval = BI.parseFloat((BI.parseFloat(axis.max).sub(BI.parseFloat(axis.min)))).div(5); - }); - - config.xAxis[0].title.align = "center"; - config.xAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle : ""; - BI.extend(config.xAxis[0], { - lineWidth: this.config.lineWidth, - enableTick: this.config.enableTick, - labelRotation: this.config.textDirection, - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - maxHeight: "40%" - }); - - config.chartType = "area"; - - // 为了给数据标签加个%,还要遍历所有的系列,唉 - this.formatDataLabel(config.plotOptions.dataLabels.enabled, items, config, this.config.chartFont); - - // 全局样式的图表文字 - this.setFontStyle(this.config.chartFont, config); - - return [items, config]; - - function _calculateValueNiceDomain (minValue, maxValue) { - - minValue = Math.min(0, minValue); - - var tickInterval = _linearTickInterval(minValue, maxValue); - - return _linearNiceDomain(minValue, maxValue, tickInterval); - } - - function _linearTickInterval (minValue, maxValue, m) { - - m = m || 5; - var span = maxValue - minValue; - var step = Math.pow(10, Math.floor(Math.log(span / m) / Math.LN10)); - var err = m / span * step; - - if (err <= .15) step *= 10; else if (err <= .35) step *= 5; else if (err <= .75) step *= 2; - - return step; - } - - function _linearNiceDomain (minValue, maxValue, tickInterval) { - - minValue = VanUtils.accMul(Math.floor(minValue / tickInterval), tickInterval); - - maxValue = VanUtils.accMul(Math.ceil(maxValue / tickInterval), tickInterval); - - return [minValue, maxValue]; - } - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function formatCordon () { - BI.each(self.config.cordon, function (idx, cor) { - if (idx === 0 && self.xAxis.length > 0) { - var magnify = self.calcMagnify(self.config.xAxisNumberLevel); - self.xAxis[0].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "top" - } - }); - }); - } - if (idx > 0 && self.yAxis.length >= idx) { - var magnify = 1; - switch (idx - 1) { - case self.constants.LEFT_AXIS: - magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS: - magnify = self.calcMagnify(self.config.rightYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS_SECOND: - magnify = self.calcMagnify(self.config.rightYAxisSecondNumberLevel); - break; - } - self.yAxis[idx - 1].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "left" - } - }); - }); - } - }); - } - - function formatChartLineStyle () { - switch (self.config.chartLineType) { - case BICst.CHART_SHAPE.RIGHT_ANGLE: - config.plotOptions.area = { - curve: false, - step: true - }; - break; - case BICst.CHART_SHAPE.CURVE: - config.plotOptions.area = { - curve: true, - step: false - }; - break; - case BICst.CHART_SHAPE.NORMAL: - default: - config.plotOptions.area = { - curve: false, - step: false - }; - break; - } - } - - function formatNumberLevelInYaxis (type, position, formatter) { - var magnify = self.calcMagnify(type); - BI.each(items, function (idx, item) { - var max = null; - BI.each(item.data, function (id, da) { - if (position === item.yAxis) { - da.y = self.formatXYDataWithMagnify(da.y, magnify); - if ((BI.isNull(max) || BI.parseFloat(da.y) > BI.parseFloat(max))) { - max = da.y; - } - } - }); - if (position === item.yAxis) { - item.tooltip = BI.deepClone(config.plotOptions.tooltip); - item.tooltip.formatter.valueFormat = formatter; - } - if (BI.isNotNull(max)) { - self.maxes.push(max); - } - }); - } - - function getXYAxisUnit (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - if (position === self.constants.X_AXIS) { - self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit); - } - if (position === self.constants.LEFT_AXIS) { - self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit); - } - if (position === self.constants.RIGHT_AXIS) { - self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit); - } - return unit === "" ? unit : "(" + unit + ")"; - } - }, - - _formatItems: function (items) { - var self = this; - this.maxes = []; - BI.each(items, function (idx, item) { - BI.each(item, function (id, it) { - if (idx > 0) { - BI.extend(it, {reversed: true, xAxis: 0}); - } else { - BI.extend(it, {reversed: false, xAxis: 1}); - } - }); - }); - return items; - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - leftYAxisTitle: options.leftYAxisTitle || "", - rightYAxisTitle: options.rightYAxisTitle || "", - chartColor: options.chartColor || [], - chartStyle: options.chartStyle || c.NORMAL, - chartLineType: options.chartLineType || c.NORMAL, - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - rightYAxisStyle: options.rightYAxisStyle || c.NORMAL, - showXAxisTitle: options.showXAxisTitle || false, - showLeftYAxisTitle: options.showLeftYAxisTitle || false, - showRightYAxisTitle: options.showRightYAxisTitle || false, - leftYAxisReversed: options.leftYAxisReversed || false, - rightYAxisReversed: options.rightYAxisReversed || false, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - rightYAxisNumberLevel: options.rightYAxisNumberLevel || c.NORMAL, - xAxisUnit: options.xAxisUnit || "", - leftYAxisUnit: options.leftYAxisUnit || "", - rightYAxisUnit: options.rightYAxisUnit || "", - xAxisTitle: options.xAxisTitle || "", - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showDataTable: options.showDataTable || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - showZoom: options.showZoom || false, - textDirection: options.textDirection || 0, - cordon: options.cordon || [], - lineWidth: BI.isNull(options.lineWidth) ? 1 : options.lineWidth, - showLabel: BI.isNull(options.showLabel) ? true : options.showLabel, - enableTick: BI.isNull(options.enableTick) ? true : options.enableTick, - enableMinorTick: BI.isNull(options.enableMinorTick) ? true : options.enableMinorTick, - numSeparators: options.numSeparators || false, - rightNumSeparators: options.rightNumSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE, - nullContinue: options.nullContinue || false - }; - this.options.items = items; - - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.AREA); - }); - types.push(type); - }); - - this.yAxis = []; - BI.each(types, function (idx, type) { - if (BI.isEmptyArray(type)) { - return; - } - var newYAxis = { - type: "value", - title: { - style: self.constants.FONT_STYLE - }, - labelStyle: self.constants.FONT_STYLE, - position: idx > 0 ? "right" : "left", - lineWidth: 1, - axisIndex: idx, - gridLineWidth: 0 - }; - self.yAxis.push(newYAxis); - }); - - this.combineChart.populate(this._formatItems(items), types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.CompareAreaChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.compare_area_chart", BI.CompareAreaChart);/** - * 图表控件 - * @class BI.CompareAxisChart - * @extends BI.Widget - */ -BI.CompareAxisChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.CompareAxisChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-compare-axis-chart" - }); - }, - - _init: function () { - BI.CompareAxisChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.xAxis = [{ - type: "category", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - position: "bottom", - gridLineWidth: 0 - }, { - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - position: "top", - gridLineWidth: 0, - type: "category", - showLabel: false - }]; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - xAxis: this.xAxis, - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.CompareAxisChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this, o = this.options; - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - formatChartLineStyle(); - formatCordon(); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.dataSheet.enabled = this.config.showDataTable; - config.xAxis[0].showLabel = !config.dataSheet.enabled; - config.zoom.zoomTool.enabled = this.config.showZoom; - if(this.config.showZoom === true) { - delete config.dataSheet; - delete config.zoom.zoomType; - } - - config.yAxis = this.yAxis; - BI.each(config.yAxis, function (idx, axis) { - var unit = ""; - switch (axis.axisIndex) { - case self.constants.LEFT_AXIS: - unit = getXYAxisUnit(self.config.leftYAxisNumberLevel, self.constants.LEFT_AXIS); - axis.title.rotation = self.constants.ROTATION; - axis.title.text = self.config.showLeftYAxisTitle === true ? self.config.leftYAxisTitle + unit : unit; - BI.extend(axis, { - reversed: false, - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: self.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(self.config.leftYAxisStyle, self.config.leftYAxisNumberLevel, self.config.numSeparators) - }); - formatNumberLevelInYaxis(self.config.leftYAxisNumberLevel, idx, axis.formatter); - break; - case self.constants.RIGHT_AXIS: - unit = getXYAxisUnit(self.config.rightYAxisNumberLevel, self.constants.RIGHT_AXIS); - axis.title.rotation = self.constants.ROTATION; - axis.title.text = self.config.showRightYAxisTitle === true ? self.config.rightYAxisTitle + unit : unit; - BI.extend(axis, { - reversed: true, - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: self.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(self.config.rightYAxisStyle, self.config.rightYAxisNumberLevel, self.config.rightNumSeparators) - }); - formatNumberLevelInYaxis(self.config.rightYAxisNumberLevel, idx, axis.formatter); - break; - } - var res = _calculateValueNiceDomain(0, self.maxes[idx]); - axis.max = res[1].mul(2); - axis.min = res[0].mul(2); - axis.tickInterval = BI.parseFloat((BI.parseFloat(axis.max).sub(BI.parseFloat(axis.min)))).div(5); - }); - - config.xAxis[0].title.align = "center"; - config.xAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle : ""; - BI.extend(config.xAxis[0], { - lineWidth: this.config.lineWidth, - enableTick: this.config.enableTick, - labelRotation: this.config.textDirection, - enableMinorTick: this.config.enableMinorTick, - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - maxHeight: "40%" - }); - - BI.extend(config.xAxis[1], { - lineWidth: this.config.lineWidth, - enableTick: this.config.enableTick, - enableMinorTick: this.config.enableMinorTick - }); - - // 为了给数据标签加个%,还要遍历所有的系列,唉 - this.formatDataLabel(config.plotOptions.dataLabels.enabled, items, config, this.config.chartFont); - - // 全局样式的图表文字 - this.setFontStyle(this.config.chartFont, config); - - return [items, config]; - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function formatCordon () { - BI.each(self.config.cordon, function (idx, cor) { - if(idx === 0 && self.xAxis.length > 0) { - var magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - self.xAxis[0].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "top" - } - }); - }); - } - if(idx > 0 && self.yAxis.length >= idx) { - var magnify = 1; - switch (idx - 1) { - case self.constants.LEFT_AXIS: - magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS: - magnify = self.calcMagnify(self.config.rightYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS_SECOND: - magnify = self.calcMagnify(self.config.rightYAxisSecondNumberLevel); - break; - } - self.yAxis[idx - 1].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "left" - } - }); - }); - } - }); - } - - function formatChartLineStyle () { - switch (self.config.chartLineType) { - case BICst.CHART_SHAPE.RIGHT_ANGLE: - config.plotOptions.curve = false; - config.plotOptions.step = true; - break; - case BICst.CHART_SHAPE.CURVE: - config.plotOptions.curve = true; - config.plotOptions.step = false; - break; - case BICst.CHART_SHAPE.NORMAL: - default: - config.plotOptions.curve = false; - config.plotOptions.step = false; - break; - } - } - - function formatNumberLevelInYaxis (type, position, formatter) { - var magnify = self.calcMagnify(type); - BI.each(items, function (idx, item) { - var max = null; - BI.each(item.data, function (id, da) { - if (position === item.yAxis) { - da.y = self.formatXYDataWithMagnify(da.y, magnify); - if((BI.isNull(max) || BI.parseFloat(da.y) > BI.parseFloat(max))) { - max = da.y; - } - } - }); - if(position === item.yAxis) { - item.tooltip = BI.deepClone(config.plotOptions.tooltip); - item.tooltip.formatter.valueFormat = formatter; - } - if(BI.isNotNull(max)) { - self.maxes.push(max); - } - }); - } - - function getXYAxisUnit (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - if(position === self.constants.X_AXIS) { - self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit); - } - if(position === self.constants.LEFT_AXIS) { - self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit); - } - if(position === self.constants.RIGHT_AXIS) { - self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit); - } - return unit === "" ? unit : "(" + unit + ")"; - } - - function _calculateValueNiceDomain (minValue, maxValue) { - - minValue = Math.min(0, minValue); - - var tickInterval = _linearTickInterval(minValue, maxValue); - - return _linearNiceDomain(minValue, maxValue, tickInterval); - } - - function _linearTickInterval (minValue, maxValue, m) { - - m = m || 5; - var span = maxValue - minValue; - var step = Math.pow(10, Math.floor(Math.log(span / m) / Math.LN10)); - var err = m / span * step; - - if (err <= .15) step *= 10; else if (err <= .35) step *= 5; else if (err <= .75) step *= 2; - - return step; - } - - function _linearNiceDomain (minValue, maxValue, tickInterval) { - - minValue = VanUtils.accMul(Math.floor(minValue / tickInterval), tickInterval); - - maxValue = VanUtils.accMul(Math.ceil(maxValue / tickInterval), tickInterval); - - return [minValue, maxValue]; - } - }, - - _formatItems: function (items) { - var self = this; - this.maxes = []; - BI.each(items, function (idx, item) { - BI.each(item, function (id, it) { - if(idx > 0) { - BI.extend(it, {reversed: true, xAxis: 1}); - }else{ - BI.extend(it, {reversed: false, xAxis: 0}); - } - }); - }); - return items; - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - leftYAxisTitle: options.leftYAxisTitle || "", - rightYAxisTitle: options.rightYAxisTitle || "", - chartColor: options.chartColor || [], - chartStyle: options.chartStyle || c.NORMAL, - chartLineType: options.chartLineType || c.NORMAL, - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - rightYAxisStyle: options.rightYAxisStyle || c.NORMAL, - showXAxisTitle: options.showXAxisTitle || false, - showLeftYAxisTitle: options.showLeftYAxisTitle || false, - showRightYAxisTitle: options.showRightYAxisTitle || false, - leftYAxisReversed: options.leftYAxisReversed || false, - rightYAxisReversed: options.rightYAxisReversed || false, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - rightYAxisNumberLevel: options.rightYAxisNumberLevel || c.NORMAL, - xAxisUnit: options.xAxisUnit || "", - leftYAxisUnit: options.leftYAxisUnit || "", - rightYAxisUnit: options.rightYAxisUnit || "", - xAxisTitle: options.xAxisTitle || "", - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showDataTable: options.showDataTable || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - showZoom: options.showZoom || false, - textDirection: options.textDirection || 0, - cordon: options.cordon || [], - lineWidth: BI.isNull(options.lineWidth) ? 1 : options.lineWidth, - showLabel: BI.isNull(options.showLabel) ? true : options.showLabel, - enableTick: BI.isNull(options.enableTick) ? true : options.enableTick, - enableMinorTick: BI.isNull(options.enableMinorTick) ? true : options.enableMinorTick, - numSeparators: options.numSeparators || false, - rightNumSeparators: options.rightNumSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE - }; - this.options.items = items; - - this.yAxis = []; - - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.AXIS); - }); - types.push(type); - }); - - BI.each(types, function (idx, type) { - if(BI.isEmptyArray(type)) { - return; - } - var newYAxis = { - type: "value", - title: { - style: self.constants.FONT_STYLE - }, - labelStyle: self.constants.FONT_STYLE, - position: idx > 0 ? "right" : "left", - lineWidth: 1, - axisIndex: idx, - gridLineWidth: 0, - reversed: idx > 0 - }; - self.yAxis.push(newYAxis); - }); - - this.combineChart.populate(this._formatItems(items), types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.CompareAxisChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.compare_axis_chart", BI.CompareAxisChart);/** - * 图表控件 - * @class BI.CompareBarChart - * @extends BI.Widget - */ -BI.CompareBarChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.CompareBarChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-compare-bar-chart" - }); - }, - - _init: function () { - BI.CompareBarChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.xAxis = [{ - type: "value", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - formatter: function () { - return this > 0 ? this : (-1) * this; - }, - gridLineWidth: 0 - }]; - this.yAxis = [{ - type: "category", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - gridLineWidth: 0, - position: "left" - }]; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - xAxis: this.xAxis, - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.CompareBarChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this, o = this.options; - var yTitle = getXYAxisUnit(this.config.xAxisNumberLevel, this.constants.LEFT_AXIS); - var xTitle = getXYAxisUnit(this.config.leftYAxisNumberLevel, this.constants.X_AXIS); - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - formatCordon(); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - - config.yAxis = this.yAxis; - config.yAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle + yTitle : yTitle; - config.yAxis[0].title.rotation = this.constants.ROTATION; - BI.extend(config.yAxis[0], { - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - lineWidth: this.config.lineWidth, - enableTick: this.config.enableTick, - labelRotation: this.config.textDirection, - maxWidth: "40%" - }); - - self.formatNumberLevelInXaxis(items, this.config.leftYAxisNumberLevel); - config.xAxis[0].title.text = this.config.showLeftYAxisTitle === true ? this.config.leftYAxisTitle + xTitle : xTitle; - config.xAxis[0].title.align = "center"; - BI.extend(config.xAxis[0], { - formatter: self.formatTickInXYaxis(this.config.leftYAxisStyle, this.config.leftYAxisNumberLevel, this.config.numSeparators, true), - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - lineWidth: this.config.lineWidth, - showLabel: this.config.showLabel, - enableTick: this.config.enableTick, - enableMinorTick: this.config.enableMinorTick - }); - - config.chartType = "bar"; - // 为了给数据标签加个%,还要遍历所有的系列,唉 - this.formatDataLabelForAxis(config.plotOptions.dataLabels.enabled, items, config.xAxis[0].formatter, this.config.chartFont); - - config.plotOptions.tooltip.formatter.valueFormat = config.xAxis[0].formatter; - - // 全局样式的图表文字 - this.setFontStyle(this.config.chartFont, config); - - return [items, config]; - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function formatCordon () { - BI.each(self.config.cordon, function (idx, cor) { - if (idx === 0 && self.xAxis.length > 0) { - var magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - self.xAxis[0].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "top" - } - }); - }); - } - if (idx > 0 && self.yAxis.length >= idx) { - var magnify = 1; - switch (idx - 1) { - case self.constants.LEFT_AXIS: - magnify = self.calcMagnify(self.config.xAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS: - magnify = self.calcMagnify(self.config.rightYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS_SECOND: - magnify = self.calcMagnify(self.config.rightYAxisSecondNumberLevel); - break; - } - self.yAxis[idx - 1].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "left" - } - }); - }); - } - }); - } - - function getXYAxisUnit (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - if (position === self.constants.X_AXIS) { - self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit); - } - if (position === self.constants.LEFT_AXIS) { - self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit); - } - if (position === self.constants.RIGHT_AXIS) { - self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit); - } - return unit === "" ? unit : "(" + unit + ")"; - } - }, - - _formatItems: function (items) { - var result = []; - var i = BI.UUID(); - BI.each(items, function (idx, item) { - BI.each(item, function (id, it) { - BI.each(it.data, function (i, t) { - var tmp = t.x; - t.x = t.y; - t.y = tmp; - if (idx === 0) { - t.x = -t.x; - } - }); - it.stack = i; - }); - }); - BI.each(items, function (idx, item) { - result = BI.concat(result, item); - }); - return [result]; - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - leftYAxisTitle: options.leftYAxisTitle || "", - chartColor: options.chartColor || [], - chartStyle: options.chartStyle || c.STYLE_NORMAL, - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - xAxisStyle: options.xAxisStyle || c.NORMAL, - showXAxisTitle: options.showXAxisTitle || false, - showLeftYAxisTitle: options.showLeftYAxisTitle || false, - leftYAxisReversed: options.leftYAxisReversed || false, - xAxisNumberLevel: options.xAxisNumberLevel || c.NORMAL, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - xAxisUnit: options.xAxisUnit || "", - leftYAxisUnit: options.leftYAxisUnit || "", - xAxisTitle: options.xAxisTitle || "", - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showDataTable: options.showDataTable || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - showZoom: options.showZoom || false, - textDirection: options.textDirection || 0, - cordon: options.cordon || [], - lineWidth: BI.isNull(options.lineWidth) ? 1 : options.lineWidth, - showLabel: BI.isNull(options.showLabel) ? true : options.showLabel, - enableTick: BI.isNull(options.enableTick) ? true : options.enableTick, - enableMinorTick: BI.isNull(options.enableMinorTick) ? true : options.enableMinorTick, - numSeparators: options.numSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE - }; - this.options.items = this._formatItems(items); - var types = []; - BI.each(this.options.items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.BAR); - }); - types.push(type); - }); - this.combineChart.populate(this.options.items, types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.CompareBarChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.compare_bar_chart", BI.CompareBarChart);/** - * 图表控件 - * @class BI.DashboardChart - * @extends BI.Widget - */ -BI.DashboardChart = BI.inherit(BI.AbstractChart, { - - - _defaultConfig: function () { - return BI.extend(BI.DashboardChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-dashboard-chart" - }); - }, - - _init: function () { - BI.DashboardChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.gaugeAxis = [{ - minorTickColor: "rgb(226,226,226)", - tickColor: "rgb(186,186,186)", - labelStyle: this.constants.FONT_STYLE, - step: 0, - showLabel: true - }]; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.DashboardChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this, o = this.options; - var isDashboard = BI.contains([self.constants.NORMAL, self.constants.HALF_DASHBOARD], self.config.chartDashboardType); - var isMultiPointers = self.config.numberOfPointer === self.constants.MULTI_POINTER; - formatChartDashboardStyle(); - config.chartType = "gauge"; - delete config.zoom; - delete config.xAxis; - delete config.yAxis; - if (isDashboard && !isMultiPointers) { - config.plotOptions.seriesLabel.enabled = false; - if(BI.isNull(items[0].data[0].z)) { - config.plotOptions.tooltip.formatter.identifier = "${SERIES}${X}${Y}${SIZE}${VALUE}"; - } - } - config.gaugeAxis[0].labelStyle = this.config.chartFont; - return [items, config]; - - function formatChartDashboardStyle () { - var bands = getBandsStyles(self.config.bandsStyles, self.config.autoCustomStyle); - var percentageLabel = BI.extend(config.plotOptions.percentageLabel, { - enabled: self.config.showPercentage === BICst.PERCENTAGE.SHOW - }); - - config.gaugeAxis = self.gaugeAxis; - var slotValueLAbel = { - enabled: true, - formatter: function () { - var value = this.value; - if (self.config.dashboardNumberLevel === BICst.TARGET_STYLE.NUM_LEVEL.PERCENT && self.config.numSeparators) { - value = BI.contentFormat(this.value, "#,##0%;-#,##0%"); - } else if (self.config.dashboardNumberLevel === BICst.TARGET_STYLE.NUM_LEVEL.PERCENT && !self.config.numSeparators) { - value = BI.contentFormat(this.value, "#0.00%"); - } else if (!(self.config.dashboardNumberLevel === BICst.TARGET_STYLE.NUM_LEVEL.PERCENT) && self.config.numSeparators) { - value = BI.contentFormat(this.value, "#,###.##;-#,###.##"); - } else { - value = BI.contentFormat(this.value, "#.##;-#.##"); - } - - var label = "
" + this.seriesName + "
" + "
" + value + - getXYAxisUnit(self.config.dashboardNumberLevel, self.constants.DASHBOARD_AXIS) + "
"; - - if (isDashboard && items[0].data.length > 1) { - if (isMultiPointers) { - return "
" + this.seriesName + ":" + value + - getXYAxisUnit(self.config.dashboardNumberLevel, self.constants.DASHBOARD_AXIS) + "
"; - } - return label; - } else if (isDashboard && BI.isNull(items[0].data[0].z)) { - return label; - } - - return "
" + this.category + "
" + label; - }, - style: self.config.chartFont, - useHtml: true - }; - switch (self.config.chartDashboardType) { - case BICst.CHART_SHAPE.HALF_DASHBOARD: - setPlotOptions("pointer_semi", bands, slotValueLAbel, percentageLabel); - break; - case BICst.CHART_SHAPE.PERCENT_DASHBOARD: - setPlotOptions("ring", bands, slotValueLAbel, percentageLabel); - break; - case BICst.CHART_SHAPE.PERCENT_SCALE_SLOT: - setPlotOptions("slot", bands, slotValueLAbel, percentageLabel); - break; - case BICst.CHART_SHAPE.HORIZONTAL_TUBE: - BI.extend(slotValueLAbel, { - align: "bottom" - }); - BI.extend(percentageLabel, { - align: "bottom" - }); - setPlotOptions("thermometer", bands, slotValueLAbel, percentageLabel, "horizontal", "vertical"); - break; - case BICst.CHART_SHAPE.VERTICAL_TUBE: - BI.extend(slotValueLAbel, { - align: "left" - }); - BI.extend(percentageLabel, { - align: "left" - }); - setPlotOptions("thermometer", bands, slotValueLAbel, percentageLabel, "vertical", "horizontal"); - break; - case BICst.CHART_SHAPE.NORMAL: - default: - setPlotOptions("pointer", bands, slotValueLAbel, percentageLabel); - break; - } - changeMaxMinScale(); - formatNumberLevelInYaxis(self.config.dashboardNumberLevel, self.constants.LEFT_AXIS); - if (self.config.dashboardNumberLevel === BICst.TARGET_STYLE.NUM_LEVEL.PERCENT) { - config.gaugeAxis[0].formatter = function () { - var scaleValue = this; - if (self.config.numSeparators) { - scaleValue = BI.contentFormat(scaleValue, "#,##0%;-#,##0%"); - } else { - scaleValue = BI.contentFormat(scaleValue, "#0.00%"); - } - return scaleValue + getXYAxisUnit(self.config.dashboardNumberLevel, self.constants.DASHBOARD_AXIS); - }; - } else { - config.gaugeAxis[0].formatter = function () { - var value = this; - if (self.config.numSeparators) { - value = BI.contentFormat(value, "#,###;-#,###"); - } - return value + getXYAxisUnit(self.config.dashboardNumberLevel, self.constants.DASHBOARD_AXIS); - }; - } - } - - function setPlotOptions (style, bands, slotValueLAbel, percentageLabel, thermometerLayout, layout) { - config.style = style; - config.plotOptions.bands = bands; - config.plotOptions.valueLabel = slotValueLAbel; - config.plotOptions.percentageLabel = percentageLabel; - config.plotOptions.thermometerLayout = thermometerLayout; - config.plotOptions.layout = layout; - } - - function changeMaxMinScale () { - self.gaugeAxis[0].min = BI.parseFloat(self.config.minScale) || null; - self.gaugeAxis[0].max = BI.parseFloat(self.config.maxScale) || null; - } - - function formatNumberLevelInYaxis (type, position) { - var magnify = self.calcMagnify(type); - BI.each(items, function (idx, item) { - BI.each(item.data, function (id, da) { - if (position === item.yAxis) { - da.y = self.formatXYDataWithMagnify(da.y, magnify); - } - }); - }); - - config.plotOptions.tooltip.formatter.valueFormat = function () { - return BI.contentFormat(this, "#.##;-#.##") + getXYAxisUnit(type, position); - }; - - if (self.config.numSeparators) { - config.plotOptions.tooltip.formatter.valueFormat = function () { - return BI.contentFormat(arguments[0], "#,###.##;-#,###.##"); - }; - } - - if (type === BICst.TARGET_STYLE.NUM_LEVEL.PERCENT) { - config.plotOptions.tooltip.formatter.valueFormat = function () { - return BI.contentFormat(arguments[0], "#0.00%"); - }; - if (self.config.numSeparators) { - config.plotOptions.tooltip.formatter.valueFormat = function () { - return BI.contentFormat(arguments[0], "#,##0%;-#,##0%"); - }; - } - } - } - - function getXYAxisUnit (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - if (position === self.constants.DASHBOARD_AXIS) { - self.config.dashboardUnit !== "" && (unit = unit + self.config.dashboardUnit); - } - return unit; - } - - function getBandsStyles (styles, change) { - var min = 0, bands = [], color = null, max = null, conditionMax = null; - - BI.each(items, function (idx, item) { - var data = item.data[0]; - if ((BI.isNull(max) || data.y > max)) { - max = data.y; - } - }); - - switch (change) { - - case BICst.SCALE_SETTING.AUTO: - break; - case BICst.SCALE_SETTING.CUSTOM: - if (styles.length === 0) { - return bands; - } - var maxScale = _calculateValueNiceDomain(0, max)[1]; - - BI.each(styles, function (idx, style) { - if(BI.parseFloat(style.range.min) > BI.parseFloat(style.range.max)) { - return bands.push({ - color: color, - from: conditionMax, - to: maxScale - }); - } - bands.push({ - color: style.color, - from: style.range.min, - to: style.range.max - }); - color = style.color; - conditionMax = style.range.max; - }); - min = BI.parseInt(styles[0].range.min); - bands.push({ - color: "#808080", - from: 0, - to: min - }); - - bands.push({ - color: color, - from: conditionMax, - to: maxScale - }); - - return bands; - - } - } - - function _calculateValueNiceDomain (minValue, maxValue) { - minValue = Math.min(0, minValue); - var tickInterval = _linearTickInterval(minValue, maxValue); - - return _linearNiceDomain(minValue, maxValue, tickInterval); - } - - function _linearTickInterval (minValue, maxValue, m) { - m = m || 5; - var span = maxValue - minValue; - var step = Math.pow(10, Math.floor(Math.log(span / m) / Math.LN10)); - var err = m / span * step; - if (err <= .15) step *= 10; else if (err <= .35) step *= 5; else if (err <= .75) step *= 2; - - return step; - } - - function _linearNiceDomain (minValue, maxValue, tickInterval) { - minValue = VanUtils.accMul(Math.floor(minValue / tickInterval), tickInterval); - maxValue = VanUtils.accMul(Math.ceil(maxValue / tickInterval), tickInterval); - - return [minValue, maxValue]; - } - }, - - _formatItems: function (items) { - if (items.length === 0) { - return []; - } - var c = this.constants; - if (this.config.chartDashboardType === c.NORMAL || this.config.chartDashboardType === c.HALF_DASHBOARD) { - var result = []; - if (this.config.numberOfPointer === c.ONE_POINTER && items[0].length === 1) {// 单个系列 - BI.each(items[0][0].data, function (idx, da) { - result.push({ - data: [BI.extend({}, da, { - x: items[0][0].name - })], - name: da.x - }); - }); - return [result]; - } else if(this.config.numberOfPointer === c.ONE_POINTER && items[0].length > 1) { - BI.each(items[0], function (idx, item) { - result.push({ - data: [BI.extend(item.data[0], { - x: item.name - })], - name: BI.UUID() - }); - }); - return [result]; - } - if (this.config.numberOfPointer === c.MULTI_POINTER && items[0].length > 1) {// 多个系列 - BI.each(items, function (idx, item) { - BI.each(item, function (id, it) { - var data = it.data[0]; - data.x = it.name; - result.push(data); - }); - }); - return [[{ - data: result, - name: "" - }]]; - } - } else { - var others = []; - if (BI.isNotNull(items[0][0].data[0].z)) { - BI.each(items[0], function (idx, item) { - BI.each(item.data, function (id, da) { - others.push({ - data: [BI.extend({}, da, { - x: item.name, - y: da.y - })], - name: da.x - }); - }); - }); - return [others]; - } - } - return items; - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants, o = this.options; - this.config = { - dashboardNumberLevel: options.dashboardNumberLevel || c.NORMAL, - dashboardUnit: options.dashboardUnit || "", - chartDashboardType: options.chartDashboardType || c.NORMAL, - numberOfPointer: options.numberOfPointer || c.ONE_POINTER, - bandsStyles: options.bandsStyles || [], - autoCustomStyle: options.autoCustom || c.AUTO, - minScale: options.minScale, - maxScale: options.maxScale, - showPercentage: options.showPercentage || c.NOT_SHOW, - numSeparators: options.numSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE - }; - o.items = this._formatItems(items); - var types = []; - BI.each(o.items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.DASHBOARD); - }); - types.push(type); - }); - - this.combineChart.populate(o.items, types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.DashboardChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.dashboard_chart", BI.DashboardChart);/** - * 图表控件 - * @class BI.DonutChart - * @extends BI.Widget - */ -BI.DonutChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.DonutChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-donut-chart" - }); - }, - - _init: function () { - BI.DonutChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.DonutChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this; - delete config.zoom; - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - - this.formatChartLegend(config, this.config.chartLegend); - - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - - config.plotOptions.innerRadius = "50.0%"; - config.chartType = "pie"; - config.plotOptions.dataLabels.align = "outside"; - config.plotOptions.dataLabels.connectorWidth = "outside"; - config.plotOptions.dataLabels.style = this.config.chartFont; - config.plotOptions.dataLabels.formatter.identifier = "${VALUE}${PERCENT}"; - delete config.xAxis; - delete config.yAxis; - BI.each(items, function (idx, item) { - BI.each(item.data, function (id, da) { - da.y = self.formatXYDataWithMagnify(da.y, 1); - }); - }); - - config.legend.style = this.config.chartFont; - return [items, config]; - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - chartColor: options.chartColor || [], - chartStyle: options.chartStyle || c.NORMAL, - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - chartFont: options.chartFont || c.FONT_STYLE - }; - this.options.items = items; - - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.DONUT); - }); - types.push(type); - }); - - this.combineChart.populate(items, types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.DonutChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.donut_chart", BI.DonutChart);/** - * 图表控件 - * @class BI.FallAxisChart - * @extends BI.Widget - */ -BI.FallAxisChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.FallAxisChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-fall-axis-chart" - }); - }, - - _init: function () { - BI.FallAxisChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.xAxis = [{ - type: "category", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - position: "bottom", - gridLineWidth: 0 - }]; - this.yAxis = [{ - type: "value", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - position: "left", - gridLineWidth: 0 - }]; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - xAxis: this.xAxis, - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.FallAxisChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this, o = this.options; - var yTitle = getXYAxisUnit(this.config.leftYAxisNumberLevel, this.constants.LEFT_AXIS); - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - formatCordon(); - config.legend.enabled = false; - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.dataSheet.enabled = this.config.showDataTable; - if(config.dataSheet.enabled === true) { - config.xAxis[0].showLabel = false; - } - config.zoom.zoomTool.enabled = this.config.showZoom; - if(this.config.showZoom === true) { - delete config.dataSheet; - delete config.zoom.zoomType; - } - - config.yAxis = this.yAxis; - BI.extend(config.yAxis[0], { - lineWidth: this.config.lineWidth, - showLabel: this.config.showLabel, - enableTick: this.config.enableTick, - enableMinorTick: this.config.enableMinorTick, - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(this.config.leftYAxisStyle, this.config.leftYAxisNumberLevel, this.config.numSeparators) - }); - formatNumberLevelInYaxis(this.config.leftYAxisNumberLevel, this.constants.LEFT_AXIS, config.yAxis[0].formatter); - config.yAxis[0].title.rotation = this.constants.ROTATION; - config.yAxis[0].title.text = this.config.showLeftYAxisTitle === true ? this.config.leftYAxisTitle + yTitle : yTitle; - - config.xAxis[0].title.align = "center"; - config.xAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle : ""; - BI.extend(config.xAxis[0], { - lineWidth: this.config.lineWidth, - enableTick: this.config.enableTick, - enableMinorTick: this.config.enableMinorTick, - labelRotation: this.config.textDirection, - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - maxHeight: "40%" - }); - - // 为了给数据标签加个%,还要遍历所有的系列,唉 - if(config.plotOptions.dataLabels.enabled === true) { - BI.each(items, function (idx, item) { - if(idx === 0) { - item.dataLabels = {}; - return; - } - item.dataLabels = { - style: self.config.chartFont, - align: "outside", - autoAdjust: true, - enabled: true, - formatter: { - identifier: "${VALUE}", - valueFormat: config.yAxis[0].formatter - } - }; - }); - } - - // 全局样式的图表文字 - this.setFontStyle(this.config.chartFont, config); - - return [items, config]; - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function formatCordon () { - BI.each(self.config.cordon, function (idx, cor) { - if(idx === 0 && self.xAxis.length > 0) { - var magnify = self.calcMagnify(self.config.xAxisNumberLevel); - self.xAxis[0].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "top" - } - }); - }); - } - if(idx > 0 && self.yAxis.length >= idx) { - var magnify = 1; - switch (idx - 1) { - case self.constants.LEFT_AXIS: - magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS: - magnify = self.calcMagnify(self.config.rightYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS_SECOND: - magnify = self.calcMagnify(self.config.rightYAxisSecondNumberLevel); - break; - } - self.yAxis[idx - 1].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "left" - } - }); - }); - } - }); - } - - function formatNumberLevelInYaxis (type, position, formatter) { - var magnify = self.calcMagnify(type); - BI.each(items, function (idx, item) { - BI.each(item.data, function (id, da) { - if (position === item.yAxis) { - da.y = self.formatXYDataWithMagnify(da.y, magnify); - } - }); - }); - config.plotOptions.tooltip.formatter.valueFormat = formatter; - } - - function getXYAxisUnit (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - if(position === self.constants.X_AXIS) { - self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit); - } - if(position === self.constants.LEFT_AXIS) { - self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit); - } - if(position === self.constants.RIGHT_AXIS) { - self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit); - } - return unit === "" ? unit : "(" + unit + ")"; - } - }, - - _formatItems: function (items) { - var o = this.options; - if(BI.isEmptyArray(items)) { - return []; - } - items = items[0]; - var tables = [], sum = 0; - var colors = this.config.chartColor || []; - if(BI.isEmptyArray(colors)) { - colors = ["rgb(152, 118, 170)", "rgb(0, 157, 227)"]; - } - BI.each(items, function (idx, item) { - BI.each(item.data, function (i, t) { - if(t.y < 0) { - tables.push([t.x, t.y, sum + t.y, t]); - }else{ - tables.push([t.x, t.y, sum, t]); - } - sum += t.y; - }); - }); - - return [BI.map(BI.makeArray(2, null), function (idx, item) { - return { - data: BI.map(tables, function (id, cell) { - var axis = BI.extend({}, cell[3], { - x: cell[0], - y: Math.abs(cell[2 - idx]) - }); - if(idx === 1) { - axis.color = cell[2 - idx] < 0 ? colors[1] : colors[0]; - }else{ - axis.color = "rgba(0,0,0,0)"; - axis.borderColor = "rgba(0,0,0,0)"; - axis.borderWidth = 0; - axis.clickColor = "rgba(0,0,0,0)"; - axis.mouseOverColor = "rgba(0,0,0,0)"; - axis.tooltip = { - enable: false - }; - } - return axis; - }), - stack: "stackedFall", - name: idx === 1 ? items[0].name : BI.UUID() - }; - })]; - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - leftYAxisTitle: options.leftYAxisTitle || "", - chartColor: options.chartColor || ["#5caae4", "#70cc7f", "#ebbb67", "#e97e7b", "#6ed3c9"], - chartStyle: options.chartStyle || c.NORMAL, - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - showXAxisTitle: options.showXAxisTitle || false, - showLeftYAxisTitle: options.showLeftYAxisTitle || false, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - xAxisUnit: options.xAxisUnit || "", - leftYAxisUnit: options.leftYAxisUnit || "", - xAxisTitle: options.xAxisTitle || "", - showDataLabel: options.showDataLabel || false, - showDataTable: options.showDataTable || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - showZoom: options.showZoom || false, - textDirection: options.textDirection || 0, - cordon: options.cordon || [], - lineWidth: BI.isNull(options.lineWidth) ? 1 : options.lineWidth, - showLabel: BI.isNull(options.showLabel) ? true : options.showLabel, - enableTick: BI.isNull(options.enableTick) ? true : options.enableTick, - enableMinorTick: BI.isNull(options.enableMinorTick) ? true : options.enableMinorTick, - numSeparators: options.numSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE - }; - this.options.items = items; - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.AXIS); - }); - types.push(type); - }); - - this.combineChart.populate(this._formatItems(items), types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.FallAxisChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.fall_axis_chart", BI.FallAxisChart);/** - * 图表控件 - * @class BI.ForceBubbleChart - * @extends BI.Widget - */ -BI.ForceBubbleChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.ForceBubbleChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-force-bubble-chart" - }); - }, - - _init: function () { - BI.ForceBubbleChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.ForceBubbleChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this, o = this.options; - config.chartType = "forceBubble"; - config.colors = this.config.chartColor; - this.formatChartLegend(config, this.config.chartLegend); - - config.plotOptions.force = true; - config.plotOptions.shadow = this.config.bubbleStyle !== this.constants.NO_PROJECT; - config.plotOptions.dataLabels.enabled = true; - config.plotOptions.dataLabels.align = "inside"; - config.plotOptions.dataLabels.style = this.config.chartFont; - config.plotOptions.dataLabels.formatter.identifier = "${CATEGORY}${VALUE}"; - delete config.xAxis; - delete config.yAxis; - delete config.zoom; - BI.each(items, function (idx, item) { - BI.each(item.data, function (id, da) { - da.y = self.formatXYDataWithMagnify(da.y, 1); - }); - }); - config.legend.style = this.config.chartFont; - return [items, config]; - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - chartColor: options.chartColor || [], - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - bubbleStyle: options.bubbleStyle || c.NO_PROJECT, - chartFont: options.chartFont || c.FONT_STYLE - }; - this.options.items = items; - - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.FORCE_BUBBLE); - }); - types.push(type); - }); - - this.combineChart.populate(items, types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.ForceBubbleChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.force_bubble_chart", BI.ForceBubbleChart);/** - * 图表控件 - * @class BI.GISMapChart - * @extends BI.Widget - */ -BI.GISMapChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.GISMapChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-gis-map-chart" - }); - }, - - _init: function () { - BI.GISMapChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.GISMapChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - delete config.dataSheet; - delete config.legend; - delete config.zoom; - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.plotOptions.dataLabels.useHtml = true; - config.plotOptions.dataLabels.style = this.config.chartFont; - config.plotOptions.dataLabels.formatter = function () { - var name = (BI.isArray(this.name) ? "" : this.name + ",") + BI.contentFormat(this.value, "#.##;-#.##"); - var style = "padding: 5px; background-color: rgba(0,0,0,0.4980392156862745);border-color: rgb(0,0,0); border-radius:2px; border-width:0px;"; - var a = "
" + name + "
"; - return a; - }; - config.plotOptions.tooltip.shared = true; - config.plotOptions.tooltip.formatter = function () { - var tip = BI.isArray(this.name) ? "" : this.name; - BI.each(this.points, function (idx, point) { - tip += ("
" + point.seriesName + ":" + BI.contentFormat((point.size || point.y), "#.##;-#.##") + "
"); - }); - return tip; - }; - config.geo = { - tileLayer: "http://webrd01.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}", - attribution: "© 2016 AutoNavi" - }; - if (this.config.showBackgroundLayer === true && BI.isNotNull(this.config.backgroundLayerInfo)) { - config.geo = {}; - if (this.config.backgroundLayerInfo.type === BICst.WMS_SERVER) { - config.geo.tileLayer = false; - config.geo.wmsUrl = this.config.backgroundLayerInfo.url; - config.geo.wmsLayer = this.config.backgroundLayerInfo.wmsLayer; - } else { - config.geo.tileLayer = this.config.backgroundLayerInfo.url; - } - } - config.chartType = "pointMap"; - config.plotOptions.icon = { - iconUrl: BICst.GIS_ICON_PATH, - iconSize: [24, 24] - }; - - config.plotOptions.marker = { - symbol: BICst.GIS_ICON_PATH, - width: 24, - height: 24, - enable: true - }; - delete config.xAxis; - delete config.yAxis; - return [items, config]; - - }, - - _checkLngLatValid: function (lnglat) { - if (lnglat.length < 2) { - return false; - } - return lnglat[0] <= 180 && lnglat[0] >= -180 && lnglat[1] <= 90 && lnglat[1] >= -90; - }, - - _formatItems: function (items) { - var self = this; - var results = []; - BI.each(items, function (idx, item) { - var result = []; - BI.each(item, function (id, it) { - var res = []; - BI.each(it.data, function (i, da) { - da.y = self.formatXYDataWithMagnify(da.y, 1); - var lnglat = da.x.split(","); - if (self.config.lnglat === self.constants.LAT_FIRST) { - var lng = lnglat[1]; - lnglat[1] = lnglat[0]; - lnglat[0] = lng; - } - da.lnglat = lnglat; - da.value = da.y; - da.name = BI.isNotNull(da.z) ? da.z : da.lnglat; - if (self._checkLngLatValid(da.lnglat)) { - res.push(da); - } - }); - if (BI.isNotEmptyArray(res)) { - result.push(BI.extend(it, { - data: res - })); - } - }); - if (BI.isNotEmptyArray(result)) { - results.push(result); - } - }); - return results; - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - lnglat: options.lnglat || c.LNG_FIRST, - chartFont: options.chartFont || c.FONT_STYLE, - showBackgroundLayer: options.showBackgroundLayer || false, - backgroundLayerInfo: options.backgroundLayerInfo - }; - this.options.items = items; - - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function () { - type.push(BICst.WIDGET.GIS_MAP); - }); - types.push(type); - }); - - this.combineChart.populate(this._formatItems(items), types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.GISMapChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.gis_map_chart", BI.GISMapChart);/** - * 图表控件 - * @class BI.LineChart - * @extends BI.Widget - */ -BI.LineChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.LineChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-line-chart" - }); - }, - - _init: function () { - BI.LineChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.xAxis = [{ - type: "category", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - position: "bottom", - gridLineWidth: 0 - }]; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - xAxis: this.xAxis, - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.LineChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this, o = this.options; - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - formatChartLineStyle(); - formatCordon(); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.plotOptions.connectNulls = this.config.nullContinue; - config.dataSheet.enabled = this.config.showDataTable; - config.xAxis[0].showLabel = !config.dataSheet.enabled; - config.zoom.zoomTool.enabled = this.config.showZoom; - if (this.config.showZoom === true) { - delete config.dataSheet; - delete config.zoom.zoomType; - } - - config.yAxis = this.yAxis; - BI.each(config.yAxis, function (idx, axis) { - var title = ""; - switch (axis.axisIndex) { - case self.constants.LEFT_AXIS: - axis.title.rotation = self.constants.ROTATION; - title = getXYAxisUnit(self.config.leftYAxisNumberLevel, self.constants.LEFT_AXIS); - axis.title.text = self.config.showLeftYAxisTitle === true ? self.config.leftYAxisTitle + title : title; - BI.extend(axis, { - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - reversed: self.config.leftYAxisReversed, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: self.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(self.config.leftYAxisStyle, self.config.leftYAxisNumberLevel, self.config.numSeparators) - }); - self.formatNumberLevelInYaxis(config, items, self.config.leftYAxisNumberLevel, idx, axis.formatter); - break; - case self.constants.RIGHT_AXIS: - title = getXYAxisUnit(self.config.rightYAxisNumberLevel, self.constants.RIGHT_AXIS); - axis.title.text = self.config.showRightYAxisTitle === true ? self.config.rightYAxisTitle + title : title; - axis.title.rotation = self.constants.ROTATION; - BI.extend(axis, { - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - reversed: self.config.rightYAxisReversed, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: self.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(self.config.rightYAxisStyle, self.config.rightYAxisNumberLevel, self.config.rightNumSeparators) - }); - self.formatNumberLevelInYaxis(config, items, self.config.rightYAxisNumberLevel, idx, axis.formatter); - break; - } - }); - - config.xAxis[0].title.align = "center"; - config.xAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle : ""; - BI.extend(config.xAxis[0], { - lineWidth: this.config.lineWidth, - enableTick: this.config.enableTick, - labelRotation: this.config.textDirection, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - maxHeight: "40%" - }); - - config.chartType = "line"; - - // 为了给数据标签加个%,还要遍历所有的系列,唉 - this.formatDataLabel(config.plotOptions.dataLabels.enabled, items, config, this.config.chartFont); - - // 全局样式的图表文字 - this.setFontStyle(this.config.chartFont, config); - - return [items, config]; - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function formatCordon () { - BI.each(self.config.cordon, function (idx, cor) { - if (idx === 0 && self.xAxis.length > 0) { - var magnify = self.calcMagnify(self.config.xAxisNumberLevel); - self.xAxis[0].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "top" - } - }); - }); - } - if (idx > 0 && self.yAxis.length >= idx) { - var magnify = 1; - switch (idx - 1) { - case self.constants.LEFT_AXIS: - magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS: - magnify = self.calcMagnify(self.config.rightYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS_SECOND: - magnify = self.calcMagnify(self.config.rightYAxisSecondNumberLevel); - break; - } - self.yAxis[idx - 1].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "left" - } - }); - }); - } - }); - } - - function formatChartLineStyle () { - switch (self.config.chartLineType) { - case BICst.CHART_SHAPE.RIGHT_ANGLE: - config.plotOptions.curve = false; - config.plotOptions.step = true; - break; - case BICst.CHART_SHAPE.CURVE: - config.plotOptions.curve = true; - config.plotOptions.step = false; - break; - case BICst.CHART_SHAPE.NORMAL: - default: - config.plotOptions.curve = false; - config.plotOptions.step = false; - break; - } - } - - function getXYAxisUnit (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - if (position === self.constants.X_AXIS) { - self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit); - } - if (position === self.constants.LEFT_AXIS) { - self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit); - } - if (position === self.constants.RIGHT_AXIS) { - self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit); - } - return unit === "" ? unit : "(" + unit + ")"; - } - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - leftYAxisTitle: options.leftYAxisTitle || "", - rightYAxisTitle: options.rightYAxisTitle || "", - chartLineType: options.chartLineType || c.NORMAL, - chartColor: options.chartColor || [], - chartStyle: options.chartStyle || c.NORMAL, - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - rightYAxisStyle: options.rightYAxisStyle || c.NORMAL, - showXAxisTitle: options.showXAxisTitle || false, - showLeftYAxisTitle: options.showLeftYAxisTitle || false, - showRightYAxisTitle: options.showRightYAxisTitle || false, - leftYAxisReversed: options.leftYAxisReversed || false, - rightYAxisReversed: options.rightYAxisReversed || false, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - rightYAxisNumberLevel: options.rightYAxisNumberLevel || c.NORMAL, - xAxisUnit: options.xAxisUnit || "", - leftYAxisUnit: options.leftYAxisUnit || "", - rightYAxisUnit: options.rightYAxisUnit || "", - xAxisTitle: options.xAxisTitle || "", - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showDataTable: options.showDataTable || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - showZoom: options.showZoom || false, - textDirection: options.textDirection || 0, - cordon: options.cordon || [], - lineWidth: BI.isNull(options.lineWidth) ? 1 : options.lineWidth, - showLabel: BI.isNull(options.showLabel) ? true : options.showLabel, - enableTick: BI.isNull(options.enableTick) ? true : options.enableTick, - enableMinorTick: BI.isNull(options.enableMinorTick) ? true : options.enableMinorTick, - numSeparators: options.numSeparators || false, - rightNumSeparators: options.rightNumSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE, - nullContinue: options.nullContinue || false - }; - this.options.items = items; - - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.LINE); - }); - types.push(type); - }); - - this.yAxis = []; - BI.each(types, function (idx, type) { - if (BI.isEmptyArray(type)) { - return; - } - var newYAxis = { - type: "value", - title: { - style: self.constants.FONT_STYLE - }, - labelStyle: self.constants.FONT_STYLE, - position: idx > 0 ? "right" : "left", - lineWidth: 1, - axisIndex: idx, - gridLineWidth: 0 - }; - self.yAxis.push(newYAxis); - }); - - this.combineChart.populate(items, types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.LineChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.line_chart", BI.LineChart);/** - * 图表控件 - * @class BI.MapChart - * @extends BI.Widget - */ -BI.MapChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.MapChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-map-chart" - }); - }, - - _init: function () { - BI.MapChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.MapChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this, c = this.constants; - formatRangeLegend(); - delete config.legend; - delete config.zoom; - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.plotOptions.tooltip.shared = true; - var formatterArray = []; - BI.each(items, function (idx, item) { - if (BI.has(item, "settings")) { - formatterArray.push(formatToolTipAndDataLabel(item.settings.format || c.NORMAL, item.settings.num_level || c.NORMAL, - item.settings.unit || "", item.settings.numSeparators || c.NUM_SEPARATORS)); - } - }); - config.plotOptions.tooltip.formatter = function () { - var tip = this.name; - var point = this.points[0]; - var index = BI.isNull(point.size) ? 0 : 1; - tip += ("
" + point.seriesName + ":" + BI.contentFormat(point.size || point.y, formatterArray[index]) + "
"); - return tip; - }; - config.plotOptions.dataLabels.formatter.valueFormat = function () { - return BI.contentFormat(arguments[0], formatterArray[0]); - }; - config.plotOptions.dataLabels.style = this.config.chartFont; - - config.plotOptions.bubble.dataLabels = config.plotOptions.dataLabels; - config.plotOptions.bubble.dataLabels.formatter.identifier = "${SIZE}"; - - config.plotOptions.bubble.tooltip = config.plotOptions.tooltip; - - config.geo = this.config.geo; - if (this.config.showBackgroundLayer === true && BI.isNotNull(this.config.backgroundLayerInfo)) { - if (this.config.backgroundLayerInfo.type === BICst.WMS_SERVER) { - config.geo.tileLayer = false; - config.geo.wmsUrl = this.config.backgroundLayerInfo.url; - config.geo.wmsLayer = this.config.backgroundLayerInfo.wmsLayer; - } else { - config.geo.tileLayer = this.config.backgroundLayerInfo.url; - } - } - if (this.config.initDrillPath.length > 1) { - config.initDrillPath = this.config.initDrillPath; - } - config.dTools.enabled = true; - config.dTools.click = function (point) { - point = point || {}; - var pointOption = point.options || {}; - self.fireEvent(BI.MapChart.EVENT_CLICK_DTOOL, pointOption); - }; - config.chartType = "areaMap"; - delete config.xAxis; - delete config.yAxis; - - var find = BI.find(items, function (idx, item) { - return BI.has(item, "type") && item.type === "areaMap"; - }); - if (BI.isNull(find)) { - items.push({ - type: "areaMap", - data: [] - }); - } - - return [items, config]; - - function formatRangeLegend () { - config.rangeLegend.enabled = true; - switch (self.config.chartLegend) { - case BICst.CHART_LEGENDS.BOTTOM: - config.rangeLegend.visible = true; - config.rangeLegend.position = "bottom"; - break; - case BICst.CHART_LEGENDS.RIGHT: - config.rangeLegend.visible = true; - config.rangeLegend.position = "right"; - break; - case BICst.CHART_LEGENDS.NOT_SHOW: - config.rangeLegend.visible = false; - break; - } - config.rangeLegend.continuous = false; - config.rangeLegend.range = getRangeStyle(self.config.mapStyles, self.config.autoCustom, self.config.themeColor); - config.rangeLegend.formatter = function () { - var to = this.to; - if (BI.isNotEmptyArray(items) && BI.has(items[0], "settings")) { - var settings = items[0].settings; - var legendFormat = formatToolTipAndDataLabel(settings.format || c.NORMAL, settings.num_level || c.NORMAL, - settings.unit || "", settings.numSeparators || c.NUM_SEPARATORS); - to = BI.contentFormat(to, legendFormat); - } - return to; - }; - } - - function formatToolTipAndDataLabel (format, numberLevel, unit, numSeparators) { - var formatter = "#.##"; - switch (format) { - case self.constants.NORMAL: - formatter = "#.##"; - if (numSeparators) formatter = "#,###.##"; - break; - case self.constants.ZERO2POINT: - formatter = "#0"; - if (numSeparators) formatter = "#,###"; - break; - case self.constants.ONE2POINT: - formatter = "#0.0"; - if (numSeparators) formatter = "#,###.0"; - break; - case self.constants.TWO2POINT: - formatter = "#0.00"; - if (numSeparators) formatter = "#,###.00"; - break; - } - - switch (numberLevel) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - formatter += ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - formatter += BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - formatter += BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - formatter += BI.i18nText("BI-Yi"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.PERCENT: - formatter += "%"; - break; - } - - return formatter + unit; - } - - function getRangeStyle (styles, change, defaultColor) { - var range = [], color = null, defaultStyle = {}; - var conditionMax = null, conditionMin = null, min = null; - - BI.each(items, function (idx, item) { - BI.each(item.data, function (id, it) { - if (BI.isNull(min) || BI.parseFloat(min) > BI.parseFloat(it.y)) { - min = it.y; - } - }); - }); - - switch (change) { - case BICst.SCALE_SETTING.AUTO: - defaultStyle.color = defaultColor; - return defaultStyle; - case BICst.SCALE_SETTING.CUSTOM: - if (styles.length !== 0) { - var maxScale = _calculateValueNiceDomain(0, self.max)[1]; - BI.each(styles, function (idx, style) { - if (style.range.max) { - range.push({ - color: style.color || "rgba(255,255,255,0)", - from: style.range.min, - to: style.range.max - }); - } else { - var to = style.range.min < maxScale ? maxScale : 266396; - range.push({ - color: style.color || "rgba(255,255,255,0)", - from: style.range.min, - to: to - }); - } - color = style.color; - conditionMax = style.range.max; - }); - - conditionMin = BI.parseFloat(styles[0].range.min); - if (conditionMin !== 0) { - range.push({ - color: "#808080", - from: 0, - to: conditionMin - }); - } - - if (conditionMax && conditionMax < maxScale) { - range.push({ - color: color || "rgba(255,255,255,0)", - from: conditionMax, - to: maxScale - }); - } - return range; - } - defaultStyle.color = defaultColor; - return defaultStyle; - - } - } - - function _calculateValueNiceDomain (minValue, maxValue) { - minValue = Math.min(0, minValue); - var tickInterval = _linearTickInterval(minValue, maxValue); - - return _linearNiceDomain(minValue, maxValue, tickInterval); - } - - function _linearTickInterval (minValue, maxValue, m) { - m = m || 5; - var span = maxValue - minValue; - var step = Math.pow(10, Math.floor(Math.log(span / m) / Math.LN10)); - var err = m / span * step; - - if (err <= .15) step *= 10; else if (err <= .35) step *= 5; else if (err <= .75) step *= 2; - - return step; - } - - function _linearNiceDomain (minValue, maxValue, tickInterval) { - minValue = VanUtils.accMul(Math.floor(minValue / tickInterval), tickInterval); - maxValue = VanUtils.accMul(Math.ceil(maxValue / tickInterval), tickInterval); - - return [minValue, maxValue]; - } - }, - - _formatDrillItems: function (items) { - var self = this; - BI.each(items.series, function (idx, da) { - var hasArea = false; - BI.each(da.data, function (idx, data) { - data.y = self.formatXYDataWithMagnify(data.y, 1); - if (BI.has(da, "settings")) { - data.y = self.formatXYDataWithMagnify(data.y, self.calcMagnify(da.settings.num_level || self.constants.NORMAL)); - } - if (BI.has(da, "type") && da.type == "bubble") { - data.name = data.x; - data.size = data.y; - } else { - data.name = data.x; - data.value = data.y; - } - if (BI.has(da, "type") && da.type === "areaMap") { - hasArea = true; - } - if (BI.has(data, "drilldown")) { - self._formatDrillItems(data.drilldown); - } - }); - if (hasArea === false) { - items.series.push({ - type: "areaMap", - data: [] - }); - } - }); - }, - - _formatItems: function (items) { - var self = this; - this.max = null; - this.min = null; - BI.each(items, function (idx, item) { - BI.each(item, function (id, it) { - BI.each(it.data, function (i, da) { - da.y = self.formatXYDataWithMagnify(da.y, 1); - if (BI.has(it, "settings")) { - da.y = self.formatXYDataWithMagnify(da.y, self.calcMagnify(it.settings.num_level || self.constants.NORMAL)); - } - if ((BI.isNull(self.max) || BI.parseFloat(da.y) > BI.parseFloat(self.max)) && id === 0) { - self.max = da.y; - } - if ((BI.isNull(self.min) || BI.parseFloat(da.y) < BI.parseFloat(self.min)) && id === 0) { - self.min = da.y; - } - if (BI.has(it, "type") && it.type == "bubble") { - da.name = da.x; - da.size = da.y; - } else { - da.name = da.x; - da.value = da.y; - } - if (BI.has(da, "drilldown")) { - self._formatDrillItems(da.drilldown); - } - }); - }); - }); - return items; - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - geo: options.geo, - initDrillPath: options.initDrillPath || [], - tooltip: options.tooltip || "", - themeColor: options.themeColor || "#65bce7", - mapStyles: options.mapStyles || [], - autoCustom: options.autoCustom || c.AUTO_CUSTOM, - showBackgroundLayer: options.showBackgroundLayer || false, - backgroundLayerInfo: options.backgroundLayerInfo, - chartFont: options.chartFont || c.FONT_STYLE - }; - this.options.items = items; - - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.MAP); - }); - types.push(type); - }); - - this.combineChart.populate(this._formatItems(items), types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.MapChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.MapChart.EVENT_CLICK_DTOOL = "EVENT_CLICK_DTOOL"; -BI.shortcut("bi.map_chart", BI.MapChart);/** - * 图表控件 - * @class BI.MultiAxisChart - * @extends BI.Widget - * leftYxis 左值轴属性 - * rightYxis 右值轴属性 - * xAxis 分类轴属性 - */ -BI.MultiAxisChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.MultiAxisChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-multi-axis-chart" - }); - }, - - _init: function () { - BI.MultiAxisChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.xAxis = [{ - type: "category", - title: { - style: {fontFamily: "inherit", color: "#808080", fontSize: "12px", fontWeight: ""} - }, - labelStyle: { - fontFamily: "inherit", color: "#808080", fontSize: "12px" - }, - position: "bottom", - gridLineWidth: 0 - }]; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - xAxis: this.xAxis, - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.MultiAxisChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this, o = this.options; - config.colors = this.config.chartColor; - config.style = this.formatChartStyle(); - this.formatCordon(); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.plotOptions.connectNulls = this.config.nullContinue; - config.dataSheet.enabled = this.config.showDataTable; - config.xAxis[0].showLabel = !config.dataSheet.enabled; - config.zoom.zoomTool.enabled = this.config.showZoom; - if (this.config.showZoom === true) { - delete config.dataSheet; - delete config.zoom.zoomType; - } - - config.yAxis = this.yAxis; - BI.each(config.yAxis, function (idx, axis) { - var title = ""; - switch (axis.axisIndex) { - case self.constants.LEFT_AXIS: - title = self.getXYAxisUnit(self.config.leftYAxisNumberLevel, self.constants.LEFT_AXIS); - axis.title.text = self.config.showLeftYAxisTitle === true ? self.config.leftYAxisTitle + title : title; - axis.title.rotation = self.constants.ROTATION; - BI.extend(axis, { - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - reversed: self.config.leftYAxisReversed, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: self.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(self.config.leftYAxisStyle, self.config.leftYAxisNumberLevel, self.config.numSeparators) - }); - self.formatNumberLevelInYaxis(config, items, self.config.leftYAxisNumberLevel, idx, axis.formatter); - break; - case self.constants.RIGHT_AXIS: - title = self.getXYAxisUnit(self.config.rightYAxisNumberLevel, self.constants.RIGHT_AXIS); - axis.title.text = self.config.showRightYAxisTitle === true ? self.config.rightYAxisTitle + title : title; - axis.title.rotation = self.constants.ROTATION; - BI.extend(axis, { - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - reversed: self.config.rightYAxisReversed, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: self.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(self.config.rightYAxisStyle, self.config.rightYAxisNumberLevel, self.config.rightNumSeparators) - }); - self.formatNumberLevelInYaxis(config, items, self.config.rightYAxisNumberLevel, idx, axis.formatter); - break; - case self.constants.RIGHT_AXIS_SECOND: - title = self.getXYAxisUnit(self.config.rightYAxisSecondNumberLevel, self.constants.RIGHT_AXIS_SECOND); - axis.title.text = self.config.showRightYAxisSecondTitle === true ? self.config.rightYAxisSecondTitle + title : title; - axis.title.rotation = self.constants.ROTATION; - BI.extend(axis, { - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - reversed: self.config.rightYAxisSecondReversed, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: self.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(self.config.rightYAxisSecondStyle, self.config.rightYAxisSecondNumberLevel, self.config.rightNumSeparators) - }); - self.formatNumberLevelInYaxis(config, items, self.config.rightYAxisSecondNumberLevel, idx, axis.formatter); - break; - default: - break; - } - }); - config.xAxis[0].title.align = "center"; - config.xAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle : ""; - BI.extend(config.xAxis[0], { - lineWidth: this.config.lineWidth, - enableTick: this.config.enableTick, - labelRotation: this.config.textDirection, - enableMinorTick: this.config.enableMinorTick, - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - maxHeight: "40%" - }); - - // 为了给数据标签加个%,还要遍历所有的系列,唉 - this.formatDataLabel(config.plotOptions.dataLabels.enabled, items, config, this.config.chartFont); - - // 全局样式的图表文字 - if (config.dataSheet) { - config.dataSheet.style = this.config.chartFont; - } - config.xAxis[0].title.style = config.xAxis[0].labelStyle = this.config.chartFont; - config.legend.style = this.config.chartFont; - config.plotOptions.dataLabels.style = this.config.chartFont; - BI.each(config.yAxis, function (idx, axis) { - axis.title.style = self.config.chartFont; - }); - - return [items, config]; - }, - - formatChartStyle: function () { - switch (this.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - }, - - formatCordon: function () { - var self = this; - var magnify = 1; - BI.each(this.config.cordon, function (idx, cor) { - if (idx === 0 && self.xAxis.length > 0) { - magnify = self.calcMagnify(self.config.xAxisNumberLevel); - self.xAxis[0].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: { - fontFamily: "inherit", - color: "#808080", - fontSize: "12px", - fontWeight: "" - }, - text: t.text, - align: "top" - } - }); - }); - } - if (idx > 0 && self.yAxis.length >= idx) { - magnify = 1; - switch (idx - 1) { - case self.constants.LEFT_AXIS: - magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS: - magnify = self.calcMagnify(self.config.rightYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS_SECOND: - magnify = self.calcMagnify(self.config.rightYAxisSecondNumberLevel); - break; - default: - break; - } - self.yAxis[idx - 1].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: { - fontFamily: "inherit", - color: "#808080", - fontSize: "12px", - fontWeight: "" - }, - text: t.text, - align: "left" - } - }); - }); - } - }); - }, - - getXYAxisUnit: function (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - default: - break; - } - if (position === this.constants.X_AXIS) { - this.config.xAxisUnit !== "" && (unit = unit + this.config.xAxisUnit); - } - if (position === this.constants.LEFT_AXIS) { - this.config.leftYAxisUnit !== "" && (unit = unit + this.config.leftYAxisUnit); - } - if (position === this.constants.RIGHT_AXIS) { - this.config.rightYAxisUnit !== "" && (unit = unit + this.config.rightYAxisUnit); - } - if (position === this.constants.RIGHT_AXIS_SECOND) { - this.config.rightYAxisSecondUnit !== "" && (unit = unit + this.config.rightYAxisSecondUnit); - } - return unit === "" ? unit : "(" + unit + ")"; - }, - - populate: function (items, options, types) { - var self = this, c = this.constants; - this.config = { - leftYAxisTitle: options.leftYAxisTitle || "", - rightYAxisTitle: options.rightYAxisTitle || "", - rightYAxisSecondTitle: options.rightYAxisSecondTitle || "", - chartColor: options.chartColor || ["#5caae4", "#70cc7f", "#ebbb67", "#e97e7b", "#6ed3c9"], - chartStyle: options.chartStyle || c.NORMAL, - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - rightYAxisStyle: options.rightYAxisStyle || c.NORMAL, - rightYAxisSecondStyle: options.rightYAxisSecondStyle || c.NORMAL, - showXAxisTitle: options.showXAxisTitle || false, - showLeftYAxisTitle: options.showLeftYAxisTitle || false, - showRightYAxisTitle: options.showRightYAxisTitle || false, - showRightYAxisSecondTitle: options.showRightYAxisSecondTitle || false, - leftYAxisReversed: options.leftYAxisReversed || false, - rightYAxisReversed: options.rightYAxisReversed || false, - rightYAxisSecondReversed: options.rightYAxisSecondReversed || false, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - rightYAxisNumberLevel: options.rightYAxisNumberLevel || c.NORMAL, - rightYAxisSecondNumberLevel: options.rightYAxisSecondNumberLevel || c.NORMAL, - xAxisUnit: options.xAxisUnit || "", - leftYAxisUnit: options.leftYAxisUnit || "", - rightYAxisUnit: options.rightYAxisUnit || "", - rightYAxisSecondUnit: options.rightYAxisSecondUnit || "", - xAxisTitle: options.xAxisTitle || "", - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showDataTable: options.showDataTable || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - showZoom: options.showZoom || false, - textDirection: options.textDirection || 0, - cordon: options.cordon || [], - lineWidth: BI.isNull(options.lineWidth) ? 1 : options.lineWidth, - showLabel: BI.isNull(options.showLabel) ? true : options.showLabel, - enableTick: BI.isNull(options.enableTick) ? true : options.enableTick, - enableMinorTick: BI.isNull(options.enableMinorTick) ? true : options.enableMinorTick, - numSeparators: options.numSeparators || false, - rightNumSeparators: options.rightNumSeparators || false, - rightNumSeparators: options.rightNumSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE, - nullContinue: options.nullContinue || false - }; - this.options.items = items; - - this.yAxis = []; - BI.each(types, function (idx, type) { - if (BI.isEmptyArray(type)) { - return; - } - var newYAxis = { - type: "value", - title: { - style: {fontFamily: "inherit", color: "#808080", fontSize: "12px", fontWeight: ""} - }, - labelStyle: { - fontFamily: "inherit", color: "#808080", fontSize: "12px" - }, - position: idx > 0 ? "right" : "left", - lineWidth: 1, - axisIndex: idx, - gridLineWidth: 0 - }; - self.yAxis.push(newYAxis); - }); - - this.combineChart.populate(items, types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.MultiAxisChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.multi_axis_chart", BI.MultiAxisChart);/** - * 图表控件 - * @class BI.MultiAxisChart - * @extends BI.Widget - * leftYxis 左值轴属性 - * rightYxis 右值轴属性 - * xAxis 分类轴属性 - */ -BI.MultiAxisCombineChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.MultiAxisCombineChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-multi-axis-combine-chart" - }); - }, - - _init: function () { - BI.MultiAxisCombineChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.xAxis = [{ - type: "category", - title: { - style: {fontFamily: "inherit", color: "#808080", fontSize: "12px", fontWeight: ""} - }, - labelStyle: { - fontFamily: "inherit", color: "#808080", fontSize: "12px" - }, - position: "bottom", - gridLineWidth: 0 - }]; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - xAxis: this.xAxis, - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.MultiAxisCombineChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this, o = this.options; - config.colors = this.config.chartColor; - config.style = this.formatChartStyle(); - this.formatCordon(); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.plotOptions.connectNulls = this.config.nullContinue; - config.dataSheet.enabled = this.config.showDataTable; - config.xAxis[0].showLabel = !config.dataSheet.enabled; - config.zoom.zoomTool.enabled = this.config.showZoom; - if (this.config.showZoom === true) { - delete config.dataSheet; - delete config.zoom.zoomType; - } - - config.yAxis = this.yAxis; - BI.each(config.yAxis, function (idx, axis) { - var title = ""; - switch (axis.axisIndex) { - case self.constants.LEFT_AXIS: - title = self.getXYAxisUnit(self.config.leftYAxisNumberLevel, self.constants.LEFT_AXIS); - axis.title.text = self.config.showLeftYAxisTitle === true ? self.config.leftYAxisTitle + title : title; - axis.title.rotation = self.constants.ROTATION; - axis.labelStyle.color = axis.lineColor = axis.tickColor = config.colors[0]; - BI.extend(axis, { - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - reversed: self.config.leftYAxisReversed, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: self.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(self.config.leftYAxisStyle, self.config.leftYAxisNumberLevel, self.config.numSeparators) - }); - self.formatNumberLevelInYaxis(config, items, self.config.leftYAxisNumberLevel, idx, axis.formatter); - break; - case self.constants.RIGHT_AXIS: - title = self.getXYAxisUnit(self.config.rightYAxisNumberLevel, self.constants.RIGHT_AXIS); - axis.title.text = self.config.showRightYAxisTitle === true ? self.config.rightYAxisTitle + title : title; - axis.title.rotation = self.constants.ROTATION; - axis.labelStyle.color = axis.lineColor = axis.tickColor = config.colors[1]; - BI.extend(axis, { - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - reversed: self.config.rightYAxisReversed, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: self.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(self.config.rightYAxisStyle, self.config.rightYAxisNumberLevel, self.config.rightNumSeparators) - }); - self.formatNumberLevelInYaxis(config, items, self.config.rightYAxisNumberLevel, idx, axis.formatter); - break; - case self.constants.RIGHT_AXIS_SECOND: - title = self.getXYAxisUnit(self.config.rightYAxisSecondNumberLevel, self.constants.RIGHT_AXIS_SECOND); - axis.title.text = self.config.showRightYAxisSecondTitle === true ? self.config.rightYAxisSecondTitle + title : title; - axis.title.rotation = self.constants.ROTATION; - axis.labelStyle.color = axis.lineColor = axis.tickColor = config.colors[2]; - BI.extend(axis, { - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - reversed: self.config.rightYAxisSecondReversed, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: self.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(self.config.rightYAxisSecondStyle, self.config.rightYAxisSecondNumberLevel, self.config.rightNumSeparators) - }); - self.formatNumberLevelInYaxis(config, items, self.config.rightYAxisSecondNumberLevel, idx, axis.formatter); - break; - default: - break; - } - }); - config.xAxis[0].title.align = "center"; - config.xAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle : ""; - BI.extend(config.xAxis[0], { - lineWidth: this.config.lineWidth, - enableTick: this.config.enableTick, - labelRotation: this.config.textDirection, - enableMinorTick: this.config.enableMinorTick, - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - maxHeight: "40%" - }); - - // 为了给数据标签加个%,还要遍历所有的系列,唉 - this.formatDataLabel(config.plotOptions.dataLabels.enabled, items, config, this.config.chartFont); - - // 全局样式的图表文字 - if (config.dataSheet) { - config.dataSheet.style = this.config.chartFont; - } - config.xAxis[0].title.style = config.xAxis[0].labelStyle = this.config.chartFont; - config.legend.style = this.config.chartFont; - config.plotOptions.dataLabels.style = this.config.chartFont; - BI.each(config.yAxis, function (idx, axis) { - axis.title.style = self.config.chartFont; - }); - - return [items, config]; - }, - - formatChartStyle: function () { - switch (this.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - }, - - formatCordon: function () { - var self = this; - var magnify = 1; - BI.each(this.config.cordon, function (idx, cor) { - if (idx === 0 && self.xAxis.length > 0) { - magnify = self.calcMagnify(self.config.xAxisNumberLevel); - self.xAxis[0].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: { - fontFamily: "inherit", - color: "#808080", - fontSize: "12px", - fontWeight: "" - }, - text: t.text, - align: "top" - } - }); - }); - } - if (idx > 0 && self.yAxis.length >= idx) { - magnify = 1; - switch (idx - 1) { - case self.constants.LEFT_AXIS: - magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS: - magnify = self.calcMagnify(self.config.rightYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS_SECOND: - magnify = self.calcMagnify(self.config.rightYAxisSecondNumberLevel); - break; - default: - break; - } - self.yAxis[idx - 1].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: { - fontFamily: "inherit", - color: "#808080", - fontSize: "12px", - fontWeight: "" - }, - text: t.text, - align: "left" - } - }); - }); - } - }); - }, - - getXYAxisUnit: function (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - default: - break; - } - if (position === this.constants.X_AXIS) { - this.config.xAxisUnit !== "" && (unit = unit + this.config.xAxisUnit); - } - if (position === this.constants.LEFT_AXIS) { - this.config.leftYAxisUnit !== "" && (unit = unit + this.config.leftYAxisUnit); - } - if (position === this.constants.RIGHT_AXIS) { - this.config.rightYAxisUnit !== "" && (unit = unit + this.config.rightYAxisUnit); - } - if (position === this.constants.RIGHT_AXIS_SECOND) { - this.config.rightYAxisSecondUnit !== "" && (unit = unit + this.config.rightYAxisSecondUnit); - } - return unit === "" ? unit : "(" + unit + ")"; - }, - - populate: function (items, options, types) { - var self = this, c = this.constants; - this.config = { - leftYAxisTitle: options.leftYAxisTitle || "", - rightYAxisTitle: options.rightYAxisTitle || "", - rightYAxisSecondTitle: options.rightYAxisSecondTitle || "", - chartColor: options.chartColor || ["#5caae4", "#70cc7f", "#ebbb67", "#e97e7b", "#6ed3c9"], - chartStyle: options.chartStyle || c.NORMAL, - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - rightYAxisStyle: options.rightYAxisStyle || c.NORMAL, - rightYAxisSecondStyle: options.rightYAxisSecondStyle || c.NORMAL, - showXAxisTitle: options.showXAxisTitle || false, - showLeftYAxisTitle: options.showLeftYAxisTitle || false, - showRightYAxisTitle: options.showRightYAxisTitle || false, - showRightYAxisSecondTitle: options.showRightYAxisSecondTitle || false, - leftYAxisReversed: options.leftYAxisReversed || false, - rightYAxisReversed: options.rightYAxisReversed || false, - rightYAxisSecondReversed: options.rightYAxisSecondReversed || false, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - rightYAxisNumberLevel: options.rightYAxisNumberLevel || c.NORMAL, - rightYAxisSecondNumberLevel: options.rightYAxisSecondNumberLevel || c.NORMAL, - xAxisUnit: options.xAxisUnit || "", - leftYAxisUnit: options.leftYAxisUnit || "", - rightYAxisUnit: options.rightYAxisUnit || "", - rightYAxisSecondUnit: options.rightYAxisSecondUnit || "", - xAxisTitle: options.xAxisTitle || "", - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showDataTable: options.showDataTable || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - showZoom: options.showZoom || false, - textDirection: options.textDirection || 0, - cordon: options.cordon || [], - lineWidth: BI.isNull(options.lineWidth) ? 1 : options.lineWidth, - showLabel: BI.isNull(options.showLabel) ? true : options.showLabel, - enableTick: BI.isNull(options.enableTick) ? true : options.enableTick, - enableMinorTick: BI.isNull(options.enableMinorTick) ? true : options.enableMinorTick, - numSeparators: options.numSeparators || false, - rightNumSeparators: options.rightNumSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE, - nullContinue: options.nullContinue || false - }; - this.options.items = items; - - this.yAxis = []; - BI.each(types, function (idx, type) { - if (BI.isEmptyArray(type)) { - return; - } - var newYAxis = { - type: "value", - title: { - style: {fontFamily: "inherit", color: "#808080", fontSize: "12px", fontWeight: ""} - }, - labelStyle: { - fontFamily: "inherit", color: "#808080", fontSize: "12px" - }, - position: idx > 0 ? "right" : "left", - lineWidth: 1, - axisIndex: idx, - gridLineWidth: 0 - }; - self.yAxis.push(newYAxis); - }); - - this.combineChart.populate(items, types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.MultiAxisCombineChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.multi_axis_combine_chart", BI.MultiAxisCombineChart);/** - * 图表控件 - * @class BI.PercentAccumulateAreaChart - * @extends BI.Widget - */ -BI.PercentAccumulateAreaChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.PercentAccumulateAreaChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-percent-accumulate-area-chart" - }); - }, - - _init: function () { - BI.PercentAccumulateAreaChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.xAxis = [{ - type: "category", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - position: "bottom", - gridLineWidth: 0 - }]; - this.yAxis = [{ - type: "value", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - position: "left", - gridLineWidth: 0 - }]; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - xAxis: this.xAxis, - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.PercentAccumulateAreaChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this; - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - formatCordon(); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.plotOptions.connectNulls = this.config.nullContinue; - config.dataSheet.enabled = this.config.showDataTable; - config.xAxis[0].showLabel = !config.dataSheet.enabled; - config.zoom.zoomTool.enabled = this.config.showZoom; - if (this.config.showZoom === true) { - delete config.dataSheet; - delete config.zoom.zoomType; - } - - config.yAxis = this.yAxis; - config.yAxis[0].title.text = getXYAxisUnit(this.config.leftYAxisNumberLevel, this.constants.LEFT_AXIS); - config.yAxis[0].title.rotation = this.constants.ROTATION; - BI.extend(config.yAxis[0], { - lineWidth: this.config.lineWidth, - showLabel: this.config.showLabel, - enableTick: this.config.enableTick, - reversed: this.config.leftYAxisReversed, - enableMinorTick: this.config.enableMinorTick, - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(this.config.leftYAxisStyle, this.config.leftYAxisNumberLevel, this.config.numSeparators) - }); - self.formatNumberLevelInYaxis(config, items, this.config.leftYAxisNumberLevel, this.constants.LEFT_AXIS, config.yAxis[0].formatter, true); - - config.xAxis[0].title.align = "center"; - config.xAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle : ""; - BI.extend(config.xAxis[0], { - lineWidth: this.config.lineWidth, - enableTick: this.config.enableTick, - labelRotation: this.config.textDirection, - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - maxHeight: "40%" - }); - - config.chartType = "area"; - - // 为了给数据标签加个%,还要遍历所有的系列,唉 - this.formatDataLabelForAxis(config.plotOptions.dataLabels.enabled, items, config.yAxis[0].formatter, this.config.chartFont, true); - - // 全局样式的图表文字 - this.setFontStyle(this.config.chartFont, config); - - return [items, config]; - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function formatCordon () { - BI.each(self.config.cordon, function (idx, cor) { - if (idx === 0 && self.xAxis.length > 0) { - var magnify = self.calcMagnify(self.config.xAxisNumberLevel); - self.xAxis[0].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "top" - } - }); - }); - } - if (idx > 0 && self.yAxis.length >= idx) { - var magnify = 1; - switch (idx - 1) { - case self.constants.LEFT_AXIS: - magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS: - magnify = self.calcMagnify(self.config.rightYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS_SECOND: - magnify = self.calcMagnify(self.config.rightYAxisSecondNumberLevel); - break; - } - self.yAxis[idx - 1].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "left" - } - }); - }); - } - }); - } - - function getXYAxisUnit (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - if (position === self.constants.X_AXIS) { - self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit); - } - if (position === self.constants.LEFT_AXIS) { - self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit); - } - - unit = unit === "" ? unit : "(" + unit + ")"; - - return self.config.showLeftYAxisTitle === true ? self.config.leftYAxisTitle + unit : unit; - } - }, - - _formatItems: function (items) { - return BI.map(items, function (idx, item) { - var i = BI.UUID(); - return BI.map(item, function (id, it) { - return BI.extend({}, it, {stack: i, stackByPercent: true}); - }); - }); - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - leftYAxisTitle: options.leftYAxisTitle || "", - chartColor: options.chartColor || [], - chartStyle: options.chartStyle || c.NORMAL, - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - showXAxisTitle: options.showXAxisTitle || false, - showLeftYAxisTitle: options.showLeftYAxisTitle || false, - leftYAxisReversed: options.leftYAxisReversed || false, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - xAxisUnit: options.xAxisUnit || "", - leftYAxisUnit: options.leftYAxisUnit || "", - xAxisTitle: options.xAxisTitle || "", - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showDataTable: options.showDataTable || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - showZoom: options.showZoom || false, - textDirection: options.textDirection || 0, - cordon: options.cordon || [], - lineWidth: BI.isNull(options.lineWidth) ? 1 : options.lineWidth, - showLabel: BI.isNull(options.showLabel) ? true : options.showLabel, - enableTick: BI.isNull(options.enableTick) ? true : options.enableTick, - enableMinorTick: BI.isNull(options.enableMinorTick) ? true : options.enableMinorTick, - numSeparators: options.numSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE, - nullContinue: options.nullContinue || false - }; - this.options.items = items; - - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.AREA); - }); - types.push(type); - }); - - this.combineChart.populate(this._formatItems(items), types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.PercentAccumulateAreaChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.percent_accumulate_area_chart", BI.PercentAccumulateAreaChart);/** - * 图表控件 百分比堆积柱状 - * @class BI.PercentAccumulateAxisChart - * @extends BI.Widget - */ -BI.PercentAccumulateAxisChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.PercentAccumulateAxisChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-percent-accumulate-axis-chart" - }); - }, - - _init: function () { - BI.PercentAccumulateAxisChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.xAxis = [{ - type: "category", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - position: "bottom", - gridLineWidth: 0 - }]; - this.yAxis = [{ - type: "value", - title: { - style: self.constants.FONT_STYLE - }, - labelStyle: self.constants.FONT_STYLE, - position: "left", - gridLineWidth: 0 - }]; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - xAxis: this.xAxis, - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.PercentAccumulateAxisChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this, o = this.options; - var yTitle = getXYAxisUnit(this.config.leftYAxisNumberLevel, this.constants.LEFT_AXIS); - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - formatCordon(); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.dataSheet.enabled = this.config.showDataTable; - config.xAxis[0].showLabel = !config.dataSheet.enabled; - config.zoom.zoomTool.enabled = this.config.showZoom; - if (this.config.showZoom === true) { - delete config.dataSheet; - delete config.zoom.zoomType; - } - - config.yAxis = this.yAxis; - config.yAxis[0].title.rotation = this.constants.ROTATION; - config.yAxis[0].title.text = this.config.showLeftYAxisTitle === true ? this.config.leftYAxisTitle + yTitle : yTitle; - BI.extend(config.yAxis[0], { - lineWidth: this.config.lineWidth, - showLabel: this.config.showLabel, - enableTick: this.config.enableTick, - reversed: this.config.leftYAxisReversed, - enableMinorTick: this.config.enableMinorTick, - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(this.config.leftYAxisStyle, this.config.leftYAxisNumberLevel, this.config.numSeparators) - }); - self.formatNumberLevelInYaxis(config, items, this.config.leftYAxisNumberLevel, this.constants.LEFT_AXIS, config.yAxis[0].formatter, true); - - config.xAxis[0].title.align = "center"; - config.xAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle : ""; - BI.extend(config.xAxis[0], { - lineWidth: this.config.lineWidth, - enableTick: this.config.enableTick, - labelRotation: this.config.textDirection, - enableMinorTick: this.config.enableMinorTick, - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - maxHeight: "40%" - }); - - // 为了给数据标签加个%,还要遍历所有的系列,唉 - this.formatDataLabelForAxis(config.plotOptions.dataLabels.enabled, items, config.yAxis[0].formatter, this.config.chartFont, true); - - // 全局样式的图表文字 - this.setFontStyle(this.config.chartFont, config); - - return [items, config]; - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function formatCordon () { - BI.each(self.config.cordon, function (idx, cor) { - if (idx === 0 && self.xAxis.length > 0) { - var magnify = self.calcMagnify(self.config.xAxisNumberLevel); - self.xAxis[0].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "top" - } - }); - }); - } - if (idx > 0 && self.yAxis.length >= idx) { - var magnify = 1; - switch (idx - 1) { - case self.constants.LEFT_AXIS: - magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS: - magnify = self.calcMagnify(self.config.rightYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS_SECOND: - magnify = self.calcMagnify(self.config.rightYAxisSecondNumberLevel); - break; - } - self.yAxis[idx - 1].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "left" - } - }); - }); - } - }); - } - - function getXYAxisUnit (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - if (position === self.constants.X_AXIS) { - self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit); - } - if (position === self.constants.LEFT_AXIS) { - self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit); - } - return unit === "" ? unit : "(" + unit + ")"; - } - }, - - _formatItems: function (items) { - return BI.map(items, function (idx, item) { - var i = BI.UUID(); - return BI.map(item, function (id, it) { - return BI.extend({}, it, {stack: i, stackByPercent: true}); - }); - }); - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - leftYAxisTitle: options.leftYAxisTitle || "", - chartColor: options.chartColor || [], - chartStyle: options.chartStyle || c.NORMAL, - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - showXAxisTitle: options.showXAxisTitle || false, - showLeftYAxisTitle: options.showLeftYAxisTitle || false, - leftYAxisReversed: options.leftYAxisReversed || false, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - xAxisUnit: options.xAxisUnit || "", - leftYAxisUnit: options.leftYAxisUnit || "", - xAxisTitle: options.xAxisTitle || "", - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showDataTable: options.showDataTable || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - showZoom: options.showZoom || false, - textDirection: options.textDirection || 0, - cordon: options.cordon || [], - lineWidth: BI.isNull(options.lineWidth) ? 1 : options.lineWidth, - showLabel: BI.isNull(options.showLabel) ? true : options.showLabel, - enableTick: BI.isNull(options.enableTick) ? true : options.enableTick, - enableMinorTick: BI.isNull(options.enableMinorTick) ? true : options.enableMinorTick, - numSeparators: options.numSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE - }; - this.options.items = items; - - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.AXIS); - }); - types.push(type); - }); - - this.combineChart.populate(this._formatItems(items), types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.PercentAccumulateAxisChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.percent_accumulate_axis_chart", BI.PercentAccumulateAxisChart);/** - * 图表控件 - * @class BI.PieChart - * @extends BI.Widget - */ -BI.PieChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.PieChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-pie-chart" - }); - }, - - _init: function () { - BI.PieChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.PieChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this, o = this.options; - delete config.zoom; - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - formatChartPieStyle(); - - this.formatChartLegend(config, this.config.chartLegend); - - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.plotOptions.tooltip.formatter.identifier = "${CATEGORY}${SERIES}${VALUE}${PERCENT}"; - - config.chartType = "pie"; - delete config.xAxis; - delete config.yAxis; - config.plotOptions.dataLabels.align = "outside"; - config.plotOptions.dataLabels.connectorWidth = "outside"; - config.plotOptions.dataLabels.formatter.identifier = "${VALUE}${PERCENT}"; - config.plotOptions.dataLabels.style = this.config.chartFont; - BI.each(items, function (idx, item) { - BI.each(item.data, function (id, da) { - da.y = self.formatXYDataWithMagnify(da.y, 1); - }); - }); - - config.legend.style = this.config.chartFont; - - return [items, config]; - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function formatChartPieStyle () { - switch (self.config.chartPieType) { - case BICst.CHART_SHAPE.EQUAL_ARC_ROSE: - config.plotOptions.roseType = "sameArc"; - break; - case BICst.CHART_SHAPE.NOT_EQUAL_ARC_ROSE: - config.plotOptions.roseType = "differentArc"; - break; - case BICst.CHART_SHAPE.NORMAL: - default: - delete config.plotOptions.roseType; - break; - } - config.plotOptions.innerRadius = self.config.chartInnerRadius + "%"; - config.plotOptions.endAngle = self.config.chartTotalAngle; - } - - }, - - // 目前饼图不会有多个系列,如果有多个就要把它们合并在一起 - _isNeedConvert: function (items) { - var result = BI.find(items, function (idx, item) { - return item.length > 1; - }); - return BI.isNotNull(result); - }, - - _formatItems: function (items) { - if(this._isNeedConvert(items)) { - // 把每个坐标轴所有的多个系列合并成一个系列 - return BI.map(items, function (idx, item) { - var seriesItem = []; - var obj = {data: [], name: ""}; - seriesItem.push(obj); - BI.each(item, function (id, series) { - BI.each(series.data, function (i, da) { - obj.data.push(BI.extend({}, da, {x: series.name})); - }); - }); - return seriesItem; - }); - } - return items; - - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - chartColor: options.chartColor || [], - chartStyle: options.chartStyle || c.NORMAL, - chartPieType: options.chartPieType || c.NORMAL, - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - chartInnerRadius: options.chartInnerRadius || 0, - chartTotalAngle: options.chartTotalAngle || BICst.PIE_ANGLES.TOTAL, - chartFont: options.chartFont || c.FONT_STYLE - }; - this.options.items = items; - - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.PIE); - }); - types.push(type); - }); - - this.combineChart.populate(this._formatItems(items), types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.PieChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.pie_chart", BI.PieChart); - -/** - * 图表控件 - * @class BI.RadarChart - * @extends BI.Widget - */ -BI.RadarChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.RadarChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-radar-chart" - }); - }, - - _init: function () { - BI.RadarChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.radiusAxis = [{ - type: "value", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - formatter: function () { - return this > 0 ? this : (-1) * this; - }, - gridLineWidth: 0, - position: "bottom" - }]; - - this.angleAxis = [{ - type: "category", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE - }]; - - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.RadarChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this; - - delete config.zoom; - - var title = getXYAxisUnit(this.config.leftYAxisNumberLevel, this.constants.LEFT_AXIS); - - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - formatChartRadarStyle(); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.plotOptions.connectNulls = this.config.nullContinue; - - config.radiusAxis = this.radiusAxis; - config.angleAxis = this.angleAxis; - config.radiusAxis[0].formatter = self.formatTickInXYaxis(this.config.leftYAxisStyle, this.config.leftYAxisNumberLevel, this.config.numSeparators); - formatNumberLevelInYaxis(this.config.leftYAxisNumberLevel, this.constants.LEFT_AXIS, config.radiusAxis[0].formatter); - config.radiusAxis[0].title.text = this.config.showLeftYAxisTitle === true ? this.config.leftYAxisTitle + title : title; - config.radiusAxis[0].gridLineWidth = this.config.showGridLine === true ? 1 : 0; - config.chartType = "radar"; - delete config.xAxis; - delete config.yAxis; - // 为了给数据标签加个%,还要遍历所有的系列,唉 - this.formatDataLabelForAxis(config.plotOptions.dataLabels.enabled, items, config.radiusAxis[0].formatter, this.config.chartFont); - - // 全局样式 - config.legend.style = this.config.chartFont; - config.radiusAxis[0].title.style = config.radiusAxis[0].labelStyle = this.config.chartFont; - config.angleAxis[0].title.style = config.angleAxis[0].labelStyle = this.config.chartFont; - - return [items, config]; - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function formatChartRadarStyle () { - switch (self.config.chartRadarType) { - case BICst.CHART_SHAPE.POLYGON: - config.plotOptions.shape = "polygon"; - break; - case BICst.CHART_SHAPE.CIRCLE: - config.plotOptions.shape = "circle"; - break; - } - } - - function formatNumberLevelInYaxis (type, position, formatter) { - var magnify = self.calcMagnify(type); - BI.each(items, function (idx, item) { - BI.each(item.data, function (id, da) { - if (position === item.yAxis) { - da.y = self.formatXYDataWithMagnify(da.y, magnify); - } - }); - }); - config.plotOptions.tooltip.formatter.valueFormat = formatter; - } - - function getXYAxisUnit (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - if (position === self.constants.X_AXIS) { - self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit); - } - if (position === self.constants.LEFT_AXIS) { - self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit); - } - if (position === self.constants.RIGHT_AXIS) { - self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit); - } - return unit === "" ? unit : "(" + unit + ")"; - } - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - chartRadarType: options.chartRadarType || c.POLYGON, - chartColor: options.chartColor || [], - chartStyle: options.chartStyle || c.STYLE_NORMAL, - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - cordon: options.cordon || [], - numSeparators: options.numSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE, - nullContinue: options.nullContinue || false - }; - this.options.items = items; - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.RADAR); - }); - types.push(type); - }); - this.combineChart.populate(items, types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.RadarChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.radar_chart", BI.RadarChart);/** - * 图表控件 - * @class BI.RangeAreaChart - * @extends BI.Widget - * 范围面积图的构造范围的两组item的必须有对应y值item1完全大于item2 - */ -BI.RangeAreaChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.RangeAreaChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-range-area-chart" - }); - }, - - _init: function () { - BI.RangeAreaChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.xAxis = [{ - type: "category", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - position: "bottom", - gridLineWidth: 0 - }]; - this.yAxis = [{ - type: "value", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - position: "left", - gridLineWidth: 0 - }]; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - xAxis: this.xAxis, - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.RangeAreaChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this; - var title = getXYAxisUnit(this.config.leftYAxisNumberLevel, this.constants.LEFT_AXIS); - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - formatCordon(); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.plotOptions.connectNulls = this.config.nullContinue; - - config.yAxis = this.yAxis; - config.yAxis[0].title.rotation = this.constants.ROTATION; - config.yAxis[0].title.text = this.config.showLeftYAxisTitle === true ? this.config.leftYAxisTitle + title : title; - BI.extend(config.yAxis[0], { - lineWidth: this.config.lineWidth, - showLabel: this.config.showLabel, - enableTick: this.config.enableTick, - enableMinorTick: this.config.enableMinorTick, - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - reversed: config.yAxis[0].reversed = this.config.leftYAxisReversed, - formatter: self.formatTickInXYaxis(this.config.leftYAxisStyle, this.config.leftYAxisNumberLevel, this.config.numSeparators) - }); - formatNumberLevelInYaxis(this.config.leftYAxisNumberLevel, this.constants.LEFT_AXIS, config.yAxis[0].formatter); - - config.xAxis[0].title.align = "center"; - config.xAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle : ""; - BI.extend(config.xAxis[0], { - lineWidth: this.config.lineWidth, - enableTick: this.config.enableTick, - labelRotation: this.config.textDirection, - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - maxHeight: "40%" - }); - - config.chartType = "area"; - config.plotOptions.tooltip.formatter.identifier = "${CATEGORY}${VALUE}"; - - // 为了给数据标签加个%,还要遍历所有的系列,唉 - this.formatDataLabelForAxis(config.plotOptions.dataLabels.enabled, items, config.yAxis[0].formatter, this.config.chartFont); - - // 全局样式的图表文字 - this.setFontStyle(this.config.chartFont, config); - - return [items, config]; - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function formatCordon () { - BI.each(self.config.cordon, function (idx, cor) { - if (idx === 0 && self.xAxis.length > 0) { - var magnify = self.calcMagnify(self.config.xAxisNumberLevel); - self.xAxis[0].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "top" - } - }); - }); - } - if (idx > 0 && self.yAxis.length >= idx) { - var magnify = 1; - switch (idx - 1) { - case self.constants.LEFT_AXIS: - magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS: - magnify = self.calcMagnify(self.config.rightYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS_SECOND: - magnify = self.calcMagnify(self.config.rightYAxisSecondNumberLevel); - break; - } - self.yAxis[idx - 1].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "left" - } - }); - }); - } - }); - } - - function formatNumberLevelInYaxis (type, position, formatter) { - var magnify = self.calcMagnify(type); - BI.each(items, function (idx, item) { - BI.each(item.data, function (id, da) { - if (position === item.yAxis) { - da.y = self.formatXYDataWithMagnify(da.y, magnify); - } - }); - }); - config.plotOptions.tooltip.formatter.valueFormat = formatter; - } - - function getXYAxisUnit (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - if (position === self.constants.X_AXIS) { - self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit); - } - if (position === self.constants.LEFT_AXIS) { - self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit); - } - return unit === "" ? unit : "(" + unit + ")"; - } - }, - - _formatItems: function (data) { - var o = this.options; - var items = []; - BI.each(data, function (idx, item) { - items = BI.concat(items, item); - }); - if (BI.isEmptyArray(items)) { - return []; - } - if (items.length === 1) { - return [items]; - } - var colors = this.config.chartColor || []; - if (BI.isEmptyArray(colors)) { - colors = ["#5caae4"]; - } - var seriesMinus = []; - BI.each(items[0].data, function (idx, item) { - var res = items[1].data[idx].y - item.y; - seriesMinus.push({ - x: items[1].data[idx].x, - y: res, - targetIds: items[1].data[idx].targetIds - }); - }); - items[1] = { - data: seriesMinus, - name: items[1].name, - stack: "stackedArea", - fillColor: colors[0] - }; - BI.each(items, function (idx, item) { - if (idx === 0) { - BI.extend(item, { - name: items[0].name, - fillColorOpacity: 0, - stack: "stackedArea", - marker: {enabled: false}, - fillColor: "#000000" - }); - } - }); - return [items]; - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - leftYAxisTitle: options.leftYAxisTitle || "", - chartColor: options.chartColor || [], - chartStyle: options.chartStyle || c.NORMAL, - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - showXAxisTitle: options.showXAxisTitle || false, - showLeftYAxisTitle: options.showLeftYAxisTitle || false, - leftYAxisReversed: options.leftYAxisReversed || false, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - xAxisUnit: options.xAxisUnit || "", - leftYAxisUnit: options.leftYAxisUnit || "", - xAxisTitle: options.xAxisTitle || "", - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - textDirection: options.textDirection || 0, - cordon: options.cordon || [], - lineWidth: BI.isNull(options.lineWidth) ? 1 : options.lineWidth, - showLabel: BI.isNull(options.showLabel) ? true : options.showLabel, - enableTick: BI.isNull(options.enableTick) ? true : options.enableTick, - enableMinorTick: BI.isNull(options.enableMinorTick) ? true : options.enableMinorTick, - numSeparators: options.numSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE, - nullContinue: options.nullContinue || false - }; - this.options.items = items; - - var types = []; - var type = []; - BI.each(items, function (idx, axisItems) { - type.push(BICst.WIDGET.AREA); - }); - if (BI.isNotEmptyArray(type)) { - types.push(type); - } - - this.combineChart.populate(this._formatItems(items), types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.RangeAreaChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.range_area_chart", BI.RangeAreaChart);/** - * 图表控件 - * @class BI.ScatterChart - * @extends BI.Widget - */ -BI.ScatterChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.ScatterChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-scatter-chart" - }); - }, - - _init: function () { - BI.ScatterChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.xAxis = [{ - type: "value", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - position: "bottom", - gridLineWidth: 0 - }]; - this.yAxis = [{ - type: "value", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - position: "left", - gridLineWidth: 0 - }]; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - xAxis: this.xAxis, - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.ScatterChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - - _formatConfig: function (config, items) { - var self = this; - delete config.zoom; - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - config.plotOptions.marker = {symbol: "circle", radius: 4.5, enabled: true}; - formatCordon(); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.plotOptions.dataLabels.formatter.identifier = "${X}${Y}"; - - config.yAxis = this.yAxis; - config.xAxis = this.xAxis; - - config.yAxis[0].formatter = self.formatTickInXYaxis(this.config.leftYAxisStyle, this.config.leftYAxisNumberLevel, this.config.numSeparators); - formatNumberLevelInYaxis(this.config.leftYAxisNumberLevel); - config.yAxis[0].title.text = getXYAxisUnit(this.config.leftYAxisNumberLevel, this.constants.LEFT_AXIS); - config.yAxis[0].title.text = this.config.showLeftYAxisTitle === true ? this.config.leftYAxisTitle + config.yAxis[0].title.text : config.yAxis[0].title.text; - config.yAxis[0].gridLineWidth = this.config.showGridLine === true ? 1 : 0; - config.yAxis[0].title.rotation = this.constants.ROTATION; - config.yAxis[0].maxWidth = "40%"; - - config.xAxis[0].formatter = self.formatTickInXYaxis(this.config.xAxisStyle, this.config.xAxisNumberLevel, this.config.rightNumSeparators); - formatNumberLevelInXaxis(this.config.xAxisNumberLevel); - config.xAxis[0].title.text = getXYAxisUnit(this.config.xAxisNumberLevel, this.constants.X_AXIS); - config.xAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle + config.xAxis[0].title.text : config.xAxis[0].title.text; - config.xAxis[0].title.align = "center"; - config.xAxis[0].gridLineWidth = this.config.showGridLine === true ? 1 : 0; - config.xAxis[0].maxHeight = "40%"; - config.chartType = "scatter"; - - if (BI.isNotEmptyArray(this.config.tooltip)) { - config.plotOptions.tooltip.formatter = function () { - var y = self.formatTickInXYaxis(self.config.leftYAxisStyle, self.config.leftYAxisNumberLevel, self.config.numSeparators)(this.y); - var x = self.formatTickInXYaxis(self.config.xAxisStyle, self.config.xAxisNumberLevel, self.config.rightNumSeparators)(this.x); - return this.seriesName + "
(X)" + self.config.tooltip[0] - + ":" + x + "
(Y)" + self.config.tooltip[1] + ":" + y + "
"; - }; - } - - if (config.plotOptions.dataLabels.enabled === true) { - BI.each(items, function (idx, item) { - item.dataLabels = { - style: self.config.chartFont, - align: "outside", - autoAdjust: true, - enabled: true, - formatter: { - identifier: "${X}${Y}", - XFormat: function () { - return BI.contentFormat(arguments[0], "#.##;-#.##"); - }, - YFormat: function () { - return BI.contentFormat(arguments[0], "#.##;-#.##"); - } - } - }; - item.dataLabels.formatter.XFormat = config.xAxis[0].formatter; - item.dataLabels.formatter.YFormat = config.yAxis[0].formatter; - }); - } - - // 全局样式图表文字 - config.legend.style = this.config.chartFont; - config.yAxis[0].title.style = config.yAxis[0].labelStyle = this.config.chartFont; - config.xAxis[0].title.style = config.xAxis[0].labelStyle = this.config.chartFont; - - return [items, config]; - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function formatCordon () { - BI.each(self.config.cordon, function (idx, cor) { - if (idx === 0 && self.xAxis.length > 0) { - var magnify = self.calcMagnify(self.config.xAxisNumberLevel); - self.xAxis[0].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "top" - } - }); - }); - } - if (idx > 0 && self.yAxis.length >= idx) { - var magnify = 1; - switch (idx - 1) { - case self.constants.LEFT_AXIS: - magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS: - magnify = self.calcMagnify(self.config.rightYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS_SECOND: - magnify = self.calcMagnify(self.config.rightYAxisSecondNumberLevel); - break; - } - self.yAxis[idx - 1].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "left" - } - }); - }); - } - }); - } - - function formatNumberLevelInXaxis (type) { - var magnify = self.calcMagnify(type); - BI.each(items, function (idx, item) { - BI.each(item.data, function (id, da) { - da.x = self.formatXYDataWithMagnify(da.x, magnify); - }); - }); - } - - function formatNumberLevelInYaxis (type) { - var magnify = self.calcMagnify(type); - BI.each(items, function (idx, item) { - BI.each(item.data, function (id, da) { - da.y = self.formatXYDataWithMagnify(da.y, magnify); - }); - }); - } - - function getXYAxisUnit (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - if (position === self.constants.X_AXIS) { - self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit); - } - if (position === self.constants.LEFT_AXIS) { - self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit); - } - if (position === self.constants.RIGHT_AXIS) { - self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit); - } - return unit === "" ? unit : "(" + unit + ")"; - } - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - leftYAxisTitle: options.leftYAxisTitle || "", - chartColor: options.chartColor || [], - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - xAxisStyle: options.xAxisStyle || c.NORMAL, - showXAxisTitle: options.showXAxisTitle || false, - showLeftYAxisTitle: options.showLeftYAxisTitle || false, - xAxisNumberLevel: options.xAxisNumberLevel || c.NORMAL, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - xAxisUnit: options.xAxisUnit || "", - leftYAxisUnit: options.leftYAxisUnit || "", - xAxisTitle: options.xAxisTitle || "", - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - cordon: options.cordon || [], - tooltip: options.tooltip || [], - numSeparators: options.numSeparators || false, - rightNumSeparators: options.rightNumSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE - }; - this.options.items = items; - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.SCATTER); - }); - types.push(type); - }); - this.combineChart.populate(items, types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.ScatterChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.scatter_chart", BI.ScatterChart); \ No newline at end of file diff --git a/dist/core.js b/dist/core.js index a00eeeada..28d26f587 100644 --- a/dist/core.js +++ b/dist/core.js @@ -12322,7 +12322,7 @@ BI.OB = function (config) { if (BI.isFunction(this.props)) { props = this.props(config); } - this.options = ($ || _).extend(this._defaultConfig(config), props, config); + this.options = (window.$ || window._).extend(this._defaultConfig(config), props, config); this._init(); this._initRef(); }; @@ -12343,7 +12343,7 @@ _.extend(BI.OB.prototype, { _initListeners: function () { var self = this; if (this.options.listeners != null) { - $.each(this.options.listeners, function (i, lis) { + _.each(this.options.listeners, function (lis) { (lis.target ? lis.target : self)[lis.once ? "once" : "on"] (lis.eventName, _.bind(lis.action, self)); }); @@ -12366,7 +12366,7 @@ _.extend(BI.OB.prototype, { }, _getEvents: function () { - if (!$.isArray(this.events)) { + if (!_.isArray(this.events)) { this.events = []; } return this.events; @@ -12380,7 +12380,7 @@ _.extend(BI.OB.prototype, { on: function (eventName, fn) { eventName = eventName.toLowerCase(); var fns = this._getEvents()[eventName]; - if (!$.isArray(fns)) { + if (!_.isArray(fns)) { fns = []; this._getEvents()[eventName] = fns; } @@ -12412,9 +12412,9 @@ _.extend(BI.OB.prototype, { delete this._getEvents()[eventName]; } else { var fns = this._getEvents()[eventName]; - if ($.isArray(fns)) { + if (_.isArray(fns)) { var newFns = []; - $.each(fns, function (idx, ifn) { + _.each(fns, function (ifn) { if (ifn != fn) { newFns.push(ifn); } @@ -20929,7 +20929,6 @@ $(function () { /** Adds the number of days array to the Date object. */ Date._MD = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; }); - /** Constants used for time computations */ Date.SECOND = 1000; Date.MINUTE = 60 * Date.SECOND; @@ -20955,7 +20954,7 @@ Date.prototype.getMonthDays = function (month) { return 29; } return Date._MD[month]; - + }; /** @@ -21415,7 +21414,7 @@ Date.getDate = function () { return new Date(utc + Date.timeZone);// + Pool.timeZone.offset); } return dt; - + }; Date.getTime = function () { @@ -21463,7 +21462,7 @@ Date.getTime = function () { return dt.getTime() - Date.timeZone - dt.getTimezoneOffset() * 60000; } return dt.getTime(); - + }; /* * 给jQuery.Event对象添加的工具方法 diff --git a/dist/fineui.js b/dist/fineui.js index e113c2e93..c29b2cab4 100644 --- a/dist/fineui.js +++ b/dist/fineui.js @@ -12523,7 +12523,7 @@ BI.OB = function (config) { if (BI.isFunction(this.props)) { props = this.props(config); } - this.options = ($ || _).extend(this._defaultConfig(config), props, config); + this.options = (window.$ || window._).extend(this._defaultConfig(config), props, config); this._init(); this._initRef(); }; @@ -12544,7 +12544,7 @@ _.extend(BI.OB.prototype, { _initListeners: function () { var self = this; if (this.options.listeners != null) { - $.each(this.options.listeners, function (i, lis) { + _.each(this.options.listeners, function (lis) { (lis.target ? lis.target : self)[lis.once ? "once" : "on"] (lis.eventName, _.bind(lis.action, self)); }); @@ -12567,7 +12567,7 @@ _.extend(BI.OB.prototype, { }, _getEvents: function () { - if (!$.isArray(this.events)) { + if (!_.isArray(this.events)) { this.events = []; } return this.events; @@ -12581,7 +12581,7 @@ _.extend(BI.OB.prototype, { on: function (eventName, fn) { eventName = eventName.toLowerCase(); var fns = this._getEvents()[eventName]; - if (!$.isArray(fns)) { + if (!_.isArray(fns)) { fns = []; this._getEvents()[eventName] = fns; } @@ -12613,9 +12613,9 @@ _.extend(BI.OB.prototype, { delete this._getEvents()[eventName]; } else { var fns = this._getEvents()[eventName]; - if ($.isArray(fns)) { + if (_.isArray(fns)) { var newFns = []; - $.each(fns, function (idx, ifn) { + _.each(fns, function (ifn) { if (ifn != fn) { newFns.push(ifn); } @@ -21130,7 +21130,6 @@ $(function () { /** Adds the number of days array to the Date object. */ Date._MD = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; }); - /** Constants used for time computations */ Date.SECOND = 1000; Date.MINUTE = 60 * Date.SECOND; @@ -21156,7 +21155,7 @@ Date.prototype.getMonthDays = function (month) { return 29; } return Date._MD[month]; - + }; /** @@ -21616,7 +21615,7 @@ Date.getDate = function () { return new Date(utc + Date.timeZone);// + Pool.timeZone.offset); } return dt; - + }; Date.getTime = function () { @@ -21664,7 +21663,7 @@ Date.getTime = function () { return dt.getTime() - Date.timeZone - dt.getTimezoneOffset() * 60000; } return dt.getTime(); - + }; /* * 给jQuery.Event对象添加的工具方法 diff --git a/dist/fineui.min.js b/dist/fineui.min.js index ed219ddf5..bda372a98 100644 --- a/dist/fineui.min.js +++ b/dist/fineui.min.js @@ -2,8 +2,8 @@ function accAdd(a,b){var c,d,e,f;try{c=a.toString().split(".")[1].length}catch(g){c=0}try{d=b.toString().split(".")[1].length}catch(g){d=0}if(f=Math.abs(c-d),e=Math.pow(10,Math.max(c,d)),f>0){var h=Math.pow(10,f);c>d?(a=Number(a.toString().replace(".","")),b=Number(b.toString().replace(".",""))*h):(a=Number(a.toString().replace(".",""))*h,b=Number(b.toString().replace(".","")))}else a=Number(a.toString().replace(".","")),b=Number(b.toString().replace(".",""));return(a+b)/e}function accSub(a,b){var c,d,e,f;try{c=a.toString().split(".")[1].length}catch(g){c=0}try{d=b.toString().split(".")[1].length}catch(g){d=0}return e=Math.pow(10,Math.max(c,d)),f=c>=d?c:d,((a*e-b*e)/e).toFixed(f)}function accMul(a,b){var c=0,d=a.toString(),e=b.toString();try{c+=d.split(".")[1].length}catch(f){}try{c+=e.split(".")[1].length}catch(f){}return Number(d.replace(".",""))*Number(e.replace(".",""))/Math.pow(10,c)}function accDiv(arg1,arg2){var t1=0,t2=0,r1,r2;try{t1=arg1.toString().split(".")[1].length}catch(e){}try{t2=arg2.toString().split(".")[1].length}catch(e){}with(Math)return r1=Number(arg1.toString().replace(".","")),r2=Number(arg2.toString().replace(".","")),t2>t1?r1/r2*pow(10,t2-t1):r1/r2/pow(10,t1-t2)}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var c;if(null==this)throw new TypeError('"this" is null or not defined');var d=Object(this),e=d.length>>>0;if(0===e)return-1;var f=0|b;if(f>=e)return-1;for(c=Math.max(f>=0?f:e-Math.abs(f),0);c>>0;if(0===e)return-1;for(b=e-1,arguments.length>1&&(b=Number(arguments[1]),b!=b?b=0:0!=b&&b!=1/0&&b!=-(1/0)&&(b=(b>0||-1)*Math.floor(Math.abs(b)))),c=b>=0?Math.min(b,e-1):e-Math.abs(b);c>=0;c--)if(c in d&&d[c]===a)return c;return-1}),window.console=window.console||function(){var a={};return a.log=a.warn=a.debug=a.info=a.error=a.time=a.dir=a.profile=a.clear=a.exception=a.trace=a.assert=function(){},a}(),Function.prototype.bind||(Function.prototype.bind=function(a){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var b=Array.prototype.slice.call(arguments,1),c=this,d=function(){},e=function(){return c.apply(this instanceof d?this:a,b.concat(Array.prototype.slice.call(arguments)))};return this.prototype&&(d.prototype=this.prototype),e.prototype=new d,e}),window.localStorage||(window.localStorage={items:{},setItem:function(a,b){BI.Cache.addCookie(a,b)},getItem:function(a){return BI.Cache.getCookie(a)},removeItem:function(a){BI.Cache.deleteCookie(a)},key:function(){},clear:function(){this.items={}}}),"undefined"!=typeof Set&&Set.toString().match(/native code/)||(Set=function(){this.set={}},Set.prototype.has=function(a){return void 0!==this.set[a]},Set.prototype.add=function(a){this.set[a]=1},Set.prototype.clear=function(){this.set={}}),!function(a){var b=a.navigator.userAgent.toLowerCase(),c=/msie|applewebkit.+safari/;if(c.test(b)){var d=Array.prototype.sort;Array.prototype.sort=function(a){if(a&&"function"==typeof a){if(this.length<2)return this;for(var b,c=0,e=c+1,f=this.length,g=!1,h=0;c0,g===!0&&(b=this[c],this[c]=this[e],this[e]=b);return this}return d.call(this)}}}(window),function(a,b){function c(a){var b=a.length,c=ia.type(a);return!ia.isWindow(a)&&(!(1!==a.nodeType||!b)||("array"===c||"function"!==c&&(0===b||"number"==typeof b&&b>0&&b-1 in a)))}function d(a){var b=xa[a]={};return ia.each(a.match(ka)||[],function(a,c){b[c]=!0}),b}function e(a,c,d,e){if(ia.acceptData(a)){var f,g,h=ia.expando,i="string"==typeof c,j=a.nodeType,k=j?ia.cache:a,l=j?a[h]:a[h]&&h;if(l&&k[l]&&(e||k[l].data)||!i||d!==b)return l||(j?a[h]=l=_.pop()||ia.guid++:l=h),k[l]||(k[l]={},j||(k[l].toJSON=ia.noop)),"object"!=typeof c&&"function"!=typeof c||(e?k[l]=ia.extend(k[l],c):k[l].data=ia.extend(k[l].data,c)),f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[ia.camelCase(c)]=d),i?(g=f[c],null==g&&(g=f[ia.camelCase(c)])):g=f,g}}function f(a,b,c){if(ia.acceptData(a)){var d,e,f,g=a.nodeType,i=g?ia.cache:a,j=g?a[ia.expando]:ia.expando;if(i[j]){if(b&&(f=c?i[j]:i[j].data)){ia.isArray(b)?b=b.concat(ia.map(b,ia.camelCase)):b in f?b=[b]:(b=ia.camelCase(b),b=b in f?[b]:b.split(" "));for(d=0,e=b.length;d=0===c})}function m(a){var b=Ua.split("|"),c=a.createDocumentFragment();if(c.createElement)for(;b.length;)c.createElement(b.pop());return c}function n(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function o(a){var b=a.getAttributeNode("type");return a.type=(b&&b.specified)+"/"+a.type,a}function p(a){var b=eb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function q(a,b){for(var c,d=0;null!=(c=a[d]);d++)ia._data(c,"globalEval",!b||ia._data(b[d],"globalEval"))}function r(a,b){if(1===b.nodeType&&ia.hasData(a)){var c,d,e,f=ia._data(a),g=ia._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d").css("cssText","display:block !important")).appendTo(b.documentElement),b=(jb[0].contentWindow||jb[0].contentDocument).document,b.write(""),b.close(),c=C(a,b),jb.detach()),ub[a]=c),c}function C(a,b){var c=ia(b.createElement(a)).appendTo(b.body),d=ia.css(c[0],"display");return c.remove(),d}function D(a,b,c,d){var e;if(ia.isArray(b))ia.each(b,function(b,e){c||Ab.test(a)?d(a,e):D(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==ia.type(b))d(a,b);else for(e in b)D(a+"["+e+"]",b[e],c,d)}function E(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(ka)||[];if(ia.isFunction(c))for(;d=f[e++];)"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function F(a,b,c,d){function e(h){var i;return f[h]=!0,ia.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||g||f[j]?g?!(i=j):void 0:(b.dataTypes.unshift(j),e(j),!1)}),i}var f={},g=a===Rb;return e(b.dataTypes[0])||!f["*"]&&e("*")}function G(a,c){var d,e,f=ia.ajaxSettings.flatOptions||{};for(e in c)c[e]!==b&&((f[e]?a:d||(d={}))[e]=c[e]);return d&&ia.extend(!0,a,d),a}function H(a,c,d){var e,f,g,h,i=a.contents,j=a.dataTypes,k=a.responseFields;for(h in k)h in d&&(c[k[h]]=d[h]);for(;"*"===j[0];)j.shift(),f===b&&(f=a.mimeType||c.getResponseHeader("Content-Type"));if(f)for(h in i)if(i[h]&&i[h].test(f)){j.unshift(h);break}if(j[0]in d)g=j[0];else{for(h in d){if(!j[0]||a.converters[h+" "+j[0]]){g=h;break}e||(e=h)}g=g||e}if(g)return g!==j[0]&&j.unshift(g),d[g]}function I(a,b){var c,d,e,f,g={},h=0,i=a.dataTypes.slice(),j=i[0];if(a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i[1])for(e in a.converters)g[e.toLowerCase()]=a.converters[e];for(;d=i[++h];)if("*"!==d){if("*"!==j&&j!==d){if(e=g[j+" "+d]||g["* "+d],!e)for(c in g)if(f=c.split(" "),f[1]===d&&(e=g[j+" "+f[0]]||g["* "+f[0]])){e===!0?e=g[c]:g[c]!==!0&&(d=f[0],i.splice(h--,0,d));break}if(e!==!0)if(e&&a["throws"])b=e(b);else try{b=e(b)}catch(k){return{state:"parsererror",error:e?k:"No conversion from "+j+" to "+d}}}j=d}return{state:"success",data:b}}function J(){try{return new a.XMLHttpRequest}catch(b){}}function K(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function L(){return setTimeout(function(){$b=b}),$b=ia.now()}function M(a,b){ia.each(b,function(b,c){for(var d=(ec[b]||[]).concat(ec["*"]),e=0,f=d.length;e)[^>]*|#([\w-]*))$/,na=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,oa=/^[\],:{}\s]*$/,pa=/(?:^|:|,)(?:\s*\[)+/g,qa=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,ra=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,sa=/^-ms-/,ta=/-([\da-z])/gi,ua=function(a,b){return b.toUpperCase()},va=function(a){(W.addEventListener||"load"===a.type||"complete"===W.readyState)&&(wa(),ia.ready())},wa=function(){W.addEventListener?(W.removeEventListener("DOMContentLoaded",va,!1),a.removeEventListener("load",va,!1)):(W.detachEvent("onreadystatechange",va),a.detachEvent("onload",va))};ia.fn=ia.prototype={jquery:aa,constructor:ia,init:function(a,c,d){var e,f;if(!a)return this;if("string"==typeof a){if(e="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:ma.exec(a),!e||!e[1]&&c)return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a);if(e[1]){if(c=c instanceof ia?c[0]:c,ia.merge(this,ia.parseHTML(e[1],c&&c.nodeType?c.ownerDocument||c:W,!0)),na.test(e[1])&&ia.isPlainObject(c))for(e in c)ia.isFunction(this[e])?this[e](c[e]):this.attr(e,c[e]);return this}if(f=W.getElementById(e[2]),f&&f.parentNode){if(f.id!==e[2])return d.find(a);this.length=1,this[0]=f}return this.context=W,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):ia.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),ia.makeArray(a,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return da.call(this)},get:function(a){return null==a?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a){var b=ia.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return ia.each(this,a,b)},ready:function(a){return ia.ready.promise().done(a),this},slice:function(){return this.pushStack(da.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c0||(T.resolveWith(W,[ia]),ia.fn.trigger&&ia(W).trigger("ready").off("ready"))}},isFunction:function(a){return"function"===ia.type(a)},isArray:Array.isArray||function(a){return"array"===ia.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return null==a?String(a):"object"==typeof a||"function"==typeof a?$[fa.call(a)]||"object":typeof a},isPlainObject:function(a){if(!a||"object"!==ia.type(a)||a.nodeType||ia.isWindow(a))return!1;try{if(a.constructor&&!ga.call(a,"constructor")&&!ga.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||ga.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||W;var d=na.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=ia.buildFragment([a],b,e),e&&ia(e).remove(),ia.merge([],d.childNodes))},parseJSON:function(b){return a.JSON&&a.JSON.parse?a.JSON.parse(b):null===b?b:"string"==typeof b&&(b=ia.trim(b),b&&oa.test(b.replace(qa,"@").replace(ra,"]").replace(pa,"")))?new Function("return "+b)():void ia.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||"string"!=typeof c)return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return d&&d.documentElement&&!d.getElementsByTagName("parsererror").length||ia.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&ia.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(sa,"ms-").replace(ta,ua)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,d){var e,f=0,g=a.length,h=c(a);if(d){if(h)for(;f-1;)j.splice(d,1),c&&(d<=g&&g--,d<=h&&h--)}),this},has:function(a){return a?ia.inArray(a,j)>-1:!(!j||!j.length)},empty:function(){return j=[],this},disable:function(){return j=k=e=b,this},disabled:function(){return!j},lock:function(){return k=b,e||m.disable(),this},locked:function(){return!k},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],!j||f&&!k||(c?k.push(b):l(b)),this},fire:function(){return m.fireWith(this,arguments),this},fired:function(){return!!f}};return m},ia.extend({Deferred:function(a){var b=[["resolve","done",ia.Callbacks("once memory"),"resolved"],["reject","fail",ia.Callbacks("once memory"),"rejected"],["notify","progress",ia.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return ia.Deferred(function(c){ia.each(b,function(b,f){var g=f[0],h=ia.isFunction(a[b])&&a[b];e[f[1]](function(){var a=h&&h.apply(this,arguments);a&&ia.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[g+"With"](this===d?c.promise():this,h?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?ia.extend(a,d):d}},e={};return d.pipe=d.then,ia.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b,c,d,e=0,f=da.call(arguments),g=f.length,h=1!==g||a&&ia.isFunction(a.promise)?g:0,i=1===h?a:ia.Deferred(),j=function(a,c,d){return function(e){c[a]=this,d[a]=arguments.length>1?da.call(arguments):e,d===b?i.notifyWith(c,d):--h||i.resolveWith(c,d)}};if(g>1)for(b=new Array(g),c=new Array(g),d=new Array(g);e
a",c=l.getElementsByTagName("*"),d=l.getElementsByTagName("a")[0],!c||!d||!c.length)return{};f=W.createElement("select"),h=f.appendChild(W.createElement("option")),e=l.getElementsByTagName("input")[0],d.style.cssText="top:1px;float:left;opacity:.5",b={getSetAttribute:"t"!==l.className,leadingWhitespace:3===l.firstChild.nodeType,tbody:!l.getElementsByTagName("tbody").length,htmlSerialize:!!l.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:"/a"===d.getAttribute("href"),opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:!!e.value,optSelected:h.selected,enctype:!!W.createElement("form").enctype,html5Clone:"<:nav>"!==W.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===W.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},e.checked=!0,b.noCloneChecked=e.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!h.disabled;try{delete l.test}catch(m){b.deleteExpando=!1}e=W.createElement("input"),e.setAttribute("value",""),b.input=""===e.getAttribute("value"),e.value="t",e.setAttribute("type","radio"),b.radioValue="t"===e.value,e.setAttribute("checked","t"),e.setAttribute("name","t"),g=W.createDocumentFragment(),g.appendChild(e),b.appendChecked=e.checked,b.checkClone=g.cloneNode(!0).cloneNode(!0).lastChild.checked,l.attachEvent&&(l.attachEvent("onclick",function(){b.noCloneEvent=!1}),l.cloneNode(!0).click());for(k in{submit:!0,change:!0,focusin:!0})l.setAttribute(i="on"+k,"t"),b[k+"Bubbles"]=i in a||l.attributes[i].expando===!1;return l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",b.clearCloneStyle="content-box"===l.style.backgroundClip,ia(function(){var c,d,e,f="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",g=W.getElementsByTagName("body")[0];g&&(c=W.createElement("div"),c.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",g.appendChild(c).appendChild(l),l.innerHTML="
t
",e=l.getElementsByTagName("td"),e[0].style.cssText="padding:0;margin:0;border:0;display:none",j=0===e[0].offsetHeight,e[0].style.display="",e[1].style.display="none",b.reliableHiddenOffsets=j&&0===e[0].offsetHeight,l.innerHTML="",l.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",b.boxSizing=4===l.offsetWidth,b.doesNotIncludeMarginInBodyOffset=1!==g.offsetTop,a.getComputedStyle&&(b.pixelPosition="1%"!==(a.getComputedStyle(l,null)||{}).top,b.boxSizingReliable="4px"===(a.getComputedStyle(l,null)||{width:"4px"}).width,d=l.appendChild(W.createElement("div")),d.style.cssText=l.style.cssText=f,d.style.marginRight=d.style.width="0",l.style.width="1px",b.reliableMarginRight=!parseFloat((a.getComputedStyle(d,null)||{}).marginRight)),typeof l.style.zoom!==V&&(l.innerHTML="",l.style.cssText=f+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=3===l.offsetWidth,l.style.display="block",l.innerHTML="
",l.firstChild.style.width="5px",b.shrinkWrapBlocks=3!==l.offsetWidth,b.inlineBlockNeedsLayout&&(g.style.zoom=1)),g.removeChild(c),c=l=e=d=null)}),c=f=g=h=d=e=null,b}();var ya=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,za=/([A-Z])/g;ia.extend({cache:{},expando:"jQuery"+(aa+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?ia.cache[a[ia.expando]]:a[ia.expando],!!a&&!h(a)},data:function(a,b,c){return e(a,b,c)},removeData:function(a,b){return f(a,b)},_data:function(a,b,c){return e(a,b,c,!0)},_removeData:function(a,b){return f(a,b,!0)},acceptData:function(a){if(a.nodeType&&1!==a.nodeType&&9!==a.nodeType)return!1;var b=a.nodeName&&ia.noData[a.nodeName.toLowerCase()];return!b||b!==!0&&a.getAttribute("classid")===b}}),ia.fn.extend({data:function(a,c){var d,e,f=this[0],h=0,i=null;if(a===b){if(this.length&&(i=ia.data(f),1===f.nodeType&&!ia._data(f,"parsedAttrs"))){for(d=f.attributes;h1,null,!0)},removeData:function(a){return this.each(function(){ia.removeData(this,a)})}}),ia.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=ia._data(a,b),c&&(!d||ia.isArray(c)?d=ia._data(a,b,ia.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=ia.queue(a,b),d=c.length,e=c.shift(),f=ia._queueHooks(a,b),g=function(){ia.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),f.cur=e,e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return ia._data(a,c)||ia._data(a,c,{empty:ia.Callbacks("once memory").add(function(){ia._removeData(a,b+"queue"),ia._removeData(a,c)})})}}),ia.fn.extend({queue:function(a,c){var d=2;return"string"!=typeof a&&(c=a,a="fx",d--),arguments.length1)},removeAttr:function(a){return this.each(function(){ia.removeAttr(this,a)})},prop:function(a,b){return ia.access(this,ia.prop,a,b,arguments.length>1)},removeProp:function(a){return a=ia.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g=0,h=this.length,i="string"==typeof a&&a;if(ia.isFunction(a))return this.each(function(b){ia(this).addClass(a.call(this,b,this.className))});if(i)for(b=(a||"").match(ka)||[];g=0;)d=d.replace(" "+e+" "," ");c.className=a?ia.trim(d):""}return this},toggleClass:function(a,b){ var c=typeof a,d="boolean"==typeof b;return ia.isFunction(a)?this.each(function(c){ia(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if("string"===c)for(var e,f=0,g=ia(this),h=b,i=a.match(ka)||[];e=i[f++];)h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e);else c!==V&&"boolean"!==c||(this.className&&ia._data(this,"__className__",this.className),this.className=this.className||a===!1?"":ia._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;c=0)return!0;return!1},val:function(a){var c,d,e,f=this[0];{if(arguments.length)return e=ia.isFunction(a),this.each(function(c){var f,g=ia(this);1===this.nodeType&&(f=e?a.call(this,c,g.val()):a,null==f?f="":"number"==typeof f?f+="":ia.isArray(f)&&(f=ia.map(f,function(a){return null==a?"":a+""})),d=ia.valHooks[this.type]||ia.valHooks[this.nodeName.toLowerCase()],d&&"set"in d&&d.set(this,f,"value")!==b||(this.value=f))});if(f)return d=ia.valHooks[f.type]||ia.valHooks[f.nodeName.toLowerCase()],d&&"get"in d&&(c=d.get(f,"value"))!==b?c:(c=f.value,"string"==typeof c?c.replace(Da,""):null==c?"":c)}}}),ia.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||e<0,g=f?null:[],h=f?e+1:d.length,i=e<0?h:f?e:0;i=0}),c.length||(a.selectedIndex=-1),c}}},attr:function(a,c,d){var e,f,g,h=a.nodeType;if(a&&3!==h&&8!==h&&2!==h)return typeof a.getAttribute===V?ia.prop(a,c,d):(f=1!==h||!ia.isXMLDoc(a),f&&(c=c.toLowerCase(),e=ia.attrHooks[c]||(Ga.test(c)?Ba:Aa)),d===b?e&&f&&"get"in e&&null!==(g=e.get(a,c))?g:(typeof a.getAttribute!==V&&(g=a.getAttribute(c)),null==g?b:g):null!==d?e&&f&&"set"in e&&(g=e.set(a,d,c))!==b?g:(a.setAttribute(c,d+""),d):void ia.removeAttr(a,c))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(ka);if(f&&1===a.nodeType)for(;c=f[e++];)d=ia.propFix[c]||c,Ga.test(c)?!Ia&&Ha.test(c)?a[ia.camelCase("default-"+c)]=a[d]=!1:a[d]=!1:ia.attr(a,c,""),a.removeAttribute(Ia?c:d)},attrHooks:{type:{set:function(a,b){if(!ia.support.radioValue&&"radio"===b&&ia.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,f,g,h=a.nodeType;if(a&&3!==h&&8!==h&&2!==h)return g=1!==h||!ia.isXMLDoc(a),g&&(c=ia.propFix[c]||c,f=ia.propHooks[c]),d!==b?f&&"set"in f&&(e=f.set(a,d,c))!==b?e:a[c]=d:f&&"get"in f&&null!==(e=f.get(a,c))?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):Ea.test(a.nodeName)||Fa.test(a.nodeName)&&a.href?0:b}}}}),Ba={get:function(a,c){var d=ia.prop(a,c),e="boolean"==typeof d&&a.getAttribute(c),f="boolean"==typeof d?Ja&&Ia?null!=e:Ha.test(c)?a[ia.camelCase("default-"+c)]:!!e:a.getAttributeNode(c);return f&&f.value!==!1?c.toLowerCase():b},set:function(a,b,c){return b===!1?ia.removeAttr(a,c):Ja&&Ia||!Ha.test(c)?a.setAttribute(!Ia&&ia.propFix[c]||c,c):a[ia.camelCase("default-"+c)]=a[c]=!0,c}},Ja&&Ia||(ia.attrHooks.value={get:function(a,c){var d=a.getAttributeNode(c);return ia.nodeName(a,"input")?a.defaultValue:d&&d.specified?d.value:b},set:function(a,b,c){return ia.nodeName(a,"input")?void(a.defaultValue=b):Aa&&Aa.set(a,b,c)}}),Ia||(Aa=ia.valHooks.button={get:function(a,c){var d=a.getAttributeNode(c);return d&&("id"===c||"name"===c||"coords"===c?""!==d.value:d.specified)?d.value:b},set:function(a,c,d){var e=a.getAttributeNode(d);return e||a.setAttributeNode(e=a.ownerDocument.createAttribute(d)),e.value=c+="","value"===d||c===a.getAttribute(d)?c:b}},ia.attrHooks.contenteditable={get:Aa.get,set:function(a,b,c){Aa.set(a,""!==b&&b,c)}},ia.each(["width","height"],function(a,b){ia.attrHooks[b]=ia.extend(ia.attrHooks[b],{set:function(a,c){if(""===c)return a.setAttribute(b,"auto"),c}})})),ia.support.hrefNormalized||(ia.each(["href","src","width","height"],function(a,c){ia.attrHooks[c]=ia.extend(ia.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return null==d?b:d}})}),ia.each(["href","src"],function(a,b){ia.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}})),ia.support.style||(ia.attrHooks.style={get:function(a){return a.style.cssText||b},set:function(a,b){return a.style.cssText=b+""}}),ia.support.optSelected||(ia.propHooks.selected=ia.extend(ia.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),ia.support.enctype||(ia.propFix.enctype="encoding"),ia.support.checkOn||ia.each(["radio","checkbox"],function(){ia.valHooks[this]={get:function(a){return null===a.getAttribute("value")?"on":a.value}}}),ia.each(["radio","checkbox"],function(){ia.valHooks[this]=ia.extend(ia.valHooks[this],{set:function(a,b){if(ia.isArray(b))return a.checked=ia.inArray(ia(a).val(),b)>=0}})});var Ka=/^(?:input|select|textarea)$/i,La=/^key/,Ma=/^(?:mouse|contextmenu)|click/,Na=/^(?:focusinfocus|focusoutblur)$/,Oa=/^([^.]*)(?:\.(.+)|)$/;ia.event={global:{},add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q,r=ia._data(a);if(r){for(d.handler&&(j=d,d=j.handler,f=j.selector),d.guid||(d.guid=ia.guid++),(h=r.events)||(h=r.events={}),(l=r.handle)||(l=r.handle=function(a){return typeof ia===V||a&&ia.event.triggered===a.type?b:ia.event.dispatch.apply(l.elem,arguments)},l.elem=a),c=(c||"").match(ka)||[""],i=c.length;i--;)g=Oa.exec(c[i])||[],o=q=g[1],p=(g[2]||"").split(".").sort(),k=ia.event.special[o]||{},o=(f?k.delegateType:k.bindType)||o,k=ia.event.special[o]||{},m=ia.extend({type:o,origType:q,data:e,handler:d,guid:d.guid,selector:f,needsContext:f&&ia.expr.match.needsContext.test(f),namespace:p.join(".")},j),(n=h[o])||(n=h[o]=[],n.delegateCount=0,k.setup&&k.setup.call(a,e,p,l)!==!1||(a.addEventListener?a.addEventListener(o,l,!1):a.attachEvent&&a.attachEvent("on"+o,l))),k.add&&(k.add.call(a,m),m.handler.guid||(m.handler.guid=d.guid)),f?n.splice(n.delegateCount++,0,m):n.push(m),ia.event.global[o]=!0;a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=ia.hasData(a)&&ia._data(a);if(q&&(k=q.events)){for(b=(b||"").match(ka)||[""],j=b.length;j--;)if(h=Oa.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){for(l=ia.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=k[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;f--;)g=m[f],!e&&p!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||ia.removeEvent(a,n,q.handle),delete k[n])}else for(n in k)ia.event.remove(a,n+b[j],c,d,!0);ia.isEmptyObject(k)&&(delete q.handle,ia._removeData(a,"events"))}},trigger:function(c,d,e,f){var g,h,i,j,k,l,m,n=[e||W],o=ga.call(c,"type")?c.type:c,p=ga.call(c,"namespace")?c.namespace.split("."):[];if(i=l=e=e||W,3!==e.nodeType&&8!==e.nodeType&&!Na.test(o+ia.event.triggered)&&(o.indexOf(".")>=0&&(p=o.split("."),o=p.shift(),p.sort()),h=o.indexOf(":")<0&&"on"+o,c=c[ia.expando]?c:new ia.Event(o,"object"==typeof c&&c),c.isTrigger=!0,c.namespace=p.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,c.result=b,c.target||(c.target=e),d=null==d?[c]:ia.makeArray(d,[c]),k=ia.event.special[o]||{},f||!k.trigger||k.trigger.apply(e,d)!==!1)){if(!f&&!k.noBubble&&!ia.isWindow(e)){for(j=k.delegateType||o,Na.test(j+o)||(i=i.parentNode);i;i=i.parentNode)n.push(i),l=i;l===(e.ownerDocument||W)&&n.push(l.defaultView||l.parentWindow||a)}for(m=0;(i=n[m++])&&!c.isPropagationStopped();)c.type=m>1?j:k.bindType||o,g=(ia._data(i,"events")||{})[c.type]&&ia._data(i,"handle"),g&&g.apply(i,d),g=h&&i[h],g&&ia.acceptData(i)&&g.apply&&g.apply(i,d)===!1&&c.preventDefault();if(c.type=o,!f&&!c.isDefaultPrevented()&&(!k._default||k._default.apply(e.ownerDocument,d)===!1)&&("click"!==o||!ia.nodeName(e,"a"))&&ia.acceptData(e)&&h&&e[o]&&!ia.isWindow(e)){l=e[h],l&&(e[h]=null),ia.event.triggered=o;try{e[o]()}catch(q){}ia.event.triggered=b,l&&(e[h]=l)}return c.result}},dispatch:function(a){a=ia.event.fix(a);var c,d,e,f,g,h=[],i=da.call(arguments),j=(ia._data(this,"events")||{})[a.type]||[],k=ia.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){for(h=ia.event.handlers.call(this,a,j),c=0;(f=h[c++])&&!a.isPropagationStopped();)for(a.currentTarget=f.elem,g=0;(e=f.handlers[g++])&&!a.isImmediatePropagationStopped();)if(!a.namespace_re||a.namespace_re.test(e.namespace)){a.handleObj=e,a.data=e.data;var l=(ia.event.special[e.origType]||{}).handle||e.handler;l.apply&&(d=l.apply(f.elem,i)),d!==b&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation())}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,c){var d,e,f,g,h=[],i=c.delegateCount,j=a.target;if(i&&j.nodeType&&(!a.button||"click"!==a.type))for(;j!=this;j=j.parentNode||this)if(1===j.nodeType&&(j.disabled!==!0||"click"!==a.type)){for(f=[],g=0;g=0:ia.find(d,this,null,[j]).length),f[d]&&f.push(e);f.length&&h.push({elem:j,handlers:f})}return iy.cacheLength&&delete a[b.shift()],a[c]=d}}function e(a){return a[N]=!0,a}function f(a){var b=F.createElement("div");try{return a(b)}catch(c){return!1}finally{b=null}}function g(a,b,c,d){var e,f,g,h,i,j,k,n,o,p;if((b?b.ownerDocument||b:O)!==F&&E(b),b=b||F,c=c||[],!a||"string"!=typeof a)return c;if(1!==(h=b.nodeType)&&9!==h)return[];if(!H&&!d){if(e=pa.exec(a))if(g=e[1]){if(9===h){if(f=b.getElementById(g),!f||!f.parentNode)return c;if(f.id===g)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(g))&&L(b,f)&&f.id===g)return c.push(f),c}else{if(e[2])return Z.apply(c,$.call(b.getElementsByTagName(a),0)),c;if((g=e[3])&&P.getByClassName&&b.getElementsByClassName)return Z.apply(c,$.call(b.getElementsByClassName(g),0)),c}if(P.qsa&&!I.test(a)){if(k=!0,n=N,o=b,p=9===h&&a,1===h&&"object"!==b.nodeName.toLowerCase()){for(j=l(a),(k=b.getAttribute("id"))?n=k.replace(sa,"\\$&"):b.setAttribute("id",n),n="[id='"+n+"'] ",i=j.length;i--;)j[i]=n+m(j[i]);o=na.test(a)&&b.parentNode||b,p=j.join(",")}if(p)try{return Z.apply(c,$.call(o.querySelectorAll(p),0)),c}catch(q){}finally{k||b.removeAttribute("id")}}}return u(a.replace(ga,"$1"),b,c,d)}function h(a,b){var c=b&&a,d=c&&(~b.sourceIndex||W)-(~a.sourceIndex||W);if(d)return d;if(c)for(;c=c.nextSibling;)if(c===b)return-1;return a?1:-1}function i(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function j(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function k(a){return e(function(b){return b=+b,e(function(c,d){for(var e,f=a([],c.length,b),g=f.length;g--;)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function l(a,b){var c,d,e,f,h,i,j,k=T[a+" "];if(k)return b?0:k.slice(0);for(h=a,i=[],j=y.preFilter;h;){c&&!(d=ha.exec(h))||(d&&(h=h.slice(d[0].length)||h),i.push(e=[])),c=!1,(d=ja.exec(h))&&(c=d.shift(),e.push({value:c,type:d[0].replace(ga," ")}),h=h.slice(c.length));for(f in y.filter)!(d=ma[f].exec(h))||j[f]&&!(d=j[f](d))||(c=d.shift(),e.push({value:c,type:f,matches:d}),h=h.slice(c.length));if(!c)break}return b?h.length:h?g.error(a):T(a,i).slice(0)}function m(a){for(var b=0,c=a.length,d="";b1?function(b,c,d){for(var e=a.length;e--;)if(!a[e](b,c,d))return!1;return!0}:a[0]}function p(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;h-1&&(e[j]=!(g[j]=l))}}else s=p(s===g?s.splice(o,s.length):s),f?f(null,g,s,i):Z.apply(g,s)})}function r(a){for(var b,c,d,e=a.length,f=y.relative[a[0].type],g=f||y.relative[" "],h=f?1:0,i=n(function(a){return a===b},g,!0),j=n(function(a){return _.call(b,a)>-1},g,!0),k=[function(a,c,d){return!f&&(d||c!==D)||((b=c).nodeType?i(a,c,d):j(a,c,d))}];h1&&o(k),h>1&&m(a.slice(0,h-1)).replace(ga,"$1"),c,h0,f=a.length>0,h=function(e,h,i,j,k){var l,m,n,o=[],q=0,r="0",s=e&&[],t=null!=k,u=D,v=e||f&&y.find.TAG("*",k&&h.parentNode||h),w=Q+=null==u?1:Math.random()||.1;for(t&&(D=h!==F&&h,x=c);null!=(l=v[r]);r++){if(f&&l){for(m=0;n=a[m++];)if(n(l,h,i)){j.push(l);break}t&&(Q=w,x=++c)}d&&((l=!n&&l)&&q--,e&&s.push(l))}if(q+=r,d&&r!==q){for(m=0;n=b[m++];)n(s,o,h,i);if(e){if(q>0)for(;r--;)s[r]||o[r]||(o[r]=Y.call(j));o=p(o)}Z.apply(j,o),t&&!e&&o.length>0&&q+b.length>1&&g.uniqueSort(j)}return t&&(Q=w,D=u),s};return d?e(h):h}function t(a,b,c){for(var d=0,e=b.length;d2&&"ID"===(g=f[0]).type&&9===b.nodeType&&!H&&y.relative[f[1].type]){if(b=y.find.ID(g.matches[0].replace(ua,va),b)[0],!b)return c;a=a.slice(f.shift().value.length)}for(e=ma.needsContext.test(a)?0:f.length;e--&&(g=f[e],!y.relative[h=g.type]);)if((i=y.find[h])&&(d=i(g.matches[0].replace(ua,va),na.test(f[0].type)&&b.parentNode||b))){if(f.splice(e,1),a=d.length&&m(f),!a)return Z.apply(c,$.call(d,0)),c;break}}return B(a,j)(d,b,H,c,na.test(a)),c}function v(){}var w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N="sizzle"+-new Date,O=a.document,P={},Q=0,R=0,S=d(),T=d(),U=d(),V=typeof b,W=1<<31,X=[],Y=X.pop,Z=X.push,$=X.slice,_=X.indexOf||function(a){for(var b=0,c=this.length;b+~])"+aa+"*"),ka=new RegExp(fa),la=new RegExp("^"+ca+"$"),ma={ID:new RegExp("^#("+ba+")"),CLASS:new RegExp("^\\.("+ba+")"),NAME:new RegExp("^\\[name=['\"]?("+ba+")['\"]?\\]"),TAG:new RegExp("^("+ba.replace("w","w*")+")"),ATTR:new RegExp("^"+ea),PSEUDO:new RegExp("^"+fa),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+aa+"*(even|odd|(([+-]|)(\\d*)n|)"+aa+"*(?:([+-]|)"+aa+"*(\\d+)|))"+aa+"*\\)|)","i"),needsContext:new RegExp("^"+aa+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+aa+"*((?:-\\d)?\\d*)"+aa+"*\\)|)(?=[^-]|$)","i")},na=/[\x20\t\r\n\f]*[+~]/,oa=/^[^{]+\{\s*\[native code/,pa=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,qa=/^(?:input|select|textarea|button)$/i,ra=/^h\d$/i,sa=/'|\\/g,ta=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,ua=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,va=function(a,b){var c="0x"+b-65536;return c!==c?b:c<0?String.fromCharCode(c+65536):String.fromCharCode(c>>10|55296,1023&c|56320)};try{$.call(O.documentElement.childNodes,0)[0].nodeType}catch(wa){$=function(a){for(var b,c=[];b=this[a++];)c.push(b);return c}}A=g.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},E=g.setDocument=function(a){var d=a?a.ownerDocument||a:O;return d!==F&&9===d.nodeType&&d.documentElement?(F=d,G=d.documentElement,H=A(d),P.tagNameNoComments=f(function(a){return a.appendChild(d.createComment("")),!a.getElementsByTagName("*").length}),P.attributes=f(function(a){a.innerHTML="";var b=typeof a.lastChild.getAttribute("multiple");return"boolean"!==b&&"string"!==b}),P.getByClassName=f(function(a){return a.innerHTML="",!(!a.getElementsByClassName||!a.getElementsByClassName("e").length)&&(a.lastChild.className="e",2===a.getElementsByClassName("e").length)}),P.getByName=f(function(a){a.id=N+0,a.innerHTML="
",G.insertBefore(a,G.firstChild);var b=d.getElementsByName&&d.getElementsByName(N).length===2+d.getElementsByName(N+0).length;return P.getIdNotName=!d.getElementById(N),G.removeChild(a),b}),y.attrHandle=f(function(a){return a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!==V&&"#"===a.firstChild.getAttribute("href")})?{}:{href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}},P.getIdNotName?(y.find.ID=function(a,b){if(typeof b.getElementById!==V&&!H){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},y.filter.ID=function(a){var b=a.replace(ua,va);return function(a){return a.getAttribute("id")===b}}):(y.find.ID=function(a,c){if(typeof c.getElementById!==V&&!H){var d=c.getElementById(a);return d?d.id===a||typeof d.getAttributeNode!==V&&d.getAttributeNode("id").value===a?[d]:b:[]}},y.filter.ID=function(a){var b=a.replace(ua,va);return function(a){var c=typeof a.getAttributeNode!==V&&a.getAttributeNode("id");return c&&c.value===b}}),y.find.TAG=P.tagNameNoComments?function(a,b){if(typeof b.getElementsByTagName!==V)return b.getElementsByTagName(a)}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){for(;c=f[e++];)1===c.nodeType&&d.push(c);return d}return f},y.find.NAME=P.getByName&&function(a,b){if(typeof b.getElementsByName!==V)return b.getElementsByName(name)},y.find.CLASS=P.getByClassName&&function(a,b){if(typeof b.getElementsByClassName!==V&&!H)return b.getElementsByClassName(a)},J=[],I=[":focus"],(P.qsa=c(d.querySelectorAll))&&(f(function(a){a.innerHTML="",a.querySelectorAll("[selected]").length||I.push("\\["+aa+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||I.push(":checked")}),f(function(a){a.innerHTML="",a.querySelectorAll("[i^='']").length&&I.push("[*^$]="+aa+"*(?:\"\"|'')"),a.querySelectorAll(":enabled").length||I.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),I.push(",.*:")})),(P.matchesSelector=c(K=G.matchesSelector||G.mozMatchesSelector||G.webkitMatchesSelector||G.oMatchesSelector||G.msMatchesSelector))&&f(function(a){P.disconnectedMatch=K.call(a,"div"),K.call(a,"[s!='']:x"),J.push("!=",fa)}),I=new RegExp(I.join("|")),J=new RegExp(J.join("|")),L=c(G.contains)||G.compareDocumentPosition?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1},M=G.compareDocumentPosition?function(a,b){var c;return a===b?(C=!0,0):(c=b.compareDocumentPosition&&a.compareDocumentPosition&&a.compareDocumentPosition(b))?1&c||a.parentNode&&11===a.parentNode.nodeType?a===d||L(O,a)?-1:b===d||L(O,b)?1:0:4&c?-1:1:a.compareDocumentPosition?-1:1}:function(a,b){var c,e=0,f=a.parentNode,g=b.parentNode,i=[a],j=[b];if(a===b)return C=!0,0;if(!f||!g)return a===d?-1:b===d?1:f?-1:g?1:0;if(f===g)return h(a,b);for(c=a;c=c.parentNode;)i.unshift(c);for(c=b;c=c.parentNode;)j.unshift(c);for(;i[e]===j[e];)e++;return e?h(i[e],j[e]):i[e]===O?-1:j[e]===O?1:0},C=!1,[0,0].sort(M),P.detectDuplicates=C,F):F},g.matches=function(a,b){return g(a,null,null,b)},g.matchesSelector=function(a,b){if((a.ownerDocument||a)!==F&&E(a),b=b.replace(ta,"='$1']"),P.matchesSelector&&!H&&(!J||!J.test(b))&&!I.test(b))try{var c=K.call(a,b);if(c||P.disconnectedMatch||a.document&&11!==a.document.nodeType)return c}catch(d){}return g(b,F,null,[a]).length>0},g.contains=function(a,b){return(a.ownerDocument||a)!==F&&E(a),L(a,b)},g.attr=function(a,b){var c;return(a.ownerDocument||a)!==F&&E(a),H||(b=b.toLowerCase()),(c=y.attrHandle[b])?c(a):H||P.attributes?a.getAttribute(b):((c=a.getAttributeNode(b))||a.getAttribute(b))&&a[b]===!0?b:c&&c.specified?c.value:null},g.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},g.uniqueSort=function(a){var b,c=[],d=1,e=0;if(C=!P.detectDuplicates,a.sort(M),C){for(;b=a[d];d++)b===a[d-1]&&(e=c.push(d));for(;e--;)a.splice(c[e],1)}return a},z=g.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(1===e||9===e||11===e){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=z(a)}else if(3===e||4===e)return a.nodeValue}else for(;b=a[d];d++)c+=z(b);return c},y=g.selectors={cacheLength:50,createPseudo:e,match:ma,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ua,va),a[3]=(a[4]||a[5]||"").replace(ua,va),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||g.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&g.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return ma.CHILD.test(a[0])?null:(a[4]?a[2]=a[4]:c&&ka.test(c)&&(b=l(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){return"*"===a?function(){return!0}:(a=a.replace(ua,va).toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=S[a+" "];return b||(b=new RegExp("(^|"+aa+")"+a+"("+aa+"|$)"))&&S(a,function(a){return b.test(a.className||typeof a.getAttribute!==V&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=g.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){for(;p;){for(l=b;l=l[p];)if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){for(k=q[N]||(q[N]={}),j=k[a]||[],n=j[0]===Q&&j[1],m=j[0]===Q&&j[2],l=n&&q.childNodes[n];l=++n&&l&&l[p]||(m=n=0)||o.pop();)if(1===l.nodeType&&++m&&l===b){k[a]=[Q,n,m];break}}else if(s&&(j=(b[N]||(b[N]={}))[a])&&j[0]===Q)m=j[1];else for(;(l=++n&&l&&l[p]||(m=n=0)||o.pop())&&((h?l.nodeName.toLowerCase()!==r:1!==l.nodeType)||!++m||(s&&((l[N]||(l[N]={}))[a]=[Q,m]),l!==b)););return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,d=y.pseudos[a]||y.setFilters[a.toLowerCase()]||g.error("unsupported pseudo: "+a);return d[N]?d(b):d.length>1?(c=[a,a,"",b],y.setFilters.hasOwnProperty(a.toLowerCase())?e(function(a,c){for(var e,f=d(a,b),g=f.length;g--;)e=_.call(a,f[g]),a[e]=!(c[e]=f[g])}):function(a){return d(a,0,c)}):d}},pseudos:{not:e(function(a){var b=[],c=[],d=B(a.replace(ga,"$1"));return d[N]?e(function(a,b,c,e){for(var f,g=d(a,null,e,[]),h=a.length;h--;)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:e(function(a){return function(b){return g(a,b).length>0}}),contains:e(function(a){return function(b){return(b.textContent||b.innerText||z(b)).indexOf(a)>-1}}),lang:e(function(a){return la.test(a||"")||g.error("unsupported lang: "+a),a=a.replace(ua,va).toLowerCase(),function(b){var c;do if(c=H?b.getAttribute("xml:lang")||b.getAttribute("lang"):b.lang)return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===G},focus:function(a){return a===F.activeElement&&(!F.hasFocus||F.hasFocus())&&!!(a.type||a.href||~a.tabIndex); },enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeName>"@"||3===a.nodeType||4===a.nodeType)return!1;return!0},parent:function(a){return!y.pseudos.empty(a)},header:function(a){return ra.test(a.nodeName)},input:function(a){return qa.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||b.toLowerCase()===a.type)},first:k(function(){return[0]}),last:k(function(a,b){return[b-1]}),eq:k(function(a,b,c){return[c<0?c+b:c]}),even:k(function(a,b){for(var c=0;c=0;)a.push(d);return a}),gt:k(function(a,b,c){for(var d=c<0?c+b:c;++d1?ia.unique(c):c),c.selector=(this.selector?this.selector+" ":"")+a,c},has:function(a){var b,c=ia(a,this),d=c.length;return this.filter(function(){for(b=0;b=0:ia.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=Sa.test(a)||"string"!=typeof a?ia(a,b||this.context):0;d-1:ia.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}return this.pushStack(f.length>1?ia.unique(f):f)},index:function(a){return a?"string"==typeof a?ia.inArray(this[0],ia(a)):ia.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){var c="string"==typeof a?ia(a,b):ia.makeArray(a&&a.nodeType?[a]:a),d=ia.merge(this.get(),c);return this.pushStack(ia.unique(d))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}}),ia.fn.andSelf=ia.fn.addBack,ia.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return ia.dir(a,"parentNode")},parentsUntil:function(a,b,c){return ia.dir(a,"parentNode",c)},next:function(a){return k(a,"nextSibling")},prev:function(a){return k(a,"previousSibling")},nextAll:function(a){return ia.dir(a,"nextSibling")},prevAll:function(a){return ia.dir(a,"previousSibling")},nextUntil:function(a,b,c){return ia.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return ia.dir(a,"previousSibling",c)},siblings:function(a){return ia.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return ia.sibling(a.firstChild)},contents:function(a){return ia.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:ia.merge([],a.childNodes)}},function(a,b){ia.fn[a]=function(c,d){var e=ia.map(this,b,c);return Pa.test(a)||(d=c),d&&"string"==typeof d&&(e=ia.filter(d,e)),e=this.length>1&&!Ta[a]?ia.unique(e):e,this.length>1&&Qa.test(a)&&(e=e.reverse()),this.pushStack(e)}}),ia.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),1===b.length?ia.find.matchesSelector(b[0],a)?[b[0]]:[]:ia.find.matches(a,b)},dir:function(a,c,d){for(var e=[],f=a[c];f&&9!==f.nodeType&&(d===b||1!==f.nodeType||!ia(f).is(d));)1===f.nodeType&&e.push(f),f=f[c];return e},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}});var Ua="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Va=/ jQuery\d+="(?:null|\d+)"/g,Wa=new RegExp("<(?:"+Ua+")[\\s/>]","i"),Xa=/^\s+/,Ya=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Za=/<([\w:]+)/,$a=/\s*$/g,gb={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:ia.support.htmlSerialize?[0,"",""]:[1,"X
","
"]},hb=m(W),ib=hb.appendChild(W.createElement("div"));gb.optgroup=gb.option,gb.tbody=gb.tfoot=gb.colgroup=gb.caption=gb.thead,gb.th=gb.td,ia.fn.extend({text:function(a){return ia.access(this,function(a){return a===b?ia.text(this):this.empty().append((this[0]&&this[0].ownerDocument||W).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(ia.isFunction(a))return this.each(function(b){ia(this).wrapAll(a.call(this,b))});if(this[0]){var b=ia(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){for(var a=this;a.firstChild&&1===a.firstChild.nodeType;)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return ia.isFunction(a)?this.each(function(b){ia(this).wrapInner(a.call(this,b))}):this.each(function(){var b=ia(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=ia.isFunction(a);return this.each(function(c){ia(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){ia.nodeName(this,"body")||ia(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.insertBefore(a,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,!1,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=0;null!=(c=this[d]);d++)(!a||ia.filter(a,[c]).length>0)&&(b||1!==c.nodeType||ia.cleanData(t(c)),c.parentNode&&(b&&ia.contains(c.ownerDocument,c)&&q(t(c,"script")),c.parentNode.removeChild(c)));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){for(1===a.nodeType&&ia.cleanData(t(a,!1));a.firstChild;)a.removeChild(a.firstChild);a.options&&ia.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return ia.clone(this,a,b)})},html:function(a){return ia.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return 1===c.nodeType?c.innerHTML.replace(Va,""):b;if("string"==typeof a&&!ab.test(a)&&(ia.support.htmlSerialize||!Wa.test(a))&&(ia.support.leadingWhitespace||!Xa.test(a))&&!gb[(Za.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ya,"<$1>");try{for(;d")?f=a.cloneNode(!0):(ib.innerHTML=a.outerHTML,ib.removeChild(f=ib.firstChild)),!(ia.support.noCloneEvent&&ia.support.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||ia.isXMLDoc(a)))for(d=t(f),h=t(a),g=0;null!=(e=h[g]);++g)d[g]&&s(e,d[g]);if(b)if(c)for(h=h||t(a),d=d||t(f),g=0;null!=(e=h[g]);g++)r(e,d[g]);else r(a,f);return d=t(f,"script"),d.length>0&&q(d,!i&&t(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,l=a.length,n=m(b),o=[],p=0;p")+k[2],e=k[0];e--;)h=h.lastChild;if(!ia.support.leadingWhitespace&&Xa.test(f)&&o.push(b.createTextNode(Xa.exec(f)[0])),!ia.support.tbody)for(f="table"!==i||$a.test(f)?""!==k[1]||$a.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;e--;)ia.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j);for(ia.merge(o,h.childNodes),h.textContent="";h.firstChild;)h.removeChild(h.firstChild);h=n.lastChild}else o.push(b.createTextNode(f));for(h&&n.removeChild(h),ia.support.appendChecked||ia.grep(t(o,"input"),u),p=0;f=o[p++];)if((!d||ia.inArray(f,d)===-1)&&(g=ia.contains(f.ownerDocument,f),h=t(n.appendChild(f),"script"),g&&q(h),c))for(e=0;f=h[e++];)db.test(f.type||"")&&c.push(f);return h=null,n},cleanData:function(a,b){for(var c,d,e,f,g=0,h=ia.expando,i=ia.cache,j=ia.support.deleteExpando,k=ia.event.special;null!=(c=a[g]);g++)if((b||ia.acceptData(c))&&(e=c[h],f=e&&i[e])){if(f.events)for(d in f.events)k[d]?ia.event.remove(c,d):ia.removeEvent(c,d,f.handle);i[e]&&(delete i[e],j?delete c[h]:typeof c.removeAttribute!==V?c.removeAttribute(h):c[h]=null,_.push(e))}}});var jb,kb,lb,mb=/alpha\([^)]*\)/i,nb=/opacity\s*=\s*([^)]*)/,ob=/^(top|right|bottom|left)$/,pb=/^(none|table(?!-c[ea]).+)/,qb=/^margin/,rb=new RegExp("^("+ja+")(.*)$","i"),sb=new RegExp("^("+ja+")(?!px)[a-z%]+$","i"),tb=new RegExp("^([+-])=("+ja+")","i"),ub={BODY:"block"},vb={position:"absolute",visibility:"hidden",display:"block"},wb={letterSpacing:0,fontWeight:400},xb=["Top","Right","Bottom","Left"],yb=["Webkit","O","Moz","ms"];ia.fn.extend({css:function(a,c){return ia.access(this,function(a,c,d){var e,f,g={},h=0;if(ia.isArray(c)){for(f=kb(a),e=c.length;h1)},show:function(){return x(this,!0)},hide:function(){return x(this)},toggle:function(a){var b="boolean"==typeof a;return this.each(function(){(b?a:w(this))?ia(this).show():ia(this).hide()})}}),ia.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=lb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":ia.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var f,g,h,i=ia.camelCase(c),j=a.style;if(c=ia.cssProps[i]||(ia.cssProps[i]=v(j,i)),h=ia.cssHooks[c]||ia.cssHooks[i],d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];if(g=typeof d,"string"===g&&(f=tb.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(ia.css(a,c)),g="number"),!(null==d||"number"===g&&isNaN(d)||("number"!==g||ia.cssNumber[i]||(d+="px"),ia.support.clearCloneStyle||""!==d||0!==c.indexOf("background")||(j[c]="inherit"),h&&"set"in h&&(d=h.set(a,d,e))===b)))try{j[c]=d}catch(k){}}},css:function(a,c,d,e){var f,g,h,i=ia.camelCase(c);return c=ia.cssProps[i]||(ia.cssProps[i]=v(a.style,i)),h=ia.cssHooks[c]||ia.cssHooks[i],h&&"get"in h&&(g=h.get(a,!0,d)),g===b&&(g=lb(a,c,e)),"normal"===g&&c in wb&&(g=wb[c]),""===d||d?(f=parseFloat(g),d===!0||ia.isNumeric(f)?f||0:g):g},swap:function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e}}),a.getComputedStyle?(kb=function(b){return a.getComputedStyle(b,null)},lb=function(a,c,d){var e,f,g,h=d||kb(a),i=h?h.getPropertyValue(c)||h[c]:b,j=a.style;return h&&(""!==i||ia.contains(a.ownerDocument,a)||(i=ia.style(a,c)),sb.test(i)&&qb.test(c)&&(e=j.width,f=j.minWidth,g=j.maxWidth,j.minWidth=j.maxWidth=j.width=i,i=h.width,j.width=e,j.minWidth=f,j.maxWidth=g)),i}):W.documentElement.currentStyle&&(kb=function(a){return a.currentStyle},lb=function(a,c,d){var e,f,g,h=d||kb(a),i=h?h[c]:b,j=a.style;return null==i&&j&&j[c]&&(i=j[c]),sb.test(i)&&!ob.test(c)&&(e=j.left,f=a.runtimeStyle,g=f&&f.left,g&&(f.left=a.currentStyle.left),j.left="fontSize"===c?"1em":i,i=j.pixelLeft+"px",j.left=e,g&&(f.left=g)),""===i?"auto":i}),ia.each(["height","width"],function(a,b){ia.cssHooks[b]={get:function(a,c,d){if(c)return 0===a.offsetWidth&&pb.test(ia.css(a,"display"))?ia.swap(a,vb,function(){return A(a,b,d)}):A(a,b,d)},set:function(a,c,d){var e=d&&kb(a);return y(a,c,d?z(a,b,d,ia.support.boxSizing&&"border-box"===ia.css(a,"boxSizing",!1,e),e):0)}}}),ia.support.opacity||(ia.cssHooks.opacity={get:function(a,b){return nb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=ia.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===ia.trim(f.replace(mb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=mb.test(f)?f.replace(mb,e):f+" "+e)}}),ia(function(){ia.support.reliableMarginRight||(ia.cssHooks.marginRight={get:function(a,b){if(b)return ia.swap(a,{display:"inline-block"},lb,[a,"marginRight"])}}),!ia.support.pixelPosition&&ia.fn.position&&ia.each(["top","left"],function(a,b){ia.cssHooks[b]={get:function(a,c){if(c)return c=lb(a,b),sb.test(c)?ia(a).position()[b]+"px":c}}})}),ia.expr&&ia.expr.filters&&(ia.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!ia.support.reliableHiddenOffsets&&"none"===(a.style&&a.style.display||ia.css(a,"display"))},ia.expr.filters.visible=function(a){return!ia.expr.filters.hidden(a)}),ia.each({margin:"",padding:"",border:"Width"},function(a,b){ia.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];d<4;d++)e[a+xb[d]+b]=f[d]||f[d-2]||f[0];return e}},qb.test(a)||(ia.cssHooks[a+b].set=y)});var zb=/%20/g,Ab=/\[\]$/,Bb=/\r?\n/g,Cb=/^(?:submit|button|image|reset|file)$/i,Db=/^(?:input|select|textarea|keygen)/i;ia.fn.extend({serialize:function(){return ia.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=ia.prop(this,"elements");return a?ia.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!ia(this).is(":disabled")&&Db.test(this.nodeName)&&!Cb.test(a)&&(this.checked||!bb.test(a))}).map(function(a,b){var c=ia(this).val();return null==c?null:ia.isArray(c)?ia.map(c,function(a){return{name:b.name,value:a.replace(Bb,"\r\n")}}):{name:b.name,value:c.replace(Bb,"\r\n")}}).get()}}),ia.param=function(a,c){var d,e=[],f=function(a,b){b=ia.isFunction(b)?b():null==b?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(c===b&&(c=ia.ajaxSettings&&ia.ajaxSettings.traditional),ia.isArray(a)||a.jquery&&!ia.isPlainObject(a))ia.each(a,function(){f(this.name,this.value)});else for(d in a)D(d,a[d],c,f);return e.join("&").replace(zb,"+")},ia.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){ia.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),ia.fn.hover=function(a,b){return this.mouseenter(a).mouseleave(b||a)};var Eb,Fb,Gb=ia.now(),Hb=/\?/,Ib=/#.*$/,Jb=/([?&])_=[^&]*/,Kb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Lb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Mb=/^(?:GET|HEAD)$/,Nb=/^\/\//,Ob=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Pb=ia.fn.load,Qb={},Rb={},Sb="*/".concat("*");try{Fb=X.href}catch(Tb){Fb=W.createElement("a"),Fb.href="",Fb=Fb.href}Eb=Ob.exec(Fb.toLowerCase())||[],ia.fn.load=function(a,c,d){if("string"!=typeof a&&Pb)return Pb.apply(this,arguments);var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),ia.isFunction(c)?(d=c,c=b):c&&"object"==typeof c&&(g="POST"),h.length>0&&ia.ajax({url:a,type:g,dataType:"html",data:c}).done(function(a){f=arguments,h.html(e?ia("
").append(ia.parseHTML(a)).find(e):a)}).complete(d&&function(a,b){h.each(d,f||[a.responseText,b,a])}),this},ia.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){ia.fn[b]=function(a){return this.on(b,a)}}),ia.each(["get","post"],function(a,c){ia[c]=function(a,d,e,f){return ia.isFunction(d)&&(f=f||e,e=d,d=b),ia.ajax({url:a,type:c,dataType:f,data:d,success:e})}}),ia.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Fb,type:"GET",isLocal:Lb.test(Eb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Sb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":ia.parseJSON,"text xml":ia.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?G(G(a,ia.ajaxSettings),b):G(ia.ajaxSettings,a)},ajaxPrefilter:E(Qb),ajaxTransport:E(Rb),ajax:function(a,c){function d(a,c,d,e){var f,l,s,t,v,x=c;2!==u&&(u=2,i&&clearTimeout(i),k=b,h=e||"",w.readyState=a>0?4:0,d&&(t=H(m,w,d)),a>=200&&a<300||304===a?(m.ifModified&&(v=w.getResponseHeader("Last-Modified"),v&&(ia.lastModified[g]=v),v=w.getResponseHeader("etag"),v&&(ia.etag[g]=v)),204===a?(f=!0,x="nocontent"):304===a?(f=!0,x="notmodified"):(f=I(m,t),x=f.state,l=f.data,s=f.error,f=!s)):(s=x,!a&&x||(x="error",a<0&&(a=0))),w.status=a,w.statusText=(c||x)+"",f?p.resolveWith(n,[l,x,w]):p.rejectWith(n,[w,x,s]),w.statusCode(r),r=b,j&&o.trigger(f?"ajaxSuccess":"ajaxError",[w,m,f?l:s]),q.fireWith(n,[w,x]),j&&(o.trigger("ajaxComplete",[w,m]),--ia.active||ia.event.trigger("ajaxStop")))}"object"==typeof a&&(c=a,a=b),c=c||{};var e,f,g,h,i,j,k,l,m=ia.ajaxSetup({},c),n=m.context||m,o=m.context&&(n.nodeType||n.jquery)?ia(n):ia.event,p=ia.Deferred(),q=ia.Callbacks("once memory"),r=m.statusCode||{},s={},t={},u=0,v="canceled",w={readyState:0,getResponseHeader:function(a){var b;if(2===u){if(!l)for(l={};b=Kb.exec(h);)l[b[1].toLowerCase()]=b[2];b=l[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===u?h:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return u||(a=t[c]=t[c]||a,s[a]=b),this},overrideMimeType:function(a){return u||(m.mimeType=a),this},statusCode:function(a){var b;if(a)if(u<2)for(b in a)r[b]=[r[b],a[b]];else w.always(a[w.status]);return this},abort:function(a){var b=a||v;return k&&k.abort(b),d(0,b),this}};if(p.promise(w).complete=q.add,w.success=w.done,w.error=w.fail,m.url=((a||m.url||Fb)+"").replace(Ib,"").replace(Nb,Eb[1]+"//"),m.type=c.method||c.type||m.method||m.type,m.dataTypes=ia.trim(m.dataType||"*").toLowerCase().match(ka)||[""],null==m.crossDomain&&(e=Ob.exec(m.url.toLowerCase()),m.crossDomain=!(!e||e[1]===Eb[1]&&e[2]===Eb[2]&&(e[3]||("http:"===e[1]?80:443))==(Eb[3]||("http:"===Eb[1]?80:443)))),m.data&&m.processData&&"string"!=typeof m.data&&(m.data=ia.param(m.data,m.traditional)),F(Qb,m,c,w),2===u)return w;j=m.global,j&&0===ia.active++&&ia.event.trigger("ajaxStart"),m.type=m.type.toUpperCase(),m.hasContent=!Mb.test(m.type),g=m.url,m.hasContent||(m.data&&(g=m.url+=(Hb.test(g)?"&":"?")+m.data,delete m.data),m.cache===!1&&(m.url=Jb.test(g)?g.replace(Jb,"$1_="+Gb++):g+(Hb.test(g)?"&":"?")+"_="+Gb++)),m.ifModified&&(ia.lastModified[g]&&w.setRequestHeader("If-Modified-Since",ia.lastModified[g]),ia.etag[g]&&w.setRequestHeader("If-None-Match",ia.etag[g])),(m.data&&m.hasContent&&m.contentType!==!1||c.contentType)&&w.setRequestHeader("Content-Type",m.contentType),w.setRequestHeader("Accept",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+("*"!==m.dataTypes[0]?", "+Sb+"; q=0.01":""):m.accepts["*"]);for(f in m.headers)w.setRequestHeader(f,m.headers[f]);if(m.beforeSend&&(m.beforeSend.call(n,w,m)===!1||2===u))return w.abort();v="abort";for(f in{success:1,error:1,complete:1})w[f](m[f]);if(k=F(Rb,m,c,w)){w.readyState=1,j&&o.trigger("ajaxSend",[w,m]),m.async&&m.timeout>0&&(i=setTimeout(function(){w.abort("timeout")},m.timeout));try{u=1,k.send(s,d)}catch(x){if(!(u<2))throw x;d(-1,x)}}else d(-1,"No Transport");return w},getScript:function(a,c){return ia.get(a,b,c,"script")},getJSON:function(a,b,c){return ia.get(a,b,c,"json")}}),ia.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return ia.globalEval(a),a}}}),ia.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),ia.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=W.head||ia("head")[0]||W.documentElement;return{send:function(b,e){c=W.createElement("script"),c.async=!0,a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,b){(b||!c.readyState||/loaded|complete/.test(c.readyState))&&(c.onload=c.onreadystatechange=null,c.parentNode&&c.parentNode.removeChild(c),c=null,b||e(200,"success"))},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(b,!0)}}}});var Ub=[],Vb=/(=)\?(?=&|$)|\?\?/;ia.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Ub.pop()||ia.expando+"_"+Gb++;return this[a]=!0,a}}),ia.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.jsonp!==!1&&(Vb.test(c.url)?"url":"string"==typeof c.data&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vb.test(c.data)&&"data");if(i||"jsonp"===c.dataTypes[0])return f=c.jsonpCallback=ia.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,i?c[i]=c[i].replace(Vb,"$1"+f):c.jsonp!==!1&&(c.url+=(Hb.test(c.url)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||ia.error(f+" was not called"),h[0]},c.dataTypes[0]="json",g=a[f],a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,Ub.push(f)),h&&ia.isFunction(g)&&g(h[0]),h=g=b}),"script"});var Wb,Xb,Yb=0,Zb=a.ActiveXObject&&function(){var a;for(a in Wb)Wb[a](b,!0)};ia.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&J()||K()}:J,Xb=ia.ajaxSettings.xhr(),ia.support.cors=!!Xb&&"withCredentials"in Xb,Xb=ia.support.ajax=!!Xb,Xb&&ia.ajaxTransport(function(c){if(!c.crossDomain||ia.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();if(c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async),c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),c.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l;try{if(d&&(e||4===i.readyState))if(d=b,g&&(i.onreadystatechange=ia.noop,Zb&&delete Wb[g]),e)4!==i.readyState&&i.abort();else{l={},h=i.status,j=i.getAllResponseHeaders(),"string"==typeof i.responseText&&(l.text=i.responseText);try{k=i.statusText}catch(m){k=""}h||!c.isLocal||c.crossDomain?1223===h&&(h=204):h=l.text?200:404}}catch(n){e||f(-1,n)}l&&f(h,k,l,j)},c.async?4===i.readyState?setTimeout(d):(g=++Yb,Zb&&(Wb||(Wb={},ia(a).unload(Zb)),Wb[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(b,!0)}}}});var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp("^(?:([+-])=|)("+ja+")([a-z%]*)$","i"),cc=/queueHooks$/,dc=[P],ec={"*":[function(a,b){var c,d,e=this.createTween(a,b),f=bc.exec(b),g=e.cur(),h=+g||0,i=1,j=20;if(f){if(c=+f[2],d=f[3]||(ia.cssNumber[a]?"":"px"),"px"!==d&&h){h=ia.css(e.elem,a,!0)||c||1;do i=i||".5",h/=i,ia.style(e.elem,a,h+d);while(i!==(i=e.cur()/g)&&1!==i&&--j)}e.unit=d,e.start=h,e.end=f[1]?h+(f[1]+1)*c:c}return e}]};ia.Animation=ia.extend(N,{tweener:function(a,b){ia.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;d-1,l={},m={};k?(m=g.position(),e=m.top,f=m.left):(e=parseFloat(i)||0,f=parseFloat(j)||0),ia.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(l.top=b.top-h.top+e),null!=b.left&&(l.left=b.left-h.left+f),"using"in b?b.using.call(a,l):g.css(l)}},ia.fn.extend({position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===ia.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),ia.nodeName(a[0],"html")||(c=a.offset()),c.top+=ia.css(a[0],"borderTopWidth",!0),c.left+=ia.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-ia.css(d,"marginTop",!0),left:b.left-c.left-ia.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||W.documentElement;a&&!ia.nodeName(a,"html")&&"static"===ia.css(a,"position");)a=a.offsetParent;return a||W.documentElement})}}),ia.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);ia.fn[a]=function(e){return ia.access(this,function(a,e,f){var g=S(a);return f===b?g?c in g?g[c]:g.document.documentElement[e]:a[e]:void(g?g.scrollTo(d?ia(g).scrollLeft():f,d?f:ia(g).scrollTop()):a[e]=f); -},a,e,arguments.length,null)}}),ia.each({Height:"height",Width:"width"},function(a,c){ia.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){ia.fn[e]=function(e,f){var g=arguments.length&&(d||"boolean"!=typeof e),h=d||(e===!0||f===!0?"margin":"border");return ia.access(this,function(c,d,e){var f;return ia.isWindow(c)?c.document.documentElement["client"+a]:9===c.nodeType?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?ia.css(c,d,h):ia.style(c,d,e,h)},c,g?e:b,g,null)}})}),a.jQuery=a.$=ia,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return ia})}(window),function(){function a(a){function b(b,c,d,e,f,g){for(;f>=0&&f0?0:h-1;return arguments.length<3&&(e=c[g?g[i]:i],i+=a),b(c,d,e,g,i,h)}}function b(a){return function(b,c,d){c=t(c,d);for(var e=null!=b&&b.length,f=a>0?0:e-1;f>=0&&f=0&&b<=w};r.each=r.forEach=function(a,b,c){b=s(b,c);var d,e;if(x(a))for(d=0,e=a.length;d=0},r.invoke=function(a,b){var c=j.call(arguments,2),d=r.isFunction(b);return r.map(a,function(a){var e=d?b:a[b];return null==e?e:e.apply(a,c)})},r.pluck=function(a,b){return r.map(a,r.property(b))},r.where=function(a,b){return r.filter(a,r.matcher(b))},r.findWhere=function(a,b){return r.find(a,r.matcher(b))},r.max=function(a,b,c){var d,e,f=-(1/0),g=-(1/0);if(null==b&&null!=a){a=x(a)?a:r.values(a);for(var h=0,i=a.length;hf&&(f=d)}else b=t(b,c),r.each(a,function(a,c,d){e=b(a,c,d),(e>g||e===-(1/0)&&f===-(1/0))&&(f=a,g=e)});return f},r.min=function(a,b,c){var d,e,f=1/0,g=1/0;if(null==b&&null!=a){a=x(a)?a:r.values(a);for(var h=0,i=a.length;hd||void 0===c)return 1;if(c=0;)if(a[d]===b)return d;return-1},r.findIndex=b(1),r.findLastIndex=b(-1),r.sortedIndex=function(a,b,c,d){c=t(c,d,1);for(var e=c(b),f=0,g=a.length;fb?(g&&(clearTimeout(g),g=null),h=j,f=a.apply(d,e),g||(d=e=null)):g||c.trailing===!1||(g=setTimeout(i,k)),f}},r.debounce=function(a,b,c){var d,e,f,g,h,i=function(){var j=r.now()-g;j=0?d=setTimeout(i,b-j):(d=null,c||(h=a.apply(f,e),d||(f=e=null)))};return function(){f=this,e=arguments,g=r.now();var j=c&&!d;return d||(d=setTimeout(i,b)),j&&(h=a.apply(f,e),f=e=null),h}},r.wrap=function(a,b){return r.partial(b,a)},r.negate=function(a){return function(){return!a.apply(this,arguments)}},r.compose=function(){var a=arguments,b=a.length-1;return function(){for(var c=b,d=a[b].apply(this,arguments);c--;)d=a[c].call(this,d);return d}},r.after=function(a,b){return function(){if(--a<1)return b.apply(this,arguments)}},r.before=function(a,b){var c;return function(){return--a>0&&(c=b.apply(this,arguments)),a<=1&&(b=null),c}},r.once=r.partial(r.before,2);var B=!{toString:null}.propertyIsEnumerable("toString"),C=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];r.keys=function(a){if(!r.isObject(a))return[];if(n)return n(a);var b=[];for(var d in a)r.has(a,d)&&b.push(d);return B&&c(a,b),b},r.allKeys=function(a){if(!r.isObject(a))return[];var b=[];for(var d in a)b.push(d);return B&&c(a,b),b},r.values=function(a){for(var b=r.keys(a),c=b.length,d=Array(c),e=0;e":">",'"':""","'":"'","`":"`"},F=r.invert(E),G=function(a){var b=function(b){return a[b]},c="(?:"+r.keys(a).join("|")+")",d=RegExp(c),e=RegExp(c,"g");return function(a){return a=null==a?"":""+a,d.test(a)?a.replace(e,b):a}};r.escape=G(E),r.unescape=G(F),r.result=function(a,b,c){var d=null==a?void 0:a[b];return void 0===d&&(d=c),r.isFunction(d)?d.call(a):d};var H=0;r.uniqueId=function(a){var b=++H+"";return a?a+b:b},r.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var I=/(.)^/,J={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},K=/\\|'|\r|\n|\u2028|\u2029/g,L=function(a){return"\\"+J[a]};r.template=function(a,b,c){!b&&c&&(b=c),b=r.defaults({},b,r.templateSettings);var d=RegExp([(b.escape||I).source,(b.interpolate||I).source,(b.evaluate||I).source].join("|")+"|$","g"),e=0,f="__p+='";a.replace(d,function(b,c,d,g,h){return f+=a.slice(e,h).replace(K,L),e=h+b.length,c?f+="'+\n((__t=("+c+"))==null?'':_.escape(__t))+\n'":d?f+="'+\n((__t=("+d+"))==null?'':__t)+\n'":g&&(f+="';\n"+g+"\n__p+='"),b}),f+="';\n",b.variable||(f="with(obj||{}){\n"+f+"}\n"),f="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+f+"return __p;\n";try{var g=new Function(b.variable||"obj","_",f)}catch(h){throw h.source=f,h}var i=function(a){return g.call(this,a,r)},j=b.variable||"obj";return i.source="function("+j+"){\n"+f+"}",i},r.chain=function(a){var b=r(a);return b._chain=!0,b};var M=function(a,b){return a._chain?r(b).chain():b};r.mixin=function(a){r.each(r.functions(a),function(b){var c=r[b]=a[b];r.prototype[b]=function(){var a=[this._wrapped];return i.apply(a,arguments),M(this,c.apply(r,a))}})},r.mixin(r),r.each(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var b=f[a];r.prototype[a]=function(){var c=this._wrapped;return b.apply(c,arguments),"shift"!==a&&"splice"!==a||0!==c.length||delete c[0],M(this,c)}}),r.each(["concat","join","slice"],function(a){var b=f[a];r.prototype[a]=function(){return M(this,b.apply(this._wrapped,arguments))}}),r.prototype.value=function(){return this._wrapped},r.prototype.valueOf=r.prototype.toJSON=r.prototype.value,r.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return r})}.call(this),null==window.BI&&(window.BI={}),window.BI||(window.BI={}),!function(a){var b=function(a,b){return function(c,d,e){return a.call(b,d,c,e)}},c=function(a){return function(){return _[a].apply(_,arguments)}},d=function(a){return function(){var c=Array.prototype.slice.call(arguments,0);return c[1]=_.isFunction(c[1])?b(c[1],c[2]):c[1],_[a].apply(_,c)}};_.extend(BI,{i18nText:function(a){var b=BI.i18n&&BI.i18n[a]||"";b||(b=a);var c=arguments.length;if(c>1)for(var d=1;d=0;c--)a=BI.map(a,function(a,d){return BI.extend({},b[c],{items:[BI.extend({},b[c].el,{el:d})]})});return a},formatEL:function(a){return a&&!a.type&&a.el?a:{el:a}},stripEL:function(a){return a.type&&a||a.el||a},trans2Element:function(a){return BI.map(a,function(a,b){return b.element})}}),_.each(["where","findWhere","contains","invoke","pluck","shuffle","sample","toArray","size"],function(a){BI[a]=c(a)}),_.each(["each","map","reduce","reduceRight","find","filter","reject","every","all","some","any","max","min","sortBy","groupBy","indexBy","countBy","partition"],function(a){BI[a]=d(a)}),_.extend(BI,{clamp:function(a,b,c){return ac&&(a=c),a},count:function(a,b,c){var d;if(c)for(d=a;d=0;d--)b(d,a[d],a);return!1},backAny:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(b(d,a[d],a))return!0;return!1},backEvery:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(!b(d,a[d],a))return!1;return!0},backFindKey:function(a,b,c){b=BI.iteratee(b,c);for(var d,e=_.keys(a),f=e.length-1;f>=0;f--)if(d=e[f],b(a[d],d,a))return d},backFind:function(a,b,c){var d;if(d=BI.isArray(a)?BI.findLastIndex(a,b,c):BI.backFindKey(a,b,c),void 0!==d&&d!==-1)return a[d]},remove:function(a,b,c){var d=BI.isFunction(b);b=d||BI.isArray(b)?b:[b];var e;if(BI.isArray(a))for(e=0;e(2147483646-a.charAt(d).charCodeAt(0)+c.charCodeAt(0))/26)return 0;return b},int2Abc:function(a){var b=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],c=a,d="";if(0===a)return"";for(;0!==c;){var e=c%26;0===e&&(e=26),d=b[e-1]+d,c=(c-e)/26}return d}}),_.each(["first","initial","last","rest","compact","flatten","without","union","intersection","difference","zip","unzip","object","indexOf","lastIndexOf","sortedIndex","range"],function(a){BI[a]=c(a)}),_.each(["findIndex","findLastIndex"],function(a){BI[a]=d(a)}),_.extend(BI,{makeArray:function(a,b){for(var c=[],d=0;d0},isCapitalEqual:function(a,b){return a=BI.isNull(a)?a:(""+a).toLowerCase(),b=BI.isNull(b)?b:(""+b).toLowerCase(),BI.isEqual(a,b)},isWidthOrHeight:function(a){return"number"==typeof a?a>=0:"string"==typeof a?/^\d{1,3}%$/.exec(a)||"auto"==a||/^\d+px$/.exec(a):void 0},isNotNull:function(a){return!BI.isNull(a)},isNull:function(a){return"undefined"==typeof a||null===a},isPlainObject:function(){return $.isPlainObject.apply($,arguments)},isEmptyArray:function(a){return BI.isArray(a)&&BI.isEmpty(a)},isNotEmptyArray:function(a){return BI.isArray(a)&&!BI.isEmpty(a)},isEmptyObject:function(a){return BI.isEqual(a,{})},isNotEmptyObject:function(a){return BI.isPlainObject(a)&&!BI.isEmptyObject(a)},isEmptyString:function(a){return BI.isString(a)&&0===a.length},isNotEmptyString:function(a){return BI.isString(a)&&!BI.isEmptyString(a)},isWindow:function(){return $.isWindow.apply($,arguments)}}),_.extend(BI,{deepClone:function(b){if(null===b||b===a)return b;var c=Object.prototype.toString.call(b);if("[object Date]"===c)return Date.getDate(b.getTime());var d,e;if("[object Array]"===c)for(d=b.length,e=[];d--;)e[d]=BI.deepClone(b[d]);else if("[object Object]"===c&&b.constructor===Object){e={};for(var d in b)BI.has(b,d)&&(e[d]=BI.deepClone(b[d]))}return e||b},isDeepMatch:function(a,b){var c=BI.keys(b),d=c.length;if(null==a)return!d;for(var e=Object(a),f=0;f10;)c=(parseInt(c.substring(0,10))+parseInt(c.substring(10,c.length),10)).toString();c=(f*c+g)%h;for(var j="",k="",d=0;d10;)c=(parseInt(c.substring(0,10),10)+parseInt(c.substring(10,c.length),10)).toString();c=(g*c+h)%i;for(var k="",l="",d=0;d127&&d<2048?(b+=String.fromCharCode(d>>6|192),b+=String.fromCharCode(63&d|128)):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128),b+=String.fromCharCode(63&d|128))}return b},c=function(a){for(var b="",c=0,d=0,e=0,f=0;c191&&d<224?(f=a.charCodeAt(c+1),b+=String.fromCharCode((31&d)<<6|63&f),c+=2):(f=a.charCodeAt(c+1),e=a.charCodeAt(c+2),b+=String.fromCharCode((15&d)<<12|(63&f)<<6|63&e),c+=3);return b};_.extend(BI,{encode:function(c){var d,e,f,g,h,i,j,k="",l=0;for(c=b(c);l>2,h=(3&d)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k=k+a.charAt(g)+a.charAt(h)+a.charAt(i)+a.charAt(j);return k},decode:function(b){var d,e,f,g,h,i,j,k="",l=0;for(b=b.replace(/[^A-Za-z0-9\+\/\=]/g,"");l>4,e=(15&h)<<4|i>>2,f=(3&i)<<6|j,k+=String.fromCharCode(d),64!=i&&(k+=String.fromCharCode(e)),64!=j&&(k+=String.fromCharCode(f));return k=c(k)}})}(),BI.Cache={_prefix:"bi",setUsername:function(a){localStorage.setItem(BI.Cache._prefix+".username",(a+""||"").toUpperCase())},getUsername:function(){return localStorage.getItem(BI.Cache._prefix+".username")||""},_getKeyPrefix:function(){return BI.Cache.getUsername()+"."+BI.Cache._prefix+"."},_generateKey:function(a){return BI.Cache._getKeyPrefix()+(a||"")},getItem:function(a){return localStorage.getItem(BI.Cache._generateKey(a))},setItem:function(a,b){localStorage.setItem(BI.Cache._generateKey(a),b)},removeItem:function(a){localStorage.removeItem(BI.Cache._generateKey(a))},clear:function(){for(var a=localStorage.length;a>=0;a--){var b=localStorage.key(a);b&&0===b.indexOf(BI.Cache._getKeyPrefix())&&localStorage.removeItem(b)}},keys:function(){for(var a=[],b=localStorage.length;b>=0;b--){var c=localStorage.key(b);if(c){var d=BI.Cache._getKeyPrefix();0===c.indexOf(d)&&(a[a.length]=c.substring(d.length))}}return a},addCookie:function(a,b,c,d){var e=a+"="+escape(b);if(d&&d>0){var f=new Date;f.setTime(f.getTime()+3600*d*1e3),e=e+"; expires="+f.toGMTString()}c&&(e=e+"; path="+c),document.cookie=e},getCookie:function(a){var b,c=new RegExp("(^| )"+a+"=([^;]*)(;|$)");return(b=document.cookie.match(c))?unescape(b[2]):null},deleteCookie:function(a,b){var c=new Date;c.setTime(c.getTime()-1e4);var d=a+"=v; expires="+c.toGMTString();b&&(d=d+"; path="+b),document.cookie=d}},BI.CellSizeAndPositionManager=function(a,b,c){this._cellSizeGetter=b,this._cellCount=a,this._estimatedCellSize=c,this._cellSizeAndPositionData={},this._lastMeasuredIndex=-1},BI.CellSizeAndPositionManager.prototype={constructor:BI.CellSizeAndPositionManager,configure:function(a,b){this._cellCount=a,this._estimatedCellSize=b},getCellCount:function(){return this._cellCount},getEstimatedCellSize:function(){return this._estimatedCellSize},getLastMeasuredIndex:function(){return this._lastMeasuredIndex},getSizeAndPositionOfCell:function(a){if(!(a<0||a>=this._cellCount)){if(a>this._lastMeasuredIndex){for(var b=this.getSizeAndPositionOfLastMeasuredCell(),c=b.offset+b.size,d=this._lastMeasuredIndex+1;d<=a;d++){var e=this._cellSizeGetter(d);null==e||isNaN(e)||(this._cellSizeAndPositionData[d]={offset:c,size:e},c+=e)}this._lastMeasuredIndex=a}return this._cellSizeAndPositionData[a]}},getSizeAndPositionOfLastMeasuredCell:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}},getTotalSize:function(){var a=this.getSizeAndPositionOfLastMeasuredCell();return a.offset+a.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize},getUpdatedOffsetForIndex:function(a,b,c,d){var e,f=this.getSizeAndPositionOfCell(d),g=f.offset,h=g-b+f.size;switch(a){case"start":e=g;break;case"end":e=h;break;case"center":e=g-(b-f.size)/2;break;default:e=Math.max(h,Math.min(g,c))}var i=this.getTotalSize();return Math.max(0,Math.min(i-b,e))},getVisibleCellRange:function(a,b){var c=this.getTotalSize();if(0===c)return{};var d=b+a,e=this._findNearestCell(b),f=this.getSizeAndPositionOfCell(e);b=f.offset+f.size;for(var g=e;bc&&(a=d-1)}if(b>0)return b-1},_exponentialSearch:function(a,b){for(var c=1;a=a?this._binarySearch(c,0,a):this._exponentialSearch(c,a)}}},BI.ScalingCellSizeAndPositionManager=function(a,b,c,d){this._cellSizeAndPositionManager=new BI.CellSizeAndPositionManager(a,b,c),this._maxScrollSize=d||1e7},BI.ScalingCellSizeAndPositionManager.prototype={constructor:BI.ScalingCellSizeAndPositionManager,configure:function(){this._cellSizeAndPositionManager.configure.apply(this._cellSizeAndPositionManager,arguments)},getCellCount:function(){return this._cellSizeAndPositionManager.getCellCount()},getEstimatedCellSize:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()},getLastMeasuredIndex:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()},getOffsetAdjustment:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize(),e=this._getOffsetPercentage(a,b,d);return Math.round(e*(d-c))},getSizeAndPositionOfCell:function(a){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(a)},getSizeAndPositionOfLastMeasuredCell:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()},getTotalSize:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())},getUpdatedOffsetForIndex:function(a,b,c,d){c=this._safeOffsetToOffset(b,c);var e=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex(a,b,c,d);return this._offsetToSafeOffset(b,e)},getVisibleCellRange:function(a,b){return b=this._safeOffsetToOffset(a,b),this._cellSizeAndPositionManager.getVisibleCellRange(a,b)},resetCell:function(a){this._cellSizeAndPositionManager.resetCell(a)},_getOffsetPercentage:function(a,b,c){return c<=a?0:b/(c-a)},_offsetToSafeOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,c);return Math.round(e*(d-a))},_safeOffsetToOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,d);return Math.round(e*(c-a))}},!function(){var a="YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZ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QJSXYJMLSZLJQLYCMMHCFMMFPQQMFYLQMCFFQMMMMHMZNFHHJGTTHHKHSLNCHHYQDXTMMQDCYZYXYQMYQYLTDCYYYZAZZCYMZYDLZFFFMMYCQZWZZMABTBYZTDMNZZGGDFTYPCGQYTTSSFFWFDTZQSSYSTWXJHXYTSXXYLBYQHWWKXHZXWZNNZZJZJJQJCCCHYYXBZXZCYZTLLCQXYNJYCYYCYNZZQYYYEWYCZDCJYCCHYJLBTZYYCQWMPWPYMLGKDLDLGKQQBGYCHJXY",b={ +},a,e,arguments.length,null)}}),ia.each({Height:"height",Width:"width"},function(a,c){ia.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){ia.fn[e]=function(e,f){var g=arguments.length&&(d||"boolean"!=typeof e),h=d||(e===!0||f===!0?"margin":"border");return ia.access(this,function(c,d,e){var f;return ia.isWindow(c)?c.document.documentElement["client"+a]:9===c.nodeType?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?ia.css(c,d,h):ia.style(c,d,e,h)},c,g?e:b,g,null)}})}),a.jQuery=a.$=ia,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return ia})}(window),function(){function a(a){function b(b,c,d,e,f,g){for(;f>=0&&f0?0:h-1;return arguments.length<3&&(e=c[g?g[i]:i],i+=a),b(c,d,e,g,i,h)}}function b(a){return function(b,c,d){c=t(c,d);for(var e=null!=b&&b.length,f=a>0?0:e-1;f>=0&&f=0&&b<=w};r.each=r.forEach=function(a,b,c){b=s(b,c);var d,e;if(x(a))for(d=0,e=a.length;d=0},r.invoke=function(a,b){var c=j.call(arguments,2),d=r.isFunction(b);return r.map(a,function(a){var e=d?b:a[b];return null==e?e:e.apply(a,c)})},r.pluck=function(a,b){return r.map(a,r.property(b))},r.where=function(a,b){return r.filter(a,r.matcher(b))},r.findWhere=function(a,b){return r.find(a,r.matcher(b))},r.max=function(a,b,c){var d,e,f=-(1/0),g=-(1/0);if(null==b&&null!=a){a=x(a)?a:r.values(a);for(var h=0,i=a.length;hf&&(f=d)}else b=t(b,c),r.each(a,function(a,c,d){e=b(a,c,d),(e>g||e===-(1/0)&&f===-(1/0))&&(f=a,g=e)});return f},r.min=function(a,b,c){var d,e,f=1/0,g=1/0;if(null==b&&null!=a){a=x(a)?a:r.values(a);for(var h=0,i=a.length;hd||void 0===c)return 1;if(c=0;)if(a[d]===b)return d;return-1},r.findIndex=b(1),r.findLastIndex=b(-1),r.sortedIndex=function(a,b,c,d){c=t(c,d,1);for(var e=c(b),f=0,g=a.length;fb?(g&&(clearTimeout(g),g=null),h=j,f=a.apply(d,e),g||(d=e=null)):g||c.trailing===!1||(g=setTimeout(i,k)),f}},r.debounce=function(a,b,c){var d,e,f,g,h,i=function(){var j=r.now()-g;j=0?d=setTimeout(i,b-j):(d=null,c||(h=a.apply(f,e),d||(f=e=null)))};return function(){f=this,e=arguments,g=r.now();var j=c&&!d;return d||(d=setTimeout(i,b)),j&&(h=a.apply(f,e),f=e=null),h}},r.wrap=function(a,b){return r.partial(b,a)},r.negate=function(a){return function(){return!a.apply(this,arguments)}},r.compose=function(){var a=arguments,b=a.length-1;return function(){for(var c=b,d=a[b].apply(this,arguments);c--;)d=a[c].call(this,d);return d}},r.after=function(a,b){return function(){if(--a<1)return b.apply(this,arguments)}},r.before=function(a,b){var c;return function(){return--a>0&&(c=b.apply(this,arguments)),a<=1&&(b=null),c}},r.once=r.partial(r.before,2);var B=!{toString:null}.propertyIsEnumerable("toString"),C=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];r.keys=function(a){if(!r.isObject(a))return[];if(n)return n(a);var b=[];for(var d in a)r.has(a,d)&&b.push(d);return B&&c(a,b),b},r.allKeys=function(a){if(!r.isObject(a))return[];var b=[];for(var d in a)b.push(d);return B&&c(a,b),b},r.values=function(a){for(var b=r.keys(a),c=b.length,d=Array(c),e=0;e":">",'"':""","'":"'","`":"`"},F=r.invert(E),G=function(a){var b=function(b){return a[b]},c="(?:"+r.keys(a).join("|")+")",d=RegExp(c),e=RegExp(c,"g");return function(a){return a=null==a?"":""+a,d.test(a)?a.replace(e,b):a}};r.escape=G(E),r.unescape=G(F),r.result=function(a,b,c){var d=null==a?void 0:a[b];return void 0===d&&(d=c),r.isFunction(d)?d.call(a):d};var H=0;r.uniqueId=function(a){var b=++H+"";return a?a+b:b},r.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var I=/(.)^/,J={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},K=/\\|'|\r|\n|\u2028|\u2029/g,L=function(a){return"\\"+J[a]};r.template=function(a,b,c){!b&&c&&(b=c),b=r.defaults({},b,r.templateSettings);var d=RegExp([(b.escape||I).source,(b.interpolate||I).source,(b.evaluate||I).source].join("|")+"|$","g"),e=0,f="__p+='";a.replace(d,function(b,c,d,g,h){return f+=a.slice(e,h).replace(K,L),e=h+b.length,c?f+="'+\n((__t=("+c+"))==null?'':_.escape(__t))+\n'":d?f+="'+\n((__t=("+d+"))==null?'':__t)+\n'":g&&(f+="';\n"+g+"\n__p+='"),b}),f+="';\n",b.variable||(f="with(obj||{}){\n"+f+"}\n"),f="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+f+"return __p;\n";try{var g=new Function(b.variable||"obj","_",f)}catch(h){throw h.source=f,h}var i=function(a){return g.call(this,a,r)},j=b.variable||"obj";return i.source="function("+j+"){\n"+f+"}",i},r.chain=function(a){var b=r(a);return b._chain=!0,b};var M=function(a,b){return a._chain?r(b).chain():b};r.mixin=function(a){r.each(r.functions(a),function(b){var c=r[b]=a[b];r.prototype[b]=function(){var a=[this._wrapped];return i.apply(a,arguments),M(this,c.apply(r,a))}})},r.mixin(r),r.each(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var b=f[a];r.prototype[a]=function(){var c=this._wrapped;return b.apply(c,arguments),"shift"!==a&&"splice"!==a||0!==c.length||delete c[0],M(this,c)}}),r.each(["concat","join","slice"],function(a){var b=f[a];r.prototype[a]=function(){return M(this,b.apply(this._wrapped,arguments))}}),r.prototype.value=function(){return this._wrapped},r.prototype.valueOf=r.prototype.toJSON=r.prototype.value,r.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return r})}.call(this),null==window.BI&&(window.BI={}),window.BI||(window.BI={}),!function(a){var b=function(a,b){return function(c,d,e){return a.call(b,d,c,e)}},c=function(a){return function(){return _[a].apply(_,arguments)}},d=function(a){return function(){var c=Array.prototype.slice.call(arguments,0);return c[1]=_.isFunction(c[1])?b(c[1],c[2]):c[1],_[a].apply(_,c)}};_.extend(BI,{i18nText:function(a){var b=BI.i18n&&BI.i18n[a]||"";b||(b=a);var c=arguments.length;if(c>1)for(var d=1;d=0;c--)a=BI.map(a,function(a,d){return BI.extend({},b[c],{items:[BI.extend({},b[c].el,{el:d})]})});return a},formatEL:function(a){return a&&!a.type&&a.el?a:{el:a}},stripEL:function(a){return a.type&&a||a.el||a},trans2Element:function(a){return BI.map(a,function(a,b){return b.element})}}),_.each(["where","findWhere","contains","invoke","pluck","shuffle","sample","toArray","size"],function(a){BI[a]=c(a)}),_.each(["each","map","reduce","reduceRight","find","filter","reject","every","all","some","any","max","min","sortBy","groupBy","indexBy","countBy","partition"],function(a){BI[a]=d(a)}),_.extend(BI,{clamp:function(a,b,c){return ac&&(a=c),a},count:function(a,b,c){var d;if(c)for(d=a;d=0;d--)b(d,a[d],a);return!1},backAny:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(b(d,a[d],a))return!0;return!1},backEvery:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(!b(d,a[d],a))return!1;return!0},backFindKey:function(a,b,c){b=BI.iteratee(b,c);for(var d,e=_.keys(a),f=e.length-1;f>=0;f--)if(d=e[f],b(a[d],d,a))return d},backFind:function(a,b,c){var d;if(d=BI.isArray(a)?BI.findLastIndex(a,b,c):BI.backFindKey(a,b,c),void 0!==d&&d!==-1)return a[d]},remove:function(a,b,c){var d=BI.isFunction(b);b=d||BI.isArray(b)?b:[b];var e;if(BI.isArray(a))for(e=0;e(2147483646-a.charAt(d).charCodeAt(0)+c.charCodeAt(0))/26)return 0;return b},int2Abc:function(a){var b=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],c=a,d="";if(0===a)return"";for(;0!==c;){var e=c%26;0===e&&(e=26),d=b[e-1]+d,c=(c-e)/26}return d}}),_.each(["first","initial","last","rest","compact","flatten","without","union","intersection","difference","zip","unzip","object","indexOf","lastIndexOf","sortedIndex","range"],function(a){BI[a]=c(a)}),_.each(["findIndex","findLastIndex"],function(a){BI[a]=d(a)}),_.extend(BI,{makeArray:function(a,b){for(var c=[],d=0;d0},isCapitalEqual:function(a,b){return a=BI.isNull(a)?a:(""+a).toLowerCase(),b=BI.isNull(b)?b:(""+b).toLowerCase(),BI.isEqual(a,b)},isWidthOrHeight:function(a){return"number"==typeof a?a>=0:"string"==typeof a?/^\d{1,3}%$/.exec(a)||"auto"==a||/^\d+px$/.exec(a):void 0},isNotNull:function(a){return!BI.isNull(a)},isNull:function(a){return"undefined"==typeof a||null===a},isPlainObject:function(){return $.isPlainObject.apply($,arguments)},isEmptyArray:function(a){return BI.isArray(a)&&BI.isEmpty(a)},isNotEmptyArray:function(a){return BI.isArray(a)&&!BI.isEmpty(a)},isEmptyObject:function(a){return BI.isEqual(a,{})},isNotEmptyObject:function(a){return BI.isPlainObject(a)&&!BI.isEmptyObject(a)},isEmptyString:function(a){return BI.isString(a)&&0===a.length},isNotEmptyString:function(a){return BI.isString(a)&&!BI.isEmptyString(a)},isWindow:function(){return $.isWindow.apply($,arguments)}}),_.extend(BI,{deepClone:function(b){if(null===b||b===a)return b;var c=Object.prototype.toString.call(b);if("[object Date]"===c)return Date.getDate(b.getTime());var d,e;if("[object Array]"===c)for(d=b.length,e=[];d--;)e[d]=BI.deepClone(b[d]);else if("[object Object]"===c&&b.constructor===Object){e={};for(var d in b)BI.has(b,d)&&(e[d]=BI.deepClone(b[d]))}return e||b},isDeepMatch:function(a,b){var c=BI.keys(b),d=c.length;if(null==a)return!d;for(var e=Object(a),f=0;f10;)c=(parseInt(c.substring(0,10))+parseInt(c.substring(10,c.length),10)).toString();c=(f*c+g)%h;for(var j="",k="",d=0;d10;)c=(parseInt(c.substring(0,10),10)+parseInt(c.substring(10,c.length),10)).toString();c=(g*c+h)%i;for(var k="",l="",d=0;d127&&d<2048?(b+=String.fromCharCode(d>>6|192),b+=String.fromCharCode(63&d|128)):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128),b+=String.fromCharCode(63&d|128))}return b},c=function(a){for(var b="",c=0,d=0,e=0,f=0;c191&&d<224?(f=a.charCodeAt(c+1),b+=String.fromCharCode((31&d)<<6|63&f),c+=2):(f=a.charCodeAt(c+1),e=a.charCodeAt(c+2),b+=String.fromCharCode((15&d)<<12|(63&f)<<6|63&e),c+=3);return b};_.extend(BI,{encode:function(c){var d,e,f,g,h,i,j,k="",l=0;for(c=b(c);l>2,h=(3&d)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k=k+a.charAt(g)+a.charAt(h)+a.charAt(i)+a.charAt(j);return k},decode:function(b){var d,e,f,g,h,i,j,k="",l=0;for(b=b.replace(/[^A-Za-z0-9\+\/\=]/g,"");l>4,e=(15&h)<<4|i>>2,f=(3&i)<<6|j,k+=String.fromCharCode(d),64!=i&&(k+=String.fromCharCode(e)),64!=j&&(k+=String.fromCharCode(f));return k=c(k)}})}(),BI.Cache={_prefix:"bi",setUsername:function(a){localStorage.setItem(BI.Cache._prefix+".username",(a+""||"").toUpperCase())},getUsername:function(){return localStorage.getItem(BI.Cache._prefix+".username")||""},_getKeyPrefix:function(){return BI.Cache.getUsername()+"."+BI.Cache._prefix+"."},_generateKey:function(a){return BI.Cache._getKeyPrefix()+(a||"")},getItem:function(a){return localStorage.getItem(BI.Cache._generateKey(a))},setItem:function(a,b){localStorage.setItem(BI.Cache._generateKey(a),b)},removeItem:function(a){localStorage.removeItem(BI.Cache._generateKey(a))},clear:function(){for(var a=localStorage.length;a>=0;a--){var b=localStorage.key(a);b&&0===b.indexOf(BI.Cache._getKeyPrefix())&&localStorage.removeItem(b)}},keys:function(){for(var a=[],b=localStorage.length;b>=0;b--){var c=localStorage.key(b);if(c){var d=BI.Cache._getKeyPrefix();0===c.indexOf(d)&&(a[a.length]=c.substring(d.length))}}return a},addCookie:function(a,b,c,d){var e=a+"="+escape(b);if(d&&d>0){var f=new Date;f.setTime(f.getTime()+3600*d*1e3),e=e+"; expires="+f.toGMTString()}c&&(e=e+"; path="+c),document.cookie=e},getCookie:function(a){var b,c=new RegExp("(^| )"+a+"=([^;]*)(;|$)");return(b=document.cookie.match(c))?unescape(b[2]):null},deleteCookie:function(a,b){var c=new Date;c.setTime(c.getTime()-1e4);var d=a+"=v; expires="+c.toGMTString();b&&(d=d+"; path="+b),document.cookie=d}},BI.CellSizeAndPositionManager=function(a,b,c){this._cellSizeGetter=b,this._cellCount=a,this._estimatedCellSize=c,this._cellSizeAndPositionData={},this._lastMeasuredIndex=-1},BI.CellSizeAndPositionManager.prototype={constructor:BI.CellSizeAndPositionManager,configure:function(a,b){this._cellCount=a,this._estimatedCellSize=b},getCellCount:function(){return this._cellCount},getEstimatedCellSize:function(){return this._estimatedCellSize},getLastMeasuredIndex:function(){return this._lastMeasuredIndex},getSizeAndPositionOfCell:function(a){if(!(a<0||a>=this._cellCount)){if(a>this._lastMeasuredIndex){for(var b=this.getSizeAndPositionOfLastMeasuredCell(),c=b.offset+b.size,d=this._lastMeasuredIndex+1;d<=a;d++){var e=this._cellSizeGetter(d);null==e||isNaN(e)||(this._cellSizeAndPositionData[d]={offset:c,size:e},c+=e)}this._lastMeasuredIndex=a}return this._cellSizeAndPositionData[a]}},getSizeAndPositionOfLastMeasuredCell:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}},getTotalSize:function(){var a=this.getSizeAndPositionOfLastMeasuredCell();return a.offset+a.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize},getUpdatedOffsetForIndex:function(a,b,c,d){var e,f=this.getSizeAndPositionOfCell(d),g=f.offset,h=g-b+f.size;switch(a){case"start":e=g;break;case"end":e=h;break;case"center":e=g-(b-f.size)/2;break;default:e=Math.max(h,Math.min(g,c))}var i=this.getTotalSize();return Math.max(0,Math.min(i-b,e))},getVisibleCellRange:function(a,b){var c=this.getTotalSize();if(0===c)return{};var d=b+a,e=this._findNearestCell(b),f=this.getSizeAndPositionOfCell(e);b=f.offset+f.size;for(var g=e;bc&&(a=d-1)}if(b>0)return b-1},_exponentialSearch:function(a,b){for(var c=1;a=a?this._binarySearch(c,0,a):this._exponentialSearch(c,a)}}},BI.ScalingCellSizeAndPositionManager=function(a,b,c,d){this._cellSizeAndPositionManager=new BI.CellSizeAndPositionManager(a,b,c),this._maxScrollSize=d||1e7},BI.ScalingCellSizeAndPositionManager.prototype={constructor:BI.ScalingCellSizeAndPositionManager,configure:function(){this._cellSizeAndPositionManager.configure.apply(this._cellSizeAndPositionManager,arguments)},getCellCount:function(){return this._cellSizeAndPositionManager.getCellCount()},getEstimatedCellSize:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()},getLastMeasuredIndex:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()},getOffsetAdjustment:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize(),e=this._getOffsetPercentage(a,b,d);return Math.round(e*(d-c))},getSizeAndPositionOfCell:function(a){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(a)},getSizeAndPositionOfLastMeasuredCell:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()},getTotalSize:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())},getUpdatedOffsetForIndex:function(a,b,c,d){c=this._safeOffsetToOffset(b,c);var e=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex(a,b,c,d);return this._offsetToSafeOffset(b,e)},getVisibleCellRange:function(a,b){return b=this._safeOffsetToOffset(a,b),this._cellSizeAndPositionManager.getVisibleCellRange(a,b)},resetCell:function(a){this._cellSizeAndPositionManager.resetCell(a)},_getOffsetPercentage:function(a,b,c){return c<=a?0:b/(c-a)},_offsetToSafeOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,c);return Math.round(e*(d-a))},_safeOffsetToOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,d);return Math.round(e*(c-a))}},!function(){var a="YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJPFYYNWJJTMYHZWZHFLZPPQHGSCYYYNJQYXXGJHHSDSJNKKTMOMLCRXYPSNQSECCQZGGLLYJLMYZZSECYKYYHQWJSSGGYXYZYJWWKDJHYCHMYXJTLXJYQBYXZLDWRDJRWYSRLDZJPCBZJJBRCFTLECZSTZFXXZHTRQHYBDLYCZSSYMMRFMYQZPWWJJYFCRWFDFZQPYDDWYXKYJAWJFFXYPSFTZYHHYZYSWCJYXSCLCXXWZZXNBGNNXBXLZSZSBSGPYSYZDHMDZBQBZCWDZZYYTZHBTSYYBZGNTNXQYWQSKBPHHLXGYBFMJEBJHHGQTJCYSXSTKZHLYCKGLYSMZXYALMELDCCXGZYRJXSDLTYZCQKCNNJWHJTZZCQLJSTSTBNXBTYXCEQXGKWJYFLZQLYHYXSPSFXLMPBYSXXXYDJCZYLLLSJXFHJXPJBTFFYABYXBHZZBJYZLWLCZGGBTSSMDTJZXPTH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GLXYDJYTLFBHBPNLYZFBBHPTGJKWETZHKJJXZXXGLLJLSTGSHJJYQLQZFKCGNNDJSSZFDBCTWWSEQFHQJBSAQTGYPQLBXBMMYWXGSLZHGLZGQYFLZBYFZJFRYSFMBYZHQGFWZSYFYJJPHZBYYZFFWODGRLMFTWLBZGYCQXCDJYGZYYYYTYTYDWEGAZYHXJLZYYHLRMGRXXZCLHNELJJTJTPWJYBJJBXJJTJTEEKHWSLJPLPSFYZPQQBDLQJJTYYQLYZKDKSQJYYQZLDQTGJQYZJSUCMRYQTHTEJMFCTYHYPKMHYZWJDQFHYYXWSHCTXRLJHQXHCCYYYJLTKTTYTMXGTCJTZAYYOCZLYLBSZYWJYTSJYHBYSHFJLYGJXXTMZYYLTXXYPZLXYJZYZYYPNHMYMDYYLBLHLSYYQQLLNJJYMSOYQBZGDLYXYLCQYXTSZEGXHZGLHWBLJHEYXTWQMAKBPQCGYSHHEGQCMWYYWLJYJHYYZLLJJYLHZYHMGSLJLJXCJJYCLYCJPCPZJZJMMYLCQLNQLJQJSXYJMLSZLJQLYCMMHCFMMFPQQMFYLQMCFFQMMMMHMZNFHHJGTTHHKHSLNCHHYQDXTMMQDCYZYXYQMYQYLTDCYYYZAZZCYMZYDLZFFFMMYCQZWZZMABTBYZTDMNZZGGDFTYPCGQYTTSSFFWFDTZQSSYSTWXJHXYTSXXYLBYQHWWKXHZXWZNNZZJZJJQJCCCHYYXBZXZCYZTLLCQXYNJYCYYCYNZZQYYYEWYCZDCJYCCHYJLBTZYYCQWMPWPYMLGKDLDLGKQQBGYCHJXY",b={ 19969:"DZ",19975:"WM",19988:"QJ",20048:"YL",20056:"SC",20060:"NM",20094:"QG",20127:"QJ",20167:"QC",20193:"YG",20250:"KH",20256:"ZC",20282:"SC",20285:"QJG",20291:"TD",20314:"YD",20315:"BF",20340:"NE",20375:"TD",20389:"YJ",20391:"CZ",20415:"PB",20446:"YS",20447:"SQ",20504:"TC",20608:"KG",20854:"QJ",20857:"ZC",20911:"PF",20985:"AW",21032:"PB",21048:"XQ",21049:"SC",21089:"YS",21119:"JC",21242:"SB",21273:"SC",21305:"YP",21306:"QO",21330:"ZC",21333:"SDC",21345:"QK",21378:"CA",21397:"SC",21414:"XS",21442:"SC",21477:"JG",21480:"TD",21484:"ZS",21494:"YX",21505:"YX",21512:"HG",21523:"XH",21537:"PB",21542:"PF",21549:"KH",21571:"E",21574:"DA",21588:"TD",21589:"O",21618:"ZC",21621:"KHA",21632:"ZJ",21654:"KG",21679:"LKG",21683:"KH",21710:"A",21719:"YH",21734:"WOE",21769:"A",21780:"WN",21804:"XH",21834:"A",21899:"ZD",21903:"RN",21908:"WO",21939:"ZC",21956:"SA",21964:"YA",21970:"TD",22003:"A",22031:"JG",22040:"XS",22060:"ZC",22066:"ZC",22079:"MH",22129:"XJ",22179:"XA",22237:"NJ",22244:"TD",22280:"JQ",22300:"YH",22313:"XW",22331:"YQ",22343:"YJ",22351:"PH",22395:"DC",22412:"TD",22484:"PB",22500:"PB",22534:"ZD",22549:"DH",22561:"PB",22612:"TD",22771:"KQ",22831:"HB",22841:"JG",22855:"QJ",22865:"XQ",23013:"ML",23081:"WM",23487:"SX",23558:"QJ",23561:"YW",23586:"YW",23614:"YW",23615:"SN",23631:"PB",23646:"ZS",23663:"ZT",23673:"YG",23762:"TD",23769:"ZS",23780:"QJ",23884:"QK",24055:"XH",24113:"DC",24162:"ZC",24191:"GA",24273:"QJ",24324:"NL",24377:"TD",24378:"QJ",24439:"PF",24554:"ZS",24683:"TD",24694:"WE",24733:"LK",24925:"TN",25094:"ZG",25100:"XQ",25103:"XH",25153:"PB",25170:"PB",25179:"KG",25203:"PB",25240:"ZS",25282:"FB",25303:"NA",25324:"KG",25341:"ZY",25373:"WZ",25375:"XJ",25384:"A",25457:"A",25528:"SD",25530:"SC",25552:"TD",25774:"ZC",25874:"ZC",26044:"YW",26080:"WM",26292:"PB",26333:"PB",26355:"ZY",26366:"CZ",26397:"ZC",26399:"QJ",26415:"ZS",26451:"SB",26526:"ZC",26552:"JG",26561:"TD",26588:"JG",26597:"CZ",26629:"ZS",26638:"YL",26646:"XQ",26653:"KG",26657:"XJ",26727:"HG",26894:"ZC",26937:"ZS",26946:"ZC",26999:"KJ",27099:"KJ",27449:"YQ",27481:"XS",27542:"ZS",27663:"ZS",27748:"TS",27784:"SC",27788:"ZD",27795:"TD",27812:"O",27850:"PB",27852:"MB",27895:"SL",27898:"PL",27973:"QJ",27981:"KH",27986:"HX",27994:"XJ",28044:"YC",28065:"WG",28177:"SM",28267:"QJ",28291:"KH",28337:"ZQ",28463:"TL",28548:"DC",28601:"TD",28689:"PB",28805:"JG",28820:"QG",28846:"PB",28952:"TD",28975:"ZC",29100:"A",29325:"QJ",29575:"SL",29602:"FB",30010:"TD",30044:"CX",30058:"PF",30091:"YSP",30111:"YN",30229:"XJ",30427:"SC",30465:"SX",30631:"YQ",30655:"QJ",30684:"QJG",30707:"SD",30729:"XH",30796:"LG",30917:"PB",31074:"NM",31085:"JZ",31109:"SC",31181:"ZC",31192:"MLB",31293:"JQ",31400:"YX",31584:"YJ",31896:"ZN",31909:"ZY",31995:"XJ",32321:"PF",32327:"ZY",32418:"HG",32420:"XQ",32421:"HG",32438:"LG",32473:"GJ",32488:"TD",32521:"QJ",32527:"PB",32562:"ZSQ",32564:"JZ",32735:"ZD",32793:"PB",33071:"PF",33098:"XL",33100:"YA",33152:"PB",33261:"CX",33324:"BP",33333:"TD",33406:"YA",33426:"WM",33432:"PB",33445:"JG",33486:"ZN",33493:"TS",33507:"QJ",33540:"QJ",33544:"ZC",33564:"XQ",33617:"YT",33632:"QJ",33636:"XH",33637:"YX",33694:"WG",33705:"PF",33728:"YW",33882:"SR",34067:"WM",34074:"YW",34121:"QJ",34255:"ZC",34259:"XL",34425:"JH",34430:"XH",34485:"KH",34503:"YS",34532:"HG",34552:"XS",34558:"YE",34593:"ZL",34660:"YQ",34892:"XH",34928:"SC",34999:"QJ",35048:"PB",35059:"SC",35098:"ZC",35203:"TQ",35265:"JX",35299:"JX",35782:"SZ",35828:"YS",35830:"E",35843:"TD",35895:"YG",35977:"MH",36158:"JG",36228:"QJ",36426:"XQ",36466:"DC",36710:"JC",36711:"ZYG",36767:"PB",36866:"SK",36951:"YW",37034:"YX",37063:"XH",37218:"ZC",37325:"ZC",38063:"PB",38079:"TD",38085:"QY",38107:"DC",38116:"TD",38123:"YD",38224:"HG",38241:"XTC",38271:"ZC",38415:"YE",38426:"KH",38461:"YD",38463:"AE",38466:"PB",38477:"XJ",38518:"YT",38551:"WK",38585:"ZC",38704:"XS",38739:"LJ",38761:"GJ",38808:"SQ",39048:"JG",39049:"XJ",39052:"HG",39076:"CZ",39271:"XT",39534:"TD",39552:"TD",39584:"PB",39647:"SB",39730:"LG",39748:"TPB",40109:"ZQ",40479:"ND",40516:"HG",40536:"HG",40583:"QJ",40765:"YQ",40784:"QJ",40840:"YK",40863:"QJG"},c=function(c){var d=c.charCodeAt(0);return d>40869||d<19968?c:b[d]?b[d]:a.charAt(d-19968)},d=function(a){for(var b,c=[""],d=0,e=a.length;d div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',b=document.head||document.getElementsByTagName("head")[0],d=document.createElement("style");d.type="text/css",d.styleSheet?d.styleSheet.cssText=a:d.appendChild(document.createTextNode(a)),b.appendChild(d),c=!0}},v=function(a,c){b?(a.__resizeTriggers__||("static"===getComputedStyle(a).position&&(a.style.position="relative"),u(),a.__resizeLast__={},a.__resizeListeners__=[],(a.__resizeTriggers__=document.createElement("div")).className="resize-triggers",a.__resizeTriggers__.innerHTML='
',a.appendChild(a.__resizeTriggers__),f(a),a.addEventListener("scroll",h,!0),l&&a.__resizeTriggers__.addEventListener(l,function(b){b.animationName===r&&f(a)})),a.__resizeListeners__.push(c)):a.attachEvent("onresize",c)},w=function(a,c){b?(a.__resizeListeners__.splice(a.__resizeListeners__.indexOf(c),1),a.__resizeListeners__.length||(a.removeEventListener("scroll",h,!0),a.__resizeTriggers__=!a.removeChild(a.__resizeTriggers__))):a.detachEvent("onresize",c)};BI.ResizeDetector={addResizeListener:function(a,b){return v(a.element[0],b),function(){w(a.element[0],b)}},removeResizeListener:function(a,b){w(a.element[0],b)}}}(),function(){function a(a,b){return a0&&(this._items[0]=b,this._sinkDown(0)),a}},push:function(a){this._items[this._size++]=a,this._bubbleUp(this._size-1)},size:function(){return this._size},peek:function(){if(0!==this._size)return this._items[0]},_heapify:function(){for(var a=Math.floor((this._size+1)/2);a>=0;a--)this._sinkDown(a)},_bubbleUp:function(a){for(var b=this._items[a];a>0;){var c=Math.floor((a+1)/2)-1,d=this._items[c];if(this._comparator(d,b))return;this._items[c]=b,this._items[a]=d,a=c}},_sinkDown:function(a){for(var b=this._items[a];;){var c=2*(a+1)-1,d=2*(a+1),e=-1;if(cc?c:b},b=5,c={index:0,offset:0,position:0,contentHeight:0};BI.TableScrollHelper=function(a,b,c,d){this._rowOffsets=BI.PrefixIntervalTree.uniform(a,b),this._storedHeights=new Array(a);for(var e=0;e=0&&c>=a-b;){var d=this._updateRowHeight(c);this._position+=d,c--}},_updateRowHeight:function(a){if(a<0||a>=this._rowCount)return 0;var b=this._rowHeightGetter(a);if(b!==this._storedHeights[a]){var c=b-this._storedHeights[a];return this._rowOffsets.set(a,b),this._storedHeights[a]=b,this._contentHeight+=c,c}return 0},getRowPosition:function(a){return this._updateRowHeight(a),this._rowOffsets.sumUntil(a)},scrollBy:function(b){if(0===this._rowCount)return c;var d=this._rowOffsets.greatestLowerBound(this._position);d=a(d,0,Math.max(this._rowCount-1,0));var e=this._rowOffsets.sumUntil(d),f=d,g=this._position,h=this._updateRowHeight(f);0!==e&&(g+=h);var i=this._storedHeights[f]-(g-e);if(b>=0)for(;b>0&&f0&&f>=0;)if(b=0){var k=this._updateRowHeight(f);j=this._storedHeights[f],g+=k}}var l=this._contentHeight-this._viewportHeight;g=a(g,0,l),this._position=g;var m=this._rowOffsets.greatestLowerBound(g);m=a(m,0,Math.max(this._rowCount-1,0)),e=this._rowOffsets.sumUntil(m);var n=e-g;return this._updateHeightsInViewport(m,n),this._updateHeightsAboveViewport(m),{index:m,offset:n,position:this._position,contentHeight:this._contentHeight}},_getRowAtEndPosition:function(a){this._updateRowHeight(a);for(var b=a,c=this._storedHeights[b];c=0;)b--,b>=0&&(this._updateRowHeight(b),c+=this._storedHeights[b]);var d=this._rowOffsets.sumTo(a)-this._viewportHeight;return d<0&&(d=0),d},scrollTo:function(b){if(0===this._rowCount)return c;if(b<=0)return this._position=0,this._updateHeightsInViewport(0,0),{index:0,offset:0,position:this._position,contentHeight:this._contentHeight};if(b>=this._contentHeight-this._viewportHeight){var d=this._rowCount-1;b=this._getRowAtEndPosition(d)}this._position=b;var e=this._rowOffsets.greatestLowerBound(b);e=a(e,0,Math.max(this._rowCount-1,0));var f=this._rowOffsets.sumUntil(e),g=f-b;return this._updateHeightsInViewport(e,g),this._updateHeightsAboveViewport(e),{index:e,offset:g,position:this._position,contentHeight:this._contentHeight}},scrollToRow:function(b,c){b=a(b,0,Math.max(this._rowCount-1,0)),c=a(c,-this._storedHeights[b],0);var d=this._rowOffsets.sumUntil(b);return this.scrollTo(d-c)},scrollRowIntoView:function(b){b=a(b,0,Math.max(this._rowCount-1,0));var c=this._rowOffsets.sumUntil(b),d=c+this._storedHeights[b];if(c=a&&e<=b)return null;var f;a-d>e-b?(f=d,this._smallValues.pop()):(f=e,this._largeValues.pop());var g=this._valueToPositionMap[f];return delete this._valueToPositionMap[f],this._valueToPositionMap[c]=g,this._pushToHeaps(g,c),g},_pushToHeaps:function(a,b){var c={position:a,value:b};this._smallValues.push(c),this._largeValues.push(c)},_cleanHeaps:function(){this._cleanHeap(this._smallValues),this._cleanHeap(this._largeValues);var a=Math.min(this._smallValues.size(),this._largeValues.size()),b=Math.max(this._smallValues.size(),this._largeValues.size());b>10*a&&this._recreateHeaps()},_recreateHeaps:function(){for(var a=this._smallValues.size()b.value}},!function(){BI.LinkHashMap=function(){this.array=[],this.map={}},BI.LinkHashMap.prototype={constructor:BI.LinkHashMap,has:function(a){return a in this.map},add:function(a,b){"undefined"!=typeof a&&(a in this.map?this.map[a]=b:(this.array.push(a),this.map[a]=b))},remove:function(a){if(a in this.map){delete this.map[a];for(var b=0;b>5]|=128<>>9<<4)+14]=b;for(var c=1732584193,d=-271733879,e=-1732584194,f=271733878,g=0;g16&&(c=this.core_md5(c,a.length*this.chrsz));for(var d=Array(16),e=Array(16),f=0;f<16;f++)d[f]=909522486^c[f],e[f]=1549556828^c[f];var g=this.core_md5(d.concat(this.str2binl(b)),512+b.length*this.chrsz);return this.core_md5(e.concat(g),640)},a.prototype.safe_add=function(a,b){var c=(65535&a)+(65535&b),d=(a>>16)+(b>>16)+(c>>16);return d<<16|65535&c},a.prototype.bit_rol=function(a,b){return a<>>32-b},a.prototype.str2binl=function(a){for(var b=Array(),c=(1<>5]|=(a.charCodeAt(d/this.chrsz)&c)<>2]>>d%4*8+4&15)+b.charAt(a[d>>2]>>d%4*8&15);return c},a.prototype.binl2b64=function(a){for(var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c="",d=0;d<4*a.length;d+=3)for(var e=(a[d>>2]>>8*(d%4)&255)<<16|(a[d+1>>2]>>8*((d+1)%4)&255)<<8|a[d+2>>2]>>8*((d+2)%4)&255,f=0;f<4;f++)c+=8*d+6*f>32*a.length?this.b64pad:b.charAt(e>>6*(3-f)&63);return c},BI.MD5=new a}(),function(){var a=function(a){return Math.floor(a/2)},b=window.Int32Array||function(a){for(var b=[],c=a-1;c>=0;--c)b[c]=0;return b},c=function(a){for(var b=1;b0;--d)this._heap[d]=this._heap[2*d]+this._heap[2*d+1]},BI.PrefixIntervalTree.prototype={constructor:BI.PrefixIntervalTree,set:function(b,c){var d=this._half+b;for(this._heap[d]=c,d=a(d);0!==d;d=a(d))this._heap[d]=this._heap[2*d]+this._heap[2*d+1]},get:function(a){var b=this._half+a;return this._heap[b]},getSize:function(){return this._size},sumUntil:function(b){if(0===b)return 0;for(var c=this._half+b-1,d=this._heap[c];1!==c;c=a(c))c%2===1&&(d+=this._heap[c-1]);return d},sumTo:function(a){return this.sumUntil(a+1)},sum:function(a,b){return this.sumUntil(b)-this.sumUntil(a)},greatestLowerBound:function(a){if(a<0)return-1;var b=1;if(this._heap[b]<=a)return this._size;for(;b=0;--d)c[d]=b;return new BI.PrefixIntervalTree(c)},BI.PrefixIntervalTree.empty=function(a){return BI.PrefixIntervalTree.uniform(a,0)}}(),!function(){BI.Queue=function(a){this.capacity=a,this.array=[]},BI.Queue.prototype={constructor:BI.Queue,contains:function(a){return this.array.contains(a)},indexOf:function(a){return this.array.contains(a)},getElementByIndex:function(a){return this.array[a]},push:function(a){this.array.push(a),this.capacity&&this.array.length>this.capacity&&this.array.shift()},pop:function(){this.array.pop()},shift:function(){this.array.shift()},unshift:function(a){this.array.unshift(a),this.capacity&&this.array.length>this.capacity&&this.array.pop()},remove:function(a){this.array.remove(a)},splice:function(){this.array.splice.apply(this.array,arguments)},slice:function(){this.array.slice.apply(this.array,arguments)},size:function(){return this.array.length},each:function(a,b){var b=b||window,a=a||null;if(null!=a&&"function"==typeof a)for(var c=0;cc?c:a},b=6,c=10;BI.TableRowBuffer=function(d,e,f,g){this._bufferSet=new BI.IntegerBufferSet,this._defaultRowHeight=e,this._viewportRowsBegin=0,this._viewportRowsEnd=0,this._maxVisibleRowCount=Math.ceil(f/e)+1,this._bufferRowsCount=a(Math.floor(this._maxVisibleRowCount/2),b,c),this._rowsCount=d,this._rowHeightGetter=g,this._rows=[],this._viewportHeight=f},BI.TableRowBuffer.prototype={constructor:BI.TableRowBuffer,getRowsWithUpdatedBuffer:function(){for(var a=2*this._bufferRowsCount,b=Math.max(this._viewportRowsBegin-this._bufferRowsCount,0);b0;)this._addRowToBuffer(b,this._viewportRowsBegin,this._viewportRowsEnd-1),b++,a--;return this._rows},getRows:function(a,b){var c=b,d=c,e=a,f=Math.min(a+this._maxVisibleRowCount,this._rowsCount);for(this._viewportRowsBegin=a;e=f&&(d=this._bufferSet.replaceFurthestValuePosition(b,c,a)),null===d?(d=this._bufferSet.getNewPositionForValue(a),this._rows[d]=a):this._rows[d]=a}}}(),function(){BI.Tree=function(){this.root=new BI.Node(BI.UUID())},BI.Tree.prototype={constructor:BI.Tree,addNode:function(a,b,c){BI.isNull(b)?this.root.addChild(a,c):BI.isNull(a)?this.root.addChild(b,c):a.addChild(b,c)},isRoot:function(a){return a===this.root},getRoot:function(){return this.root},clear:function(){this.root.clear()},initTree:function(a){var b=this;this.clear();var c=[];for(BI.each(a,function(a,d){var e=new BI.Node(d);e.set("data",d),b.addNode(e),c.push(e)});!BI.isEmpty(c);){var d=c.shift(),e=d.get("data");BI.each(e.children,function(a,e){var f=new BI.Node(e);f.set("data",e),c.push(f),b.addNode(d,f)})}},_toJSON:function(a){var b=this,c=[];return BI.each(a.getChildren(),function(a,d){c.push(b._toJSON(d))}),BI.extend({id:a.id},BI.deepClone(a.get("data")),c.length>0?{children:c}:{})},toJSON:function(a){var b=this,c=[];return BI.each((a||this.root).getChildren(),function(a,d){c.push(b._toJSON(d))}),c},_toJSONWithNode:function(a){var b=this,c=[];return BI.each(a.getChildren(),function(a,d){c.push(b._toJSONWithNode(d))}),BI.extend({id:a.id},BI.deepClone(a.get("data")),{node:a},c.length>0?{children:c}:{})},toJSONWithNode:function(a){var b=this,c=[];return BI.each((a||this.root).getChildren(),function(a,d){c.push(b._toJSONWithNode(d))}),c},search:function(a,b,c){if(!(a instanceof BI.Node))return arguments.callee.apply(this,[this.root,a,b]);var d=this,e=null;return BI.isNull(b)?null:BI.isEqual(a[c||"id"],b)?a:(BI.any(a.getChildren(),function(a,f){if(e=d.search(f,b,c),null!==e)return!0}),e)},_traverse:function(a,b){var c=[];for(c.push(a);!BI.isEmpty(c);){var d=c.shift(),e=b&&b(d);if(e===!1)break;e!==!0&&null!=d&&(c=c.concat(d.getChildren()))}},traverse:function(a){this._traverse(this.root,a)},_recursion:function(a,b,c){var d=this;return BI.every(a.getChildren(),function(a,e){var f=BI.clone(b);f.push(e.id);var g=c&&c(e,f);return g!==!1&&(g===!0||d._recursion(e,f,c))})},recursion:function(a){this._recursion(this.root,[],a)},inOrderTraverse:function(a){this._inOrderTraverse(this.root,a)},_inOrderTraverse:function(a,b){null!=a&&(this._inOrderTraverse(a.getLeft()),b&&b(a),this._inOrderTraverse(a.getRight()))},nrInOrderTraverse:function(a){for(var b=[],c=this.root;null!=c||!BI.isEmpty(b);){for(;null!=c;)b.push(c),c=c.getLeft();c=b.pop(),a&&a(c),c=c.getRight()}},preOrderTraverse:function(a){this._preOrderTraverse(this.root,a)},_preOrderTraverse:function(a,b){null!=a&&(b&&b(a),this._preOrderTraverse(a.getLeft()),this._preOrderTraverse(a.getRight()))},nrPreOrderTraverse:function(a){for(var b=[],c=this.root;null!=c||!BI.isEmpty(b);){for(;null!=c;)a&&a(c),b.push(c),c=c.getLeft();c=b.pop(),c=c.getRight()}},postOrderTraverse:function(a){this._postOrderTraverse(this.root,a)},_postOrderTraverse:function(a,b){null!=a&&(this._postOrderTraverse(a.getLeft()),this._postOrderTraverse(a.getRight()),b&&b(a))},nrPostOrderTraverse:function(a){for(var b=[],c=this.root,d=null;null!=c||!BI.isEmpty(b);){for(;null!=c;)b.push(c),c=c.getLeft();c=BI.last(b),null==c.getRight()||c.getRight()==d?(a&&a(c),c=b.pop(),d=c,c=null):c=c.getRight()}}},BI.Node=function(a){BI.isObject(a)?BI.extend(this,a):this.id=a,this.clear.apply(this,arguments)},BI.Node.prototype={constructor:BI.Node,set:function(a,b){return BI.isObject(a)?void BI.extend(this,a):void(this[a]=b)},get:function(a){return this[a]},isLeaf:function(){return BI.isEmpty(this.children)},getChildren:function(){return this.children},getChildrenLength:function(){return this.children.length},getFirstChild:function(){return BI.first(this.children)},getLastChild:function(){return BI.last(this.children)},setLeft:function(a){this.left=a},getLeft:function(){return this.left},setRight:function(a){this.right=a},getRight:function(){return this.right},setParent:function(a){this.parent=a},getParent:function(){return this.parent},getChild:function(a){return this.children[a]},getChildIndex:function(a){return BI.findIndex(this.children,function(b,c){return c.get("id")===a})},removeChild:function(a){this.removeChildByIndex(this.getChildIndex(a))},removeChildByIndex:function(a){var b=this.getChild(a-1),c=this.getChild(a+1);null!=b&&b.setRight(c||null),null!=c&&c.setLeft(b||null), this.children.splice(a,1)},removeAllChilds:function(){this.children=[]},addChild:function(a,b){var c=null;c=BI.isUndefined(b)?this.children.length-1:b-1,a.setParent(this),c>=0&&(this.getChild(c)&&this.getChild(c).setRight(a),a.setLeft(this.getChild(c))),BI.isUndefined(b)?this.children.push(a):this.children.splice(b,0,a)},equals:function(a){return this===a||this.id===a.id},clear:function(){this.parent=null,this.left=null,this.right=null,this.children=[]}},BI.extend(BI.Tree,{transformToArrayFormat:function(a,b){if(!a)return[];var c=[];if(BI.isArray(a))for(var d=0,e=a.length;d=this.x&&a<=this.x+this.w&&b>=this.y&&b<=this.y+this.h)},getPosition:function(){var a=[];return a.push(this.x+this.w/2),a.push(this.y+this.h/2),a}},BI.BehaviorFactory={createBehavior:function(a,b){var c;switch(a){case"highlight":c=BI.HighlightBehavior;break;case"redmark":c=BI.RedMarkBehavior}return new c(b)}},BI.Behavior=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.Behavior.superclass._defaultConfig.apply(this,arguments),{rule:function(){return!0}})},_init:function(){BI.Behavior.superclass._init.apply(this,arguments)},doBehavior:function(){}}),BI.Layout=BI.inherit(BI.Widget,{props:function(){return{scrollable:null,scrollx:!1,scrolly:!1,items:[]}},render:function(){this._init4Margin(),this._init4Scroll()},_init4Margin:function(){this.options.top&&this.element.css("top",this.options.top),this.options.left&&this.element.css("left",this.options.left),this.options.bottom&&this.element.css("bottom",this.options.bottom),this.options.right&&this.element.css("right",this.options.right)},_init4Scroll:function(){switch(this.options.scrollable){case!0:this.element.css("overflow","auto");break;case!1:this.element.css("overflow","hidden")}this.options.scrollx&&this.element.css({"overflow-x":"auto","overflow-y":"hidden"}),this.options.scrolly&&this.element.css({"overflow-x":"hidden","overflow-y":"auto"})},_mountChildren:function(){var a=this,b=document.createDocumentFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&this.element.append(b)},_getChildName:function(a){return a+""},_addElement:function(a,b){var c,d=this;return this.hasWidget(this._getChildName(a))?c=this.getWidgetByName(this._getChildName(a)):(c=BI.createWidget(b,this),c.on(BI.Events.DESTROY,function(){BI.each(d._children,function(a,b){b===c&&(BI.remove(d._children,b),d.removeItemAt(0|a))})}),this.addWidget(this._getChildName(a),c)),c},_getOptions:function(a){return a instanceof BI.Widget&&(a=a.options),a=BI.stripEL(a),a instanceof BI.Widget&&(a=a.options),a},_compare:function(a,b){function c(a,b,e,f){if(a===b)return 0!==a||1/a===1/b;if(null==a||null==b)return a===b;var g=Object.prototype.toString.call(a);switch(g){case"[object RegExp]":case"[object String]":return""+a==""+b;case"[object Number]":return+a!==+a?+b!==+b:0===+a?1/+a===1/b:+a===+b;case"[object Date]":case"[object Boolean]":return+a===+b}var h="[object Array]"===g;if(!h){if(BI.isFunction(a)&&BI.isFunction(b))return!0;a=d._getOptions(a),b=d._getOptions(b)}e=e||[],f=f||[];for(var i=e.length;i--;)if(e[i]===a)return f[i]===b;if(e.push(a),f.push(b),h){if(i=a.length,i!==b.length)return!1;for(;i--;)if(!c(a[i],b[i],e,f))return!1}else{var j,k=_.keys(a);if(i=k.length,_.keys(b).length!==i)return!1;for(;i--;)if(j=k[i],!_.has(b,j)||!c(a[j],b[j],e,f))return!1}return e.pop(),f.pop(),!0}var d=this;return c(a,b)},_getWrapper:function(){return this.element},_addItemAt:function(a,b){for(var c=this.options.items.length;c>a;c--)this._children[this._getChildName(c)]=this._children[this._getChildName(c-1)];delete this._children[this._getChildName(a)],this.options.items.splice(a,0,b)},_removeItemAt:function(a){for(var b=a;bthis.options.items.length)){this._addItemAt(a,b);var c=this._addElement(a,b);return a>0?this._children[this._getChildName(a-1)].element.after(c.element):c.element.prependTo(this._getWrapper()),c._mount(),c}},removeItemAt:function(a){a=BI.isArray(a)?a:[a];for(var b=[],c=[],d={},e=0,f=this.options.items.length;ethis.options.items.length-1)return!1;var c=this._children[this._getChildName(a)];return c.shouldUpdate?c.shouldUpdate(this._getOptions(b))===!0:null},updateItemAt:function(a,b){if(!(a<0||a>this.options.items.length-1)){var c,d=this._children[this._getChildName(a)];if(c=d.update(this._getOptions(b)))return c;var e=this._children[this._getChildName(a)];delete this._children[this._getChildName(a)],this.options.items.splice(a,1);var f=this._addElement(a,b);this.options.items.splice(a,0,b),this._children[this._getChildName(a)]=f,a>0?this._children[this._getChildName(a-1)].element.after(f.element):f.element.prependTo(this._getWrapper()),e._destroy(),f._mount()}},addItems:function(a){var b=this,c=this.options,d=document.createDocumentFragment(),e=[];BI.each(a,function(a,f){var g=b._addElement(c.items.length,f);b._children[b._getChildName(c.items.length)]=g,c.items.push(f),e.push(g),d.appendChild(g.element[0])}),this._getWrapper().append(d),BI.each(e,function(a,b){b._mount()})},prependItems:function(a){var b=this;a=a||[];for(var c=document.createDocumentFragment(),d=[],e=a.length-1;e>=0;e--){this._addItemAt(0,a[e]);var f=this._addElement(0,a[e]);b._children[b._getChildName(0)]=f,this.options.items.unshift(a[e]),d.push(f),c.appendChild(f.element[0])}this._getWrapper().prepend(c),BI.each(d,function(a,b){b._mount()})},getValue:function(){var a,b=this,c=[];return BI.each(this.options.items,function(d){if(a=b._children[b._getChildName(d)]){var e=a.getValue();e=BI.isArray(e)?e:[e],c=c.concat(e)}}),c},setValue:function(a){var b,c=this;BI.each(this.options.items,function(d){(b=c._children[c._getChildName(d)])&&b.setValue(a)})},setText:function(a){var b,c=this;BI.each(this.options.items,function(d){(b=c._children[c._getChildName(d)])&&b.setText(a)})},patchItem:function(a,b,c){var d=this.shouldUpdateItem(c,b);if(d===!0||null===d&&!this._compare(a,b))return this.updateItemAt(c,b)},updateChildren:function(a,b){function c(a,b,c,d){return a=j._getOptions(a),b=j._getOptions(b),BI.isKey(a.key)?a.key===b.key:c>=0?c===d:void 0}function d(a,b){var c=j._getOptions(a),d=null==c.key?b:c.key;return s[d]=j._addElement(d,a)}function e(a,b,c,e){for(;c<=e;++c){var f=d(b[c],c);g(f,a,!1,c)}}function f(a,b,c){for(;b<=c;++b){var d=j._getOptions(a[b]),e=null==d.key?b:d.key;s[e]._destroy()}}function g(a,b,c,d){a=j._getOptions(a),b=b&&j._getOptions(b);var e=BI.isKey(a.key)?a.key:d;if(b&&s[b.key]){var f,g=BI.isKey(b.key)?b.key:d;f=c?s[g].element.next():s[g].element,f.length>0?f.before(s[e].element):j._getWrapper().append(s[e].element)}else j._getWrapper().append(s[e].element)}var h,i,j=this,k=0,l=0,m=a.length-1,n=a[0],o=a[m],p=b.length-1,q=b[0],r=b[p],s={};for(BI.each(a,function(a,b){b=j._getOptions(b);var c=null==b.key?a:b.key;BI.isKey(c)&&(s[c]=j._children[j._getChildName(a)])});k<=m&&l<=p;)if(BI.isNull(n))n=a[++k];else if(BI.isNull(o))o=a[--m];else if(c(n,q,k,l))i=this.patchItem(n,q,k)||i,s[null==n.key?this._getChildName(k):n.key]=this._children[this._getChildName(k)],n=a[++k],q=b[++l];else if(c(o,r,m,p))i=this.patchItem(o,r,m)||i,s[null==o.key?this._getChildName(m):o.key]=this._children[this._getChildName(m)],o=a[--m],r=b[--p];else if(c(n,r))i=this.patchItem(n,r,k)||i,s[null==n.key?this._getChildName(k):n.key]=this._children[this._getChildName(k)],g(n,o,!0),n=a[++k],r=b[--p];else if(c(o,q))i=this.patchItem(o,q,m)||i,s[null==o.key?this._getChildName(m):o.key]=this._children[this._getChildName(m)],g(o,n),o=a[--m],q=b[++l];else{var t=d(q);g(t,n),q=b[++l]}return k>m?(h=BI.isNull(b[p+1])?null:b[p+1].elm,e(h,b,l,p)):l>p&&f(a,k,m),this._children={},BI.each(b,function(a,b){var c=j._getOptions(b),d=null==c.key?a:c.key;s[d]._mount(),j._children[j._getChildName(a)]=s[d]}),i},update:function(a){var b=this.options,c=a.items||[],d=this.updateChildren(b.items,c);return this.options.items=c,d},stroke:function(a){var b=this;BI.each(a,function(a,c){c&&b._addElement(a,c)})},removeWidget:function(a){var b;BI.isWidget(a)?BI.each(this._children,function(c,d){d===a&&(b=c)}):b=a,b&&this._removeItemAt(0|b)},empty:function(){BI.Layout.superclass.empty.apply(this,arguments),this.options.items=[]},destroy:function(){BI.Layout.superclass.destroy.apply(this,arguments),this.options.items=[]},populate:function(a){this.options;return a=a||[],this._isMounted?void this.update({items:a}):(this.options.items=a,void this.stroke(a))},resize:function(){}}),BI.shortcut("bi.layout",BI.Layout),BI.Plugin=BI.Plugin||{},!function(){var a={},b={},c={};BI.extend(BI.Plugin,{getWidget:function(b,d){if(c[b])for(var e=c[b].length-1;e>=0;e--)c[b][e](d);if(a[b])for(var f,e=a[b].length-1;e>=0;e--)if(f=a[b][e](d))return f;return d},configWidget:function(a,b){c[a]||(c[a]=[]),c[a].push(b)},registerWidget:function(b,c){a[b]||(a[b]=[]),a[b].length>0&&console.log("组件已经注册过了!"),a[b].push(c)},relieveWidget:function(b){delete a[b]},getObject:function(a,c){if(b[a])for(var d,e=0,f=b[a].length;e0&&console.log("对象已经注册过了!"),b[a].push(c)},relieveObject:function(a){delete b[a]}})}(),BI.Action=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.Action.superclass._defaultConfig.apply(this,arguments),{src:null,tar:null})},_init:function(){BI.Action.superclass._init.apply(this,arguments)},actionPerformed:function(a,b,c){},actionBack:function(a,b,c){}}),BI.ActionFactory={createAction:function(a,b){var c;switch(a){case"show":c=BI.ShowAction}return new c(b)}},BI.ShowAction=BI.inherit(BI.Action,{_defaultConfig:function(){return BI.extend(BI.ShowAction.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.ShowAction.superclass._init.apply(this,arguments)},actionPerformed:function(a,b,c){b=b||this.options.tar,b.setVisible(!0),c&&c()},actionBack:function(a,b,c){a=a||this.options.tar,a.setVisible(!1),c&&c()}}),BI.PopoverSection=BI.inherit(BI.Widget,{_init:function(){BI.PopoverSection.superclass._init.apply(this,arguments)},rebuildNorth:function(a){return!0},rebuildCenter:function(a){},rebuildSouth:function(a){return!1},close:function(){this.fireEvent(BI.PopoverSection.EVENT_CLOSE)},end:function(){}}),BI.PopoverSection.EVENT_CLOSE="EVENT_CLOSE",function(){function isEmpty(a){var b=""===a||null===a||void 0===a;return b}function isInvalidDate(a){return"Invalid Date"==a||"NaN"==a}function _eFormat(a,b){var c=b.indexOf("E"),d=b.substr(0,c),e=b.substr(c+1);if(/^[0\.-]+$/.test(a))a=BI._numberFormat(0,d)+"E"+BI._numberFormat(0,e);else{var f=a<0;f&&(a=a.substr(1));var g=(d.split(".")[0]||"").length,h=a.indexOf(".");h<0&&(h=a.length);var i=0;a=a.replace(".","");for(var j=a.length;i="1")break}var l=h-i-g,m=a.substr(i,g),n=i+g-a.length;if(n>0)for(var o=0;o-1)return a>=0?_numberFormat(a+"",b.substring(0,c)):_numberFormat(-a+"",b.substr(c+1));if(+a<0&&"-"!==b.charAt(0))return _numberFormat(-a+"","-"+b);var d=a.split("."),e=b.split("."),f=d[0]||"",g=e[0]||"",h=d[1]||"",i=e[1]||"";if(/[%‰]$/.test(b)){var j=/[%]$/.test(b)?"00":"000";h+=j,f+=h.substr(0,j.length),f=f.replace(/^0+/gi,""),h=h.substr(j.length).replace(/0+$/gi,"")}var k=_dealWithRight(h,i);k.leftPlus&&(f=parseInt(f)+1+"",f=isNaN(f)?"1":f),k=k.num;var l=_dealWithLeft(f,g);return/[0-9]/.test(l)||(l+="0"),/[0-9]/.test(k)?l+"."+k:l+k}function _dealWithRight(a,b){for(var c="",d=0,e=0,f=b.length;e4){j.leftPlus=!0;var k=c.match(/^[0-9]+/);if(k){var l=k[0],m=l.length,n=parseInt(l)+1+"";n.length>m?n=n.substr(1):(n=String.leftPad(n,m,"0"),j.leftPlus=!1),c=c.replace(/^[0-9]+/,n)}}return j.num=c,j}function _dealWithLeft(a,b){for(var c="",d=a.length-1,e=-1,f=-1,g=b.length-1;g>=0;g--){var h=b.charAt(g),i=a.charAt(d);switch(h){case"0":isEmpty(i)&&(i="0"),f=-1,c=i+c,d--;break;case"#":f=g,c=i+c,d--;break;case",":if(!isEmpty(i)){var j=b.match(/,[#0]+/);j&&(e=j[0].length-1),c=","+c}break;default:c=h+c}}if(f>-1){var k=a.substr(0,d+1);c=c.substr(0,f)+k+c.substr(f)}if(e>0){var l=c.match(/[0-9]+,/);if(l){l=l[0];for(var m="",n=l.length-1-e;n>=0;n-=e)m=l.substr(n,e)+","+m;var o=l.substr(0,n+e);isEmpty(o)||(m=o+","+m)}c=c.replace(/[0-9]+,/,m)}return c}window.BI||(window.BI={}),BI.cjkEncode=function(a){if("string"!=typeof a)return a;for(var b="",c=0;c=128||91===d||93===d?"["+d.toString(16)+"]":a.charAt(c)}return b},BI.cjkDecode=function(text){if(null==text)return"";if(!isNaN(text)||text.indexOf("[")==-1)return text;for(var newText="",i=0;ii+1){var subText=text.substring(i+1,rightIdx);subText.length>0&&(ch=String.fromCharCode(eval("0x"+subText))),i=rightIdx}}newText+=ch}return newText},BI.htmlEncode=function(a){return null==a?"":String(a).replace(/&/g,"&").replace(/\"/g,""").replace(//g,">").replace(/\s/g," ")},BI.htmlDecode=function(a){return null==a?"":String(a).replace(/&/g,"&").replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">").replace(/ /g," ")},BI.cjkEncodeDO=function(a){if(BI.isPlainObject(a)){var b={};return _.each(a,function(a,c){"string"!=typeof a&&(a=BI.jsonEncode(a)),c=BI.cjkEncode(c),b[c]=BI.cjkEncode(a)}),b}return a},BI.jsonEncode=function(a){var b=!!{}.hasOwnProperty,c={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},d=function(a){return/["\\\x00-\x1f]/.test(a)?'"'+a.replace(/([\x00-\x1f\\"])/g,function(a,b){var d=c[b];return d?d:(d=b.charCodeAt(),"\\u00"+Math.floor(d/16).toString(16)+(d%16).toString(16))})+'"':'"'+a+'"'},e=function(a){var b,c,d,e=["["],f=a.length;for(c=0;c2?Date._MN[b.getMonth()]:d<2?b.getMonth()+1:String.leftPad(b.getMonth()+1+"",2,"0");break;case"d":c=d>1?String.leftPad(b.getDate()+"",2,"0"):b.getDate();break;case"h":var f=b.getHours()%12;0===f&&(f=12),c=d>1?String.leftPad(f+"",2,"0"):f;break;case"H":c=d>1?String.leftPad(b.getHours()+"",2,"0"):b.getHours();break;case"m":c=d>1?String.leftPad(b.getMinutes()+"",2,"0"):b.getMinutes();break;case"s":c=d>1?String.leftPad(b.getSeconds()+"",2,"0"):b.getSeconds();break;case"a":c=b.getHours()<12?"am":"pm";break;case"z":c=b.getTimezone();break;default:c=a.str}return c}if(!a)return"";var d=b.length,e="";if(d>0){for(var f=b.charAt(0),g=0,h=f,i=1;i$("body").outerWidth()&&(l-=k.element.outerWidth()+15),m+k.element.outerHeight()>$("body").outerHeight()?(m-=k.element.outerHeight()+15,!f.belowMouse&&(m=Math.min(m,h.top-k.element.outerHeight()-5))):!f.belowMouse&&(m=Math.max(m,j)),k.element.css({left:l<0?0:l+"px",top:m<0?0:m+"px"}),k.element.hover(function(){g.remove(b),e.element.trigger("mouseleave.title"+e.getName())}),this},add:function(a,b){return this.has(a)?this:(this.set(a,b),this)},get:function(a){return this.tooltipsManager[a]},set:function(a,b){this.tooltipsManager[a]=b},has:function(a){return null!=this.tooltipsManager[a]},remove:function(a){return this.has(a)?(this.tooltipsManager[a].destroy(),delete this.tooltipsManager[a],this):this}}),_.extend(BI,{Events:{KEYDOWN:"_KEYDOWN",BACKSPACE:"_BACKSPACE",SPACE:"_SPACE",ENTER:"_ENTER",CONFIRM:"_CONFIRM",ERROR:"_ERROR",PAUSE:"_PAUSE",DESTROY:"_DESTROY",UNMOUNT:"_UNMOUNT",CLEAR:"_CLEAR",ADD:"_ADD",EDITING:"_EDITING",EMPTY:"_EMPTY",VIEW:"_VIEW",RESIZE:"_RESIZE",BEFOREEDIT:"_BEFOREEDIT",AFTEREDIT:"_AFTEREDIT",STARTEDIT:"_STARTEDIT",STOPEDIT:"_STOPEDIT",CHANGE:"_CHANGE",EXPAND:"_EXPAND",COLLAPSE:"_COLLAPSE",CALLBACK:"_CALLBACK",CLICK:"_CLICK",STATECHANGE:"_STATECHANGE",BEFORESTATECHANGE:"_BEFORESTATECHANGE",INIT:"_INIT",AFTERINIT:"_AFTERINIT",SCROLL:"_SCROLL",STARTLOAD:"_STARTLOAD",AFTERLOAD:"_AFTERLOAD",BS:"beforesubmit",AS:"aftersubmit",SC:"submitcomplete",SF:"submitfailure",SS:"submitsuccess",BVW:"beforeverifywrite",AVW:"afterverifywrite",AV:"afterverify",BW:"beforewrite",AW:"afterwrite",WS:"writesuccess",WF:"writefailure",BA:"beforeappend",AA:"afterappend",BD:"beforedelete",AD:"beforedelete",UC:"unloadcheck",BTOPDF:"beforetopdf",ATOPDF:"aftertopdf",BTOEXCEL:"beforetoexcel",ATOEXCEL:"aftertoexcel",BTOWORD:"beforetoword",ATOWORD:"aftertoword",BTOIMAGE:"beforetoimage",ATOIMAGE:"aftertoimage",BTOHTML:"beforetohtml",ATOHTML:"aftertohtml",BIMEXCEL:"beforeimportexcel",AIMEXCEL:"afterimportexcel",BPDFPRINT:"beforepdfprint",APDFPRINT:"afterpdfprint",BFLASHPRINT:"beforeflashprint",AFLASHPRINT:"afterflashprint",BAPPLETPRINT:"beforeappletprint",AAPPLETPRINT:"afterappletprint",BSEVERPRINT:"beforeserverprint",ASERVERPRINT:"afterserverprint",BEMAIL:"beforeemail",AEMAIL:"afteremail"}}),BI.extend(jQuery.fn,{destroy:function(){this.remove(),BI.isIE()===!0&&(this[0].outerHTML="")},__textKeywordMarked__:function(a,b,c){if(!BI.isKey(b)||(a+"").length>100)return this.html(BI.htmlEncode(a));b+="",b=BI.toUpperCase(b);var d=(a||"")+"";for(c=(c||BI.makeFirstPY(a))+"",null!=c&&(c=BI.toUpperCase(c)),this.empty();;){var e=BI.toUpperCase(d).indexOf(b),f=null;if(null!=c&&(f=c.indexOf(b),f>=0&&(f%=a.length)),e>=0)this.append(d.substr(0,e)),this.append($("").addClass("bi-keyword-red-mark").html(BI.htmlEncode(d.substr(e,b.length)))),d=d.substr(e+b.length),null!=c&&(c=c.substr(e+b.length));else{if(!(null!=f&&f>=0&&Math.floor(f/a.length)===Math.floor((f+b.length-1)/a.length))){this.append(d);break}this.append(d.substr(0,f)),this.append($("").addClass("bi-keyword-red-mark").html(BI.htmlEncode(d.substr(f,b.length)))),null!=c&&(c=c.substr(f+b.length)),d=d.substr(f+b.length)}}return this},getDomHeight:function(a){var b=$(this).clone();b.appendTo($(a||"body"));var c=b.height();return b.remove(),c},hasVerticalScroll:function(){return this.height()>0&&this[0].clientWidth0&&this[0].clientHeightb.left+this.outerWidth()||a.pageYb.top+this.outerHeight())},__hasZIndexMask__:function(a){return a&&null!=this.zIndexMask[a]},__buildZIndexMask__:function(a,b){this.zIndexMask=this.zIndexMask||{},this.indexMask=this.indexMask||[];var c=BI.createWidget({type:"bi.center_adapt",cls:"bi-z-index-mask",items:b});return c.element.css({"z-index":a}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:c,left:0,right:0,top:0,bottom:0}]}),this.indexMask.push(c),a&&(this.zIndexMask[a]=c),c.element},__releaseZIndexMask__:function(a){if(a&&this.zIndexMask[a])return this.indexMask.remove(this.zIndexMask[a]),void this.zIndexMask[a].destroy();this.indexMask=this.indexMask||[];var b=this.indexMask.pop();b&&b.destroy()}}),BI.extend(jQuery,{getLeftPosition:function(a,b,c){return{left:a.element.offset().left-b.element.outerWidth()-(c||0)}},getRightPosition:function(a,b,c){var d=a.element;return{left:d.offset().left+d.outerWidth()+(c||0)}},getTopPosition:function(a,b,c){return{top:a.element.offset().top-b.element.outerHeight()-(c||0)}},getBottomPosition:function(a,b,c){var d=a.element;return{top:d.offset().top+d.outerHeight()+(c||0)}},isLeftSpaceEnough:function(a,b,c){return $.getLeftPosition(a,b,c).left>=0},isRightSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=$("body").bounds();return $.getRightPosition(a,b,c).left+d.width<=e.width},isTopSpaceEnough:function(a,b,c){return $.getTopPosition(a,b,c).top>=0},isBottomSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=$("body").bounds();return $.getBottomPosition(a,b,c).top+d.height<=e.height},isRightSpaceLarger:function(a){var b=$("body").bounds();return b.width-a.element.offset().left-a.element.bounds().width>=a.element.offset().left},isBottomSpaceLarger:function(a){var b=$("body").bounds();return b.height-a.element.offset().top-a.element.bounds().height>=a.element.offset().top},getLeftAlignPosition:function(a,b,c){var d=b.element.bounds(),e=$("body").bounds(),f=a.element.offset().left+c;return f+d.width>e.width&&(f=e.width-d.width),f<0&&(f=0),{left:f}},getLeftAdaptPosition:function(a,b,c){return $.isLeftSpaceEnough(a,b,c)?$.getLeftPosition(a,b,c):{left:0}},getRightAlignPosition:function(a,b,c){var d=a.element.bounds(),e=b.element.bounds(),f=a.element.offset().left+d.width-e.width-c;return f<0&&(f=0),{left:f}},getRightAdaptPosition:function(a,b,c){return $.isRightSpaceEnough(a,b,c)?$.getRightPosition(a,b,c):{left:$("body").bounds().width-b.element.bounds().width}},getTopAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=$("body").bounds();return $.isBottomSpaceEnough(a,b,-1*h.height+c)?e=g.top+c:d?(e=g.top+c,f=j.height-e):(e=j.height-i.height,ef.height?{top:0,adaptHeight:f.height-c}:{top:0}},getBottomAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=$("body").bounds();return $.isTopSpaceEnough(a,b,-1*h.height+c)?e=g.top+h.height-i.height-c:d?(e=0,f=g.top+h.height-c):(e=0,i.height+c>j.height&&(f=j.height-c)),e<0&&(e=0),f?{top:e,adaptHeight:f}:{top:e}},getBottomAdaptPosition:function(a,b,c,d){var e=a.element.offset(),f=a.element.bounds(),g=b.element.bounds(),h=$("body").bounds();return $.isBottomSpaceEnough(a,b,c)?$.getBottomPosition(a,b,c):d?{top:e.top+f.height+c,adaptHeight:h.height-e.top-f.height-c}:g.height+c>h.height?{top:c,adaptHeight:h.height-c}:{top:h.height-g.height-c}},getCenterAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=$("body").bounds();return c=d.left+e.width/2+f.width/2>g.width?g.width-f.width:d.left+e.width/2-f.width/2,c<0&&(c=0),{left:c}},getMiddleAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=$("body").bounds();return c=d.top+e.height/2+f.height/2>g.height?g.height-f.height:d.top+e.height/2-f.height/2,c<0&&(c=0),{top:c}},getComboPositionByDirections:function(a,b,c,d,e,f){c||(c=0),d||(d=0);var g,h,i,j,k,l=[],m=[],n=!1,o=!1,p=!1;for(g=0;g-1?f===b?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j:(k=g.indexOf(b),k>-1&&Math.floor(k/f.length)===Math.floor((k+b.length-1)/f.length)&&(f===b||b.length===f.length?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j))}),{matched:h,finded:i}}}),BI.DOM={},BI.extend(BI.DOM,{hang:function(a){if(!BI.isEmpty(a)){var b=document.createDocumentFragment();return BI.each(a,function(a,c){c instanceof BI.Widget&&(c=c.element),c instanceof $&&c[0]&&b.appendChild(c[0])}),b}},isExist:function(a){return $("body").find(a.element).length>0},preloadImages:function(a,b){function c(){d++,d>=a.length&&b()}var d=0,e=[];BI.each(a,function(a,b){e[a]=new Image,e[a].src=b,e[a].onload=function(){c()},e[a].onerror=function(){c()}})},isColor:function(a){return a&&(this.isRGBColor(a)||this.isHexColor(a))},isRGBColor:function(a){return!!a&&"rgb"===a.substr(0,3)},isHexColor:function(a){return!!a&&("#"===a[0]&&7===a.length)},isDarkColor:function(a){if(!a||!this.isHexColor(a))return!1;var b=this.rgb2json(this.hex2rgb(a)),c=Math.round(.299*b.r+.587*b.g+.114*b.b);return c<192},getContrastColor:function(a){return a&&this.isColor(a)?this.isDarkColor(a)?"#ffffff":"#1a1a1a":""},rgb2hex:function(a){if(!a||"rgb"!=a.substr(0,3))return"";var b=a.match(/\d+(\.\d+)?/g),c=BI.parseInt(b[0]),d=BI.parseInt(b[1]),e=BI.parseInt(b[2]),f="#"+this.int2hex(c)+this.int2hex(d)+this.int2hex(e);return f},rgb2json:function(a){if(!a)return{};if(!this.isRGBColor(a))return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2])}},rgba2json:function(a){if(!a)return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2]),a:BI.parseFloat(b[3])}},json2rgb:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgb("+a.r+","+a.g+","+a.b+")":""},json2rgba:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgba("+a.r+","+a.g+","+a.b+","+a.a+")":""},int2hex:function(a){var b=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return b[a>>>4]+""+b[15&a]},hex2rgb:function(a){if(!a)return"";if(!this.isHexColor(a))return a;var b,c="rgb(";return 7===a.length?b=[BI.parseInt("0x"+a.substring(1,3)),BI.parseInt("0x"+a.substring(3,5)),BI.parseInt("0x"+a.substring(5,7))]:4===a.length&&(b=[BI.parseInt("0x"+a.substring(1,2)),BI.parseInt("0x"+a.substring(2,3)),BI.parseInt("0x"+a.substring(3,4))]),c+=b[0]+",",c+=b[1]+",",c+=b[2]+")"},rgba2rgb:function(a,b){if(BI.isNull(b)&&(b=1),"rgba"!=a.substr(0,4))return"";var c=a.match(/\d+(\.\d+)?/g);if(c.length<4)return"";var d=BI.parseFloat(c[0]),e=BI.parseFloat(c[1]),f=BI.parseFloat(c[2]),g=BI.parseFloat(c[3]);return"rgb("+Math.floor(255*(b*(1-g))+d*g)+","+Math.floor(255*(b*(1-g))+e*g)+","+Math.floor(255*(b*(1-g))+f*g)+")"},getTextSizeWidth:function(a,b){var c=$("").addClass("text-width-span").appendTo($("body"));null==b&&(b=12),b+="px",c.css("font-size",b).text(a);var d=c.width();return c.remove(),d},getScrollWidth:function(){if(null==this._scrollWidth){var a=$("
").width(50).height(50).css({position:"absolute",top:"-9999px",overflow:"scroll"}).appendTo($("body"));this._scrollWidth=a[0].offsetWidth-a[0].clientWidth,a.destroy()}return this._scrollWidth}}),function(){var a={};BI.constant=function(b,c){if(null!=a[b])throw"constant:["+b+"] has been registed";a[b]=c};var b={};BI.model=function(a,c){if(null!=b[a])throw"model:["+a+"] has been registed";b[a]=c};var c={};BI.store=function(a,b){if(null!=c[a])throw"store:["+a+"] has been registed";c[a]=b};var d={};BI.service=function(a,b){if(null!=d[a])throw"service:["+a+"] has been registed";d[a]=b};var e={};BI.provider=function(a,b){if(null!=e[a])throw"provider:["+a+"] has been registed";e[a]=b},BI.config=function(b,c){return a[b]?a[b]=c(a[b]):e[b]?(k[b]||(k[b]=new e[b]),c(k[b])):void BI.Plugin.configWidget(b,c)};var f={};BI.action=function(a,b){return f[a]||(f[a]=[]),f[a].push(b),function(){f[a].remove(b),0===f[a].length&&delete f[a]}};var g={};BI.point=function(a,b,c,d){g[a]||(g[a]={}),g[a][b]||(g[a][b]={},g[a][b][d?"after":"before"]=[]),g[a][b][d?"after":"before"].push(c)},BI.Constants={getConstant:function(b){return a[b]}};var h=function(a,b){if(g[b])for(var c in g[b]){var d=g[b][c].before;d&&BI.aspect.before(a,c,function(){for(var b=0,c=d.length;b1?d.toString():d[0]:d,BI.isNull(d))throw new Error("value cannot be null");var f=b.cardNameCreator(d);if(!b.cardLayout.isCardExisted(f)){var g=b.cardCreator(f);b.cardLayout.addCardByName(f,g),b.afterCardCreated(f)}b.cardLayout.showCardByName(f),BI.nextTick(function(){b.afterCardShow(f),a.fireEvent(BI.ShowListener.EVENT_CHANGE,f)})}})}}),BI.ShowListener.EVENT_CHANGE="ShowListener.EVENT_CHANGE",BI.StyleLoaderManager=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.StyleLoaderManager.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.StyleLoaderManager.superclass._init.apply(this,arguments),this.stylesManager={}},loadStyle:function(a,b){var c=document,d=c.createElement("style");return c.getElementsByTagName("head")[0].appendChild(d),d.setAttribute("type","text/css"),d.styleSheet?d.styleSheet.cssText=b:d.appendChild(document.createTextNode(b)),this.stylesManager[a]=d,this},get:function(a){return this.stylesManager[a]},has:function(a){return null!=this.stylesManager[a]},removeStyle:function(a){return this.has(a)?(this.stylesManager[a].parentNode.removeChild(this.stylesManager[a]),delete this.stylesManager[a],this):this}}),BI.Logic=BI.inherit(BI.OB,{createLogic:function(){return this.options||{}}}),BI.LogicFactory={Type:{Vertical:"vertical",Horizontal:"horizontal",Table:"table",HorizontalFill:"horizontal_fill"},createLogic:function(a,b){var c;switch(a){case BI.LogicFactory.Type.Vertical:c=BI.VerticalLayoutLogic;break;case BI.LogicFactory.Type.Horizontal:c=BI.HorizontalLayoutLogic;break;case BI.LogicFactory.Type.Table:c=BI.TableLayoutLogic;break;case BI.LogicFactory.Type.HorizontalFill:c=BI.HorizontalFillLayoutLogic;break;default:c=BI.Logic}return new c(b).createLogic()},createLogicTypeByDirection:function(a){switch(a){case BI.Direction.Top:case BI.Direction.Bottom:case BI.Direction.Custom:return BI.LogicFactory.Type.Vertical;case BI.Direction.Left:case BI.Direction.Right:return BI.LogicFactory.Type.Horizontal}},createLogicItemsByDirection:function(a){var b,c=Array.prototype.slice.call(arguments,1);switch(c=BI.map(c,function(a,b){return BI.isWidget(b)?{el:b,width:b.options.width,height:b.options.height}:b}),a){case BI.Direction.Bottom:b=BI.LogicFactory.Type.Vertical,c.reverse();break;case BI.Direction.Right:b=BI.LogicFactory.Type.Horizontal,c.reverse();break;case BI.Direction.Custom:c=c.slice(1)}return c}},BI.VerticalLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.VerticalLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,items:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},createLogic:function(){var a,b=this.options;return a=b.dynamic?"bi.vertical":"bi.vtape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.VerticalLayoutLogic.superclass._init.apply(this,arguments)}}),BI.HorizontalLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.HorizontalLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,items:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},createLogic:function(){var a,b=this.options;return a=b.dynamic?"bi.vertical_adapt":"bi.htape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.HorizontalLayoutLogic.superclass._init.apply(this,arguments)}}),BI.TableLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.TableLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,columns:0,rows:0,columnSize:[],rowSize:[],hgap:0,vgap:0,items:[]})},createLogic:function(){var a,b=this.options;return a=b.dynamic?"bi.table":"bi.window",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,columns:b.columns,rows:b.rows,columnSize:b.columnSize,rowSize:b.rowSize,hgap:b.hgap,vgap:b.vgap,items:b.items}},_init:function(){BI.TableLayoutLogic.superclass._init.apply(this,arguments)}}),BI.HorizontalFillLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.HorizontalFillLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,items:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},createLogic:function(){var a,b=this.options,c=[];return BI.each(b.items,function(a,b){c.push(b.width||0)}),a=b.dynamic?"bi.horizontal_adapt":"bi.htape",{type:a,columnSize:c,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.HorizontalFillLayoutLogic.superclass._init.apply(this,arguments)}}),_.extend(Array.prototype,{contains:function(a){return this.indexOf(a)>-1},remove:function(a){var b=this.indexOf(a);return b!==-1&&this.splice(b,1),this},pushArray:function(a){for(var b=0;b8&&(a=9),a},Date.prototype.getQuarterStartDate=function(){return Date.getDate(this.getFullYear(),this.getQuarterStartMonth(),1)},Date.prototype.getQuarterEndDate=function(){var a=this.getQuarterStartMonth()+2;return Date.getDate(this.getFullYear(),a,this.getMonthDays(a))},Date.prototype.getAfterMultiMonth=function(a){var b=Date.getDate(Date.getTime(this.getFullYear(),this.getMonth(),this.getDate(),this.getHours(),this.getMinutes(),this.getSeconds()));return b.setMonth(b.getMonth()+a|0),b},Date.prototype.getBeforeMultiMonth=function(a){var b=Date.getDate(Date.getTime(this.getFullYear(),this.getMonth(),this.getDate(),this.getHours(),this.getMinutes(),this.getSeconds()));return b.setMonth(b.getMonth()-a|0),b},Date.prototype.getOffsetMonth=function(a){var b=Date.getDate(Date.getTime(this.getFullYear(),this.getMonth(),this.getDate(),this.getHours(),this.getMinutes(),this.getSeconds())),c=b.getDate(),d=Date.getDate(b.getFullYear(),b.getMonth()+parseInt(a),1).getMonthDays();return c>d&&(c=d),b.setDate(c),b.setMonth(b.getMonth()+parseInt(a)),b},Date.prototype.getWeekStartDate=function(){var a=this.getDay();return this.getOffsetDate(0===a?-6:1-a)},Date.prototype.getWeekEndDate=function(){var a=this.getDay();return this.getOffsetDate(0===a?0:7-a)},Date.prototype.equalsTo=function(a){return this.getFullYear()==a.getFullYear()&&this.getMonth()==a.getMonth()&&this.getDate()==a.getDate()&&this.getHours()==a.getHours()&&this.getMinutes()==a.getMinutes()&&this.getSeconds()==a.getSeconds()},Date.prototype.setDateOnly=function(a){var b=Date.getDate(a);this.setDate(1),this.setFullYear(b.getFullYear()),this.setMonth(b.getMonth()),this.setDate(b.getDate())},Date.prototype.print=function(a){var b=this.getMonth(),c=this.getDate(),d=this.getFullYear(),e=this.getWeekNumber(),f=this.getQuarter(),g=this.getDay(),h={},i=this.getHours(),j=i>=12,k=j?i-12:i,l=this.getDayOfYear();0==k&&(k=12);var m=this.getMinutes(),n=this.getSeconds();h["%a"]=Date._SDN[g],h["%A"]=Date._DN[g],h["%b"]=Date._SMN[b],h["%B"]=Date._MN[b],h["%C"]=1+Math.floor(d/100),h["%d"]=c<10?"0"+c:c,h["%e"]=c,h["%H"]=i<10?"0"+i:i,h["%I"]=k<10?"0"+k:k,h["%j"]=l<100?l<10?"00"+l:"0"+l:l,h["%k"]=i,h["%l"]=k,h["%X"]=b<9?"0"+(1+b):1+b,h["%x"]=b+1,h["%M"]=m<10?"0"+m:m,h["%n"]="\n",h["%p"]=j?"PM":"AM",h["%P"]=j?"pm":"am",h["%s"]=Math.floor(this.getTime()/1e3),h["%S"]=n<10?"0"+n:n,h["%t"]="\t",h["%U"]=h["%W"]=h["%V"]=e<10?"0"+e:e,h["%u"]=g+1,h["%w"]=g,h["%y"]=(""+d).substr(2,2),h["%Y"]=d,h["%%"]="%",h["%Q"]=f;var o=/%./g;if(!BI.isKhtml())return a.replace(o,function(a){return h[a]||a});for(var p=a.match(o),q=0;qe[0]?f=["y",1]:a>=d[0]&&a<=e[0]&&(a==d[0]&&(be[1]?f=["m",1]:b==e[1]&&c>e[2]&&(f=["d",1]))),f},Date.checkLegal=function(a){var b=a.match(/\d+/g),c=0|b[0],d=0|b[1],e=0|b[2];if(b.length<=1)return!0;if(b.length<=2)return d>=1&&d<=12;var f=Date._MD.slice(0);return f[1]=Date.isLeap(c)?29:28,d>=1&&d<=12&&e<=f[d-1]},Date.parseDateTime=function(a,b){var c=Date.getDate(),d=0,e=0,f=1,g=a.split(/\W+/);if("%y%x"==b.toLowerCase()||"%y%x%d"==b.toLowerCase()){var h=4,i=2;g[0]=a.substring(0,h),g[1]=a.substring(h,h+i),g[2]=a.substring(h+i,h+2*i)}var j=b.match(/%./g),k=0,l=0,m=0,n=0,o=0;for(k=0;k29?1900:2e3);break;case"%b":case"%B":for(l=0;l<12;++l)if(Date._MN[l].substr(0,g[k].length).toLowerCase()==g[k].toLowerCase()){e=l;break}break;case"%H":case"%I":case"%k":case"%l":m=parseInt(g[k],10);break;case"%P":case"%p":/pm/i.test(g[k])&&m<12?m+=12:/am/i.test(g[k])&&m>=12&&(m-=12);break;case"%M":n=parseInt(g[k],10);case"%S":o=parseInt(g[k],10)}if(isNaN(d)&&(d=c.getFullYear()),isNaN(e)&&(e=c.getMonth()),isNaN(f)&&(f=c.getDate()),isNaN(m)&&(m=c.getHours()),isNaN(n)&&(n=c.getMinutes()),isNaN(o)&&(o=c.getSeconds()),0!=d)return Date.getDate(d,e,f,m,n,o);for(d=0,e=-1,f=0,k=0;k - - - - - diff --git a/src/addons/chart/chart.combine.js b/src/addons/chart/chart.combine.js deleted file mode 100644 index 11cb7c3c1..000000000 --- a/src/addons/chart/chart.combine.js +++ /dev/null @@ -1,156 +0,0 @@ -/** - * 图表控件 - * @class BI.CombineChart - * @extends BI.Widget - */ -BI.CombineChart = BI.inherit(BI.Widget, { - - _defaultConfig: function () { - return BI.extend(BI.CombineChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-combine-chart", - items: [], - xAxis: [{type: "category"}], - yAxis: [{type: "value"}], - types: [[], []], - popupItemsGetter: BI.emptyFn, - formatConfig: BI.emptyFn - }); - }, - - _init: function () { - BI.CombineChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - - // 图可配置属性 - this.CombineChart = BI.createWidget({ - type: "bi.chart", - element: this.element - }); - this.CombineChart.on(BI.Chart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.CombineChart.EVENT_CHANGE, obj); - }); - - if (BI.isNotEmptyArray(o.items)) { - this.populate(o.items); - } - }, - - _formatItems: function (items) { - var result = [], self = this, o = this.options; - var yAxisIndex = 0; - BI.each(items, function (i, belongAxisItems) { - var combineItems = BI.ChartCombineFormatItemFactory.combineItems(o.types[i], belongAxisItems); - BI.each(combineItems, function (j, axisItems) { - if (BI.isArray(axisItems)) { - result = BI.concat(result, axisItems); - } else { - result.push(BI.extend(axisItems, {yAxis: yAxisIndex})); - } - }); - if (BI.isNotEmptyArray(combineItems)) { - yAxisIndex++; - } - }); - var config = BI.ChartCombineFormatItemFactory.combineConfig(); - config.plotOptions.click = function () { - var data = BI.clone(this.options); - data.toolTipRect = this.getTooltipRect(); - var items = o.popupItemsGetter(data); - if (items && items.length === 1) { - self.fireEvent(BI.CombineChart.EVENT_ITEM_CLICK, BI.extend({}, items[0], data)); - } - if (items && items.length > 1) { - self._createPopup(items, data.toolTipRect, data); - } - self.fireEvent(BI.CombineChart.EVENT_CHANGE, data); - }; - return [result, config]; - }, - - _createPopup: function (items, rect, opt) { - var self = this; - if (this.combo) { - this.combo.destroy(); - } - this._doDestroy = true; - this.combo = BI.createWidget({ - type: "bi.combo", - direction: "bottom", - isNeedAdjustWidth: false, - popup: { - el: BI.createWidget({ - type: "bi.vertical", - cls: "bi-linkage-list", - items: BI.map(items, function (i, item) { - return { - el: BI.extend({ - type: "bi.text_button", - cls: "bi-linkage-list-item", - height: 30, - handler: function () { - self.fireEvent(BI.CombineChart.EVENT_ITEM_CLICK, BI.extend({}, item, opt)); - self.combo.destroy(); - }, - hgap: 10 - }, item) - }; - }) - }) - }, - width: 0 - }); - BI.createWidget({ - type: "bi.absolute", - element: this.element, - items: [{ - el: this.combo, - top: rect.y, - left: rect.x - }] - }); - this.combo.element.hover(function () { - self._doDestroy = false; - }, function () { - self._doDestroy = true; - self._debounce2Destroy(); - }); - this._debounce2Destroy = BI.debounce(BI.bind(destroyCombo, this.combo), 3000); - this.combo.showView(); - this._debounce2Destroy(); - - function destroyCombo () { - if (self._doDestroy) { - this.destroy(); - } - } - }, - - setTypes: function (types) { - this.options.types = types || [[]]; - }, - - populate: function (items, types) { - var o = this.options; - if (BI.isNotNull(types)) { - this.setTypes(types); - } - var opts = this._formatItems(items); - BI.extend(opts[1], { - xAxis: o.xAxis, - yAxis: o.yAxis - }); - var result = o.formatConfig(opts[1], opts[0]) || opts; - this.CombineChart.populate(result[0], result[1]); - }, - - resize: function () { - this.CombineChart.resize(); - }, - - magnify: function () { - this.CombineChart.magnify(); - } -}); -BI.CombineChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.CombineChart.EVENT_ITEM_CLICK = "EVENT_ITEM_CLICK"; -BI.shortcut("bi.combine_chart", BI.CombineChart); \ No newline at end of file diff --git a/src/addons/chart/chart.js b/src/addons/chart/chart.js deleted file mode 100644 index 37d8dfbb7..000000000 --- a/src/addons/chart/chart.js +++ /dev/null @@ -1,55 +0,0 @@ -/** - * 图表控件 - * @class BI.Chart - * @extends BI.Widget - */ -BI.Chart = BI.inherit(BI.Pane, { - - _defaultConfig: function () { - return BI.extend(BI.Chart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-chart" - }); - }, - - _init: function () { - BI.Chart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - - this.isSetOptions = false; - this.vanCharts = VanCharts.init(self.element[0]); - - this._resizer = BI.debounce(function () { - if (self.element.width() > 0 && self.element.height() > 0) { - self.vanCharts.resize(); - } - }, 30); - BI.ResizeDetector.addResizeListener(this, function (e) { - self._resizer(); - }); - }, - - resize: function () { - if (this.isSetOptions === true) { - this._resizer(); - } - }, - - magnify: function () { - this.vanCharts.refreshRestore(); - }, - - populate: function (items, options) { - var self = this, o = this.options; - o.items = items; - this.config = options || {}; - this.config.series = o.items; - - var setOptions = function () { - self.vanCharts.setOptions(self.config); - self.isSetOptions = true; - }; - BI.nextTick(setOptions); - } -}); -BI.Chart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.chart", BI.Chart); \ No newline at end of file diff --git a/src/addons/chart/chart/chart.abstract.js b/src/addons/chart/chart/chart.abstract.js deleted file mode 100644 index 3ec61fec1..000000000 --- a/src/addons/chart/chart/chart.abstract.js +++ /dev/null @@ -1,286 +0,0 @@ -/** - * 图表控件 - * @class BI.AbstractChart - * @extends BI.Widget - */ -BI.AbstractChart = BI.inherit(BI.Widget, { - - constants: { - LEFT_AXIS: 0, - RIGHT_AXIS: 1, - RIGHT_AXIS_SECOND: 2, - X_AXIS: 3, - ROTATION: -90, - NORMAL: 1, - LEGEND_BOTTOM: 4, - ZERO2POINT: 2, - ONE2POINT: 3, - TWO2POINT: 4, - MINLIMIT: 1e-5, - LEGEND_HEIGHT: 80, - LEGEND_WIDTH: "30.0%", - FIX_COUNT: 6, - STYLE_NORMAL: 21, - NO_PROJECT: 16, - DASHBOARD_AXIS: 4, - ONE_POINTER: 1, - MULTI_POINTER: 2, - HALF_DASHBOARD: 9, - PERCENT_DASHBOARD: 10, - PERCENT_SCALE_SLOT: 11, - VERTICAL_TUBE: 12, - HORIZONTAL_TUBE: 13, - LNG_FIRST: 3, - LAT_FIRST: 4, - themeColor: "#65bce7", - autoCustom: 1, - POLYGON: 7, - AUTO_CUSTOM: 1, - AUTO: 1, - NOT_SHOW: 2, - LINE_WIDTH: 1, - NUM_SEPARATORS: false, - FONT_STYLE: { - fontFamily: "inherit", - color: "inherit", - fontSize: "12px" - } - }, - - _defaultConfig: function () { - return BI.extend(BI.AbstractChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-abstract-chart", - popupItemsGetter: BI.emptyFn - }); - }, - - _init: function () { - BI.AbstractChart.superclass._init.apply(this, arguments); - }, - - /** - * 格式化坐标轴数量级及其所影响的系列的各项属性 - * @param config 配置信息 - * @param items 系列数据 - * @param type 坐标轴数量级 - * @param position 坐标轴位置 - * @param formatter 系列tooltip格式化内容 - */ - formatNumberLevelInYaxis: function (config, items, type, position, formatter, isPercentChart) { - var magnify = this.calcMagnify(type); - BI.each(items, function (idx, item) { - BI.each(item.data, function (id, da) { - if (position === item.yAxis) { - if (BI.isNotNull(da.y) && !BI.isNumber(da.y)) { - da.y = BI.parseFloat(da.y); - } - if (BI.isNotNull(da.y)) { - da.y = BI.contentFormat(BI.parseFloat(da.y.div(magnify).toFixed(4)), "#.####;-#.####"); - } - } - }); - if (position === item.yAxis) { - item.tooltip = BI.deepClone(config.plotOptions.tooltip); - item.tooltip.formatter.valueFormat = formatter; - if(isPercentChart) { - item.tooltip.formatter.percentFormat = formatter; - item.tooltip.formatter.identifier = "${CATEGORY}${SERIES}${PERCENT}"; - } - } - }); - }, - - formatNumberLevelInXaxis: function (items, type) { - var magnify = this.calcMagnify(type); - BI.each(items, function (idx, item) { - BI.each(item.data, function (id, da) { - if (BI.isNotNull(da.x) && !BI.isNumber(da.x)) { - da.x = BI.parseFloat(da.x); - } - if (BI.isNotNull(da.x)) { - da.x = BI.contentFormat(BI.parseFloat(da.x.div(magnify).toFixed(4)), "#.####;-#.####"); - } - }); - }); - }, - - formatXYDataWithMagnify: function (number, magnify) { - if (BI.isNull(number)) { - return null; - } - if (!BI.isNumber(number)) { - number = BI.parseFloat(number); - } - return BI.contentFormat(BI.parseFloat(number.div(magnify).toFixed(4)), "#.####;-#.####"); - }, - - calcMagnify: function (type) { - var magnify = 1; - switch (type) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - case BICst.TARGET_STYLE.NUM_LEVEL.PERCENT: - magnify = 1; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - magnify = 10000; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - magnify = 1000000; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - magnify = 100000000; - break; - } - return magnify; - }, - - formatChartLegend: function (config, chartLegend) { - switch (chartLegend) { - case BICst.CHART_LEGENDS.BOTTOM: - config.legend.enabled = true; - config.legend.position = "bottom"; - config.legend.maxHeight = this.constants.LEGEND_HEIGHT; - break; - case BICst.CHART_LEGENDS.RIGHT: - config.legend.enabled = true; - config.legend.position = "right"; - config.legend.maxWidth = this.constants.LEGEND_WIDTH; - break; - case BICst.CHART_LEGENDS.NOT_SHOW: - default: - config.legend.enabled = false; - break; - } - }, - - getXYAxisUnit: function (numberLevelType, axis_unit) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - return (BI.isEmptyString(unit) && BI.isEmptyString(axis_unit)) ? unit : "(" + unit + axis_unit + ")"; - }, - - formatTickInXYaxis: function (type, number_level, separators, isCompareBar) { - var formatter = "#.##"; - switch (type) { - case this.constants.NORMAL: - formatter = "#.##"; - if (separators) { - formatter = "#,###.##"; - } - break; - case this.constants.ZERO2POINT: - formatter = "#0"; - if (separators) { - formatter = "#,###"; - } - break; - case this.constants.ONE2POINT: - formatter = "#0.0"; - if (separators) { - formatter = "#,###.0"; - } - break; - case this.constants.TWO2POINT: - formatter = "#0.00"; - if (separators) { - formatter = "#,###.00"; - } - break; - } - if (number_level === BICst.TARGET_STYLE.NUM_LEVEL.PERCENT) { - formatter += "%"; - } - formatter += ";-" + formatter; - if(isCompareBar) { - return function () { - arguments[0] = arguments[0] > 0 ? arguments[0] : (-1) * arguments[0]; - return BI.contentFormat(arguments[0], formatter); - }; - } - return function () { - return BI.contentFormat(arguments[0], formatter); - }; - }, - - formatDataLabel: function (state, items, config, style) { - var self = this; - if (state === true) { - BI.each(items, function (idx, item) { - item.dataLabels = { - align: "outside", - autoAdjust: true, - style: style, - enabled: true, - formatter: { - identifier: "${VALUE}", - valueFormat: config.yAxis[item.yAxis].formatter - } - }; - }); - } - }, - - formatDataLabelForAxis: function (state, items, format, style, isPercentChart) { - var self = this; - if (state === true) { - BI.each(items, function (idx, item) { - item.dataLabels = { - align: "outside", - autoAdjust: true, - style: style, - enabled: true, - formatter: { - identifier: "${VALUE}", - valueFormat: format - } - }; - if(isPercentChart) { - item.dataLabels.formatter.identifier = "${PERCENT}"; - item.dataLabels.formatter.percentFormat = format; - } - }); - } - }, - - setFontStyle: function (fontStyle, config) { - if (config.dataSheet) { - config.dataSheet.style = fontStyle; - } - config.xAxis[0].title.style = fontStyle; - config.xAxis[0].labelStyle = fontStyle; - config.legend.style = fontStyle; - BI.each(config.yAxis, function (idx, axis) { - axis.labelStyle = fontStyle; - axis.title.style = fontStyle; - }); - }, - - _formatItems: function (items) { - return items; - }, - - populate: function (items, options) { - }, - - resize: function () { - }, - - magnify: function () { - } -}); - -BI.AbstractChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.AbstractChart.EVENT_ITEM_CLICK = "EVENT_ITEM_CLICK"; diff --git a/src/addons/chart/chart/chart.accumulatearea.js b/src/addons/chart/chart/chart.accumulatearea.js deleted file mode 100644 index d0a9318cc..000000000 --- a/src/addons/chart/chart/chart.accumulatearea.js +++ /dev/null @@ -1,277 +0,0 @@ -/** - * 图表控件 - * @class BI.AccumulateAreaChart - * @extends BI.Widget - */ -BI.AccumulateAreaChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.AccumulateAreaChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-accumulate-area-chart" - }); - }, - - _init: function () { - BI.AccumulateAreaChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - - this.xAxis = [{ - type: "category", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE - }]; - this.yAxis = []; - - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - xAxis: this.xAxis, - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.AccumulateAreaChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this; - - config.colors = this.config.chartColor; - config.style = formatChartStyle(this.config.chartStyle); - formatChartLineStyle(this.config.chartLineType); - formatCordon(this.config.cordon); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.plotOptions.connectNulls = this.config.nullContinue; - config.dataSheet.enabled = this.config.showDataTable; - config.xAxis[0].showLabel = !config.dataSheet.enabled; - config.zoom.zoomTool.enabled = this.config.showZoom; - if (this.config.showZoom === true) { - delete config.dataSheet; - delete config.zoom.zoomType; - } - - config.yAxis = this.yAxis; - BI.each(config.yAxis, function (idx, axis) { - var unit = ""; - switch (axis.axisIndex) { - case self.constants.LEFT_AXIS: - unit = self.getXYAxisUnit(self.config.leftYAxisNumberLevel, self.config.leftYAxisUnit); - axis.title.text = self.config.showLeftYAxisTitle === true ? self.config.leftYAxisTitle + unit : unit; - axis.title.rotation = self.constants.ROTATION; - BI.extend(axis, { - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - reversed: self.config.leftYAxisReversed, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: self.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(self.config.leftYAxisStyle, self.config.leftYAxisNumberLevel, self.config.numSeparators) - }); - self.formatNumberLevelInYaxis(config, items, self.config.leftYAxisNumberLevel, idx, axis.formatter, self.config.numSeparators); - - break; - case self.constants.RIGHT_AXIS: - unit = self.getXYAxisUnit(self.config.rightYAxisNumberLevel, self.config.rightYAxisUnit); - axis.title.text = self.config.showRightYAxisTitle === true ? self.config.rightYAxisTitle + unit : unit; - axis.title.rotation = self.constants.ROTATION; - BI.extend(axis, { - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - reversed: self.config.rightYAxisReversed, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: self.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(self.config.rightYAxisStyle, self.config.rightYAxisNumberLevel, self.config.rightNumSeparators) - }); - self.formatNumberLevelInYaxis(config, items, self.config.rightYAxisNumberLevel, idx, axis.formatter, self.config.rightNumSeparators); - break; - } - }); - - config.xAxis[0].title.align = "center"; - config.xAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle : ""; - BI.extend(config.xAxis[0], { - lineWidth: this.config.lineWidth, - enableTick: this.config.enableTick, - labelRotation: this.config.textDirection, - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - maxHeight: "40%" - }); - - config.chartType = "area"; - - // 为了给数据标签加个%,还要遍历所有的系列,唉 - this.formatDataLabel(config.plotOptions.dataLabels.enabled, items, config, this.config.chartFont); - - // 全局样式的图表文字 - this.setFontStyle(this.config.chartFont, config); - - return [items, config]; - - function formatChartStyle (v) { - switch (v) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function formatChartLineStyle (v) { - switch (v) { - case BICst.CHART_SHAPE.RIGHT_ANGLE: - config.plotOptions.curve = false; - config.plotOptions.step = true; - break; - case BICst.CHART_SHAPE.CURVE: - config.plotOptions.curve = true; - config.plotOptions.step = false; - break; - case BICst.CHART_SHAPE.NORMAL: - default: - config.plotOptions.curve = false; - config.plotOptions.step = false; - break; - } - } - - function formatCordon (cordon) { - BI.each(cordon, function (idx, cor) { - if (idx === 0 && self.xAxis.length > 0) { - var magnify = self.calcMagnify(self.config.xAxisNumberLevel); - self.xAxis[0].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "top" - } - }); - }); - } - if (idx > 0 && self.yAxis.length >= idx) { - var magnify = 1; - switch (idx - 1) { - case self.constants.LEFT_AXIS: - magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS: - magnify = self.calcMagnify(self.config.rightYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS_SECOND: - magnify = self.calcMagnify(self.config.rightYAxisSecondNumberLevel); - break; - } - self.yAxis[idx - 1].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "left" - } - }); - }); - } - }); - } - }, - - _formatItems: function (items) { - return BI.map(items, function (idx, item) { - var i = BI.UUID(); - return BI.map(item, function (id, it) { - return BI.extend({}, it, {stack: i}); - }); - }); - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - leftYAxisTitle: options.leftYAxisTitle || "", - rightYAxisTitle: options.rightYAxisTitle || "", - chartColor: options.chartColor || [], - chartStyle: options.chartStyle || c.STYLE_NORMAL, - chartLineType: options.chartLineType || c.NORMAL, - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - rightYAxisStyle: options.rightYAxisStyle || c.NORMAL, - showXAxisTitle: options.showXAxisTitle || false, - showLeftYAxisTitle: options.showLeftYAxisTitle || false, - showRightYAxisTitle: options.showRightYAxisTitle || false, - leftYAxisReversed: options.leftYAxisReversed || false, - rightYAxisReversed: options.rightYAxisReversed || false, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - rightYAxisNumberLevel: options.rightYAxisNumberLevel || c.NORMAL, - xAxisUnit: options.xAxisUnit || "", - leftYAxisUnit: options.leftYAxisUnit || "", - rightYAxisUnit: options.rightYAxisUnit || "", - xAxisTitle: options.xAxisTitle || "", - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showDataTable: options.showDataTable || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - showZoom: options.showZoom || false, - textDirection: options.textDirection || 0, - cordon: options.cordon || [], - lineWidth: BI.isNull(options.lineWidth) ? 1 : options.lineWidth, - showLabel: BI.isNull(options.showLabel) ? true : options.showLabel, - enableTick: BI.isNull(options.enableTick) ? true : options.enableTick, - enableMinorTick: BI.isNull(options.enableMinorTick) ? true : options.enableMinorTick, - numSeparators: options.numSeparators || false, - rightNumSeparators: options.rightNumSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE, - nullContinue: options.nullContinue || false - }; - this.options.items = items; - this.yAxis = []; - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.AREA); - }); - types.push(type); - }); - BI.each(types, function (idx, type) { - if (BI.isEmptyArray(type)) { - return; - } - var newYAxis = { - type: "value", - title: { - style: self.constants.FONT_STYLE - }, - labelStyle: self.constants.FONT_STYLE, - position: idx > 0 ? "right" : "left", - lineWidth: 1, - axisIndex: idx, - gridLineWidth: 0 - }; - self.yAxis.push(newYAxis); - }); - this.combineChart.populate(this._formatItems(items), types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.AccumulateAreaChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.accumulate_area_chart", BI.AccumulateAreaChart); \ No newline at end of file diff --git a/src/addons/chart/chart/chart.accumulateaxis.js b/src/addons/chart/chart/chart.accumulateaxis.js deleted file mode 100644 index 4c1e61ff6..000000000 --- a/src/addons/chart/chart/chart.accumulateaxis.js +++ /dev/null @@ -1,280 +0,0 @@ -/** - * 图表控件 - * @class BI.AccumulateAxisChart - * @extends BI.Widget - */ -BI.AccumulateAxisChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.AccumulateAxisChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-accumulate-axis-chart" - }); - }, - - _init: function () { - BI.AccumulateAxisChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.xAxis = [{ - type: "category", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE - }]; - this.yAxis = []; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - xAxis: this.xAxis, - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.AccumulateAxisChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this, o = this.options; - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - formatCordon(); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.dataSheet.enabled = this.config.showDataTable; - config.xAxis[0].showLabel = !config.dataSheet.enabled; - config.zoom.zoomTool.enabled = this.config.showZoom; - if (this.config.showZoom === true) { - delete config.dataSheet; - delete config.zoom.zoomType; - } - - config.yAxis = this.yAxis; - BI.each(config.yAxis, function (idx, axis) { - switch (axis.axisIndex) { - case self.constants.LEFT_AXIS: - axis.title.text = getTitleText(self.config.leftYAxisNumberLevel, self.constants.LEFT_AXIS, self.config.showLeftYAxisTitle, self.config.leftYAxisTitle); - axis.title.rotation = self.constants.ROTATION; - BI.extend(axis, { - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - reversed: self.config.leftYAxisReversed, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: self.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(self.config.leftYAxisStyle, self.config.leftYAxisNumberLevel, self.config.numSeparators) - }); - self.formatNumberLevelInYaxis(config, items, self.config.leftYAxisNumberLevel, idx, axis.formatter); - break; - case self.constants.RIGHT_AXIS: - axis.title.text = getTitleText(self.config.rightYAxisNumberLevel, self.constants.RIGHT_AXIS, self.config.showRightYAxisTitle, self.config.rightYAxisTitle); - axis.title.rotation = self.constants.ROTATION; - BI.extend(axis, { - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - reversed: self.config.rightYAxisReversed, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: self.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(self.config.rightYAxisStyle, self.config.rightYAxisNumberLevel, self.config.rightNumSeparators) - }); - self.formatNumberLevelInYaxis(config, items, self.config.rightYAxisNumberLevel, idx, axis.formatter); - break; - } - }); - - config.xAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle : ""; - config.xAxis[0].title.align = "center"; - BI.extend(config.xAxis[0], { - lineWidth: self.config.lineWidth, - enableTick: self.config.enableTick, - labelRotation: this.config.textDirection, - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - maxHeight: "40%" - }); - - config.chartType = "column"; - - // 为了给数据标签加个%,还要遍历所有的系列,唉 - this.formatDataLabel(config.plotOptions.dataLabels.enabled, items, config, this.config.chartFont); - - // 全局样式的图表文字 - this.setFontStyle(this.config.chartFont, config); - - return [items, config]; - - function formatCordon () { - BI.each(self.config.cordon, function (idx, cor) { - if (idx === 0 && self.xAxis.length > 0) { - var magnify = self.calcMagnify(self.config.xAxisNumberLevel); - self.xAxis[0].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "top" - } - }); - }); - } - if (idx > 0 && self.yAxis.length >= idx) { - var magnify = 1; - switch (idx - 1) { - case self.constants.LEFT_AXIS: - magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS: - magnify = self.calcMagnify(self.config.rightYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS_SECOND: - magnify = self.calcMagnify(self.config.rightYAxisSecondNumberLevel); - break; - } - self.yAxis[idx - 1].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "left" - } - }); - }); - } - }); - } - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function getTitleText (numberLevelType, position, show, title) { - var unit = ""; - - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - if (position === self.constants.X_AXIS) { - self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit); - } - if (position === self.constants.LEFT_AXIS) { - self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit); - } - if (position === self.constants.RIGHT_AXIS) { - self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit); - } - - unit = unit === "" ? unit : "(" + unit + ")"; - - return show === true ? title + unit : unit; - } - }, - - _formatItems: function (items) { - return BI.map(items, function (idx, item) { - var i = BI.UUID(); - return BI.map(item, function (id, it) { - return BI.extend({}, it, {stack: i}); - }); - }); - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - leftYAxisTitle: options.leftYAxisTitle || "", - rightYAxisTitle: options.rightYAxisTitle || "", - chartColor: options.chartColor || [], - chartStyle: options.chartStyle || c.STYLE_NORMAL, - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - rightYAxisStyle: options.rightYAxisStyle || c.NORMAL, - showXAxisTitle: options.showXAxisTitle || false, - showLeftYAxisTitle: options.showLeftYAxisTitle || false, - showRightYAxisTitle: options.showRightYAxisTitle || false, - leftYAxisReversed: options.leftYAxisReversed || false, - rightYAxisReversed: options.rightYAxisReversed || false, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - rightYAxisNumberLevel: options.rightYAxisNumberLevel || c.NORMAL, - xAxisUnit: options.xAxisUnit || "", - leftYAxisUnit: options.leftYAxisUnit || "", - rightYAxisUnit: options.rightYAxisUnit || "", - xAxisTitle: options.xAxisTitle || "", - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showDataTable: options.showDataTable || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - showZoom: options.showZoom || false, - textDirection: options.textDirection || 0, - cordon: options.cordon || [], - lineWidth: BI.isNull(options.lineWidth) ? 1 : options.lineWidth, - showLabel: BI.isNull(options.showLabel) ? true : options.showLabel, - enableTick: BI.isNull(options.enableTick) ? true : options.enableTick, - enableMinorTick: BI.isNull(options.enableMinorTick) ? true : options.enableMinorTick, - numSeparators: options.numSeparators || false, - rightNumSeparators: options.rightNumSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE - }; - this.options.items = items; - this.yAxis = []; - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.AXIS); - }); - types.push(type); - }); - BI.each(types, function (idx, type) { - if (BI.isEmptyArray(type)) { - return; - } - var newYAxis = { - type: "value", - title: { - style: self.constants.FONT_STYLE - }, - labelStyle: self.constants.FONT_STYLE, - position: idx > 0 ? "right" : "left", - lineWidth: 1, - axisIndex: idx, - gridLineWidth: 0 - }; - self.yAxis.push(newYAxis); - }); - this.combineChart.populate(this._formatItems(items), types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.AccumulateAxisChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.accumulate_axis_chart", BI.AccumulateAxisChart); \ No newline at end of file diff --git a/src/addons/chart/chart/chart.accumulatebar.js b/src/addons/chart/chart/chart.accumulatebar.js deleted file mode 100644 index 54480e057..000000000 --- a/src/addons/chart/chart/chart.accumulatebar.js +++ /dev/null @@ -1,246 +0,0 @@ -/** - * 图表控件 - * @class BI.AccumulateBarChart - * @extends BI.Widget - */ -BI.AccumulateBarChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.AccumulateBarChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-accumulate-bar-chart" - }); - }, - - _init: function () { - BI.AccumulateBarChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.xAxis = [{ - type: "value", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - formatter: function () { - return this > 0 ? this : (-1) * this; - }, - gridLineWidth: 0 - }]; - this.yAxis = [{ - type: "category", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - gridLineWidth: 0, - position: "left" - }]; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - xAxis: this.xAxis, - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.AccumulateBarChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this; - var unit = getXYAxisUnit(this.config.xAxisNumberLevel, this.constants.LEFT_AXIS); - var xTitle = getXYAxisUnit(this.config.leftYAxisNumberLevel, this.constants.X_AXIS); - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - formatCordon(); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - - config.yAxis = this.yAxis; - config.yAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle + unit : unit; - config.yAxis[0].title.rotation = this.constants.ROTATION; - BI.extend(config.yAxis[0], { - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - labelRotation: this.config.textDirection, - lineWidth: this.config.lineWidth, - enableTick: this.config.enableTick, - maxWidth: "40%" - }); - - self.formatNumberLevelInXaxis(items, this.config.leftYAxisNumberLevel); - config.xAxis[0].title.text = this.config.showLeftYAxisTitle === true ? this.config.leftYAxisTitle + xTitle : xTitle; - config.xAxis[0].title.align = "center"; - BI.extend(config.xAxis[0], { - formatter: self.formatTickInXYaxis(this.config.leftYAxisStyle, self.config.leftYAxisNumberLevel, self.config.numSeparators), - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - showLabel: this.config.showLabel, - enableTick: this.config.enableTick, - lineWidth: this.config.lineWidth, - enableMinorTick: this.config.enableMinorTick - }); - config.chartType = "bar"; - // 为了给数据标签加个%,还要遍历所有的系列,唉 - this.formatDataLabelForAxis(config.plotOptions.dataLabels.enabled, items, config.xAxis[0].formatter, this.config.chartFont); - - config.plotOptions.tooltip.formatter.valueFormat = config.xAxis[0].formatter; - - // 全局样式的图表文字 - this.setFontStyle(this.config.chartFont, config); - - return [items, config]; - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function formatCordon () { - BI.each(self.config.cordon, function (idx, cor) { - if (idx === 0 && self.xAxis.length > 0) { - var magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - self.xAxis[0].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "top" - } - }); - }); - } - if (idx > 0 && self.yAxis.length >= idx) { - var magnify = 1; - switch (idx - 1) { - case self.constants.LEFT_AXIS: - magnify = self.calcMagnify(self.config.xAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS: - magnify = self.calcMagnify(self.config.rightYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS_SECOND: - magnify = self.calcMagnify(self.config.rightYAxisSecondNumberLevel); - break; - } - self.yAxis[idx - 1].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "left" - } - }); - }); - } - }); - } - - function getXYAxisUnit (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - if (position === self.constants.X_AXIS) { - self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit); - } - if (position === self.constants.LEFT_AXIS) { - self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit); - } - if (position === self.constants.RIGHT_AXIS) { - self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit); - } - return unit === "" ? unit : "(" + unit + ")"; - } - }, - - _formatItems: function (items) { - BI.each(items, function (idx, item) { - var stackId = BI.UUID(); - BI.each(item, function (id, it) { - it.stack = stackId; - BI.each(it.data, function (i, t) { - var tmp = t.x; - t.x = t.y; - t.y = tmp; - }); - }); - }); - return items; - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - leftYAxisTitle: options.leftYAxisTitle || "", - chartColor: options.chartColor || [], - chartStyle: options.chartStyle || c.STYLE_NORMAL, - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - xAxisStyle: options.xAxisStyle || c.NORMAL, - showXAxisTitle: options.showXAxisTitle || false, - showLeftYAxisTitle: options.showLeftYAxisTitle || false, - leftYAxisReversed: options.leftYAxisReversed || false, - xAxisNumberLevel: options.xAxisNumberLevel || c.NORMAL, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - xAxisUnit: options.xAxisUnit || "", - leftYAxisUnit: options.leftYAxisUnit || "", - xAxisTitle: options.xAxisTitle || "", - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showDataTable: options.showDataTable || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - showZoom: options.showZoom || false, - textDirection: options.textDirection || 0, - cordon: options.cordon || [], - minimalist_model: options.minimalist_model || false, - lineWidth: BI.isNull(options.lineWidth) ? 1 : options.lineWidth, - showLabel: BI.isNull(options.showLabel) ? true : options.showLabel, - enableTick: BI.isNull(options.enableTick) ? true : options.enableTick, - enableMinorTick: BI.isNull(options.enableMinorTick) ? true : options.enableMinorTick, - numSeparators: options.numSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE - }; - this.options.items = items; - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.BAR); - }); - types.push(type); - }); - this.combineChart.populate(this._formatItems(items), types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.AccumulateBarChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.accumulate_bar_chart", BI.AccumulateBarChart); \ No newline at end of file diff --git a/src/addons/chart/chart/chart.accumulateradar.js b/src/addons/chart/chart/chart.accumulateradar.js deleted file mode 100644 index 19ab625e8..000000000 --- a/src/addons/chart/chart/chart.accumulateradar.js +++ /dev/null @@ -1,194 +0,0 @@ -/** - * 图表控件 - * @class BI.AccumulateRadarChart - * @extends BI.Widget - */ -BI.AccumulateRadarChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.AccumulateRadarChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-accumulate-radar-chart" - }); - }, - - _init: function () { - BI.AccumulateRadarChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.radiusAxis = [{ - type: "value", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - formatter: function () { - return this > 0 ? this : (-1) * this; - }, - gridLineWidth: 0, - position: "bottom" - }]; - - this.angleAxis = [{ - type: "category", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE - }]; - - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.AccumulateRadarChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatItems: function (items) { - return BI.map(items, function (idx, item) { - var i = BI.UUID(); - return BI.map(item, function (id, it) { - return BI.extend({}, it, {stack: i}); - }); - }); - }, - - _formatConfig: function (config, items) { - var self = this; - - delete config.zoom; - - var title = getXYAxisUnit(this.config.leftYAxisNumberLevel, this.constants.LEFT_AXIS); - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - formatChartRadarStyle(); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.plotOptions.connectNulls = this.config.nullContinue; - - config.radiusAxis = this.radiusAxis; - config.angleAxis = this.angleAxis; - config.radiusAxis[0].formatter = self.formatTickInXYaxis(this.config.leftYAxisStyle, this.config.leftYAxisNumberLevel, this.config.numSeparators); - formatNumberLevelInYaxis(this.config.leftYAxisNumberLevel, this.constants.LEFT_AXIS, config.radiusAxis[0].formatter); - config.radiusAxis[0].title.text = this.config.showLeftYAxisTitle === true ? this.config.leftYAxisTitle + title : title; - config.radiusAxis[0].gridLineWidth = this.config.showGridLine === true ? 1 : 0; - config.chartType = "radar"; - config.plotOptions.columnType = true; - delete config.xAxis; - delete config.yAxis; - // 为了给数据标签加个%,还要遍历所有的系列,唉 - this.formatDataLabelForAxis(config.plotOptions.dataLabels.enabled, items, config.radiusAxis[0].formatter, this.config.chartFont); - - // 全局样式的图表文字 - config.radiusAxis[0].labelStyle = config.radiusAxis[0].title.style = this.config.chartFont; - config.angleAxis[0].labelStyle = config.angleAxis[0].title.style = this.config.chartFont; - config.legend.style = this.config.chartFont; - - return [items, config]; - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function formatChartRadarStyle () { - switch (self.config.chartRadarType) { - case BICst.CHART_SHAPE.POLYGON: - config.plotOptions.shape = "polygon"; - break; - case BICst.CHART_SHAPE.CIRCLE: - config.plotOptions.shape = "circle"; - break; - } - } - - function formatNumberLevelInYaxis (type, position, formatter) { - var magnify = self.calcMagnify(type); - BI.each(items, function (idx, item) { - BI.each(item.data, function (id, da) { - if (position === item.yAxis) { - da.y = self.formatXYDataWithMagnify(da.y, magnify); - } - }); - }); - config.plotOptions.tooltip.formatter.valueFormat = formatter; - } - - function getXYAxisUnit (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - if (position === self.constants.X_AXIS) { - self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit); - } - if (position === self.constants.LEFT_AXIS) { - self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit); - } - if (position === self.constants.RIGHT_AXIS) { - self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit); - } - return unit === "" ? unit : "(" + unit + ")"; - } - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - chartRadarType: options.chartRadarType || c.NORMAL, - chartColor: options.chartColor || [], - chartStyle: options.chartStyle || c.STYLE_NORMAL, - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - cordon: options.cordon || [], - numSeparators: options.numSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE, - nullContinue: options.nullContinue || false - }; - this.options.items = items; - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.RADAR); - }); - types.push(type); - }); - this.combineChart.populate(this._formatItems(items), types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.AccumulateRadarChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.accumulate_radar_chart", BI.AccumulateRadarChart); \ No newline at end of file diff --git a/src/addons/chart/chart/chart.area.js b/src/addons/chart/chart/chart.area.js deleted file mode 100644 index 31a0720fa..000000000 --- a/src/addons/chart/chart/chart.area.js +++ /dev/null @@ -1,302 +0,0 @@ -/** - * 图表控件 - * @class BI.AreaChart - * @extends BI.Widget - */ -BI.AreaChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.AreaChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-area-chart" - }); - }, - - _init: function () { - BI.AreaChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.xAxis = [{ - type: "category", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - position: "bottom", - gridLineWidth: 0 - }]; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - xAxis: this.xAxis, - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.AreaChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this; - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - formatChartLineStyle(); - formatCordon(); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.plotOptions.connectNulls = this.config.nullContinue; - config.dataSheet.enabled = this.config.showDataTable; - config.xAxis[0].showLabel = !config.dataSheet.enabled; - config.zoom.zoomTool.enabled = this.config.showZoom; - if (this.config.showZoom === true) { - delete config.dataSheet; - delete config.zoom.zoomType; - } - - config.yAxis = this.yAxis; - BI.each(config.yAxis, function (idx, axis) { - var title = ""; - switch (axis.axisIndex) { - case self.constants.LEFT_AXIS: - title = getXYAxisUnit(self.config.leftYAxisNumberLevel, self.constants.LEFT_AXIS); - axis.title.text = self.config.showLeftYAxisTitle === true ? self.config.leftYAxisTitle + title : title; - axis.title.rotation = self.constants.ROTATION; - BI.extend(axis, { - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - reversed: self.config.leftYAxisReversed, - enableMinorTick: self.config.enableMinorTick, - formatter: self.formatTickInXYaxis(self.config.leftYAxisStyle, self.config.leftYAxisNumberLevel, self.config.numSeparators), - gridLineWidth: self.config.showGridLine === true ? 1 : 0 - }); - self.formatNumberLevelInYaxis(config, items, self.config.leftYAxisNumberLevel, idx, axis.formatter); - break; - case self.constants.RIGHT_AXIS: - title = getXYAxisUnit(self.config.rightYAxisNumberLevel, self.constants.RIGHT_AXIS); - axis.title.text = self.config.showRightYAxisTitle === true ? self.config.rightYAxisTitle + title : title; - axis.title.rotation = self.constants.ROTATION; - BI.extend(axis, { - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - reversed: self.config.rightYAxisReversed, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: self.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(self.config.rightYAxisStyle, self.config.rightYAxisNumberLevel, self.config.rightNumSeparators) - }); - self.formatNumberLevelInYaxis(config, items, self.config.rightYAxisNumberLevel, idx, axis.formatter); - break; - } - }); - - config.xAxis[0].title.align = "center"; - config.xAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle : ""; - BI.extend(config.xAxis[0], { - lineWidth: this.config.lineWidth, - enableTick: this.config.enableTick, - labelRotation: this.config.textDirection, - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - maxHeight: "40%" - }); - - config.chartType = "area"; - - // 为了给数据标签加个%,还要遍历所有的系列,唉 - this.formatDataLabel(config.plotOptions.dataLabels.enabled, items, config, this.config.chartFont); - - // 全局样式的图表文字 - this.setFontStyle(this.config.chartFont, config); - - return [items, config]; - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function formatCordon () { - BI.each(self.config.cordon, function (idx, cor) { - if (idx === 0 && self.xAxis.length > 0) { - var magnify = self.calcMagnify(self.config.xAxisNumberLevel); - self.xAxis[0].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "top" - } - }); - }); - } - if (idx > 0 && self.yAxis.length >= idx) { - var magnify = 1; - switch (idx - 1) { - case self.constants.LEFT_AXIS: - magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS: - magnify = self.calcMagnify(self.config.rightYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS_SECOND: - magnify = self.calcMagnify(self.config.rightYAxisSecondNumberLevel); - break; - } - self.yAxis[idx - 1].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "left" - } - }); - }); - } - }); - } - - function formatChartLineStyle () { - switch (self.config.chartLineType) { - case BICst.CHART_SHAPE.RIGHT_ANGLE: - config.plotOptions.curve = false; - config.plotOptions.step = true; - break; - case BICst.CHART_SHAPE.CURVE: - config.plotOptions.curve = true; - config.plotOptions.step = false; - break; - case BICst.CHART_SHAPE.NORMAL: - default: - config.plotOptions.curve = false; - config.plotOptions.step = false; - break; - } - } - - function getXYAxisUnit (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - if (position === self.constants.X_AXIS) { - self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit); - } - if (position === self.constants.LEFT_AXIS) { - self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit); - } - if (position === self.constants.RIGHT_AXIS) { - self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit); - } - return unit === "" ? unit : "(" + unit + ")"; - } - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - leftYAxisTitle: options.leftYAxisTitle || "", - rightYAxisTitle: options.rightYAxisTitle || "", - rightYAxisSecondTitle: options.rightYAxisSecondTitle || "", - chartLineType: options.chartLineType || c.NORMAL, - chartColor: options.chartColor || [], - chartStyle: options.chartStyle || c.NORMAL, - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - rightYAxisStyle: options.rightYAxisStyle || c.NORMAL, - rightYAxisSecondStyle: options.rightYAxisSecondStyle || c.NORMAL, - showXAxisTitle: options.showXAxisTitle || false, - showLeftYAxisTitle: options.showLeftYAxisTitle || false, - showRightYAxisTitle: options.showRightYAxisTitle || false, - showRightYAxisSecondTitle: options.showRightYAxisSecondTitle || false, - leftYAxisReversed: options.leftYAxisReversed || false, - rightYAxisReversed: options.rightYAxisReversed || false, - rightYAxisSecondReversed: options.rightYAxisSecondReversed || false, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - rightYAxisNumberLevel: options.rightYAxisNumberLevel || c.NORMAL, - rightYAxisSecondNumberLevel: options.rightYAxisSecondNumberLevel || c.NORMAL, - xAxisUnit: options.xAxisUnit || "", - leftYAxisUnit: options.leftYAxisUnit || "", - rightYAxisUnit: options.rightYAxisUnit || "", - rightYAxisSecondUnit: options.rightYAxisSecondUnit || "", - xAxisTitle: options.xAxisTitle || "", - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showDataTable: options.showDataTable || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - showZoom: options.showZoom || false, - textDirection: options.textDirection || 0, - cordon: options.cordon || [], - lineWidth: BI.isNull(options.lineWidth) ? 1 : options.lineWidth, - showLabel: BI.isNull(options.showLabel) ? true : options.showLabel, - enableTick: BI.isNull(options.enableTick) ? true : options.enableTick, - enableMinorTick: BI.isNull(options.enableMinorTick) ? true : options.enableMinorTick, - numSeparators: options.numSeparators || false, - rightNumSeparators: options.rightNumSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE, - nullContinue: options.nullContinue || false - }; - this.options.items = items; - - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.AREA); - }); - types.push(type); - }); - - this.yAxis = []; - BI.each(types, function (idx, type) { - if (BI.isEmptyArray(type)) { - return; - } - var newYAxis = { - type: "value", - title: { - style: self.constants.FONT_STYLE - }, - labelStyle: self.constants.FONT_STYLE, - position: idx > 0 ? "right" : "left", - lineWidth: 1, - axisIndex: idx, - gridLineWidth: 0 - }; - self.yAxis.push(newYAxis); - }); - - this.combineChart.populate(items, types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.AreaChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.area_chart", BI.AreaChart); \ No newline at end of file diff --git a/src/addons/chart/chart/chart.axis.js b/src/addons/chart/chart/chart.axis.js deleted file mode 100644 index 20f029933..000000000 --- a/src/addons/chart/chart/chart.axis.js +++ /dev/null @@ -1,276 +0,0 @@ -/** - * 图表控件 柱状 - * @class BI.AxisChart - * @extends BI.Widget - * leftYxis 左值轴属性 - * rightYxis 右值轴属性 - * xAxis 分类轴属性 - */ -BI.AxisChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.AxisChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-axis-chart" - }); - }, - - _init: function () { - BI.AxisChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.xAxis = [{ - type: "category", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - position: "bottom", - gridLineWidth: 0 - }]; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - xAxis: this.xAxis, - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.AxisChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this, o = this.options; - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - formatCordon(); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.plotOptions.connectNulls = this.config.nullContinue; - config.dataSheet.enabled = this.config.showDataTable; - config.xAxis[0].showLabel = !config.dataSheet.enabled; - config.zoom.zoomTool.enabled = this.config.showZoom; - if (this.config.showZoom === true) { - delete config.dataSheet; - delete config.zoom.zoomType; - } - - config.yAxis = this.yAxis; - BI.each(config.yAxis, function (idx, axis) { - var title; - switch (axis.axisIndex) { - case self.constants.LEFT_AXIS: - title = getXYAxisUnit(self.config.leftYAxisNumberLevel, self.constants.LEFT_AXIS); - axis.title.text = self.config.showLeftYAxisTitle === true ? self.config.leftYAxisTitle + title : title; - axis.title.rotation = self.constants.ROTATION; - BI.extend(axis, { - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - reversed: self.config.leftYAxisReversed, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: self.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(self.config.leftYAxisStyle, self.config.leftYAxisNumberLevel, self.config.numSeparators) - }); - self.formatNumberLevelInYaxis(config, items, self.config.leftYAxisNumberLevel, idx, axis.formatter); - break; - case self.constants.RIGHT_AXIS: - title = getXYAxisUnit(self.config.rightYAxisNumberLevel, self.constants.RIGHT_AXIS); - axis.title.text = self.config.showRightYAxisTitle === true ? self.config.rightYAxisTitle + title : title; - axis.title.rotation = self.constants.ROTATION; - BI.extend(axis, { - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - reversed: self.config.rightYAxisReversed, - enableMinorTIck: self.config.enableMinorTick, - formatter: self.formatTickInXYaxis(self.config.rightYAxisStyle, self.config.rightYAxisNumberLevel, self.config.rightNumSeparators), - gridLineWidth: self.config.showGridLine === true ? 1 : 0 - }); - self.formatNumberLevelInYaxis(config, items, self.config.rightYAxisNumberLevel, idx, axis.formatter); - break; - } - }); - - config.xAxis[0].title.align = "center"; - config.xAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle : ""; - BI.extend(config.xAxis[0], { - lineWidth: this.config.lineWidth, - enableTick: this.config.enableTick, - labelRotation: this.config.textDirection, - enableMinorTick: this.config.enableMinorTick, - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - maxHeight: "40%" - }); - - var lineItem = []; - var otherItem = []; - BI.each(items, function (idx, item) { - if (item.type === "line") { - lineItem.push(item); - } else { - otherItem.push(item); - } - }); - - // 为了给数据标签加个%,还要遍历所有的系列,唉 - this.formatDataLabel(config.plotOptions.dataLabels.enabled, items, config, this.config.chartFont); - - // 全局样式的图表文字 - this.setFontStyle(this.config.chartFont, config); - - return [BI.concat(otherItem, lineItem), config]; - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function formatCordon () { - BI.each(self.config.cordon, function (idx, cor) { - if (idx === 0 && self.xAxis.length > 0) { - var magnify = self.calcMagnify(self.config.xAxisNumberLevel); - self.xAxis[0].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "top" - } - }); - }); - } - if (idx > 0 && self.yAxis.length >= idx) { - var magnify = 1; - switch (idx - 1) { - case self.constants.LEFT_AXIS: - magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS: - magnify = self.calcMagnify(self.config.rightYAxisNumberLevel); - break; - } - self.yAxis[idx - 1].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "left" - } - }); - }); - } - }); - } - - function getXYAxisUnit (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - if (position === self.constants.X_AXIS) { - self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit); - } - if (position === self.constants.LEFT_AXIS) { - self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit); - } - if (position === self.constants.RIGHT_AXIS) { - self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit); - } - return unit === "" ? unit : "(" + unit + ")"; - } - }, - - populate: function (items, options, types) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - leftYAxisTitle: options.leftYAxisTitle || "", - rightYAxisTitle: options.rightYAxisTitle || "", - chartColor: options.chartColor || [], - chartStyle: options.chartStyle || c.NORMAL, - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - rightYAxisStyle: options.rightYAxisStyle || c.NORMAL, - showXAxisTitle: options.showXAxisTitle || false, - showLeftYAxisTitle: options.showLeftYAxisTitle || false, - showRightYAxisTitle: options.showRightYAxisTitle || false, - leftYAxisReversed: options.leftYAxisReversed || false, - rightYAxisReversed: options.rightYAxisReversed || false, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - rightYAxisNumberLevel: options.rightYAxisNumberLevel || c.NORMAL, - xAxisUnit: options.xAxisUnit || "", - leftYAxisUnit: options.leftYAxisUnit || "", - rightYAxisUnit: options.rightYAxisUnit || "", - xAxisTitle: options.xAxisTitle || "", - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showDataTable: options.showDataTable || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - showZoom: options.showZoom || false, - textDirection: options.textDirection || 0, - cordon: options.cordon || [], - lineWidth: BI.isNull(options.lineWidth) ? 1 : options.lineWidth, - showLabel: BI.isNull(options.showLabel) ? true : options.showLabel, - enableTick: BI.isNull(options.enableTick) ? true : options.enableTick, - enableMinorTick: BI.isNull(options.enableMinorTick) ? true : options.enableMinorTick, - numSeparators: options.numSeparators || false, - rightNumSeparators: options.rightNumSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE, - nullContinue: true - }; - this.options.items = items; - - this.yAxis = []; - BI.each(types, function (idx, type) { - if (BI.isEmptyArray(type)) { - return; - } - var newYAxis = { - type: "value", - title: { - style: self.constants.FONT_STYLE - }, - labelStyle: self.constants.FONT_STYLE, - position: idx > 0 ? "right" : "left", - lineWidth: 1, - axisIndex: idx, - gridLineWidth: 0 - }; - self.yAxis.push(newYAxis); - }); - - this.combineChart.populate(items, types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.AxisChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.axis_chart", BI.AxisChart); \ No newline at end of file diff --git a/src/addons/chart/chart/chart.bar.js b/src/addons/chart/chart/chart.bar.js deleted file mode 100644 index 372c2c67e..000000000 --- a/src/addons/chart/chart/chart.bar.js +++ /dev/null @@ -1,241 +0,0 @@ -/** - * 图表控件 - * @class BI.BarChart - * @extends BI.Widget - */ -BI.BarChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.BarChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-bar-chart" - }); - }, - - _init: function () { - BI.BarChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.xAxis = [{ - type: "value", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - formatter: function () { - return this > 0 ? this : (-1) * this; - }, - gridLineWidth: 0 - }]; - this.yAxis = [{ - type: "category", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - gridLineWidth: 0, - position: "left" - }]; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - xAxis: this.xAxis, - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - var tmp = obj.x; - obj.x = obj.y; - obj.y = tmp; - self.fireEvent(BI.BarChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this; - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - formatCordon(); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - - // 分类轴 - config.yAxis = this.yAxis; - config.yAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle : ""; - config.yAxis[0].title.rotation = this.constants.ROTATION; - BI.extend(config.yAxis[0], { - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - labelRotation: this.config.textDirection, - enableTick: this.config.enableTick, - lineWidth: this.config.lineWidth, - maxWidth: "40%" - }); - - // 值轴 - self.formatNumberLevelInXaxis(items, this.config.leftYAxisNumberLevel); - config.xAxis[0].title.text = getXAxisTitle(this.config.leftYAxisNumberLevel, this.constants.X_AXIS); - config.xAxis[0].title.align = "center"; - BI.extend(config.xAxis[0], { - formatter: self.formatTickInXYaxis(this.config.leftYAxisStyle, this.config.leftYAxisNumberLevel, this.config.numSeparators), - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - enableTick: this.config.enableTick, - showLabel: this.config.showLabel, - lineWidth: this.config.lineWidth, - enableMinorTick: this.config.enableMinorTick - }); - config.chartType = "bar"; - - this.formatDataLabelForAxis(config.plotOptions.dataLabels.enabled, items, config.xAxis[0].formatter, this.config.chartFont); - - config.plotOptions.tooltip.formatter.valueFormat = config.xAxis[0].formatter; - - // 全局样式的图表文字 - this.setFontStyle(this.config.chartFont, config); - - return [items, config]; - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function formatCordon () { - BI.each(self.config.cordon, function (idx, cor) { - if (idx === 0 && self.xAxis.length > 0) { - var magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - self.xAxis[0].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "top" - } - }); - }); - } - if (idx > 0 && self.yAxis.length >= idx) { - var magnify = 1; - switch (idx - 1) { - case self.constants.LEFT_AXIS: - magnify = self.calcMagnify(self.config.xAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS: - magnify = self.calcMagnify(self.config.rightYAxisNumberLevel); - break; - } - self.yAxis[idx - 1].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "left" - } - }); - }); - } - }); - } - - function getXAxisTitle (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - if (position === self.constants.X_AXIS) { - self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit); - } - if (position === self.constants.LEFT_AXIS) { - self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit); - } - unit = unit === "" ? unit : "(" + unit + ")"; - - return self.config.showLeftYAxisTitle === true ? self.config.leftYAxisTitle + unit : unit; - } - }, - - _formatItems: function (items) { - BI.each(items, function (idx, item) { - BI.each(item, function (id, it) { - BI.each(it.data, function (i, t) { - var tmp = t.x; - t.x = t.y; - t.y = tmp; - }); - }); - }); - return items; - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - leftYAxisTitle: options.leftYAxisTitle || "", - chartColor: options.chartColor || [], - chartStyle: options.chartStyle || c.STYLE_NORMAL, - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - xAxisStyle: options.xAxisStyle || c.NORMAL, - showXAxisTitle: options.showXAxisTitle || false, - showLeftYAxisTitle: options.showLeftYAxisTitle || false, - leftYAxisReversed: options.leftYAxisReversed || false, - xAxisNumberLevel: options.xAxisNumberLevel || c.NORMAL, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - xAxisUnit: options.xAxisUnit || "", - leftYAxisUnit: options.leftYAxisUnit || "", - xAxisTitle: options.xAxisTitle || "", - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - showZoom: options.showZoom || false, - textDirection: options.textDirection || 0, - cordon: options.cordon || [], - lineWidth: BI.isNull(options.lineWidth) ? 1 : options.lineWidth, - showLabel: BI.isNull(options.showLabel) ? true : options.showLabel, - enableTick: BI.isNull(options.enableTick) ? true : options.enableTick, - enableMinorTick: BI.isNull(options.enableMinorTick) ? true : options.enableMinorTick, - numSeparators: options.numSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE - }; - this.options.items = items; - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.BAR); - }); - types.push(type); - }); - this.combineChart.populate(this._formatItems(items), types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.BarChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.bar_chart", BI.BarChart); \ No newline at end of file diff --git a/src/addons/chart/chart/chart.bubble.js b/src/addons/chart/chart/chart.bubble.js deleted file mode 100644 index 8c045e010..000000000 --- a/src/addons/chart/chart/chart.bubble.js +++ /dev/null @@ -1,283 +0,0 @@ -/** - * 图表控件 - * @class BI.BubbleChart - * @extends BI.Widget - */ -BI.BubbleChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.BubbleChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-bubble-chart" - }); - }, - - _init: function () { - BI.BubbleChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.xAxis = [{ - type: "value", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - position: "bottom", - gridLineWidth: 0 - }]; - this.yAxis = [{ - type: "value", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - position: "left", - gridLineWidth: 0 - }]; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - xAxis: this.xAxis, - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.BubbleChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this, o = this.options; - delete config.zoom; - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - formatCordon(); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.plotOptions.dataLabels.formatter.identifier = "${X}${Y}${SIZE}"; - config.plotOptions.shadow = this.config.bubbleStyle !== this.constants.NO_PROJECT; - config.yAxis = this.yAxis; - - config.yAxis[0].formatter = self.formatTickInXYaxis(this.config.leftYAxisStyle, this.config.leftYAxisNumberLevel, this.config.numSeparators); - formatNumberLevelInYaxis(this.config.leftYAxisNumberLevel, this.constants.LEFT_AXIS); - config.yAxis[0].title.text = getXYAxisUnit(this.config.leftYAxisNumberLevel, this.constants.LEFT_AXIS); - config.yAxis[0].title.text = this.config.showLeftYAxisTitle === true ? this.config.leftYAxisTitle + config.yAxis[0].title.text : config.yAxis[0].title.text; - config.yAxis[0].gridLineWidth = this.config.showGridLine === true ? 1 : 0; - config.yAxis[0].lineWidth = 1; - config.yAxis[0].title.rotation = this.constants.ROTATION; - config.yAxis[0].maxWidth = "40%"; - - config.xAxis[0].formatter = self.formatTickInXYaxis(this.config.xAxisStyle, this.config.xAxisNumberLevel, this.config.rightNumSeparators); - self.formatNumberLevelInXaxis(items, this.config.xAxisNumberLevel); - config.xAxis[0].title.text = getXYAxisUnit(this.config.xAxisNumberLevel, this.constants.X_AXIS); - config.xAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle + config.xAxis[0].title.text : config.xAxis[0].title.text; - config.xAxis[0].title.align = "center"; - config.xAxis[0].gridLineWidth = this.config.showGridLine === true ? 1 : 0; - config.xAxis[0].maxHeith = "40%"; - config.chartType = "bubble"; - - if (BI.isNotEmptyArray(this.config.tooltip)) { - config.plotOptions.bubble.tooltip = { - useHtml: true, - style: { - color: "RGB(184, 184, 184)" - }, - formatter: function () { - var y = self.formatTickInXYaxis(self.config.leftYAxisStyle, self.config.leftYAxisNumberLevel, self.config.numSeparators)(this.y); - var x = self.formatTickInXYaxis(self.config.xAxisStyle, self.config.xAxisNumberLevel, self.config.rightNumSeparators)(this.x); - return this.seriesName + "
(X)" + self.config.tooltip[0] + ":" + x + "
(Y)" + self.config.tooltip[1] - + ":" + y + "
(" + BI.i18nText("BI-Size") + ")" + self.config.tooltip[2] + ":" + this.size + "
"; - } - }; - } - - // 为了给数据标签加个%,还要遍历所有的系列,唉 - if (config.plotOptions.dataLabels.enabled === true) { - BI.each(items, function (idx, item) { - item.dataLabels = { - style: self.config.chartFont, - align: "outside", - autoAdjust: true, - enabled: true, - formatter: { - identifier: "${X}${Y}${SIZE}", - XFormat: function () { - return BI.contentFormat(arguments[0], "#.##;-#.##"); - }, - YFormat: function () { - return BI.contentFormat(arguments[0], "#.##;-#.##"); - }, - sizeFormat: function () { - return BI.contentFormat(arguments[0], "#.##;-#.##"); - } - } - }; - item.dataLabels.formatter.XFormat = config.xAxis[0].formatter; - item.dataLabels.formatter.YFormat = config.yAxis[0].formatter; - }); - } - - // 全局样式图表文字 - config.yAxis[0].title.style = config.yAxis[0].labelStyle = this.config.chartFont; - config.xAxis[0].title.style = config.xAxis[0].labelStyle = this.config.chartFont; - config.legend.style = this.config.chartFont; - - return [items, config]; - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function formatCordon () { - BI.each(self.config.cordon, function (idx, cor) { - if (idx === 0 && self.xAxis.length > 0) { - var magnify = self.calcMagnify(self.config.xAxisNumberLevel); - self.xAxis[0].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "top" - } - }); - }); - } - if (idx > 0 && self.yAxis.length >= idx) { - var magnify = 1; - switch (idx - 1) { - case self.constants.LEFT_AXIS: - magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS: - magnify = self.calcMagnify(self.config.rightYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS_SECOND: - magnify = self.calcMagnify(self.config.rightYAxisSecondNumberLevel); - break; - } - self.yAxis[idx - 1].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "left" - } - }); - }); - } - }); - } - - function formatNumberLevelInYaxis (type, position) { - var magnify = self.calcMagnify(type); - BI.each(items, function (idx, item) { - BI.each(item.data, function (id, da) { - if (position === item.yAxis) { - da.y = self.formatXYDataWithMagnify(da.y, magnify); - } - }); - }); - if (type === BICst.TARGET_STYLE.NUM_LEVEL.PERCENT) { - // config.plotOptions.tooltip.formatter.valueFormat = "function(){return window.FR ? FR.contentFormat(arguments[0], '#0%') : arguments[0]}"; - } - } - - function getXYAxisUnit (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - if (position === self.constants.X_AXIS) { - self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit); - } - if (position === self.constants.LEFT_AXIS) { - self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit); - } - if (position === self.constants.RIGHT_AXIS) { - self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit); - } - return unit === "" ? unit : "(" + unit + ")"; - } - }, - - _formatItems: function (items) { - BI.each(items, function (idx, item) { - BI.each(item, function (id, it) { - BI.each(it.data, function (i, da) { - var data = da.size; - da.size = BI.contentFormat(data, "#.##;-#.##"); - }); - }); - }); - return items; - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - leftYAxisTitle: options.leftYAxisTitle || "", - chartColor: options.chartColor || [], - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - xAxisStyle: options.xAxisStyle || c.NORMAL, - showXAxisTitle: options.showXAxisTitle || false, - showLeftYAxisTitle: options.showLeftYAxisTitle || false, - xAxisNumberLevel: options.xAxisNumberLevel || c.NORMAL, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - xAxisUnit: options.xAxisUnit || "", - leftYAxisUnit: options.leftYAxisUnit || "", - xAxisTitle: options.xAxisTitle || "", - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - cordon: options.cordon || [], - tooltip: options.tooltip || [], - bubbleStyle: options.bubbleStyle || c.NO_PROJECT, - numSeparators: options.numSeparators || false, - rightNumSeparators: options.rightNumSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE - }; - this.options.items = items; - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.BUBBLE); - }); - types.push(type); - }); - this.combineChart.populate(this._formatItems(items), types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.BubbleChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.bubble_chart", BI.BubbleChart); diff --git a/src/addons/chart/chart/chart.comparearea.js b/src/addons/chart/chart/chart.comparearea.js deleted file mode 100644 index 55dbc4dec..000000000 --- a/src/addons/chart/chart/chart.comparearea.js +++ /dev/null @@ -1,373 +0,0 @@ -/** - * 图表控件 - * @class BI.CompareAreaChart - * @extends BI.Widget - */ -BI.CompareAreaChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.CompareAreaChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-compare-area-chart" - }); - }, - - _init: function () { - BI.CompareAreaChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.xAxis = [{ - type: "category", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - position: "bottom", - gridLineWidth: 0 - }]; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - xAxis: this.xAxis, - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.CompareAreaChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this; - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - formatChartLineStyle(); - formatCordon(); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.plotOptions.connectNulls = this.config.nullContinue; - config.dataSheet.enabled = this.config.showDataTable; - config.xAxis[0].showLabel = !config.dataSheet.enabled; - config.zoom.zoomTool.enabled = this.config.showZoom; - if (this.config.showZoom === true) { - delete config.dataSheet; - delete config.zoom.zoomType; - } - - config.yAxis = this.yAxis; - BI.each(config.yAxis, function (idx, axis) { - var title = ""; - switch (axis.axisIndex) { - case self.constants.LEFT_AXIS: - title = getXYAxisUnit(self.config.leftYAxisNumberLevel, self.constants.LEFT_AXIS); - axis.title.rotation = self.constants.ROTATION; - axis.title.text = self.config.showLeftYAxisTitle === true ? self.config.leftYAxisTitle + title : title; - BI.extend(axis, { - reversed: false, - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: self.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(self.config.leftYAxisStyle, self.config.leftYAxisNumberLevel, self.config.numSeparators) - }); - formatNumberLevelInYaxis(self.config.leftYAxisNumberLevel, idx, axis.formatter); - break; - case self.constants.RIGHT_AXIS: - title = getXYAxisUnit(self.config.rightYAxisNumberLevel, self.constants.RIGHT_AXIS); - axis.title.rotation = self.constants.ROTATION; - axis.title.text = self.config.showRightYAxisTitle === true ? self.config.rightYAxisTitle + title : title; - BI.extend(axis, { - reversed: true, - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: self.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(self.config.rightYAxisStyle, self.config.rightYAxisNumberLevel, self.config.rightNumSeparators) - }); - formatNumberLevelInYaxis(self.config.rightYAxisNumberLevel, idx, axis.formatter); - break; - } - var res = _calculateValueNiceDomain(0, self.maxes[idx]); - axis.max = res[1].mul(2); - axis.min = res[0].mul(2); - axis.tickInterval = BI.parseFloat((BI.parseFloat(axis.max).sub(BI.parseFloat(axis.min)))).div(5); - }); - - config.xAxis[0].title.align = "center"; - config.xAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle : ""; - BI.extend(config.xAxis[0], { - lineWidth: this.config.lineWidth, - enableTick: this.config.enableTick, - labelRotation: this.config.textDirection, - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - maxHeight: "40%" - }); - - config.chartType = "area"; - - // 为了给数据标签加个%,还要遍历所有的系列,唉 - this.formatDataLabel(config.plotOptions.dataLabels.enabled, items, config, this.config.chartFont); - - // 全局样式的图表文字 - this.setFontStyle(this.config.chartFont, config); - - return [items, config]; - - function _calculateValueNiceDomain (minValue, maxValue) { - - minValue = Math.min(0, minValue); - - var tickInterval = _linearTickInterval(minValue, maxValue); - - return _linearNiceDomain(minValue, maxValue, tickInterval); - } - - function _linearTickInterval (minValue, maxValue, m) { - - m = m || 5; - var span = maxValue - minValue; - var step = Math.pow(10, Math.floor(Math.log(span / m) / Math.LN10)); - var err = m / span * step; - - if (err <= .15) step *= 10; else if (err <= .35) step *= 5; else if (err <= .75) step *= 2; - - return step; - } - - function _linearNiceDomain (minValue, maxValue, tickInterval) { - - minValue = VanUtils.accMul(Math.floor(minValue / tickInterval), tickInterval); - - maxValue = VanUtils.accMul(Math.ceil(maxValue / tickInterval), tickInterval); - - return [minValue, maxValue]; - } - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function formatCordon () { - BI.each(self.config.cordon, function (idx, cor) { - if (idx === 0 && self.xAxis.length > 0) { - var magnify = self.calcMagnify(self.config.xAxisNumberLevel); - self.xAxis[0].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "top" - } - }); - }); - } - if (idx > 0 && self.yAxis.length >= idx) { - var magnify = 1; - switch (idx - 1) { - case self.constants.LEFT_AXIS: - magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS: - magnify = self.calcMagnify(self.config.rightYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS_SECOND: - magnify = self.calcMagnify(self.config.rightYAxisSecondNumberLevel); - break; - } - self.yAxis[idx - 1].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "left" - } - }); - }); - } - }); - } - - function formatChartLineStyle () { - switch (self.config.chartLineType) { - case BICst.CHART_SHAPE.RIGHT_ANGLE: - config.plotOptions.area = { - curve: false, - step: true - }; - break; - case BICst.CHART_SHAPE.CURVE: - config.plotOptions.area = { - curve: true, - step: false - }; - break; - case BICst.CHART_SHAPE.NORMAL: - default: - config.plotOptions.area = { - curve: false, - step: false - }; - break; - } - } - - function formatNumberLevelInYaxis (type, position, formatter) { - var magnify = self.calcMagnify(type); - BI.each(items, function (idx, item) { - var max = null; - BI.each(item.data, function (id, da) { - if (position === item.yAxis) { - da.y = self.formatXYDataWithMagnify(da.y, magnify); - if ((BI.isNull(max) || BI.parseFloat(da.y) > BI.parseFloat(max))) { - max = da.y; - } - } - }); - if (position === item.yAxis) { - item.tooltip = BI.deepClone(config.plotOptions.tooltip); - item.tooltip.formatter.valueFormat = formatter; - } - if (BI.isNotNull(max)) { - self.maxes.push(max); - } - }); - } - - function getXYAxisUnit (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - if (position === self.constants.X_AXIS) { - self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit); - } - if (position === self.constants.LEFT_AXIS) { - self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit); - } - if (position === self.constants.RIGHT_AXIS) { - self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit); - } - return unit === "" ? unit : "(" + unit + ")"; - } - }, - - _formatItems: function (items) { - var self = this; - this.maxes = []; - BI.each(items, function (idx, item) { - BI.each(item, function (id, it) { - if (idx > 0) { - BI.extend(it, {reversed: true, xAxis: 0}); - } else { - BI.extend(it, {reversed: false, xAxis: 1}); - } - }); - }); - return items; - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - leftYAxisTitle: options.leftYAxisTitle || "", - rightYAxisTitle: options.rightYAxisTitle || "", - chartColor: options.chartColor || [], - chartStyle: options.chartStyle || c.NORMAL, - chartLineType: options.chartLineType || c.NORMAL, - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - rightYAxisStyle: options.rightYAxisStyle || c.NORMAL, - showXAxisTitle: options.showXAxisTitle || false, - showLeftYAxisTitle: options.showLeftYAxisTitle || false, - showRightYAxisTitle: options.showRightYAxisTitle || false, - leftYAxisReversed: options.leftYAxisReversed || false, - rightYAxisReversed: options.rightYAxisReversed || false, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - rightYAxisNumberLevel: options.rightYAxisNumberLevel || c.NORMAL, - xAxisUnit: options.xAxisUnit || "", - leftYAxisUnit: options.leftYAxisUnit || "", - rightYAxisUnit: options.rightYAxisUnit || "", - xAxisTitle: options.xAxisTitle || "", - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showDataTable: options.showDataTable || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - showZoom: options.showZoom || false, - textDirection: options.textDirection || 0, - cordon: options.cordon || [], - lineWidth: BI.isNull(options.lineWidth) ? 1 : options.lineWidth, - showLabel: BI.isNull(options.showLabel) ? true : options.showLabel, - enableTick: BI.isNull(options.enableTick) ? true : options.enableTick, - enableMinorTick: BI.isNull(options.enableMinorTick) ? true : options.enableMinorTick, - numSeparators: options.numSeparators || false, - rightNumSeparators: options.rightNumSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE, - nullContinue: options.nullContinue || false - }; - this.options.items = items; - - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.AREA); - }); - types.push(type); - }); - - this.yAxis = []; - BI.each(types, function (idx, type) { - if (BI.isEmptyArray(type)) { - return; - } - var newYAxis = { - type: "value", - title: { - style: self.constants.FONT_STYLE - }, - labelStyle: self.constants.FONT_STYLE, - position: idx > 0 ? "right" : "left", - lineWidth: 1, - axisIndex: idx, - gridLineWidth: 0 - }; - self.yAxis.push(newYAxis); - }); - - this.combineChart.populate(this._formatItems(items), types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.CompareAreaChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.compare_area_chart", BI.CompareAreaChart); \ No newline at end of file diff --git a/src/addons/chart/chart/chart.compareaxis.js b/src/addons/chart/chart/chart.compareaxis.js deleted file mode 100644 index 5ea95826d..000000000 --- a/src/addons/chart/chart/chart.compareaxis.js +++ /dev/null @@ -1,381 +0,0 @@ -/** - * 图表控件 - * @class BI.CompareAxisChart - * @extends BI.Widget - */ -BI.CompareAxisChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.CompareAxisChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-compare-axis-chart" - }); - }, - - _init: function () { - BI.CompareAxisChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.xAxis = [{ - type: "category", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - position: "bottom", - gridLineWidth: 0 - }, { - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - position: "top", - gridLineWidth: 0, - type: "category", - showLabel: false - }]; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - xAxis: this.xAxis, - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.CompareAxisChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this, o = this.options; - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - formatChartLineStyle(); - formatCordon(); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.dataSheet.enabled = this.config.showDataTable; - config.xAxis[0].showLabel = !config.dataSheet.enabled; - config.zoom.zoomTool.enabled = this.config.showZoom; - if(this.config.showZoom === true) { - delete config.dataSheet; - delete config.zoom.zoomType; - } - - config.yAxis = this.yAxis; - BI.each(config.yAxis, function (idx, axis) { - var unit = ""; - switch (axis.axisIndex) { - case self.constants.LEFT_AXIS: - unit = getXYAxisUnit(self.config.leftYAxisNumberLevel, self.constants.LEFT_AXIS); - axis.title.rotation = self.constants.ROTATION; - axis.title.text = self.config.showLeftYAxisTitle === true ? self.config.leftYAxisTitle + unit : unit; - BI.extend(axis, { - reversed: false, - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: self.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(self.config.leftYAxisStyle, self.config.leftYAxisNumberLevel, self.config.numSeparators) - }); - formatNumberLevelInYaxis(self.config.leftYAxisNumberLevel, idx, axis.formatter); - break; - case self.constants.RIGHT_AXIS: - unit = getXYAxisUnit(self.config.rightYAxisNumberLevel, self.constants.RIGHT_AXIS); - axis.title.rotation = self.constants.ROTATION; - axis.title.text = self.config.showRightYAxisTitle === true ? self.config.rightYAxisTitle + unit : unit; - BI.extend(axis, { - reversed: true, - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: self.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(self.config.rightYAxisStyle, self.config.rightYAxisNumberLevel, self.config.rightNumSeparators) - }); - formatNumberLevelInYaxis(self.config.rightYAxisNumberLevel, idx, axis.formatter); - break; - } - var res = _calculateValueNiceDomain(0, self.maxes[idx]); - axis.max = res[1].mul(2); - axis.min = res[0].mul(2); - axis.tickInterval = BI.parseFloat((BI.parseFloat(axis.max).sub(BI.parseFloat(axis.min)))).div(5); - }); - - config.xAxis[0].title.align = "center"; - config.xAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle : ""; - BI.extend(config.xAxis[0], { - lineWidth: this.config.lineWidth, - enableTick: this.config.enableTick, - labelRotation: this.config.textDirection, - enableMinorTick: this.config.enableMinorTick, - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - maxHeight: "40%" - }); - - BI.extend(config.xAxis[1], { - lineWidth: this.config.lineWidth, - enableTick: this.config.enableTick, - enableMinorTick: this.config.enableMinorTick - }); - - // 为了给数据标签加个%,还要遍历所有的系列,唉 - this.formatDataLabel(config.plotOptions.dataLabels.enabled, items, config, this.config.chartFont); - - // 全局样式的图表文字 - this.setFontStyle(this.config.chartFont, config); - - return [items, config]; - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function formatCordon () { - BI.each(self.config.cordon, function (idx, cor) { - if(idx === 0 && self.xAxis.length > 0) { - var magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - self.xAxis[0].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "top" - } - }); - }); - } - if(idx > 0 && self.yAxis.length >= idx) { - var magnify = 1; - switch (idx - 1) { - case self.constants.LEFT_AXIS: - magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS: - magnify = self.calcMagnify(self.config.rightYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS_SECOND: - magnify = self.calcMagnify(self.config.rightYAxisSecondNumberLevel); - break; - } - self.yAxis[idx - 1].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "left" - } - }); - }); - } - }); - } - - function formatChartLineStyle () { - switch (self.config.chartLineType) { - case BICst.CHART_SHAPE.RIGHT_ANGLE: - config.plotOptions.curve = false; - config.plotOptions.step = true; - break; - case BICst.CHART_SHAPE.CURVE: - config.plotOptions.curve = true; - config.plotOptions.step = false; - break; - case BICst.CHART_SHAPE.NORMAL: - default: - config.plotOptions.curve = false; - config.plotOptions.step = false; - break; - } - } - - function formatNumberLevelInYaxis (type, position, formatter) { - var magnify = self.calcMagnify(type); - BI.each(items, function (idx, item) { - var max = null; - BI.each(item.data, function (id, da) { - if (position === item.yAxis) { - da.y = self.formatXYDataWithMagnify(da.y, magnify); - if((BI.isNull(max) || BI.parseFloat(da.y) > BI.parseFloat(max))) { - max = da.y; - } - } - }); - if(position === item.yAxis) { - item.tooltip = BI.deepClone(config.plotOptions.tooltip); - item.tooltip.formatter.valueFormat = formatter; - } - if(BI.isNotNull(max)) { - self.maxes.push(max); - } - }); - } - - function getXYAxisUnit (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - if(position === self.constants.X_AXIS) { - self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit); - } - if(position === self.constants.LEFT_AXIS) { - self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit); - } - if(position === self.constants.RIGHT_AXIS) { - self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit); - } - return unit === "" ? unit : "(" + unit + ")"; - } - - function _calculateValueNiceDomain (minValue, maxValue) { - - minValue = Math.min(0, minValue); - - var tickInterval = _linearTickInterval(minValue, maxValue); - - return _linearNiceDomain(minValue, maxValue, tickInterval); - } - - function _linearTickInterval (minValue, maxValue, m) { - - m = m || 5; - var span = maxValue - minValue; - var step = Math.pow(10, Math.floor(Math.log(span / m) / Math.LN10)); - var err = m / span * step; - - if (err <= .15) step *= 10; else if (err <= .35) step *= 5; else if (err <= .75) step *= 2; - - return step; - } - - function _linearNiceDomain (minValue, maxValue, tickInterval) { - - minValue = VanUtils.accMul(Math.floor(minValue / tickInterval), tickInterval); - - maxValue = VanUtils.accMul(Math.ceil(maxValue / tickInterval), tickInterval); - - return [minValue, maxValue]; - } - }, - - _formatItems: function (items) { - var self = this; - this.maxes = []; - BI.each(items, function (idx, item) { - BI.each(item, function (id, it) { - if(idx > 0) { - BI.extend(it, {reversed: true, xAxis: 1}); - }else{ - BI.extend(it, {reversed: false, xAxis: 0}); - } - }); - }); - return items; - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - leftYAxisTitle: options.leftYAxisTitle || "", - rightYAxisTitle: options.rightYAxisTitle || "", - chartColor: options.chartColor || [], - chartStyle: options.chartStyle || c.NORMAL, - chartLineType: options.chartLineType || c.NORMAL, - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - rightYAxisStyle: options.rightYAxisStyle || c.NORMAL, - showXAxisTitle: options.showXAxisTitle || false, - showLeftYAxisTitle: options.showLeftYAxisTitle || false, - showRightYAxisTitle: options.showRightYAxisTitle || false, - leftYAxisReversed: options.leftYAxisReversed || false, - rightYAxisReversed: options.rightYAxisReversed || false, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - rightYAxisNumberLevel: options.rightYAxisNumberLevel || c.NORMAL, - xAxisUnit: options.xAxisUnit || "", - leftYAxisUnit: options.leftYAxisUnit || "", - rightYAxisUnit: options.rightYAxisUnit || "", - xAxisTitle: options.xAxisTitle || "", - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showDataTable: options.showDataTable || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - showZoom: options.showZoom || false, - textDirection: options.textDirection || 0, - cordon: options.cordon || [], - lineWidth: BI.isNull(options.lineWidth) ? 1 : options.lineWidth, - showLabel: BI.isNull(options.showLabel) ? true : options.showLabel, - enableTick: BI.isNull(options.enableTick) ? true : options.enableTick, - enableMinorTick: BI.isNull(options.enableMinorTick) ? true : options.enableMinorTick, - numSeparators: options.numSeparators || false, - rightNumSeparators: options.rightNumSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE - }; - this.options.items = items; - - this.yAxis = []; - - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.AXIS); - }); - types.push(type); - }); - - BI.each(types, function (idx, type) { - if(BI.isEmptyArray(type)) { - return; - } - var newYAxis = { - type: "value", - title: { - style: self.constants.FONT_STYLE - }, - labelStyle: self.constants.FONT_STYLE, - position: idx > 0 ? "right" : "left", - lineWidth: 1, - axisIndex: idx, - gridLineWidth: 0, - reversed: idx > 0 - }; - self.yAxis.push(newYAxis); - }); - - this.combineChart.populate(this._formatItems(items), types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.CompareAxisChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.compare_axis_chart", BI.CompareAxisChart); \ No newline at end of file diff --git a/src/addons/chart/chart/chart.comparebar.js b/src/addons/chart/chart/chart.comparebar.js deleted file mode 100644 index 978b2031d..000000000 --- a/src/addons/chart/chart/chart.comparebar.js +++ /dev/null @@ -1,253 +0,0 @@ -/** - * 图表控件 - * @class BI.CompareBarChart - * @extends BI.Widget - */ -BI.CompareBarChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.CompareBarChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-compare-bar-chart" - }); - }, - - _init: function () { - BI.CompareBarChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.xAxis = [{ - type: "value", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - formatter: function () { - return this > 0 ? this : (-1) * this; - }, - gridLineWidth: 0 - }]; - this.yAxis = [{ - type: "category", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - gridLineWidth: 0, - position: "left" - }]; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - xAxis: this.xAxis, - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.CompareBarChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this, o = this.options; - var yTitle = getXYAxisUnit(this.config.xAxisNumberLevel, this.constants.LEFT_AXIS); - var xTitle = getXYAxisUnit(this.config.leftYAxisNumberLevel, this.constants.X_AXIS); - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - formatCordon(); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - - config.yAxis = this.yAxis; - config.yAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle + yTitle : yTitle; - config.yAxis[0].title.rotation = this.constants.ROTATION; - BI.extend(config.yAxis[0], { - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - lineWidth: this.config.lineWidth, - enableTick: this.config.enableTick, - labelRotation: this.config.textDirection, - maxWidth: "40%" - }); - - self.formatNumberLevelInXaxis(items, this.config.leftYAxisNumberLevel); - config.xAxis[0].title.text = this.config.showLeftYAxisTitle === true ? this.config.leftYAxisTitle + xTitle : xTitle; - config.xAxis[0].title.align = "center"; - BI.extend(config.xAxis[0], { - formatter: self.formatTickInXYaxis(this.config.leftYAxisStyle, this.config.leftYAxisNumberLevel, this.config.numSeparators, true), - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - lineWidth: this.config.lineWidth, - showLabel: this.config.showLabel, - enableTick: this.config.enableTick, - enableMinorTick: this.config.enableMinorTick - }); - - config.chartType = "bar"; - // 为了给数据标签加个%,还要遍历所有的系列,唉 - this.formatDataLabelForAxis(config.plotOptions.dataLabels.enabled, items, config.xAxis[0].formatter, this.config.chartFont); - - config.plotOptions.tooltip.formatter.valueFormat = config.xAxis[0].formatter; - - // 全局样式的图表文字 - this.setFontStyle(this.config.chartFont, config); - - return [items, config]; - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function formatCordon () { - BI.each(self.config.cordon, function (idx, cor) { - if (idx === 0 && self.xAxis.length > 0) { - var magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - self.xAxis[0].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "top" - } - }); - }); - } - if (idx > 0 && self.yAxis.length >= idx) { - var magnify = 1; - switch (idx - 1) { - case self.constants.LEFT_AXIS: - magnify = self.calcMagnify(self.config.xAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS: - magnify = self.calcMagnify(self.config.rightYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS_SECOND: - magnify = self.calcMagnify(self.config.rightYAxisSecondNumberLevel); - break; - } - self.yAxis[idx - 1].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "left" - } - }); - }); - } - }); - } - - function getXYAxisUnit (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - if (position === self.constants.X_AXIS) { - self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit); - } - if (position === self.constants.LEFT_AXIS) { - self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit); - } - if (position === self.constants.RIGHT_AXIS) { - self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit); - } - return unit === "" ? unit : "(" + unit + ")"; - } - }, - - _formatItems: function (items) { - var result = []; - var i = BI.UUID(); - BI.each(items, function (idx, item) { - BI.each(item, function (id, it) { - BI.each(it.data, function (i, t) { - var tmp = t.x; - t.x = t.y; - t.y = tmp; - if (idx === 0) { - t.x = -t.x; - } - }); - it.stack = i; - }); - }); - BI.each(items, function (idx, item) { - result = BI.concat(result, item); - }); - return [result]; - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - leftYAxisTitle: options.leftYAxisTitle || "", - chartColor: options.chartColor || [], - chartStyle: options.chartStyle || c.STYLE_NORMAL, - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - xAxisStyle: options.xAxisStyle || c.NORMAL, - showXAxisTitle: options.showXAxisTitle || false, - showLeftYAxisTitle: options.showLeftYAxisTitle || false, - leftYAxisReversed: options.leftYAxisReversed || false, - xAxisNumberLevel: options.xAxisNumberLevel || c.NORMAL, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - xAxisUnit: options.xAxisUnit || "", - leftYAxisUnit: options.leftYAxisUnit || "", - xAxisTitle: options.xAxisTitle || "", - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showDataTable: options.showDataTable || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - showZoom: options.showZoom || false, - textDirection: options.textDirection || 0, - cordon: options.cordon || [], - lineWidth: BI.isNull(options.lineWidth) ? 1 : options.lineWidth, - showLabel: BI.isNull(options.showLabel) ? true : options.showLabel, - enableTick: BI.isNull(options.enableTick) ? true : options.enableTick, - enableMinorTick: BI.isNull(options.enableMinorTick) ? true : options.enableMinorTick, - numSeparators: options.numSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE - }; - this.options.items = this._formatItems(items); - var types = []; - BI.each(this.options.items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.BAR); - }); - types.push(type); - }); - this.combineChart.populate(this.options.items, types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.CompareBarChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.compare_bar_chart", BI.CompareBarChart); \ No newline at end of file diff --git a/src/addons/chart/chart/chart.dashboard.js b/src/addons/chart/chart/chart.dashboard.js deleted file mode 100644 index a95c448b0..000000000 --- a/src/addons/chart/chart/chart.dashboard.js +++ /dev/null @@ -1,398 +0,0 @@ -/** - * 图表控件 - * @class BI.DashboardChart - * @extends BI.Widget - */ -BI.DashboardChart = BI.inherit(BI.AbstractChart, { - - - _defaultConfig: function () { - return BI.extend(BI.DashboardChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-dashboard-chart" - }); - }, - - _init: function () { - BI.DashboardChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.gaugeAxis = [{ - minorTickColor: "rgb(226,226,226)", - tickColor: "rgb(186,186,186)", - labelStyle: this.constants.FONT_STYLE, - step: 0, - showLabel: true - }]; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.DashboardChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this, o = this.options; - var isDashboard = BI.contains([self.constants.NORMAL, self.constants.HALF_DASHBOARD], self.config.chartDashboardType); - var isMultiPointers = self.config.numberOfPointer === self.constants.MULTI_POINTER; - formatChartDashboardStyle(); - config.chartType = "gauge"; - delete config.zoom; - delete config.xAxis; - delete config.yAxis; - if (isDashboard && !isMultiPointers) { - config.plotOptions.seriesLabel.enabled = false; - if(BI.isNull(items[0].data[0].z)) { - config.plotOptions.tooltip.formatter.identifier = "${SERIES}${X}${Y}${SIZE}${VALUE}"; - } - } - config.gaugeAxis[0].labelStyle = this.config.chartFont; - return [items, config]; - - function formatChartDashboardStyle () { - var bands = getBandsStyles(self.config.bandsStyles, self.config.autoCustomStyle); - var percentageLabel = BI.extend(config.plotOptions.percentageLabel, { - enabled: self.config.showPercentage === BICst.PERCENTAGE.SHOW - }); - - config.gaugeAxis = self.gaugeAxis; - var slotValueLAbel = { - enabled: true, - formatter: function () { - var value = this.value; - if (self.config.dashboardNumberLevel === BICst.TARGET_STYLE.NUM_LEVEL.PERCENT && self.config.numSeparators) { - value = BI.contentFormat(this.value, "#,##0%;-#,##0%"); - } else if (self.config.dashboardNumberLevel === BICst.TARGET_STYLE.NUM_LEVEL.PERCENT && !self.config.numSeparators) { - value = BI.contentFormat(this.value, "#0.00%"); - } else if (!(self.config.dashboardNumberLevel === BICst.TARGET_STYLE.NUM_LEVEL.PERCENT) && self.config.numSeparators) { - value = BI.contentFormat(this.value, "#,###.##;-#,###.##"); - } else { - value = BI.contentFormat(this.value, "#.##;-#.##"); - } - - var label = "
" + this.seriesName + "
" + "
" + value + - getXYAxisUnit(self.config.dashboardNumberLevel, self.constants.DASHBOARD_AXIS) + "
"; - - if (isDashboard && items[0].data.length > 1) { - if (isMultiPointers) { - return "
" + this.seriesName + ":" + value + - getXYAxisUnit(self.config.dashboardNumberLevel, self.constants.DASHBOARD_AXIS) + "
"; - } - return label; - } else if (isDashboard && BI.isNull(items[0].data[0].z)) { - return label; - } - - return "
" + this.category + "
" + label; - }, - style: self.config.chartFont, - useHtml: true - }; - switch (self.config.chartDashboardType) { - case BICst.CHART_SHAPE.HALF_DASHBOARD: - setPlotOptions("pointer_semi", bands, slotValueLAbel, percentageLabel); - break; - case BICst.CHART_SHAPE.PERCENT_DASHBOARD: - setPlotOptions("ring", bands, slotValueLAbel, percentageLabel); - break; - case BICst.CHART_SHAPE.PERCENT_SCALE_SLOT: - setPlotOptions("slot", bands, slotValueLAbel, percentageLabel); - break; - case BICst.CHART_SHAPE.HORIZONTAL_TUBE: - BI.extend(slotValueLAbel, { - align: "bottom" - }); - BI.extend(percentageLabel, { - align: "bottom" - }); - setPlotOptions("thermometer", bands, slotValueLAbel, percentageLabel, "horizontal", "vertical"); - break; - case BICst.CHART_SHAPE.VERTICAL_TUBE: - BI.extend(slotValueLAbel, { - align: "left" - }); - BI.extend(percentageLabel, { - align: "left" - }); - setPlotOptions("thermometer", bands, slotValueLAbel, percentageLabel, "vertical", "horizontal"); - break; - case BICst.CHART_SHAPE.NORMAL: - default: - setPlotOptions("pointer", bands, slotValueLAbel, percentageLabel); - break; - } - changeMaxMinScale(); - formatNumberLevelInYaxis(self.config.dashboardNumberLevel, self.constants.LEFT_AXIS); - if (self.config.dashboardNumberLevel === BICst.TARGET_STYLE.NUM_LEVEL.PERCENT) { - config.gaugeAxis[0].formatter = function () { - var scaleValue = this; - if (self.config.numSeparators) { - scaleValue = BI.contentFormat(scaleValue, "#,##0%;-#,##0%"); - } else { - scaleValue = BI.contentFormat(scaleValue, "#0.00%"); - } - return scaleValue + getXYAxisUnit(self.config.dashboardNumberLevel, self.constants.DASHBOARD_AXIS); - }; - } else { - config.gaugeAxis[0].formatter = function () { - var value = this; - if (self.config.numSeparators) { - value = BI.contentFormat(value, "#,###;-#,###"); - } - return value + getXYAxisUnit(self.config.dashboardNumberLevel, self.constants.DASHBOARD_AXIS); - }; - } - } - - function setPlotOptions (style, bands, slotValueLAbel, percentageLabel, thermometerLayout, layout) { - config.style = style; - config.plotOptions.bands = bands; - config.plotOptions.valueLabel = slotValueLAbel; - config.plotOptions.percentageLabel = percentageLabel; - config.plotOptions.thermometerLayout = thermometerLayout; - config.plotOptions.layout = layout; - } - - function changeMaxMinScale () { - self.gaugeAxis[0].min = BI.parseFloat(self.config.minScale) || null; - self.gaugeAxis[0].max = BI.parseFloat(self.config.maxScale) || null; - } - - function formatNumberLevelInYaxis (type, position) { - var magnify = self.calcMagnify(type); - BI.each(items, function (idx, item) { - BI.each(item.data, function (id, da) { - if (position === item.yAxis) { - da.y = self.formatXYDataWithMagnify(da.y, magnify); - } - }); - }); - - config.plotOptions.tooltip.formatter.valueFormat = function () { - return BI.contentFormat(this, "#.##;-#.##") + getXYAxisUnit(type, position); - }; - - if (self.config.numSeparators) { - config.plotOptions.tooltip.formatter.valueFormat = function () { - return BI.contentFormat(arguments[0], "#,###.##;-#,###.##"); - }; - } - - if (type === BICst.TARGET_STYLE.NUM_LEVEL.PERCENT) { - config.plotOptions.tooltip.formatter.valueFormat = function () { - return BI.contentFormat(arguments[0], "#0.00%"); - }; - if (self.config.numSeparators) { - config.plotOptions.tooltip.formatter.valueFormat = function () { - return BI.contentFormat(arguments[0], "#,##0%;-#,##0%"); - }; - } - } - } - - function getXYAxisUnit (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - if (position === self.constants.DASHBOARD_AXIS) { - self.config.dashboardUnit !== "" && (unit = unit + self.config.dashboardUnit); - } - return unit; - } - - function getBandsStyles (styles, change) { - var min = 0, bands = [], color = null, max = null, conditionMax = null; - - BI.each(items, function (idx, item) { - var data = item.data[0]; - if ((BI.isNull(max) || data.y > max)) { - max = data.y; - } - }); - - switch (change) { - - case BICst.SCALE_SETTING.AUTO: - break; - case BICst.SCALE_SETTING.CUSTOM: - if (styles.length === 0) { - return bands; - } - var maxScale = _calculateValueNiceDomain(0, max)[1]; - - BI.each(styles, function (idx, style) { - if(BI.parseFloat(style.range.min) > BI.parseFloat(style.range.max)) { - return bands.push({ - color: color, - from: conditionMax, - to: maxScale - }); - } - bands.push({ - color: style.color, - from: style.range.min, - to: style.range.max - }); - color = style.color; - conditionMax = style.range.max; - }); - min = BI.parseInt(styles[0].range.min); - bands.push({ - color: "#808080", - from: 0, - to: min - }); - - bands.push({ - color: color, - from: conditionMax, - to: maxScale - }); - - return bands; - - } - } - - function _calculateValueNiceDomain (minValue, maxValue) { - minValue = Math.min(0, minValue); - var tickInterval = _linearTickInterval(minValue, maxValue); - - return _linearNiceDomain(minValue, maxValue, tickInterval); - } - - function _linearTickInterval (minValue, maxValue, m) { - m = m || 5; - var span = maxValue - minValue; - var step = Math.pow(10, Math.floor(Math.log(span / m) / Math.LN10)); - var err = m / span * step; - if (err <= .15) step *= 10; else if (err <= .35) step *= 5; else if (err <= .75) step *= 2; - - return step; - } - - function _linearNiceDomain (minValue, maxValue, tickInterval) { - minValue = VanUtils.accMul(Math.floor(minValue / tickInterval), tickInterval); - maxValue = VanUtils.accMul(Math.ceil(maxValue / tickInterval), tickInterval); - - return [minValue, maxValue]; - } - }, - - _formatItems: function (items) { - if (items.length === 0) { - return []; - } - var c = this.constants; - if (this.config.chartDashboardType === c.NORMAL || this.config.chartDashboardType === c.HALF_DASHBOARD) { - var result = []; - if (this.config.numberOfPointer === c.ONE_POINTER && items[0].length === 1) {// 单个系列 - BI.each(items[0][0].data, function (idx, da) { - result.push({ - data: [BI.extend({}, da, { - x: items[0][0].name - })], - name: da.x - }); - }); - return [result]; - } else if(this.config.numberOfPointer === c.ONE_POINTER && items[0].length > 1) { - BI.each(items[0], function (idx, item) { - result.push({ - data: [BI.extend(item.data[0], { - x: item.name - })], - name: BI.UUID() - }); - }); - return [result]; - } - if (this.config.numberOfPointer === c.MULTI_POINTER && items[0].length > 1) {// 多个系列 - BI.each(items, function (idx, item) { - BI.each(item, function (id, it) { - var data = it.data[0]; - data.x = it.name; - result.push(data); - }); - }); - return [[{ - data: result, - name: "" - }]]; - } - } else { - var others = []; - if (BI.isNotNull(items[0][0].data[0].z)) { - BI.each(items[0], function (idx, item) { - BI.each(item.data, function (id, da) { - others.push({ - data: [BI.extend({}, da, { - x: item.name, - y: da.y - })], - name: da.x - }); - }); - }); - return [others]; - } - } - return items; - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants, o = this.options; - this.config = { - dashboardNumberLevel: options.dashboardNumberLevel || c.NORMAL, - dashboardUnit: options.dashboardUnit || "", - chartDashboardType: options.chartDashboardType || c.NORMAL, - numberOfPointer: options.numberOfPointer || c.ONE_POINTER, - bandsStyles: options.bandsStyles || [], - autoCustomStyle: options.autoCustom || c.AUTO, - minScale: options.minScale, - maxScale: options.maxScale, - showPercentage: options.showPercentage || c.NOT_SHOW, - numSeparators: options.numSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE - }; - o.items = this._formatItems(items); - var types = []; - BI.each(o.items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.DASHBOARD); - }); - types.push(type); - }); - - this.combineChart.populate(o.items, types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.DashboardChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.dashboard_chart", BI.DashboardChart); \ No newline at end of file diff --git a/src/addons/chart/chart/chart.donut.js b/src/addons/chart/chart/chart.donut.js deleted file mode 100644 index 966a3866d..000000000 --- a/src/addons/chart/chart/chart.donut.js +++ /dev/null @@ -1,103 +0,0 @@ -/** - * 图表控件 - * @class BI.DonutChart - * @extends BI.Widget - */ -BI.DonutChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.DonutChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-donut-chart" - }); - }, - - _init: function () { - BI.DonutChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.DonutChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this; - delete config.zoom; - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - - this.formatChartLegend(config, this.config.chartLegend); - - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - - config.plotOptions.innerRadius = "50.0%"; - config.chartType = "pie"; - config.plotOptions.dataLabels.align = "outside"; - config.plotOptions.dataLabels.connectorWidth = "outside"; - config.plotOptions.dataLabels.style = this.config.chartFont; - config.plotOptions.dataLabels.formatter.identifier = "${VALUE}${PERCENT}"; - delete config.xAxis; - delete config.yAxis; - BI.each(items, function (idx, item) { - BI.each(item.data, function (id, da) { - da.y = self.formatXYDataWithMagnify(da.y, 1); - }); - }); - - config.legend.style = this.config.chartFont; - return [items, config]; - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - chartColor: options.chartColor || [], - chartStyle: options.chartStyle || c.NORMAL, - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - chartFont: options.chartFont || c.FONT_STYLE - }; - this.options.items = items; - - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.DONUT); - }); - types.push(type); - }); - - this.combineChart.populate(items, types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.DonutChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.donut_chart", BI.DonutChart); \ No newline at end of file diff --git a/src/addons/chart/chart/chart.fallaxis.js b/src/addons/chart/chart/chart.fallaxis.js deleted file mode 100644 index df940d146..000000000 --- a/src/addons/chart/chart/chart.fallaxis.js +++ /dev/null @@ -1,310 +0,0 @@ -/** - * 图表控件 - * @class BI.FallAxisChart - * @extends BI.Widget - */ -BI.FallAxisChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.FallAxisChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-fall-axis-chart" - }); - }, - - _init: function () { - BI.FallAxisChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.xAxis = [{ - type: "category", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - position: "bottom", - gridLineWidth: 0 - }]; - this.yAxis = [{ - type: "value", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - position: "left", - gridLineWidth: 0 - }]; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - xAxis: this.xAxis, - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.FallAxisChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this, o = this.options; - var yTitle = getXYAxisUnit(this.config.leftYAxisNumberLevel, this.constants.LEFT_AXIS); - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - formatCordon(); - config.legend.enabled = false; - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.dataSheet.enabled = this.config.showDataTable; - if(config.dataSheet.enabled === true) { - config.xAxis[0].showLabel = false; - } - config.zoom.zoomTool.enabled = this.config.showZoom; - if(this.config.showZoom === true) { - delete config.dataSheet; - delete config.zoom.zoomType; - } - - config.yAxis = this.yAxis; - BI.extend(config.yAxis[0], { - lineWidth: this.config.lineWidth, - showLabel: this.config.showLabel, - enableTick: this.config.enableTick, - enableMinorTick: this.config.enableMinorTick, - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(this.config.leftYAxisStyle, this.config.leftYAxisNumberLevel, this.config.numSeparators) - }); - formatNumberLevelInYaxis(this.config.leftYAxisNumberLevel, this.constants.LEFT_AXIS, config.yAxis[0].formatter); - config.yAxis[0].title.rotation = this.constants.ROTATION; - config.yAxis[0].title.text = this.config.showLeftYAxisTitle === true ? this.config.leftYAxisTitle + yTitle : yTitle; - - config.xAxis[0].title.align = "center"; - config.xAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle : ""; - BI.extend(config.xAxis[0], { - lineWidth: this.config.lineWidth, - enableTick: this.config.enableTick, - enableMinorTick: this.config.enableMinorTick, - labelRotation: this.config.textDirection, - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - maxHeight: "40%" - }); - - // 为了给数据标签加个%,还要遍历所有的系列,唉 - if(config.plotOptions.dataLabels.enabled === true) { - BI.each(items, function (idx, item) { - if(idx === 0) { - item.dataLabels = {}; - return; - } - item.dataLabels = { - style: self.config.chartFont, - align: "outside", - autoAdjust: true, - enabled: true, - formatter: { - identifier: "${VALUE}", - valueFormat: config.yAxis[0].formatter - } - }; - }); - } - - // 全局样式的图表文字 - this.setFontStyle(this.config.chartFont, config); - - return [items, config]; - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function formatCordon () { - BI.each(self.config.cordon, function (idx, cor) { - if(idx === 0 && self.xAxis.length > 0) { - var magnify = self.calcMagnify(self.config.xAxisNumberLevel); - self.xAxis[0].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "top" - } - }); - }); - } - if(idx > 0 && self.yAxis.length >= idx) { - var magnify = 1; - switch (idx - 1) { - case self.constants.LEFT_AXIS: - magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS: - magnify = self.calcMagnify(self.config.rightYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS_SECOND: - magnify = self.calcMagnify(self.config.rightYAxisSecondNumberLevel); - break; - } - self.yAxis[idx - 1].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "left" - } - }); - }); - } - }); - } - - function formatNumberLevelInYaxis (type, position, formatter) { - var magnify = self.calcMagnify(type); - BI.each(items, function (idx, item) { - BI.each(item.data, function (id, da) { - if (position === item.yAxis) { - da.y = self.formatXYDataWithMagnify(da.y, magnify); - } - }); - }); - config.plotOptions.tooltip.formatter.valueFormat = formatter; - } - - function getXYAxisUnit (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - if(position === self.constants.X_AXIS) { - self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit); - } - if(position === self.constants.LEFT_AXIS) { - self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit); - } - if(position === self.constants.RIGHT_AXIS) { - self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit); - } - return unit === "" ? unit : "(" + unit + ")"; - } - }, - - _formatItems: function (items) { - var o = this.options; - if(BI.isEmptyArray(items)) { - return []; - } - items = items[0]; - var tables = [], sum = 0; - var colors = this.config.chartColor || []; - if(BI.isEmptyArray(colors)) { - colors = ["rgb(152, 118, 170)", "rgb(0, 157, 227)"]; - } - BI.each(items, function (idx, item) { - BI.each(item.data, function (i, t) { - if(t.y < 0) { - tables.push([t.x, t.y, sum + t.y, t]); - }else{ - tables.push([t.x, t.y, sum, t]); - } - sum += t.y; - }); - }); - - return [BI.map(BI.makeArray(2, null), function (idx, item) { - return { - data: BI.map(tables, function (id, cell) { - var axis = BI.extend({}, cell[3], { - x: cell[0], - y: Math.abs(cell[2 - idx]) - }); - if(idx === 1) { - axis.color = cell[2 - idx] < 0 ? colors[1] : colors[0]; - }else{ - axis.color = "rgba(0,0,0,0)"; - axis.borderColor = "rgba(0,0,0,0)"; - axis.borderWidth = 0; - axis.clickColor = "rgba(0,0,0,0)"; - axis.mouseOverColor = "rgba(0,0,0,0)"; - axis.tooltip = { - enable: false - }; - } - return axis; - }), - stack: "stackedFall", - name: idx === 1 ? items[0].name : BI.UUID() - }; - })]; - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - leftYAxisTitle: options.leftYAxisTitle || "", - chartColor: options.chartColor || ["#5caae4", "#70cc7f", "#ebbb67", "#e97e7b", "#6ed3c9"], - chartStyle: options.chartStyle || c.NORMAL, - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - showXAxisTitle: options.showXAxisTitle || false, - showLeftYAxisTitle: options.showLeftYAxisTitle || false, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - xAxisUnit: options.xAxisUnit || "", - leftYAxisUnit: options.leftYAxisUnit || "", - xAxisTitle: options.xAxisTitle || "", - showDataLabel: options.showDataLabel || false, - showDataTable: options.showDataTable || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - showZoom: options.showZoom || false, - textDirection: options.textDirection || 0, - cordon: options.cordon || [], - lineWidth: BI.isNull(options.lineWidth) ? 1 : options.lineWidth, - showLabel: BI.isNull(options.showLabel) ? true : options.showLabel, - enableTick: BI.isNull(options.enableTick) ? true : options.enableTick, - enableMinorTick: BI.isNull(options.enableMinorTick) ? true : options.enableMinorTick, - numSeparators: options.numSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE - }; - this.options.items = items; - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.AXIS); - }); - types.push(type); - }); - - this.combineChart.populate(this._formatItems(items), types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.FallAxisChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.fall_axis_chart", BI.FallAxisChart); \ No newline at end of file diff --git a/src/addons/chart/chart/chart.forcebubble.js b/src/addons/chart/chart/chart.forcebubble.js deleted file mode 100644 index d23696f64..000000000 --- a/src/addons/chart/chart/chart.forcebubble.js +++ /dev/null @@ -1,87 +0,0 @@ -/** - * 图表控件 - * @class BI.ForceBubbleChart - * @extends BI.Widget - */ -BI.ForceBubbleChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.ForceBubbleChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-force-bubble-chart" - }); - }, - - _init: function () { - BI.ForceBubbleChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.ForceBubbleChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this, o = this.options; - config.chartType = "forceBubble"; - config.colors = this.config.chartColor; - this.formatChartLegend(config, this.config.chartLegend); - - config.plotOptions.force = true; - config.plotOptions.shadow = this.config.bubbleStyle !== this.constants.NO_PROJECT; - config.plotOptions.dataLabels.enabled = true; - config.plotOptions.dataLabels.align = "inside"; - config.plotOptions.dataLabels.style = this.config.chartFont; - config.plotOptions.dataLabels.formatter.identifier = "${CATEGORY}${VALUE}"; - delete config.xAxis; - delete config.yAxis; - delete config.zoom; - BI.each(items, function (idx, item) { - BI.each(item.data, function (id, da) { - da.y = self.formatXYDataWithMagnify(da.y, 1); - }); - }); - config.legend.style = this.config.chartFont; - return [items, config]; - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - chartColor: options.chartColor || [], - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - bubbleStyle: options.bubbleStyle || c.NO_PROJECT, - chartFont: options.chartFont || c.FONT_STYLE - }; - this.options.items = items; - - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.FORCE_BUBBLE); - }); - types.push(type); - }); - - this.combineChart.populate(items, types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.ForceBubbleChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.force_bubble_chart", BI.ForceBubbleChart); \ No newline at end of file diff --git a/src/addons/chart/chart/chart.gismap.js b/src/addons/chart/chart/chart.gismap.js deleted file mode 100644 index b217b0491..000000000 --- a/src/addons/chart/chart/chart.gismap.js +++ /dev/null @@ -1,160 +0,0 @@ -/** - * 图表控件 - * @class BI.GISMapChart - * @extends BI.Widget - */ -BI.GISMapChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.GISMapChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-gis-map-chart" - }); - }, - - _init: function () { - BI.GISMapChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.GISMapChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - delete config.dataSheet; - delete config.legend; - delete config.zoom; - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.plotOptions.dataLabels.useHtml = true; - config.plotOptions.dataLabels.style = this.config.chartFont; - config.plotOptions.dataLabels.formatter = function () { - var name = (BI.isArray(this.name) ? "" : this.name + ",") + BI.contentFormat(this.value, "#.##;-#.##"); - var style = "padding: 5px; background-color: rgba(0,0,0,0.4980392156862745);border-color: rgb(0,0,0); border-radius:2px; border-width:0px;"; - var a = "
" + name + "
"; - return a; - }; - config.plotOptions.tooltip.shared = true; - config.plotOptions.tooltip.formatter = function () { - var tip = BI.isArray(this.name) ? "" : this.name; - BI.each(this.points, function (idx, point) { - tip += ("
" + point.seriesName + ":" + BI.contentFormat((point.size || point.y), "#.##;-#.##") + "
"); - }); - return tip; - }; - config.geo = { - tileLayer: "http://webrd01.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}", - attribution: "© 2016 AutoNavi" - }; - if (this.config.showBackgroundLayer === true && BI.isNotNull(this.config.backgroundLayerInfo)) { - config.geo = {}; - if (this.config.backgroundLayerInfo.type === BICst.WMS_SERVER) { - config.geo.tileLayer = false; - config.geo.wmsUrl = this.config.backgroundLayerInfo.url; - config.geo.wmsLayer = this.config.backgroundLayerInfo.wmsLayer; - } else { - config.geo.tileLayer = this.config.backgroundLayerInfo.url; - } - } - config.chartType = "pointMap"; - config.plotOptions.icon = { - iconUrl: BICst.GIS_ICON_PATH, - iconSize: [24, 24] - }; - - config.plotOptions.marker = { - symbol: BICst.GIS_ICON_PATH, - width: 24, - height: 24, - enable: true - }; - delete config.xAxis; - delete config.yAxis; - return [items, config]; - - }, - - _checkLngLatValid: function (lnglat) { - if (lnglat.length < 2) { - return false; - } - return lnglat[0] <= 180 && lnglat[0] >= -180 && lnglat[1] <= 90 && lnglat[1] >= -90; - }, - - _formatItems: function (items) { - var self = this; - var results = []; - BI.each(items, function (idx, item) { - var result = []; - BI.each(item, function (id, it) { - var res = []; - BI.each(it.data, function (i, da) { - da.y = self.formatXYDataWithMagnify(da.y, 1); - var lnglat = da.x.split(","); - if (self.config.lnglat === self.constants.LAT_FIRST) { - var lng = lnglat[1]; - lnglat[1] = lnglat[0]; - lnglat[0] = lng; - } - da.lnglat = lnglat; - da.value = da.y; - da.name = BI.isNotNull(da.z) ? da.z : da.lnglat; - if (self._checkLngLatValid(da.lnglat)) { - res.push(da); - } - }); - if (BI.isNotEmptyArray(res)) { - result.push(BI.extend(it, { - data: res - })); - } - }); - if (BI.isNotEmptyArray(result)) { - results.push(result); - } - }); - return results; - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - lnglat: options.lnglat || c.LNG_FIRST, - chartFont: options.chartFont || c.FONT_STYLE, - showBackgroundLayer: options.showBackgroundLayer || false, - backgroundLayerInfo: options.backgroundLayerInfo - }; - this.options.items = items; - - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function () { - type.push(BICst.WIDGET.GIS_MAP); - }); - types.push(type); - }); - - this.combineChart.populate(this._formatItems(items), types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.GISMapChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.gis_map_chart", BI.GISMapChart); \ No newline at end of file diff --git a/src/addons/chart/chart/chart.line.js b/src/addons/chart/chart/chart.line.js deleted file mode 100644 index aa42fe34a..000000000 --- a/src/addons/chart/chart/chart.line.js +++ /dev/null @@ -1,297 +0,0 @@ -/** - * 图表控件 - * @class BI.LineChart - * @extends BI.Widget - */ -BI.LineChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.LineChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-line-chart" - }); - }, - - _init: function () { - BI.LineChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.xAxis = [{ - type: "category", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - position: "bottom", - gridLineWidth: 0 - }]; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - xAxis: this.xAxis, - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.LineChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this, o = this.options; - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - formatChartLineStyle(); - formatCordon(); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.plotOptions.connectNulls = this.config.nullContinue; - config.dataSheet.enabled = this.config.showDataTable; - config.xAxis[0].showLabel = !config.dataSheet.enabled; - config.zoom.zoomTool.enabled = this.config.showZoom; - if (this.config.showZoom === true) { - delete config.dataSheet; - delete config.zoom.zoomType; - } - - config.yAxis = this.yAxis; - BI.each(config.yAxis, function (idx, axis) { - var title = ""; - switch (axis.axisIndex) { - case self.constants.LEFT_AXIS: - axis.title.rotation = self.constants.ROTATION; - title = getXYAxisUnit(self.config.leftYAxisNumberLevel, self.constants.LEFT_AXIS); - axis.title.text = self.config.showLeftYAxisTitle === true ? self.config.leftYAxisTitle + title : title; - BI.extend(axis, { - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - reversed: self.config.leftYAxisReversed, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: self.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(self.config.leftYAxisStyle, self.config.leftYAxisNumberLevel, self.config.numSeparators) - }); - self.formatNumberLevelInYaxis(config, items, self.config.leftYAxisNumberLevel, idx, axis.formatter); - break; - case self.constants.RIGHT_AXIS: - title = getXYAxisUnit(self.config.rightYAxisNumberLevel, self.constants.RIGHT_AXIS); - axis.title.text = self.config.showRightYAxisTitle === true ? self.config.rightYAxisTitle + title : title; - axis.title.rotation = self.constants.ROTATION; - BI.extend(axis, { - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - reversed: self.config.rightYAxisReversed, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: self.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(self.config.rightYAxisStyle, self.config.rightYAxisNumberLevel, self.config.rightNumSeparators) - }); - self.formatNumberLevelInYaxis(config, items, self.config.rightYAxisNumberLevel, idx, axis.formatter); - break; - } - }); - - config.xAxis[0].title.align = "center"; - config.xAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle : ""; - BI.extend(config.xAxis[0], { - lineWidth: this.config.lineWidth, - enableTick: this.config.enableTick, - labelRotation: this.config.textDirection, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - maxHeight: "40%" - }); - - config.chartType = "line"; - - // 为了给数据标签加个%,还要遍历所有的系列,唉 - this.formatDataLabel(config.plotOptions.dataLabels.enabled, items, config, this.config.chartFont); - - // 全局样式的图表文字 - this.setFontStyle(this.config.chartFont, config); - - return [items, config]; - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function formatCordon () { - BI.each(self.config.cordon, function (idx, cor) { - if (idx === 0 && self.xAxis.length > 0) { - var magnify = self.calcMagnify(self.config.xAxisNumberLevel); - self.xAxis[0].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "top" - } - }); - }); - } - if (idx > 0 && self.yAxis.length >= idx) { - var magnify = 1; - switch (idx - 1) { - case self.constants.LEFT_AXIS: - magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS: - magnify = self.calcMagnify(self.config.rightYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS_SECOND: - magnify = self.calcMagnify(self.config.rightYAxisSecondNumberLevel); - break; - } - self.yAxis[idx - 1].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "left" - } - }); - }); - } - }); - } - - function formatChartLineStyle () { - switch (self.config.chartLineType) { - case BICst.CHART_SHAPE.RIGHT_ANGLE: - config.plotOptions.curve = false; - config.plotOptions.step = true; - break; - case BICst.CHART_SHAPE.CURVE: - config.plotOptions.curve = true; - config.plotOptions.step = false; - break; - case BICst.CHART_SHAPE.NORMAL: - default: - config.plotOptions.curve = false; - config.plotOptions.step = false; - break; - } - } - - function getXYAxisUnit (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - if (position === self.constants.X_AXIS) { - self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit); - } - if (position === self.constants.LEFT_AXIS) { - self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit); - } - if (position === self.constants.RIGHT_AXIS) { - self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit); - } - return unit === "" ? unit : "(" + unit + ")"; - } - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - leftYAxisTitle: options.leftYAxisTitle || "", - rightYAxisTitle: options.rightYAxisTitle || "", - chartLineType: options.chartLineType || c.NORMAL, - chartColor: options.chartColor || [], - chartStyle: options.chartStyle || c.NORMAL, - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - rightYAxisStyle: options.rightYAxisStyle || c.NORMAL, - showXAxisTitle: options.showXAxisTitle || false, - showLeftYAxisTitle: options.showLeftYAxisTitle || false, - showRightYAxisTitle: options.showRightYAxisTitle || false, - leftYAxisReversed: options.leftYAxisReversed || false, - rightYAxisReversed: options.rightYAxisReversed || false, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - rightYAxisNumberLevel: options.rightYAxisNumberLevel || c.NORMAL, - xAxisUnit: options.xAxisUnit || "", - leftYAxisUnit: options.leftYAxisUnit || "", - rightYAxisUnit: options.rightYAxisUnit || "", - xAxisTitle: options.xAxisTitle || "", - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showDataTable: options.showDataTable || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - showZoom: options.showZoom || false, - textDirection: options.textDirection || 0, - cordon: options.cordon || [], - lineWidth: BI.isNull(options.lineWidth) ? 1 : options.lineWidth, - showLabel: BI.isNull(options.showLabel) ? true : options.showLabel, - enableTick: BI.isNull(options.enableTick) ? true : options.enableTick, - enableMinorTick: BI.isNull(options.enableMinorTick) ? true : options.enableMinorTick, - numSeparators: options.numSeparators || false, - rightNumSeparators: options.rightNumSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE, - nullContinue: options.nullContinue || false - }; - this.options.items = items; - - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.LINE); - }); - types.push(type); - }); - - this.yAxis = []; - BI.each(types, function (idx, type) { - if (BI.isEmptyArray(type)) { - return; - } - var newYAxis = { - type: "value", - title: { - style: self.constants.FONT_STYLE - }, - labelStyle: self.constants.FONT_STYLE, - position: idx > 0 ? "right" : "left", - lineWidth: 1, - axisIndex: idx, - gridLineWidth: 0 - }; - self.yAxis.push(newYAxis); - }); - - this.combineChart.populate(items, types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.LineChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.line_chart", BI.LineChart); \ No newline at end of file diff --git a/src/addons/chart/chart/chart.map.js b/src/addons/chart/chart/chart.map.js deleted file mode 100644 index 90c79515f..000000000 --- a/src/addons/chart/chart/chart.map.js +++ /dev/null @@ -1,361 +0,0 @@ -/** - * 图表控件 - * @class BI.MapChart - * @extends BI.Widget - */ -BI.MapChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.MapChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-map-chart" - }); - }, - - _init: function () { - BI.MapChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.MapChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this, c = this.constants; - formatRangeLegend(); - delete config.legend; - delete config.zoom; - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.plotOptions.tooltip.shared = true; - var formatterArray = []; - BI.each(items, function (idx, item) { - if (BI.has(item, "settings")) { - formatterArray.push(formatToolTipAndDataLabel(item.settings.format || c.NORMAL, item.settings.num_level || c.NORMAL, - item.settings.unit || "", item.settings.numSeparators || c.NUM_SEPARATORS)); - } - }); - config.plotOptions.tooltip.formatter = function () { - var tip = this.name; - var point = this.points[0]; - var index = BI.isNull(point.size) ? 0 : 1; - tip += ("
" + point.seriesName + ":" + BI.contentFormat(point.size || point.y, formatterArray[index]) + "
"); - return tip; - }; - config.plotOptions.dataLabels.formatter.valueFormat = function () { - return BI.contentFormat(arguments[0], formatterArray[0]); - }; - config.plotOptions.dataLabels.style = this.config.chartFont; - - config.plotOptions.bubble.dataLabels = config.plotOptions.dataLabels; - config.plotOptions.bubble.dataLabels.formatter.identifier = "${SIZE}"; - - config.plotOptions.bubble.tooltip = config.plotOptions.tooltip; - - config.geo = this.config.geo; - if (this.config.showBackgroundLayer === true && BI.isNotNull(this.config.backgroundLayerInfo)) { - if (this.config.backgroundLayerInfo.type === BICst.WMS_SERVER) { - config.geo.tileLayer = false; - config.geo.wmsUrl = this.config.backgroundLayerInfo.url; - config.geo.wmsLayer = this.config.backgroundLayerInfo.wmsLayer; - } else { - config.geo.tileLayer = this.config.backgroundLayerInfo.url; - } - } - if (this.config.initDrillPath.length > 1) { - config.initDrillPath = this.config.initDrillPath; - } - config.dTools.enabled = true; - config.dTools.click = function (point) { - point = point || {}; - var pointOption = point.options || {}; - self.fireEvent(BI.MapChart.EVENT_CLICK_DTOOL, pointOption); - }; - config.chartType = "areaMap"; - delete config.xAxis; - delete config.yAxis; - - var find = BI.find(items, function (idx, item) { - return BI.has(item, "type") && item.type === "areaMap"; - }); - if (BI.isNull(find)) { - items.push({ - type: "areaMap", - data: [] - }); - } - - return [items, config]; - - function formatRangeLegend () { - config.rangeLegend.enabled = true; - switch (self.config.chartLegend) { - case BICst.CHART_LEGENDS.BOTTOM: - config.rangeLegend.visible = true; - config.rangeLegend.position = "bottom"; - break; - case BICst.CHART_LEGENDS.RIGHT: - config.rangeLegend.visible = true; - config.rangeLegend.position = "right"; - break; - case BICst.CHART_LEGENDS.NOT_SHOW: - config.rangeLegend.visible = false; - break; - } - config.rangeLegend.continuous = false; - config.rangeLegend.range = getRangeStyle(self.config.mapStyles, self.config.autoCustom, self.config.themeColor); - config.rangeLegend.formatter = function () { - var to = this.to; - if (BI.isNotEmptyArray(items) && BI.has(items[0], "settings")) { - var settings = items[0].settings; - var legendFormat = formatToolTipAndDataLabel(settings.format || c.NORMAL, settings.num_level || c.NORMAL, - settings.unit || "", settings.numSeparators || c.NUM_SEPARATORS); - to = BI.contentFormat(to, legendFormat); - } - return to; - }; - } - - function formatToolTipAndDataLabel (format, numberLevel, unit, numSeparators) { - var formatter = "#.##"; - switch (format) { - case self.constants.NORMAL: - formatter = "#.##"; - if (numSeparators) formatter = "#,###.##"; - break; - case self.constants.ZERO2POINT: - formatter = "#0"; - if (numSeparators) formatter = "#,###"; - break; - case self.constants.ONE2POINT: - formatter = "#0.0"; - if (numSeparators) formatter = "#,###.0"; - break; - case self.constants.TWO2POINT: - formatter = "#0.00"; - if (numSeparators) formatter = "#,###.00"; - break; - } - - switch (numberLevel) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - formatter += ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - formatter += BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - formatter += BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - formatter += BI.i18nText("BI-Yi"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.PERCENT: - formatter += "%"; - break; - } - - return formatter + unit; - } - - function getRangeStyle (styles, change, defaultColor) { - var range = [], color = null, defaultStyle = {}; - var conditionMax = null, conditionMin = null, min = null; - - BI.each(items, function (idx, item) { - BI.each(item.data, function (id, it) { - if (BI.isNull(min) || BI.parseFloat(min) > BI.parseFloat(it.y)) { - min = it.y; - } - }); - }); - - switch (change) { - case BICst.SCALE_SETTING.AUTO: - defaultStyle.color = defaultColor; - return defaultStyle; - case BICst.SCALE_SETTING.CUSTOM: - if (styles.length !== 0) { - var maxScale = _calculateValueNiceDomain(0, self.max)[1]; - BI.each(styles, function (idx, style) { - if (style.range.max) { - range.push({ - color: style.color || "rgba(255,255,255,0)", - from: style.range.min, - to: style.range.max - }); - } else { - var to = style.range.min < maxScale ? maxScale : 266396; - range.push({ - color: style.color || "rgba(255,255,255,0)", - from: style.range.min, - to: to - }); - } - color = style.color; - conditionMax = style.range.max; - }); - - conditionMin = BI.parseFloat(styles[0].range.min); - if (conditionMin !== 0) { - range.push({ - color: "#808080", - from: 0, - to: conditionMin - }); - } - - if (conditionMax && conditionMax < maxScale) { - range.push({ - color: color || "rgba(255,255,255,0)", - from: conditionMax, - to: maxScale - }); - } - return range; - } - defaultStyle.color = defaultColor; - return defaultStyle; - - } - } - - function _calculateValueNiceDomain (minValue, maxValue) { - minValue = Math.min(0, minValue); - var tickInterval = _linearTickInterval(minValue, maxValue); - - return _linearNiceDomain(minValue, maxValue, tickInterval); - } - - function _linearTickInterval (minValue, maxValue, m) { - m = m || 5; - var span = maxValue - minValue; - var step = Math.pow(10, Math.floor(Math.log(span / m) / Math.LN10)); - var err = m / span * step; - - if (err <= .15) step *= 10; else if (err <= .35) step *= 5; else if (err <= .75) step *= 2; - - return step; - } - - function _linearNiceDomain (minValue, maxValue, tickInterval) { - minValue = VanUtils.accMul(Math.floor(minValue / tickInterval), tickInterval); - maxValue = VanUtils.accMul(Math.ceil(maxValue / tickInterval), tickInterval); - - return [minValue, maxValue]; - } - }, - - _formatDrillItems: function (items) { - var self = this; - BI.each(items.series, function (idx, da) { - var hasArea = false; - BI.each(da.data, function (idx, data) { - data.y = self.formatXYDataWithMagnify(data.y, 1); - if (BI.has(da, "settings")) { - data.y = self.formatXYDataWithMagnify(data.y, self.calcMagnify(da.settings.num_level || self.constants.NORMAL)); - } - if (BI.has(da, "type") && da.type == "bubble") { - data.name = data.x; - data.size = data.y; - } else { - data.name = data.x; - data.value = data.y; - } - if (BI.has(da, "type") && da.type === "areaMap") { - hasArea = true; - } - if (BI.has(data, "drilldown")) { - self._formatDrillItems(data.drilldown); - } - }); - if (hasArea === false) { - items.series.push({ - type: "areaMap", - data: [] - }); - } - }); - }, - - _formatItems: function (items) { - var self = this; - this.max = null; - this.min = null; - BI.each(items, function (idx, item) { - BI.each(item, function (id, it) { - BI.each(it.data, function (i, da) { - da.y = self.formatXYDataWithMagnify(da.y, 1); - if (BI.has(it, "settings")) { - da.y = self.formatXYDataWithMagnify(da.y, self.calcMagnify(it.settings.num_level || self.constants.NORMAL)); - } - if ((BI.isNull(self.max) || BI.parseFloat(da.y) > BI.parseFloat(self.max)) && id === 0) { - self.max = da.y; - } - if ((BI.isNull(self.min) || BI.parseFloat(da.y) < BI.parseFloat(self.min)) && id === 0) { - self.min = da.y; - } - if (BI.has(it, "type") && it.type == "bubble") { - da.name = da.x; - da.size = da.y; - } else { - da.name = da.x; - da.value = da.y; - } - if (BI.has(da, "drilldown")) { - self._formatDrillItems(da.drilldown); - } - }); - }); - }); - return items; - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - geo: options.geo, - initDrillPath: options.initDrillPath || [], - tooltip: options.tooltip || "", - themeColor: options.themeColor || "#65bce7", - mapStyles: options.mapStyles || [], - autoCustom: options.autoCustom || c.AUTO_CUSTOM, - showBackgroundLayer: options.showBackgroundLayer || false, - backgroundLayerInfo: options.backgroundLayerInfo, - chartFont: options.chartFont || c.FONT_STYLE - }; - this.options.items = items; - - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.MAP); - }); - types.push(type); - }); - - this.combineChart.populate(this._formatItems(items), types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.MapChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.MapChart.EVENT_CLICK_DTOOL = "EVENT_CLICK_DTOOL"; -BI.shortcut("bi.map_chart", BI.MapChart); \ No newline at end of file diff --git a/src/addons/chart/chart/chart.multiaxis.js b/src/addons/chart/chart/chart.multiaxis.js deleted file mode 100644 index 33f869df3..000000000 --- a/src/addons/chart/chart/chart.multiaxis.js +++ /dev/null @@ -1,322 +0,0 @@ -/** - * 图表控件 - * @class BI.MultiAxisChart - * @extends BI.Widget - * leftYxis 左值轴属性 - * rightYxis 右值轴属性 - * xAxis 分类轴属性 - */ -BI.MultiAxisChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.MultiAxisChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-multi-axis-chart" - }); - }, - - _init: function () { - BI.MultiAxisChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.xAxis = [{ - type: "category", - title: { - style: {fontFamily: "inherit", color: "#808080", fontSize: "12px", fontWeight: ""} - }, - labelStyle: { - fontFamily: "inherit", color: "#808080", fontSize: "12px" - }, - position: "bottom", - gridLineWidth: 0 - }]; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - xAxis: this.xAxis, - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.MultiAxisChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this, o = this.options; - config.colors = this.config.chartColor; - config.style = this.formatChartStyle(); - this.formatCordon(); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.plotOptions.connectNulls = this.config.nullContinue; - config.dataSheet.enabled = this.config.showDataTable; - config.xAxis[0].showLabel = !config.dataSheet.enabled; - config.zoom.zoomTool.enabled = this.config.showZoom; - if (this.config.showZoom === true) { - delete config.dataSheet; - delete config.zoom.zoomType; - } - - config.yAxis = this.yAxis; - BI.each(config.yAxis, function (idx, axis) { - var title = ""; - switch (axis.axisIndex) { - case self.constants.LEFT_AXIS: - title = self.getXYAxisUnit(self.config.leftYAxisNumberLevel, self.constants.LEFT_AXIS); - axis.title.text = self.config.showLeftYAxisTitle === true ? self.config.leftYAxisTitle + title : title; - axis.title.rotation = self.constants.ROTATION; - BI.extend(axis, { - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - reversed: self.config.leftYAxisReversed, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: self.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(self.config.leftYAxisStyle, self.config.leftYAxisNumberLevel, self.config.numSeparators) - }); - self.formatNumberLevelInYaxis(config, items, self.config.leftYAxisNumberLevel, idx, axis.formatter); - break; - case self.constants.RIGHT_AXIS: - title = self.getXYAxisUnit(self.config.rightYAxisNumberLevel, self.constants.RIGHT_AXIS); - axis.title.text = self.config.showRightYAxisTitle === true ? self.config.rightYAxisTitle + title : title; - axis.title.rotation = self.constants.ROTATION; - BI.extend(axis, { - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - reversed: self.config.rightYAxisReversed, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: self.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(self.config.rightYAxisStyle, self.config.rightYAxisNumberLevel, self.config.rightNumSeparators) - }); - self.formatNumberLevelInYaxis(config, items, self.config.rightYAxisNumberLevel, idx, axis.formatter); - break; - case self.constants.RIGHT_AXIS_SECOND: - title = self.getXYAxisUnit(self.config.rightYAxisSecondNumberLevel, self.constants.RIGHT_AXIS_SECOND); - axis.title.text = self.config.showRightYAxisSecondTitle === true ? self.config.rightYAxisSecondTitle + title : title; - axis.title.rotation = self.constants.ROTATION; - BI.extend(axis, { - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - reversed: self.config.rightYAxisSecondReversed, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: self.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(self.config.rightYAxisSecondStyle, self.config.rightYAxisSecondNumberLevel, self.config.rightNumSeparators) - }); - self.formatNumberLevelInYaxis(config, items, self.config.rightYAxisSecondNumberLevel, idx, axis.formatter); - break; - default: - break; - } - }); - config.xAxis[0].title.align = "center"; - config.xAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle : ""; - BI.extend(config.xAxis[0], { - lineWidth: this.config.lineWidth, - enableTick: this.config.enableTick, - labelRotation: this.config.textDirection, - enableMinorTick: this.config.enableMinorTick, - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - maxHeight: "40%" - }); - - // 为了给数据标签加个%,还要遍历所有的系列,唉 - this.formatDataLabel(config.plotOptions.dataLabels.enabled, items, config, this.config.chartFont); - - // 全局样式的图表文字 - if (config.dataSheet) { - config.dataSheet.style = this.config.chartFont; - } - config.xAxis[0].title.style = config.xAxis[0].labelStyle = this.config.chartFont; - config.legend.style = this.config.chartFont; - config.plotOptions.dataLabels.style = this.config.chartFont; - BI.each(config.yAxis, function (idx, axis) { - axis.title.style = self.config.chartFont; - }); - - return [items, config]; - }, - - formatChartStyle: function () { - switch (this.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - }, - - formatCordon: function () { - var self = this; - var magnify = 1; - BI.each(this.config.cordon, function (idx, cor) { - if (idx === 0 && self.xAxis.length > 0) { - magnify = self.calcMagnify(self.config.xAxisNumberLevel); - self.xAxis[0].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: { - fontFamily: "inherit", - color: "#808080", - fontSize: "12px", - fontWeight: "" - }, - text: t.text, - align: "top" - } - }); - }); - } - if (idx > 0 && self.yAxis.length >= idx) { - magnify = 1; - switch (idx - 1) { - case self.constants.LEFT_AXIS: - magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS: - magnify = self.calcMagnify(self.config.rightYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS_SECOND: - magnify = self.calcMagnify(self.config.rightYAxisSecondNumberLevel); - break; - default: - break; - } - self.yAxis[idx - 1].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: { - fontFamily: "inherit", - color: "#808080", - fontSize: "12px", - fontWeight: "" - }, - text: t.text, - align: "left" - } - }); - }); - } - }); - }, - - getXYAxisUnit: function (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - default: - break; - } - if (position === this.constants.X_AXIS) { - this.config.xAxisUnit !== "" && (unit = unit + this.config.xAxisUnit); - } - if (position === this.constants.LEFT_AXIS) { - this.config.leftYAxisUnit !== "" && (unit = unit + this.config.leftYAxisUnit); - } - if (position === this.constants.RIGHT_AXIS) { - this.config.rightYAxisUnit !== "" && (unit = unit + this.config.rightYAxisUnit); - } - if (position === this.constants.RIGHT_AXIS_SECOND) { - this.config.rightYAxisSecondUnit !== "" && (unit = unit + this.config.rightYAxisSecondUnit); - } - return unit === "" ? unit : "(" + unit + ")"; - }, - - populate: function (items, options, types) { - var self = this, c = this.constants; - this.config = { - leftYAxisTitle: options.leftYAxisTitle || "", - rightYAxisTitle: options.rightYAxisTitle || "", - rightYAxisSecondTitle: options.rightYAxisSecondTitle || "", - chartColor: options.chartColor || ["#5caae4", "#70cc7f", "#ebbb67", "#e97e7b", "#6ed3c9"], - chartStyle: options.chartStyle || c.NORMAL, - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - rightYAxisStyle: options.rightYAxisStyle || c.NORMAL, - rightYAxisSecondStyle: options.rightYAxisSecondStyle || c.NORMAL, - showXAxisTitle: options.showXAxisTitle || false, - showLeftYAxisTitle: options.showLeftYAxisTitle || false, - showRightYAxisTitle: options.showRightYAxisTitle || false, - showRightYAxisSecondTitle: options.showRightYAxisSecondTitle || false, - leftYAxisReversed: options.leftYAxisReversed || false, - rightYAxisReversed: options.rightYAxisReversed || false, - rightYAxisSecondReversed: options.rightYAxisSecondReversed || false, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - rightYAxisNumberLevel: options.rightYAxisNumberLevel || c.NORMAL, - rightYAxisSecondNumberLevel: options.rightYAxisSecondNumberLevel || c.NORMAL, - xAxisUnit: options.xAxisUnit || "", - leftYAxisUnit: options.leftYAxisUnit || "", - rightYAxisUnit: options.rightYAxisUnit || "", - rightYAxisSecondUnit: options.rightYAxisSecondUnit || "", - xAxisTitle: options.xAxisTitle || "", - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showDataTable: options.showDataTable || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - showZoom: options.showZoom || false, - textDirection: options.textDirection || 0, - cordon: options.cordon || [], - lineWidth: BI.isNull(options.lineWidth) ? 1 : options.lineWidth, - showLabel: BI.isNull(options.showLabel) ? true : options.showLabel, - enableTick: BI.isNull(options.enableTick) ? true : options.enableTick, - enableMinorTick: BI.isNull(options.enableMinorTick) ? true : options.enableMinorTick, - numSeparators: options.numSeparators || false, - rightNumSeparators: options.rightNumSeparators || false, - rightNumSeparators: options.rightNumSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE, - nullContinue: options.nullContinue || false - }; - this.options.items = items; - - this.yAxis = []; - BI.each(types, function (idx, type) { - if (BI.isEmptyArray(type)) { - return; - } - var newYAxis = { - type: "value", - title: { - style: {fontFamily: "inherit", color: "#808080", fontSize: "12px", fontWeight: ""} - }, - labelStyle: { - fontFamily: "inherit", color: "#808080", fontSize: "12px" - }, - position: idx > 0 ? "right" : "left", - lineWidth: 1, - axisIndex: idx, - gridLineWidth: 0 - }; - self.yAxis.push(newYAxis); - }); - - this.combineChart.populate(items, types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.MultiAxisChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.multi_axis_chart", BI.MultiAxisChart); \ No newline at end of file diff --git a/src/addons/chart/chart/chart.multiaxiscombine.js b/src/addons/chart/chart/chart.multiaxiscombine.js deleted file mode 100644 index 020c4bac4..000000000 --- a/src/addons/chart/chart/chart.multiaxiscombine.js +++ /dev/null @@ -1,324 +0,0 @@ -/** - * 图表控件 - * @class BI.MultiAxisChart - * @extends BI.Widget - * leftYxis 左值轴属性 - * rightYxis 右值轴属性 - * xAxis 分类轴属性 - */ -BI.MultiAxisCombineChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.MultiAxisCombineChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-multi-axis-combine-chart" - }); - }, - - _init: function () { - BI.MultiAxisCombineChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.xAxis = [{ - type: "category", - title: { - style: {fontFamily: "inherit", color: "#808080", fontSize: "12px", fontWeight: ""} - }, - labelStyle: { - fontFamily: "inherit", color: "#808080", fontSize: "12px" - }, - position: "bottom", - gridLineWidth: 0 - }]; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - xAxis: this.xAxis, - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.MultiAxisCombineChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this, o = this.options; - config.colors = this.config.chartColor; - config.style = this.formatChartStyle(); - this.formatCordon(); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.plotOptions.connectNulls = this.config.nullContinue; - config.dataSheet.enabled = this.config.showDataTable; - config.xAxis[0].showLabel = !config.dataSheet.enabled; - config.zoom.zoomTool.enabled = this.config.showZoom; - if (this.config.showZoom === true) { - delete config.dataSheet; - delete config.zoom.zoomType; - } - - config.yAxis = this.yAxis; - BI.each(config.yAxis, function (idx, axis) { - var title = ""; - switch (axis.axisIndex) { - case self.constants.LEFT_AXIS: - title = self.getXYAxisUnit(self.config.leftYAxisNumberLevel, self.constants.LEFT_AXIS); - axis.title.text = self.config.showLeftYAxisTitle === true ? self.config.leftYAxisTitle + title : title; - axis.title.rotation = self.constants.ROTATION; - axis.labelStyle.color = axis.lineColor = axis.tickColor = config.colors[0]; - BI.extend(axis, { - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - reversed: self.config.leftYAxisReversed, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: self.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(self.config.leftYAxisStyle, self.config.leftYAxisNumberLevel, self.config.numSeparators) - }); - self.formatNumberLevelInYaxis(config, items, self.config.leftYAxisNumberLevel, idx, axis.formatter); - break; - case self.constants.RIGHT_AXIS: - title = self.getXYAxisUnit(self.config.rightYAxisNumberLevel, self.constants.RIGHT_AXIS); - axis.title.text = self.config.showRightYAxisTitle === true ? self.config.rightYAxisTitle + title : title; - axis.title.rotation = self.constants.ROTATION; - axis.labelStyle.color = axis.lineColor = axis.tickColor = config.colors[1]; - BI.extend(axis, { - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - reversed: self.config.rightYAxisReversed, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: self.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(self.config.rightYAxisStyle, self.config.rightYAxisNumberLevel, self.config.rightNumSeparators) - }); - self.formatNumberLevelInYaxis(config, items, self.config.rightYAxisNumberLevel, idx, axis.formatter); - break; - case self.constants.RIGHT_AXIS_SECOND: - title = self.getXYAxisUnit(self.config.rightYAxisSecondNumberLevel, self.constants.RIGHT_AXIS_SECOND); - axis.title.text = self.config.showRightYAxisSecondTitle === true ? self.config.rightYAxisSecondTitle + title : title; - axis.title.rotation = self.constants.ROTATION; - axis.labelStyle.color = axis.lineColor = axis.tickColor = config.colors[2]; - BI.extend(axis, { - lineWidth: self.config.lineWidth, - showLabel: self.config.showLabel, - enableTick: self.config.enableTick, - reversed: self.config.rightYAxisSecondReversed, - enableMinorTick: self.config.enableMinorTick, - gridLineWidth: self.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(self.config.rightYAxisSecondStyle, self.config.rightYAxisSecondNumberLevel, self.config.rightNumSeparators) - }); - self.formatNumberLevelInYaxis(config, items, self.config.rightYAxisSecondNumberLevel, idx, axis.formatter); - break; - default: - break; - } - }); - config.xAxis[0].title.align = "center"; - config.xAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle : ""; - BI.extend(config.xAxis[0], { - lineWidth: this.config.lineWidth, - enableTick: this.config.enableTick, - labelRotation: this.config.textDirection, - enableMinorTick: this.config.enableMinorTick, - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - maxHeight: "40%" - }); - - // 为了给数据标签加个%,还要遍历所有的系列,唉 - this.formatDataLabel(config.plotOptions.dataLabels.enabled, items, config, this.config.chartFont); - - // 全局样式的图表文字 - if (config.dataSheet) { - config.dataSheet.style = this.config.chartFont; - } - config.xAxis[0].title.style = config.xAxis[0].labelStyle = this.config.chartFont; - config.legend.style = this.config.chartFont; - config.plotOptions.dataLabels.style = this.config.chartFont; - BI.each(config.yAxis, function (idx, axis) { - axis.title.style = self.config.chartFont; - }); - - return [items, config]; - }, - - formatChartStyle: function () { - switch (this.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - }, - - formatCordon: function () { - var self = this; - var magnify = 1; - BI.each(this.config.cordon, function (idx, cor) { - if (idx === 0 && self.xAxis.length > 0) { - magnify = self.calcMagnify(self.config.xAxisNumberLevel); - self.xAxis[0].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: { - fontFamily: "inherit", - color: "#808080", - fontSize: "12px", - fontWeight: "" - }, - text: t.text, - align: "top" - } - }); - }); - } - if (idx > 0 && self.yAxis.length >= idx) { - magnify = 1; - switch (idx - 1) { - case self.constants.LEFT_AXIS: - magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS: - magnify = self.calcMagnify(self.config.rightYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS_SECOND: - magnify = self.calcMagnify(self.config.rightYAxisSecondNumberLevel); - break; - default: - break; - } - self.yAxis[idx - 1].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: { - fontFamily: "inherit", - color: "#808080", - fontSize: "12px", - fontWeight: "" - }, - text: t.text, - align: "left" - } - }); - }); - } - }); - }, - - getXYAxisUnit: function (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - default: - break; - } - if (position === this.constants.X_AXIS) { - this.config.xAxisUnit !== "" && (unit = unit + this.config.xAxisUnit); - } - if (position === this.constants.LEFT_AXIS) { - this.config.leftYAxisUnit !== "" && (unit = unit + this.config.leftYAxisUnit); - } - if (position === this.constants.RIGHT_AXIS) { - this.config.rightYAxisUnit !== "" && (unit = unit + this.config.rightYAxisUnit); - } - if (position === this.constants.RIGHT_AXIS_SECOND) { - this.config.rightYAxisSecondUnit !== "" && (unit = unit + this.config.rightYAxisSecondUnit); - } - return unit === "" ? unit : "(" + unit + ")"; - }, - - populate: function (items, options, types) { - var self = this, c = this.constants; - this.config = { - leftYAxisTitle: options.leftYAxisTitle || "", - rightYAxisTitle: options.rightYAxisTitle || "", - rightYAxisSecondTitle: options.rightYAxisSecondTitle || "", - chartColor: options.chartColor || ["#5caae4", "#70cc7f", "#ebbb67", "#e97e7b", "#6ed3c9"], - chartStyle: options.chartStyle || c.NORMAL, - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - rightYAxisStyle: options.rightYAxisStyle || c.NORMAL, - rightYAxisSecondStyle: options.rightYAxisSecondStyle || c.NORMAL, - showXAxisTitle: options.showXAxisTitle || false, - showLeftYAxisTitle: options.showLeftYAxisTitle || false, - showRightYAxisTitle: options.showRightYAxisTitle || false, - showRightYAxisSecondTitle: options.showRightYAxisSecondTitle || false, - leftYAxisReversed: options.leftYAxisReversed || false, - rightYAxisReversed: options.rightYAxisReversed || false, - rightYAxisSecondReversed: options.rightYAxisSecondReversed || false, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - rightYAxisNumberLevel: options.rightYAxisNumberLevel || c.NORMAL, - rightYAxisSecondNumberLevel: options.rightYAxisSecondNumberLevel || c.NORMAL, - xAxisUnit: options.xAxisUnit || "", - leftYAxisUnit: options.leftYAxisUnit || "", - rightYAxisUnit: options.rightYAxisUnit || "", - rightYAxisSecondUnit: options.rightYAxisSecondUnit || "", - xAxisTitle: options.xAxisTitle || "", - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showDataTable: options.showDataTable || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - showZoom: options.showZoom || false, - textDirection: options.textDirection || 0, - cordon: options.cordon || [], - lineWidth: BI.isNull(options.lineWidth) ? 1 : options.lineWidth, - showLabel: BI.isNull(options.showLabel) ? true : options.showLabel, - enableTick: BI.isNull(options.enableTick) ? true : options.enableTick, - enableMinorTick: BI.isNull(options.enableMinorTick) ? true : options.enableMinorTick, - numSeparators: options.numSeparators || false, - rightNumSeparators: options.rightNumSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE, - nullContinue: options.nullContinue || false - }; - this.options.items = items; - - this.yAxis = []; - BI.each(types, function (idx, type) { - if (BI.isEmptyArray(type)) { - return; - } - var newYAxis = { - type: "value", - title: { - style: {fontFamily: "inherit", color: "#808080", fontSize: "12px", fontWeight: ""} - }, - labelStyle: { - fontFamily: "inherit", color: "#808080", fontSize: "12px" - }, - position: idx > 0 ? "right" : "left", - lineWidth: 1, - axisIndex: idx, - gridLineWidth: 0 - }; - self.yAxis.push(newYAxis); - }); - - this.combineChart.populate(items, types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.MultiAxisCombineChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.multi_axis_combine_chart", BI.MultiAxisCombineChart); \ No newline at end of file diff --git a/src/addons/chart/chart/chart.percentaccumulatearea.js b/src/addons/chart/chart/chart.percentaccumulatearea.js deleted file mode 100644 index c4020b36c..000000000 --- a/src/addons/chart/chart/chart.percentaccumulatearea.js +++ /dev/null @@ -1,245 +0,0 @@ -/** - * 图表控件 - * @class BI.PercentAccumulateAreaChart - * @extends BI.Widget - */ -BI.PercentAccumulateAreaChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.PercentAccumulateAreaChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-percent-accumulate-area-chart" - }); - }, - - _init: function () { - BI.PercentAccumulateAreaChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.xAxis = [{ - type: "category", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - position: "bottom", - gridLineWidth: 0 - }]; - this.yAxis = [{ - type: "value", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - position: "left", - gridLineWidth: 0 - }]; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - xAxis: this.xAxis, - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.PercentAccumulateAreaChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this; - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - formatCordon(); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.plotOptions.connectNulls = this.config.nullContinue; - config.dataSheet.enabled = this.config.showDataTable; - config.xAxis[0].showLabel = !config.dataSheet.enabled; - config.zoom.zoomTool.enabled = this.config.showZoom; - if (this.config.showZoom === true) { - delete config.dataSheet; - delete config.zoom.zoomType; - } - - config.yAxis = this.yAxis; - config.yAxis[0].title.text = getXYAxisUnit(this.config.leftYAxisNumberLevel, this.constants.LEFT_AXIS); - config.yAxis[0].title.rotation = this.constants.ROTATION; - BI.extend(config.yAxis[0], { - lineWidth: this.config.lineWidth, - showLabel: this.config.showLabel, - enableTick: this.config.enableTick, - reversed: this.config.leftYAxisReversed, - enableMinorTick: this.config.enableMinorTick, - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(this.config.leftYAxisStyle, this.config.leftYAxisNumberLevel, this.config.numSeparators) - }); - self.formatNumberLevelInYaxis(config, items, this.config.leftYAxisNumberLevel, this.constants.LEFT_AXIS, config.yAxis[0].formatter, true); - - config.xAxis[0].title.align = "center"; - config.xAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle : ""; - BI.extend(config.xAxis[0], { - lineWidth: this.config.lineWidth, - enableTick: this.config.enableTick, - labelRotation: this.config.textDirection, - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - maxHeight: "40%" - }); - - config.chartType = "area"; - - // 为了给数据标签加个%,还要遍历所有的系列,唉 - this.formatDataLabelForAxis(config.plotOptions.dataLabels.enabled, items, config.yAxis[0].formatter, this.config.chartFont, true); - - // 全局样式的图表文字 - this.setFontStyle(this.config.chartFont, config); - - return [items, config]; - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function formatCordon () { - BI.each(self.config.cordon, function (idx, cor) { - if (idx === 0 && self.xAxis.length > 0) { - var magnify = self.calcMagnify(self.config.xAxisNumberLevel); - self.xAxis[0].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "top" - } - }); - }); - } - if (idx > 0 && self.yAxis.length >= idx) { - var magnify = 1; - switch (idx - 1) { - case self.constants.LEFT_AXIS: - magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS: - magnify = self.calcMagnify(self.config.rightYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS_SECOND: - magnify = self.calcMagnify(self.config.rightYAxisSecondNumberLevel); - break; - } - self.yAxis[idx - 1].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "left" - } - }); - }); - } - }); - } - - function getXYAxisUnit (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - if (position === self.constants.X_AXIS) { - self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit); - } - if (position === self.constants.LEFT_AXIS) { - self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit); - } - - unit = unit === "" ? unit : "(" + unit + ")"; - - return self.config.showLeftYAxisTitle === true ? self.config.leftYAxisTitle + unit : unit; - } - }, - - _formatItems: function (items) { - return BI.map(items, function (idx, item) { - var i = BI.UUID(); - return BI.map(item, function (id, it) { - return BI.extend({}, it, {stack: i, stackByPercent: true}); - }); - }); - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - leftYAxisTitle: options.leftYAxisTitle || "", - chartColor: options.chartColor || [], - chartStyle: options.chartStyle || c.NORMAL, - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - showXAxisTitle: options.showXAxisTitle || false, - showLeftYAxisTitle: options.showLeftYAxisTitle || false, - leftYAxisReversed: options.leftYAxisReversed || false, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - xAxisUnit: options.xAxisUnit || "", - leftYAxisUnit: options.leftYAxisUnit || "", - xAxisTitle: options.xAxisTitle || "", - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showDataTable: options.showDataTable || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - showZoom: options.showZoom || false, - textDirection: options.textDirection || 0, - cordon: options.cordon || [], - lineWidth: BI.isNull(options.lineWidth) ? 1 : options.lineWidth, - showLabel: BI.isNull(options.showLabel) ? true : options.showLabel, - enableTick: BI.isNull(options.enableTick) ? true : options.enableTick, - enableMinorTick: BI.isNull(options.enableMinorTick) ? true : options.enableMinorTick, - numSeparators: options.numSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE, - nullContinue: options.nullContinue || false - }; - this.options.items = items; - - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.AREA); - }); - types.push(type); - }); - - this.combineChart.populate(this._formatItems(items), types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.PercentAccumulateAreaChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.percent_accumulate_area_chart", BI.PercentAccumulateAreaChart); \ No newline at end of file diff --git a/src/addons/chart/chart/chart.percentaccumulateaxis.js b/src/addons/chart/chart/chart.percentaccumulateaxis.js deleted file mode 100644 index b7ced4edb..000000000 --- a/src/addons/chart/chart/chart.percentaccumulateaxis.js +++ /dev/null @@ -1,240 +0,0 @@ -/** - * 图表控件 百分比堆积柱状 - * @class BI.PercentAccumulateAxisChart - * @extends BI.Widget - */ -BI.PercentAccumulateAxisChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.PercentAccumulateAxisChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-percent-accumulate-axis-chart" - }); - }, - - _init: function () { - BI.PercentAccumulateAxisChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.xAxis = [{ - type: "category", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - position: "bottom", - gridLineWidth: 0 - }]; - this.yAxis = [{ - type: "value", - title: { - style: self.constants.FONT_STYLE - }, - labelStyle: self.constants.FONT_STYLE, - position: "left", - gridLineWidth: 0 - }]; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - xAxis: this.xAxis, - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.PercentAccumulateAxisChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this, o = this.options; - var yTitle = getXYAxisUnit(this.config.leftYAxisNumberLevel, this.constants.LEFT_AXIS); - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - formatCordon(); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.dataSheet.enabled = this.config.showDataTable; - config.xAxis[0].showLabel = !config.dataSheet.enabled; - config.zoom.zoomTool.enabled = this.config.showZoom; - if (this.config.showZoom === true) { - delete config.dataSheet; - delete config.zoom.zoomType; - } - - config.yAxis = this.yAxis; - config.yAxis[0].title.rotation = this.constants.ROTATION; - config.yAxis[0].title.text = this.config.showLeftYAxisTitle === true ? this.config.leftYAxisTitle + yTitle : yTitle; - BI.extend(config.yAxis[0], { - lineWidth: this.config.lineWidth, - showLabel: this.config.showLabel, - enableTick: this.config.enableTick, - reversed: this.config.leftYAxisReversed, - enableMinorTick: this.config.enableMinorTick, - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - formatter: self.formatTickInXYaxis(this.config.leftYAxisStyle, this.config.leftYAxisNumberLevel, this.config.numSeparators) - }); - self.formatNumberLevelInYaxis(config, items, this.config.leftYAxisNumberLevel, this.constants.LEFT_AXIS, config.yAxis[0].formatter, true); - - config.xAxis[0].title.align = "center"; - config.xAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle : ""; - BI.extend(config.xAxis[0], { - lineWidth: this.config.lineWidth, - enableTick: this.config.enableTick, - labelRotation: this.config.textDirection, - enableMinorTick: this.config.enableMinorTick, - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - maxHeight: "40%" - }); - - // 为了给数据标签加个%,还要遍历所有的系列,唉 - this.formatDataLabelForAxis(config.plotOptions.dataLabels.enabled, items, config.yAxis[0].formatter, this.config.chartFont, true); - - // 全局样式的图表文字 - this.setFontStyle(this.config.chartFont, config); - - return [items, config]; - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function formatCordon () { - BI.each(self.config.cordon, function (idx, cor) { - if (idx === 0 && self.xAxis.length > 0) { - var magnify = self.calcMagnify(self.config.xAxisNumberLevel); - self.xAxis[0].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "top" - } - }); - }); - } - if (idx > 0 && self.yAxis.length >= idx) { - var magnify = 1; - switch (idx - 1) { - case self.constants.LEFT_AXIS: - magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS: - magnify = self.calcMagnify(self.config.rightYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS_SECOND: - magnify = self.calcMagnify(self.config.rightYAxisSecondNumberLevel); - break; - } - self.yAxis[idx - 1].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "left" - } - }); - }); - } - }); - } - - function getXYAxisUnit (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - if (position === self.constants.X_AXIS) { - self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit); - } - if (position === self.constants.LEFT_AXIS) { - self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit); - } - return unit === "" ? unit : "(" + unit + ")"; - } - }, - - _formatItems: function (items) { - return BI.map(items, function (idx, item) { - var i = BI.UUID(); - return BI.map(item, function (id, it) { - return BI.extend({}, it, {stack: i, stackByPercent: true}); - }); - }); - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - leftYAxisTitle: options.leftYAxisTitle || "", - chartColor: options.chartColor || [], - chartStyle: options.chartStyle || c.NORMAL, - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - showXAxisTitle: options.showXAxisTitle || false, - showLeftYAxisTitle: options.showLeftYAxisTitle || false, - leftYAxisReversed: options.leftYAxisReversed || false, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - xAxisUnit: options.xAxisUnit || "", - leftYAxisUnit: options.leftYAxisUnit || "", - xAxisTitle: options.xAxisTitle || "", - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showDataTable: options.showDataTable || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - showZoom: options.showZoom || false, - textDirection: options.textDirection || 0, - cordon: options.cordon || [], - lineWidth: BI.isNull(options.lineWidth) ? 1 : options.lineWidth, - showLabel: BI.isNull(options.showLabel) ? true : options.showLabel, - enableTick: BI.isNull(options.enableTick) ? true : options.enableTick, - enableMinorTick: BI.isNull(options.enableMinorTick) ? true : options.enableMinorTick, - numSeparators: options.numSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE - }; - this.options.items = items; - - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.AXIS); - }); - types.push(type); - }); - - this.combineChart.populate(this._formatItems(items), types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.PercentAccumulateAxisChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.percent_accumulate_axis_chart", BI.PercentAccumulateAxisChart); \ No newline at end of file diff --git a/src/addons/chart/chart/chart.pie.js b/src/addons/chart/chart/chart.pie.js deleted file mode 100644 index 7c9608af7..000000000 --- a/src/addons/chart/chart/chart.pie.js +++ /dev/null @@ -1,153 +0,0 @@ -/** - * 图表控件 - * @class BI.PieChart - * @extends BI.Widget - */ -BI.PieChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.PieChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-pie-chart" - }); - }, - - _init: function () { - BI.PieChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.PieChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this, o = this.options; - delete config.zoom; - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - formatChartPieStyle(); - - this.formatChartLegend(config, this.config.chartLegend); - - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.plotOptions.tooltip.formatter.identifier = "${CATEGORY}${SERIES}${VALUE}${PERCENT}"; - - config.chartType = "pie"; - delete config.xAxis; - delete config.yAxis; - config.plotOptions.dataLabels.align = "outside"; - config.plotOptions.dataLabels.connectorWidth = "outside"; - config.plotOptions.dataLabels.formatter.identifier = "${VALUE}${PERCENT}"; - config.plotOptions.dataLabels.style = this.config.chartFont; - BI.each(items, function (idx, item) { - BI.each(item.data, function (id, da) { - da.y = self.formatXYDataWithMagnify(da.y, 1); - }); - }); - - config.legend.style = this.config.chartFont; - - return [items, config]; - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function formatChartPieStyle () { - switch (self.config.chartPieType) { - case BICst.CHART_SHAPE.EQUAL_ARC_ROSE: - config.plotOptions.roseType = "sameArc"; - break; - case BICst.CHART_SHAPE.NOT_EQUAL_ARC_ROSE: - config.plotOptions.roseType = "differentArc"; - break; - case BICst.CHART_SHAPE.NORMAL: - default: - delete config.plotOptions.roseType; - break; - } - config.plotOptions.innerRadius = self.config.chartInnerRadius + "%"; - config.plotOptions.endAngle = self.config.chartTotalAngle; - } - - }, - - // 目前饼图不会有多个系列,如果有多个就要把它们合并在一起 - _isNeedConvert: function (items) { - var result = BI.find(items, function (idx, item) { - return item.length > 1; - }); - return BI.isNotNull(result); - }, - - _formatItems: function (items) { - if(this._isNeedConvert(items)) { - // 把每个坐标轴所有的多个系列合并成一个系列 - return BI.map(items, function (idx, item) { - var seriesItem = []; - var obj = {data: [], name: ""}; - seriesItem.push(obj); - BI.each(item, function (id, series) { - BI.each(series.data, function (i, da) { - obj.data.push(BI.extend({}, da, {x: series.name})); - }); - }); - return seriesItem; - }); - } - return items; - - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - chartColor: options.chartColor || [], - chartStyle: options.chartStyle || c.NORMAL, - chartPieType: options.chartPieType || c.NORMAL, - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - chartInnerRadius: options.chartInnerRadius || 0, - chartTotalAngle: options.chartTotalAngle || BICst.PIE_ANGLES.TOTAL, - chartFont: options.chartFont || c.FONT_STYLE - }; - this.options.items = items; - - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.PIE); - }); - types.push(type); - }); - - this.combineChart.populate(this._formatItems(items), types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.PieChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.pie_chart", BI.PieChart); - diff --git a/src/addons/chart/chart/chart.radar.js b/src/addons/chart/chart/chart.radar.js deleted file mode 100644 index b64ae5e12..000000000 --- a/src/addons/chart/chart/chart.radar.js +++ /dev/null @@ -1,185 +0,0 @@ -/** - * 图表控件 - * @class BI.RadarChart - * @extends BI.Widget - */ -BI.RadarChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.RadarChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-radar-chart" - }); - }, - - _init: function () { - BI.RadarChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.radiusAxis = [{ - type: "value", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - formatter: function () { - return this > 0 ? this : (-1) * this; - }, - gridLineWidth: 0, - position: "bottom" - }]; - - this.angleAxis = [{ - type: "category", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE - }]; - - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.RadarChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this; - - delete config.zoom; - - var title = getXYAxisUnit(this.config.leftYAxisNumberLevel, this.constants.LEFT_AXIS); - - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - formatChartRadarStyle(); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.plotOptions.connectNulls = this.config.nullContinue; - - config.radiusAxis = this.radiusAxis; - config.angleAxis = this.angleAxis; - config.radiusAxis[0].formatter = self.formatTickInXYaxis(this.config.leftYAxisStyle, this.config.leftYAxisNumberLevel, this.config.numSeparators); - formatNumberLevelInYaxis(this.config.leftYAxisNumberLevel, this.constants.LEFT_AXIS, config.radiusAxis[0].formatter); - config.radiusAxis[0].title.text = this.config.showLeftYAxisTitle === true ? this.config.leftYAxisTitle + title : title; - config.radiusAxis[0].gridLineWidth = this.config.showGridLine === true ? 1 : 0; - config.chartType = "radar"; - delete config.xAxis; - delete config.yAxis; - // 为了给数据标签加个%,还要遍历所有的系列,唉 - this.formatDataLabelForAxis(config.plotOptions.dataLabels.enabled, items, config.radiusAxis[0].formatter, this.config.chartFont); - - // 全局样式 - config.legend.style = this.config.chartFont; - config.radiusAxis[0].title.style = config.radiusAxis[0].labelStyle = this.config.chartFont; - config.angleAxis[0].title.style = config.angleAxis[0].labelStyle = this.config.chartFont; - - return [items, config]; - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function formatChartRadarStyle () { - switch (self.config.chartRadarType) { - case BICst.CHART_SHAPE.POLYGON: - config.plotOptions.shape = "polygon"; - break; - case BICst.CHART_SHAPE.CIRCLE: - config.plotOptions.shape = "circle"; - break; - } - } - - function formatNumberLevelInYaxis (type, position, formatter) { - var magnify = self.calcMagnify(type); - BI.each(items, function (idx, item) { - BI.each(item.data, function (id, da) { - if (position === item.yAxis) { - da.y = self.formatXYDataWithMagnify(da.y, magnify); - } - }); - }); - config.plotOptions.tooltip.formatter.valueFormat = formatter; - } - - function getXYAxisUnit (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - if (position === self.constants.X_AXIS) { - self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit); - } - if (position === self.constants.LEFT_AXIS) { - self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit); - } - if (position === self.constants.RIGHT_AXIS) { - self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit); - } - return unit === "" ? unit : "(" + unit + ")"; - } - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - chartRadarType: options.chartRadarType || c.POLYGON, - chartColor: options.chartColor || [], - chartStyle: options.chartStyle || c.STYLE_NORMAL, - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - cordon: options.cordon || [], - numSeparators: options.numSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE, - nullContinue: options.nullContinue || false - }; - this.options.items = items; - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.RADAR); - }); - types.push(type); - }); - this.combineChart.populate(items, types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.RadarChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.radar_chart", BI.RadarChart); \ No newline at end of file diff --git a/src/addons/chart/chart/chart.rangearea.js b/src/addons/chart/chart/chart.rangearea.js deleted file mode 100644 index d692a7455..000000000 --- a/src/addons/chart/chart/chart.rangearea.js +++ /dev/null @@ -1,284 +0,0 @@ -/** - * 图表控件 - * @class BI.RangeAreaChart - * @extends BI.Widget - * 范围面积图的构造范围的两组item的必须有对应y值item1完全大于item2 - */ -BI.RangeAreaChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.RangeAreaChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-range-area-chart" - }); - }, - - _init: function () { - BI.RangeAreaChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.xAxis = [{ - type: "category", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - position: "bottom", - gridLineWidth: 0 - }]; - this.yAxis = [{ - type: "value", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - position: "left", - gridLineWidth: 0 - }]; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - xAxis: this.xAxis, - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.RangeAreaChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - _formatConfig: function (config, items) { - var self = this; - var title = getXYAxisUnit(this.config.leftYAxisNumberLevel, this.constants.LEFT_AXIS); - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - formatCordon(); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.plotOptions.connectNulls = this.config.nullContinue; - - config.yAxis = this.yAxis; - config.yAxis[0].title.rotation = this.constants.ROTATION; - config.yAxis[0].title.text = this.config.showLeftYAxisTitle === true ? this.config.leftYAxisTitle + title : title; - BI.extend(config.yAxis[0], { - lineWidth: this.config.lineWidth, - showLabel: this.config.showLabel, - enableTick: this.config.enableTick, - enableMinorTick: this.config.enableMinorTick, - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - reversed: config.yAxis[0].reversed = this.config.leftYAxisReversed, - formatter: self.formatTickInXYaxis(this.config.leftYAxisStyle, this.config.leftYAxisNumberLevel, this.config.numSeparators) - }); - formatNumberLevelInYaxis(this.config.leftYAxisNumberLevel, this.constants.LEFT_AXIS, config.yAxis[0].formatter); - - config.xAxis[0].title.align = "center"; - config.xAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle : ""; - BI.extend(config.xAxis[0], { - lineWidth: this.config.lineWidth, - enableTick: this.config.enableTick, - labelRotation: this.config.textDirection, - gridLineWidth: this.config.showGridLine === true ? 1 : 0, - maxHeight: "40%" - }); - - config.chartType = "area"; - config.plotOptions.tooltip.formatter.identifier = "${CATEGORY}${VALUE}"; - - // 为了给数据标签加个%,还要遍历所有的系列,唉 - this.formatDataLabelForAxis(config.plotOptions.dataLabels.enabled, items, config.yAxis[0].formatter, this.config.chartFont); - - // 全局样式的图表文字 - this.setFontStyle(this.config.chartFont, config); - - return [items, config]; - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function formatCordon () { - BI.each(self.config.cordon, function (idx, cor) { - if (idx === 0 && self.xAxis.length > 0) { - var magnify = self.calcMagnify(self.config.xAxisNumberLevel); - self.xAxis[0].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "top" - } - }); - }); - } - if (idx > 0 && self.yAxis.length >= idx) { - var magnify = 1; - switch (idx - 1) { - case self.constants.LEFT_AXIS: - magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS: - magnify = self.calcMagnify(self.config.rightYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS_SECOND: - magnify = self.calcMagnify(self.config.rightYAxisSecondNumberLevel); - break; - } - self.yAxis[idx - 1].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "left" - } - }); - }); - } - }); - } - - function formatNumberLevelInYaxis (type, position, formatter) { - var magnify = self.calcMagnify(type); - BI.each(items, function (idx, item) { - BI.each(item.data, function (id, da) { - if (position === item.yAxis) { - da.y = self.formatXYDataWithMagnify(da.y, magnify); - } - }); - }); - config.plotOptions.tooltip.formatter.valueFormat = formatter; - } - - function getXYAxisUnit (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - if (position === self.constants.X_AXIS) { - self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit); - } - if (position === self.constants.LEFT_AXIS) { - self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit); - } - return unit === "" ? unit : "(" + unit + ")"; - } - }, - - _formatItems: function (data) { - var o = this.options; - var items = []; - BI.each(data, function (idx, item) { - items = BI.concat(items, item); - }); - if (BI.isEmptyArray(items)) { - return []; - } - if (items.length === 1) { - return [items]; - } - var colors = this.config.chartColor || []; - if (BI.isEmptyArray(colors)) { - colors = ["#5caae4"]; - } - var seriesMinus = []; - BI.each(items[0].data, function (idx, item) { - var res = items[1].data[idx].y - item.y; - seriesMinus.push({ - x: items[1].data[idx].x, - y: res, - targetIds: items[1].data[idx].targetIds - }); - }); - items[1] = { - data: seriesMinus, - name: items[1].name, - stack: "stackedArea", - fillColor: colors[0] - }; - BI.each(items, function (idx, item) { - if (idx === 0) { - BI.extend(item, { - name: items[0].name, - fillColorOpacity: 0, - stack: "stackedArea", - marker: {enabled: false}, - fillColor: "#000000" - }); - } - }); - return [items]; - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - leftYAxisTitle: options.leftYAxisTitle || "", - chartColor: options.chartColor || [], - chartStyle: options.chartStyle || c.NORMAL, - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - showXAxisTitle: options.showXAxisTitle || false, - showLeftYAxisTitle: options.showLeftYAxisTitle || false, - leftYAxisReversed: options.leftYAxisReversed || false, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - xAxisUnit: options.xAxisUnit || "", - leftYAxisUnit: options.leftYAxisUnit || "", - xAxisTitle: options.xAxisTitle || "", - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - textDirection: options.textDirection || 0, - cordon: options.cordon || [], - lineWidth: BI.isNull(options.lineWidth) ? 1 : options.lineWidth, - showLabel: BI.isNull(options.showLabel) ? true : options.showLabel, - enableTick: BI.isNull(options.enableTick) ? true : options.enableTick, - enableMinorTick: BI.isNull(options.enableMinorTick) ? true : options.enableMinorTick, - numSeparators: options.numSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE, - nullContinue: options.nullContinue || false - }; - this.options.items = items; - - var types = []; - var type = []; - BI.each(items, function (idx, axisItems) { - type.push(BICst.WIDGET.AREA); - }); - if (BI.isNotEmptyArray(type)) { - types.push(type); - } - - this.combineChart.populate(this._formatItems(items), types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.RangeAreaChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.range_area_chart", BI.RangeAreaChart); \ No newline at end of file diff --git a/src/addons/chart/chart/chart.scatter.js b/src/addons/chart/chart/chart.scatter.js deleted file mode 100644 index 9fabe6808..000000000 --- a/src/addons/chart/chart/chart.scatter.js +++ /dev/null @@ -1,266 +0,0 @@ -/** - * 图表控件 - * @class BI.ScatterChart - * @extends BI.Widget - */ -BI.ScatterChart = BI.inherit(BI.AbstractChart, { - - _defaultConfig: function () { - return BI.extend(BI.ScatterChart.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-scatter-chart" - }); - }, - - _init: function () { - BI.ScatterChart.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.xAxis = [{ - type: "value", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - position: "bottom", - gridLineWidth: 0 - }]; - this.yAxis = [{ - type: "value", - title: { - style: this.constants.FONT_STYLE - }, - labelStyle: this.constants.FONT_STYLE, - position: "left", - gridLineWidth: 0 - }]; - this.combineChart = BI.createWidget({ - type: "bi.combine_chart", - xAxis: this.xAxis, - popupItemsGetter: o.popupItemsGetter, - formatConfig: BI.bind(this._formatConfig, this), - element: this.element - }); - this.combineChart.on(BI.CombineChart.EVENT_CHANGE, function (obj) { - self.fireEvent(BI.ScatterChart.EVENT_CHANGE, obj); - }); - this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) { - self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj); - }); - }, - - - _formatConfig: function (config, items) { - var self = this; - delete config.zoom; - config.colors = this.config.chartColor; - config.style = formatChartStyle(); - config.plotOptions.marker = {symbol: "circle", radius: 4.5, enabled: true}; - formatCordon(); - this.formatChartLegend(config, this.config.chartLegend); - config.plotOptions.dataLabels.enabled = this.config.showDataLabel; - config.plotOptions.dataLabels.formatter.identifier = "${X}${Y}"; - - config.yAxis = this.yAxis; - config.xAxis = this.xAxis; - - config.yAxis[0].formatter = self.formatTickInXYaxis(this.config.leftYAxisStyle, this.config.leftYAxisNumberLevel, this.config.numSeparators); - formatNumberLevelInYaxis(this.config.leftYAxisNumberLevel); - config.yAxis[0].title.text = getXYAxisUnit(this.config.leftYAxisNumberLevel, this.constants.LEFT_AXIS); - config.yAxis[0].title.text = this.config.showLeftYAxisTitle === true ? this.config.leftYAxisTitle + config.yAxis[0].title.text : config.yAxis[0].title.text; - config.yAxis[0].gridLineWidth = this.config.showGridLine === true ? 1 : 0; - config.yAxis[0].title.rotation = this.constants.ROTATION; - config.yAxis[0].maxWidth = "40%"; - - config.xAxis[0].formatter = self.formatTickInXYaxis(this.config.xAxisStyle, this.config.xAxisNumberLevel, this.config.rightNumSeparators); - formatNumberLevelInXaxis(this.config.xAxisNumberLevel); - config.xAxis[0].title.text = getXYAxisUnit(this.config.xAxisNumberLevel, this.constants.X_AXIS); - config.xAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle + config.xAxis[0].title.text : config.xAxis[0].title.text; - config.xAxis[0].title.align = "center"; - config.xAxis[0].gridLineWidth = this.config.showGridLine === true ? 1 : 0; - config.xAxis[0].maxHeight = "40%"; - config.chartType = "scatter"; - - if (BI.isNotEmptyArray(this.config.tooltip)) { - config.plotOptions.tooltip.formatter = function () { - var y = self.formatTickInXYaxis(self.config.leftYAxisStyle, self.config.leftYAxisNumberLevel, self.config.numSeparators)(this.y); - var x = self.formatTickInXYaxis(self.config.xAxisStyle, self.config.xAxisNumberLevel, self.config.rightNumSeparators)(this.x); - return this.seriesName + "
(X)" + self.config.tooltip[0] - + ":" + x + "
(Y)" + self.config.tooltip[1] + ":" + y + "
"; - }; - } - - if (config.plotOptions.dataLabels.enabled === true) { - BI.each(items, function (idx, item) { - item.dataLabels = { - style: self.config.chartFont, - align: "outside", - autoAdjust: true, - enabled: true, - formatter: { - identifier: "${X}${Y}", - XFormat: function () { - return BI.contentFormat(arguments[0], "#.##;-#.##"); - }, - YFormat: function () { - return BI.contentFormat(arguments[0], "#.##;-#.##"); - } - } - }; - item.dataLabels.formatter.XFormat = config.xAxis[0].formatter; - item.dataLabels.formatter.YFormat = config.yAxis[0].formatter; - }); - } - - // 全局样式图表文字 - config.legend.style = this.config.chartFont; - config.yAxis[0].title.style = config.yAxis[0].labelStyle = this.config.chartFont; - config.xAxis[0].title.style = config.xAxis[0].labelStyle = this.config.chartFont; - - return [items, config]; - - function formatChartStyle () { - switch (self.config.chartStyle) { - case BICst.CHART_STYLE.STYLE_GRADUAL: - return "gradual"; - case BICst.CHART_STYLE.STYLE_NORMAL: - default: - return "normal"; - } - } - - function formatCordon () { - BI.each(self.config.cordon, function (idx, cor) { - if (idx === 0 && self.xAxis.length > 0) { - var magnify = self.calcMagnify(self.config.xAxisNumberLevel); - self.xAxis[0].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "top" - } - }); - }); - } - if (idx > 0 && self.yAxis.length >= idx) { - var magnify = 1; - switch (idx - 1) { - case self.constants.LEFT_AXIS: - magnify = self.calcMagnify(self.config.leftYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS: - magnify = self.calcMagnify(self.config.rightYAxisNumberLevel); - break; - case self.constants.RIGHT_AXIS_SECOND: - magnify = self.calcMagnify(self.config.rightYAxisSecondNumberLevel); - break; - } - self.yAxis[idx - 1].plotLines = BI.map(cor, function (i, t) { - return BI.extend(t, { - value: t.value.div(magnify), - width: 1, - label: { - style: self.config.chartFont, - text: t.text, - align: "left" - } - }); - }); - } - }); - } - - function formatNumberLevelInXaxis (type) { - var magnify = self.calcMagnify(type); - BI.each(items, function (idx, item) { - BI.each(item.data, function (id, da) { - da.x = self.formatXYDataWithMagnify(da.x, magnify); - }); - }); - } - - function formatNumberLevelInYaxis (type) { - var magnify = self.calcMagnify(type); - BI.each(items, function (idx, item) { - BI.each(item.data, function (id, da) { - da.y = self.formatXYDataWithMagnify(da.y, magnify); - }); - }); - } - - function getXYAxisUnit (numberLevelType, position) { - var unit = ""; - switch (numberLevelType) { - case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL: - unit = ""; - break; - case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND: - unit = BI.i18nText("BI-Wan"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.MILLION: - unit = BI.i18nText("BI-Million"); - break; - case BICst.TARGET_STYLE.NUM_LEVEL.YI: - unit = BI.i18nText("BI-Yi"); - break; - } - if (position === self.constants.X_AXIS) { - self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit); - } - if (position === self.constants.LEFT_AXIS) { - self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit); - } - if (position === self.constants.RIGHT_AXIS) { - self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit); - } - return unit === "" ? unit : "(" + unit + ")"; - } - }, - - populate: function (items, options) { - options || (options = {}); - var self = this, c = this.constants; - this.config = { - leftYAxisTitle: options.leftYAxisTitle || "", - chartColor: options.chartColor || [], - leftYAxisStyle: options.leftYAxisStyle || c.NORMAL, - xAxisStyle: options.xAxisStyle || c.NORMAL, - showXAxisTitle: options.showXAxisTitle || false, - showLeftYAxisTitle: options.showLeftYAxisTitle || false, - xAxisNumberLevel: options.xAxisNumberLevel || c.NORMAL, - leftYAxisNumberLevel: options.leftYAxisNumberLevel || c.NORMAL, - xAxisUnit: options.xAxisUnit || "", - leftYAxisUnit: options.leftYAxisUnit || "", - xAxisTitle: options.xAxisTitle || "", - chartLegend: options.chartLegend || c.LEGEND_BOTTOM, - showDataLabel: options.showDataLabel || false, - showGridLine: BI.isNull(options.showGridLine) ? true : options.showGridLine, - cordon: options.cordon || [], - tooltip: options.tooltip || [], - numSeparators: options.numSeparators || false, - rightNumSeparators: options.rightNumSeparators || false, - chartFont: options.chartFont || c.FONT_STYLE - }; - this.options.items = items; - var types = []; - BI.each(items, function (idx, axisItems) { - var type = []; - BI.each(axisItems, function (id, item) { - type.push(BICst.WIDGET.SCATTER); - }); - types.push(type); - }); - this.combineChart.populate(items, types); - }, - - resize: function () { - this.combineChart.resize(); - }, - - magnify: function () { - this.combineChart.magnify(); - } -}); -BI.ScatterChart.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.scatter_chart", BI.ScatterChart); \ No newline at end of file diff --git a/src/addons/chart/factory.charts.js b/src/addons/chart/factory.charts.js deleted file mode 100644 index f31b75a17..000000000 --- a/src/addons/chart/factory.charts.js +++ /dev/null @@ -1,291 +0,0 @@ -BI.ChartCombineFormatItemFactory = { - combineItems: function (types, items) { - var calItems = BI.values(items); - return BI.map(calItems, function (idx, item) { - return BI.ChartCombineFormatItemFactory.formatItems(types[idx], item); - }); - }, - - formatItems: function (type, items) { - var item = {}; - switch (type) { - case BICst.WIDGET.BAR: - case BICst.WIDGET.ACCUMULATE_BAR: - case BICst.WIDGET.COMPARE_BAR: - item = BI.extend({type: "bar"}, items); - break; - case BICst.WIDGET.BUBBLE: - item = BI.extend({type: "bubble"}, items); - break; - case BICst.WIDGET.FORCE_BUBBLE: - item = BI.extend({type: "forceBubble"}, items); - break; - case BICst.WIDGET.SCATTER: - item = BI.extend({type: "scatter"}, items); - break; - case BICst.WIDGET.AXIS: - case BICst.WIDGET.ACCUMULATE_AXIS: - case BICst.WIDGET.PERCENT_ACCUMULATE_AXIS: - case BICst.WIDGET.COMPARE_AXIS: - case BICst.WIDGET.FALL_AXIS: - item = BI.extend({type: "column"}, items); - break; - case BICst.WIDGET.LINE: - item = BI.extend({type: "line"}, items); - break; - case BICst.WIDGET.AREA: - case BICst.WIDGET.ACCUMULATE_AREA: - case BICst.WIDGET.COMPARE_AREA: - case BICst.WIDGET.RANGE_AREA: - case BICst.WIDGET.PERCENT_ACCUMULATE_AREA: - item = BI.extend({type: "area"}, items); - break; - case BICst.WIDGET.DONUT: - item = BI.extend({type: "pie"}, items); - break; - case BICst.WIDGET.RADAR: - case BICst.WIDGET.ACCUMULATE_RADAR: - item = BI.extend({type: "radar"}, items); - break; - case BICst.WIDGET.PIE: - item = BI.extend({type: "pie"}, items); - break; - case BICst.WIDGET.DASHBOARD: - item = BI.extend({type: "gauge"}, items); - break; - case BICst.WIDGET.MAP: - item = BI.extend({type: "areaMap"}, items); - break; - case BICst.WIDGET.GIS_MAP: - item = BI.extend({type: "pointMap"}, items); - break; - default: - item = BI.extend({type: "column"}, items); - break; - } - return item; - }, - - combineConfig: function () { - return { - title: "", - chartType: "column", - plotOptions: { - rotatable: false, - startAngle: 0, - borderRadius: 0, - endAngle: 360, - innerRadius: "0.0%", - layout: "horizontal", - hinge: "rgb(101,107,109)", - dataLabels: { - autoAdjust: true, - style: {fontFamily: "inherit", color: "inherit", fontSize: "12px"}, - formatter: { - identifier: "${VALUE}", - valueFormat: this._contentFormat2Decimal, - seriesFormat: this._contentFormat, - percentFormat: this._contentFormatPercentage, - categoryFormat: this._contentFormat, - XFormat: this._contentFormat2Decimal, - YFormat: this._contentFormat2Decimal, - sizeFormat: this._contentFormat2Decimal - }, - align: "outside", - enabled: false - }, - percentageLabel: { - formatter: { - identifier: "${PERCENT}", - valueFormat: this._contentFormat2Decimal, - seriesFormat: this._contentFormat, - percentFormat: this._contentFormatPercentage, - categoryFormat: this._contentFormat - }, - style: { - fontFamily: "inherit", color: "inherit", fontSize: "12px" - }, - align: "bottom", - enabled: true - }, - valueLabel: { - formatter: { - identifier: "${SERIES}${VALUE}", - valueFormat: this._contentFormat2Decimal, - seriesFormat: this._contentFormat, - percentFormat: this._contentFormatPercentage, - categoryFormat: this._contentFormat - }, - backgroundColor: "rgb(255,255,0)", - style: { - fontFamily: "inherit", color: "inherit", fontSize: "12px" - }, - align: "inside", - enabled: true - }, - hingeBackgroundColor: "rgb(220,242,249)", - seriesLabel: { - formatter: { - identifier: "${CATEGORY}", - valueFormat: this._contentFormat2Decimal, - seriesFormat: this._contentFormat, - percentFormat: this._contentFormatPercentage, - categoryFormat: this._contentFormat - }, - style: { - fontFamily: "inherit", color: "inherit", fontSize: "12px" - }, - align: "bottom", - enabled: true - }, - paneBackgroundColor: "rgb(252,252,252)", - needle: "rgb(229,113,90)", - large: false, - connectNulls: false, - shadow: true, - curve: false, - sizeBy: "area", - tooltip: { - formatter: { - identifier: "${SERIES}${X}${Y}${SIZE}{CATEGORY}${SERIES}${VALUE}", - valueFormat: this._contentFormat2Decimal, - seriesFormat: this._contentFormat, - percentFormat: this._contentFormatPercentage, - categoryFormat: this._contentFormat, - XFormat: this._contentFormat2Decimal, - sizeFormat: this._contentFormat2Decimal, - YFormat: this._contentFormat2Decimal - }, - shared: false, - padding: 5, - backgroundColor: "rgba(0,0,0,0.4980392156862745)", - borderColor: "rgb(0,0,0)", - shadow: false, - borderRadius: 2, - borderWidth: 0, - follow: false, - enabled: true, - animation: true, - style: { - fontFamily: "Microsoft YaHei, Hiragino Sans GB W3", - color: "#c4c6c6", - fontSize: "12px", - fontWeight: "" - } - }, - maxSize: 80, - fillColorOpacity: 0.5, - step: false, - force: false, - minSize: 15, - displayNegative: true, - categoryGap: "16.0%", - borderColor: "rgb(255,255,255)", - borderWidth: 1, - gap: "22.0%", - animation: true, - lineWidth: 2, - bubble: { - large: false, - connectNulls: false, - shadow: true, - curve: false, - sizeBy: "area", - maxSize: 80, - minSize: 15, - lineWidth: 0, - animation: true, - fillColorOpacity: 0.699999988079071, - marker: { - symbol: "circle", - radius: 28.39695010101295, - enabled: true - } - } - }, - dTools: { - enabled: false, - style: { - fontFamily: "Microsoft YaHei, Hiragino Sans GB W3", - color: "#1a1a1a", - fontSize: "12px" - }, - backgroundColor: "white" - }, - dataSheet: { - enabled: false, - borderColor: "rgb(0,0,0)", - borderWidth: 1, - formatter: this._contentFormat2Decimal, - style: { - fontFamily: "inherit", color: "inherit", fontSize: "12px" - } - }, - borderColor: "rgb(238,238,238)", - shadow: false, - legend: { - borderColor: "rgb(204,204,204)", - borderRadius: 0, - shadow: false, - borderWidth: 0, - visible: true, - style: { - fontFamily: "inherit", color: "inherit", fontSize: "12px" - }, - position: "right", - enabled: false - }, - rangeLegend: { - range: { - min: 0, - color: [ - [ - 0, - "rgb(182,226,255)" - ], - [ - 0.5, - "rgb(109,196,255)" - ], - [ - 1, - "rgb(36,167,255)" - ] - ], - max: 266393 - }, - enabled: false - }, - zoom: {zoomType: "xy", zoomTool: {visible: false, resize: true, from: "", to: ""}}, - plotBorderColor: "rgba(255,255,255,0)", - tools: { - hidden: false, - toImage: {enabled: false}, - sort: {enabled: false}, - fullScreen: {enabled: false}, - refresh: { - enabled: false - } - }, - plotBorderWidth: 0, - style: "normal", - colors: ["rgb(99,178,238)", "rgb(118,218,145)"], - borderRadius: 0, - borderWidth: 0, - plotShadow: false, - plotBorderRadius: 0 - }; - }, - - _contentFormat: function () { - return BI.contentFormat(arguments[0], ""); - }, - - _contentFormat2Decimal: function () { - return BI.contentFormat(arguments[0], "#.##;-#.##"); - }, - - _contentFormatPercentage: function () { - return BI.contentFormat(arguments[0], "#.##%;-#.##%"); - } -}; \ No newline at end of file diff --git a/src/core/ob.js b/src/core/ob.js index 9ae93ced4..474347923 100644 --- a/src/core/ob.js +++ b/src/core/ob.js @@ -8,7 +8,7 @@ BI.OB = function (config) { if (BI.isFunction(this.props)) { props = this.props(config); } - this.options = ($ || _).extend(this._defaultConfig(config), props, config); + this.options = (window.$ || window._).extend(this._defaultConfig(config), props, config); this._init(); this._initRef(); }; @@ -29,7 +29,7 @@ _.extend(BI.OB.prototype, { _initListeners: function () { var self = this; if (this.options.listeners != null) { - $.each(this.options.listeners, function (i, lis) { + _.each(this.options.listeners, function (lis) { (lis.target ? lis.target : self)[lis.once ? "once" : "on"] (lis.eventName, _.bind(lis.action, self)); }); @@ -52,7 +52,7 @@ _.extend(BI.OB.prototype, { }, _getEvents: function () { - if (!$.isArray(this.events)) { + if (!_.isArray(this.events)) { this.events = []; } return this.events; @@ -66,7 +66,7 @@ _.extend(BI.OB.prototype, { on: function (eventName, fn) { eventName = eventName.toLowerCase(); var fns = this._getEvents()[eventName]; - if (!$.isArray(fns)) { + if (!_.isArray(fns)) { fns = []; this._getEvents()[eventName] = fns; } @@ -98,9 +98,9 @@ _.extend(BI.OB.prototype, { delete this._getEvents()[eventName]; } else { var fns = this._getEvents()[eventName]; - if ($.isArray(fns)) { + if (_.isArray(fns)) { var newFns = []; - $.each(fns, function (idx, ifn) { + _.each(fns, function (ifn) { if (ifn != fn) { newFns.push(ifn); } diff --git a/src/core/proto/date.i18n.js b/src/core/proto/date.i18n.js new file mode 100644 index 000000000..1ef77e287 --- /dev/null +++ b/src/core/proto/date.i18n.js @@ -0,0 +1,62 @@ +$(function () { + // 牵扯到国际化这些常量在页面加载后再生效 + // full day names + Date._DN = [BI.i18nText("BI-Basic_Sunday"), + BI.i18nText("BI-Basic_Monday"), + BI.i18nText("BI-Basic_Tuesday"), + BI.i18nText("BI-Basic_Wednesday"), + BI.i18nText("BI-Basic_Thursday"), + BI.i18nText("BI-Basic_Friday"), + BI.i18nText("BI-Basic_Saturday"), + BI.i18nText("BI-Basic_Sunday")]; + + // short day names + Date._SDN = [BI.i18nText("BI-Basic_Simple_Sunday"), + BI.i18nText("BI-Basic_Simple_Monday"), + BI.i18nText("BI-Basic_Simple_Tuesday"), + BI.i18nText("BI-Basic_Simple_Wednesday"), + BI.i18nText("BI-Basic_Simple_Thursday"), + BI.i18nText("BI-Basic_Simple_Friday"), + BI.i18nText("BI-Basic_Simple_Saturday"), + BI.i18nText("BI-Basic_Simple_Sunday")]; + + // Monday first, etc. + Date._FD = 1; + + // full month namesdat + Date._MN = [ + BI.i18nText("BI-Basic_January"), + BI.i18nText("BI-Basic_February"), + BI.i18nText("BI-Basic_March"), + BI.i18nText("BI-Basic_April"), + BI.i18nText("BI-Basic_May"), + BI.i18nText("BI-Basic_June"), + BI.i18nText("BI-Basic_July"), + BI.i18nText("BI-Basic_August"), + BI.i18nText("BI-Basic_September"), + BI.i18nText("BI-Basic_October"), + BI.i18nText("BI-Basic_November"), + BI.i18nText("BI-Basic_December")]; + + // short month names + Date._SMN = [0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11]; + + Date._QN = ["", BI.i18nText("BI-Quarter_1"), + BI.i18nText("BI-Quarter_2"), + BI.i18nText("BI-Quarter_3"), + BI.i18nText("BI-Quarter_4")]; + + /** Adds the number of days array to the Date object. */ + Date._MD = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; +}); \ No newline at end of file diff --git a/src/core/proto/date.js b/src/core/proto/date.js index a2c3e4095..67d29437f 100644 --- a/src/core/proto/date.js +++ b/src/core/proto/date.js @@ -1,65 +1,3 @@ -$(function () { - // 牵扯到国际化这些常量在页面加载后再生效 - // full day names - Date._DN = [BI.i18nText("BI-Basic_Sunday"), - BI.i18nText("BI-Basic_Monday"), - BI.i18nText("BI-Basic_Tuesday"), - BI.i18nText("BI-Basic_Wednesday"), - BI.i18nText("BI-Basic_Thursday"), - BI.i18nText("BI-Basic_Friday"), - BI.i18nText("BI-Basic_Saturday"), - BI.i18nText("BI-Basic_Sunday")]; - - // short day names - Date._SDN = [BI.i18nText("BI-Basic_Simple_Sunday"), - BI.i18nText("BI-Basic_Simple_Monday"), - BI.i18nText("BI-Basic_Simple_Tuesday"), - BI.i18nText("BI-Basic_Simple_Wednesday"), - BI.i18nText("BI-Basic_Simple_Thursday"), - BI.i18nText("BI-Basic_Simple_Friday"), - BI.i18nText("BI-Basic_Simple_Saturday"), - BI.i18nText("BI-Basic_Simple_Sunday")]; - - // Monday first, etc. - Date._FD = 1; - - // full month namesdat - Date._MN = [ - BI.i18nText("BI-Basic_January"), - BI.i18nText("BI-Basic_February"), - BI.i18nText("BI-Basic_March"), - BI.i18nText("BI-Basic_April"), - BI.i18nText("BI-Basic_May"), - BI.i18nText("BI-Basic_June"), - BI.i18nText("BI-Basic_July"), - BI.i18nText("BI-Basic_August"), - BI.i18nText("BI-Basic_September"), - BI.i18nText("BI-Basic_October"), - BI.i18nText("BI-Basic_November"), - BI.i18nText("BI-Basic_December")]; - - // short month names - Date._SMN = [0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11]; - - Date._QN = ["", BI.i18nText("BI-Quarter_1"), - BI.i18nText("BI-Quarter_2"), - BI.i18nText("BI-Quarter_3"), - BI.i18nText("BI-Quarter_4")]; - - /** Adds the number of days array to the Date object. */ - Date._MD = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; -}); /** Constants used for time computations */ Date.SECOND = 1000; @@ -86,7 +24,7 @@ Date.prototype.getMonthDays = function (month) { return 29; } return Date._MD[month]; - + }; /** @@ -546,7 +484,7 @@ Date.getDate = function () { return new Date(utc + Date.timeZone);// + Pool.timeZone.offset); } return dt; - + }; Date.getTime = function () { @@ -594,5 +532,5 @@ Date.getTime = function () { return dt.getTime() - Date.timeZone - dt.getTimezoneOffset() * 60000; } return dt.getTime(); - + }; diff --git a/utils/utils.js b/utils/utils.js index a6b9e1ab8..096daf7d6 100644 --- a/utils/utils.js +++ b/utils/utils.js @@ -2155,7 +2155,563 @@ _.extend(String, { return args[i]; }); } -});/** +}); +/** Constants used for time computations */ +Date.SECOND = 1000; +Date.MINUTE = 60 * Date.SECOND; +Date.HOUR = 60 * Date.MINUTE; +Date.DAY = 24 * Date.HOUR; +Date.WEEK = 7 * Date.DAY; + +/** + * 获取时区 + * @returns {String} + */ +Date.prototype.getTimezone = function () { + return this.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/, "$1$2").replace(/[^A-Z]/g, ""); +}; + +/** Returns the number of days in the current month */ +Date.prototype.getMonthDays = function (month) { + var year = this.getFullYear(); + if (typeof month === "undefined") { + month = this.getMonth(); + } + if (((0 == (year % 4)) && ( (0 != (year % 100)) || (0 == (year % 400)))) && month == 1) { + return 29; + } + return Date._MD[month]; + +}; + +/** + * 获取每月的最后一天 + * @returns {Date} + */ +Date.prototype.getLastDateOfMonth = function () { + return Date.getDate(this.getFullYear(), this.getMonth(), this.getMonthDays()); +}; + +/** Returns the number of day in the year. */ +Date.prototype.getDayOfYear = function () { + var now = Date.getDate(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0); + var then = Date.getDate(this.getFullYear(), 0, 0, 0, 0, 0); + var time = now - then; + return Math.floor(time / Date.DAY); +}; + +/** Returns the number of the week in year, as defined in ISO 8601. */ +Date.prototype.getWeekNumber = function () { + var d = Date.getDate(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0); + // 周一是一周第一天 + var week = d.getDay() === 0 ? 7 : d.getDay(); + // var week = d.getDay(); + if (this.getMonth() === 0 && this.getDate() <= week) { + return 1; + } + d.setDate(this.getDate() - (week - 1)); + var ms = d.valueOf(); // GMT + d.setMonth(0); + d.setDate(1); + var offset = Math.floor((ms - d.valueOf()) / (7 * 864e5)) + 1; + if (d.getDay() !== 1) { + offset++; + } + return offset; +}; + +Date.prototype.getQuarter = function () { + return Math.floor(this.getMonth() / 3) + 1; +}; + +// 离当前时间多少天的时间 +Date.prototype.getOffsetDate = function (offset) { + return Date.getDate(Date.getTime(this.getFullYear(), this.getMonth(), this.getDate(), this.getHours(), this.getMinutes(), this.getSeconds()) + offset * 864e5); +}; + +Date.prototype.getAfterMulQuarter = function (n) { + var dt = Date.getDate(Date.getTime(this.getFullYear(), this.getMonth(), this.getDate(), this.getHours(), this.getMinutes(), this.getSeconds())); + dt.setMonth(dt.getMonth() + n * 3); + return dt; +}; +// 获得n个季度前的日期 +Date.prototype.getBeforeMulQuarter = function (n) { + var dt = Date.getDate(Date.getTime(this.getFullYear(), this.getMonth(), this.getDate(), this.getHours(), this.getMinutes(), this.getSeconds())); + dt.setMonth(dt.getMonth() - n * 3); + return dt; +}; +// 得到本季度的起始月份 +Date.prototype.getQuarterStartMonth = function () { + var quarterStartMonth = 0; + var nowMonth = this.getMonth(); + if (nowMonth < 3) { + quarterStartMonth = 0; + } + if (2 < nowMonth && nowMonth < 6) { + quarterStartMonth = 3; + } + if (5 < nowMonth && nowMonth < 9) { + quarterStartMonth = 6; + } + if (nowMonth > 8) { + quarterStartMonth = 9; + } + return quarterStartMonth; +}; +// 获得本季度的起始日期 +Date.prototype.getQuarterStartDate = function () { + return Date.getDate(this.getFullYear(), this.getQuarterStartMonth(), 1); +}; +// 得到本季度的结束日期 +Date.prototype.getQuarterEndDate = function () { + var quarterEndMonth = this.getQuarterStartMonth() + 2; + return Date.getDate(this.getFullYear(), quarterEndMonth, this.getMonthDays(quarterEndMonth)); +}; +Date.prototype.getAfterMultiMonth = function (n) { + var dt = Date.getDate(Date.getTime(this.getFullYear(), this.getMonth(), this.getDate(), this.getHours(), this.getMinutes(), this.getSeconds())); + dt.setMonth(dt.getMonth() + n | 0); + return dt; +}; +Date.prototype.getBeforeMultiMonth = function (n) { + var dt = Date.getDate(Date.getTime(this.getFullYear(), this.getMonth(), this.getDate(), this.getHours(), this.getMinutes(), this.getSeconds())); + dt.setMonth(dt.getMonth() - n | 0); + return dt; +}; + +// 指定日期n个月之前或之后的日期 +Date.prototype.getOffsetMonth = function (n) { + var dt = Date.getDate(Date.getTime(this.getFullYear(), this.getMonth(), this.getDate(), this.getHours(), this.getMinutes(), this.getSeconds())); + var day = dt.getDate(); + var monthDay = Date.getDate(dt.getFullYear(), dt.getMonth() + parseInt(n), 1).getMonthDays(); + if (day > monthDay) { + day = monthDay; + } + dt.setDate(day); + dt.setMonth(dt.getMonth() + parseInt(n)); + return dt; +}; + +// 获得本周的起始日期 +Date.prototype.getWeekStartDate = function () { + var w = this.getDay(); + return this.getOffsetDate(w === 0 ? -6 : 1 - w); +}; +// 得到本周的结束日期 +Date.prototype.getWeekEndDate = function () { + var w = this.getDay(); + return this.getOffsetDate(w === 0 ? 0 : 7 - w); +}; + +/** Checks date and time equality */ +Date.prototype.equalsTo = function (date) { + return ((this.getFullYear() == date.getFullYear()) && + (this.getMonth() == date.getMonth()) && + (this.getDate() == date.getDate()) && + (this.getHours() == date.getHours()) && + (this.getMinutes() == date.getMinutes()) && + (this.getSeconds() == date.getSeconds())); +}; + +/** Set only the year, month, date parts (keep existing time) */ +Date.prototype.setDateOnly = function (date) { + var tmp = Date.getDate(date); + this.setDate(1); + this.setFullYear(tmp.getFullYear()); + this.setMonth(tmp.getMonth()); + this.setDate(tmp.getDate()); +}; +/** Prints the date in a string according to the given format. */ +Date.prototype.print = function (str) { + var m = this.getMonth(); + var d = this.getDate(); + var y = this.getFullYear(); + var wn = this.getWeekNumber(); + var qr = this.getQuarter(); + var w = this.getDay(); + var s = {}; + var hr = this.getHours(); + var pm = (hr >= 12); + var ir = (pm) ? (hr - 12) : hr; + var dy = this.getDayOfYear(); + if (ir == 0) { + ir = 12; + } + var min = this.getMinutes(); + var sec = this.getSeconds(); + s["%a"] = Date._SDN[w]; // abbreviated weekday name [FIXME: I18N] + s["%A"] = Date._DN[w]; // full weekday name + s["%b"] = Date._SMN[m]; // abbreviated month name [FIXME: I18N] + s["%B"] = Date._MN[m]; // full month name + // FIXME: %c : preferred date and time representation for the current locale + s["%C"] = 1 + Math.floor(y / 100); // the century number + s["%d"] = (d < 10) ? ("0" + d) : d; // the day of the month (range 01 to 31) + s["%e"] = d; // the day of the month (range 1 to 31) + // FIXME: %D : american date style: %m/%d/%y + // FIXME: %E, %F, %G, %g, %h (man strftime) + s["%H"] = (hr < 10) ? ("0" + hr) : hr; // hour, range 00 to 23 (24h format) + s["%I"] = (ir < 10) ? ("0" + ir) : ir; // hour, range 01 to 12 (12h format) + s["%j"] = (dy < 100) ? ((dy < 10) ? ("00" + dy) : ("0" + dy)) : dy; // day of the year (range 001 to 366) + s["%k"] = hr; // hour, range 0 to 23 (24h format) + s["%l"] = ir; // hour, range 1 to 12 (12h format) + s["%X"] = (m < 9) ? ("0" + (1 + m)) : (1 + m); // month, range 01 to 12 + s["%x"] = m + 1; // month, range 1 to 12 + s["%M"] = (min < 10) ? ("0" + min) : min; // minute, range 00 to 59 + s["%n"] = "\n"; // a newline character + s["%p"] = pm ? "PM" : "AM"; + s["%P"] = pm ? "pm" : "am"; + // FIXME: %r : the time in am/pm notation %I:%M:%S %p + // FIXME: %R : the time in 24-hour notation %H:%M + s["%s"] = Math.floor(this.getTime() / 1000); + s["%S"] = (sec < 10) ? ("0" + sec) : sec; // seconds, range 00 to 59 + s["%t"] = "\t"; // a tab character + // FIXME: %T : the time in 24-hour notation (%H:%M:%S) + s["%U"] = s["%W"] = s["%V"] = (wn < 10) ? ("0" + wn) : wn; + s["%u"] = w + 1; // the day of the week (range 1 to 7, 1 = MON) + s["%w"] = w; // the day of the week (range 0 to 6, 0 = SUN) + // FIXME: %x : preferred date representation for the current locale without the time + // FIXME: %X : preferred time representation for the current locale without the date + s["%y"] = ("" + y).substr(2, 2); // year without the century (range 00 to 99) + s["%Y"] = y; // year with the century + s["%%"] = "%"; // a literal '%' character + s["%Q"] = qr; + + var re = /%./g; + if (!BI.isKhtml()) { + return str.replace(re, function (par) { + return s[par] || par; + }); + } + + var a = str.match(re); + for (var i = 0; i < a.length; i++) { + var tmp = s[a[i]]; + if (tmp) { + re = new RegExp(a[i], "g"); + str = str.replace(re, tmp); + } + } + + return str; +}; + +/** + * 是否是闰年 + * @param year + * @returns {boolean} + */ +Date.isLeap = function (year) { + return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; +}; + +/** + * 检测是否在有效期 + * + * @param YY 年 + * @param MM 月 + * @param DD 日 + * @param minDate '1900-01-01' + * @param maxDate '2099-12-31' + * @returns {Array} 若无效返回无效状态 + */ +Date.checkVoid = function (YY, MM, DD, minDate, maxDate) { + var back = []; + YY = YY | 0; + MM = MM | 0; + DD = DD | 0; + minDate = BI.isString(minDate) ? minDate.match(/\d+/g) : minDate; + maxDate = BI.isString(maxDate) ? maxDate.match(/\d+/g) : maxDate; + if (YY < minDate[0]) { + back = ["y"]; + } else if (YY > maxDate[0]) { + back = ["y", 1]; + } else if (YY >= minDate[0] && YY <= maxDate[0]) { + if (YY == minDate[0]) { + if (MM < minDate[1]) { + back = ["m"]; + } else if (MM == minDate[1]) { + if (DD < minDate[2]) { + back = ["d"]; + } + } + } + if (YY == maxDate[0]) { + if (MM > maxDate[1]) { + back = ["m", 1]; + } else if (MM == maxDate[1]) { + if (DD > maxDate[2]) { + back = ["d", 1]; + } + } + } + } + return back; +}; + +Date.checkLegal = function (str) { + var ar = str.match(/\d+/g); + var YY = ar[0] | 0, MM = ar[1] | 0, DD = ar[2] | 0; + if (ar.length <= 1) { + return true; + } + if (ar.length <= 2) { + return MM >= 1 && MM <= 12; + } + var MD = Date._MD.slice(0); + MD[1] = Date.isLeap(YY) ? 29 : 28; + return MM >= 1 && MM <= 12 && DD <= MD[MM - 1]; +}; + +Date.parseDateTime = function (str, fmt) { + var today = Date.getDate(); + var y = 0; + var m = 0; + var d = 1; + // wei : 对于fmt为‘YYYYMM’或者‘YYYYMMdd’的格式,str的值为类似'201111'的形式,因为年月之间没有分隔符,所以正则表达式分割无效,导致bug7376。 + var a = str.split(/\W+/); + if (fmt.toLowerCase() == "%y%x" || fmt.toLowerCase() == "%y%x%d") { + var yearlength = 4; + var otherlength = 2; + a[0] = str.substring(0, yearlength); + a[1] = str.substring(yearlength, yearlength + otherlength); + a[2] = str.substring(yearlength + otherlength, yearlength + otherlength * 2); + } + var b = fmt.match(/%./g); + var i = 0, j = 0; + var hr = 0; + var min = 0; + var sec = 0; + for (i = 0; i < a.length; ++i) { + switch (b[i]) { + case "%d": + case "%e": + d = parseInt(a[i], 10); + break; + + case "%X": + m = parseInt(a[i], 10) - 1; + break; + case "%x": + m = parseInt(a[i], 10) - 1; + break; + + case "%Y": + case "%y": + y = parseInt(a[i], 10); + (y < 100) && (y += (y > 29) ? 1900 : 2000); + break; + + case "%b": + case "%B": + for (j = 0; j < 12; ++j) { + if (Date._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { + m = j; + break; + } + } + break; + + case "%H": + case "%I": + case "%k": + case "%l": + hr = parseInt(a[i], 10); + break; + + case "%P": + case "%p": + if (/pm/i.test(a[i]) && hr < 12) { + hr += 12; + } else if (/am/i.test(a[i]) && hr >= 12) { + hr -= 12; + } + break; + + case "%M": + min = parseInt(a[i], 10); + case "%S": + sec = parseInt(a[i], 10); + break; + } + } + // if (!a[i]) { + // continue; + // } + if (isNaN(y)) { + y = today.getFullYear(); + } + if (isNaN(m)) { + m = today.getMonth(); + } + if (isNaN(d)) { + d = today.getDate(); + } + if (isNaN(hr)) { + hr = today.getHours(); + } + if (isNaN(min)) { + min = today.getMinutes(); + } + if (isNaN(sec)) { + sec = today.getSeconds(); + } + if (y != 0) { + return Date.getDate(y, m, d, hr, min, sec); + } + y = 0; + m = -1; + d = 0; + for (i = 0; i < a.length; ++i) { + if (a[i].search(/[a-zA-Z]+/) != -1) { + var t = -1; + for (j = 0; j < 12; ++j) { + if (Date._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { + t = j; + break; + } + } + if (t != -1) { + if (m != -1) { + d = m + 1; + } + m = t; + } + } else if (parseInt(a[i], 10) <= 12 && m == -1) { + m = a[i] - 1; + } else if (parseInt(a[i], 10) > 31 && y == 0) { + y = parseInt(a[i], 10); + (y < 100) && (y += (y > 29) ? 1900 : 2000); + } else if (d == 0) { + d = a[i]; + } + } + if (y == 0) { + y = today.getFullYear(); + } + if (m != -1 && d != 0) { + return Date.getDate(y, m, d, hr, min, sec); + } + return today; +}; + +Date.getDate = function () { + var length = arguments.length; + var args = arguments; + var dt; + switch (length) { + // new Date() + case 0: + dt = new Date(); + break; + // new Date(long) + case 1: + dt = new Date(args[0]); + break; + // new Date(year, month) + case 2: + dt = new Date(args[0], args[1]); + break; + // new Date(year, month, day) + case 3: + dt = new Date(args[0], args[1], args[2]); + break; + // new Date(year, month, day, hour) + case 4: + dt = new Date(args[0], args[1], args[2], args[3]); + break; + // new Date(year, month, day, hour, minute) + case 5: + dt = new Date(args[0], args[1], args[2], args[3], args[4]); + break; + // new Date(year, month, day, hour, minute, second) + case 6: + dt = new Date(args[0], args[1], args[2], args[3], args[4], args[5]); + break; + // new Date(year, month, day, hour, minute, second, millisecond) + case 7: + dt = new Date(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + break; + default: + dt = new Date(); + break; + } + if(BI.isNotNull(Date.timeZone) && (arguments.length === 0 || (arguments.length === 1 && BI.isNumber(arguments[0])))) { + var localTime = dt.getTime(); + var localOffset = dt.getTimezoneOffset() * 60000; // 获得当地时间偏移的毫秒数 + var utc = localTime + localOffset; // utc即GMT时间标准时区 + return new Date(utc + Date.timeZone);// + Pool.timeZone.offset); + } + return dt; + +}; + +Date.getTime = function () { + var length = arguments.length; + var args = arguments; + var dt; + switch (length) { + // new Date() + case 0: + dt = new Date(); + break; + // new Date(long) + case 1: + dt = new Date(args[0]); + break; + // new Date(year, month) + case 2: + dt = new Date(args[0], args[1]); + break; + // new Date(year, month, day) + case 3: + dt = new Date(args[0], args[1], args[2]); + break; + // new Date(year, month, day, hour) + case 4: + dt = new Date(args[0], args[1], args[2], args[3]); + break; + // new Date(year, month, day, hour, minute) + case 5: + dt = new Date(args[0], args[1], args[2], args[3], args[4]); + break; + // new Date(year, month, day, hour, minute, second) + case 6: + dt = new Date(args[0], args[1], args[2], args[3], args[4], args[5]); + break; + // new Date(year, month, day, hour, minute, second, millisecond) + case 7: + dt = new Date(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + break; + default: + dt = new Date(); + break; + } + if(BI.isNotNull(Date.timeZone)) { + return dt.getTime() - Date.timeZone - dt.getTimezoneOffset() * 60000; + } + return dt.getTime(); + +}; +Function.prototype.before = function (func) { + var __self = this; + return function () { + if (func.apply(this, arguments) === false) { + return false; + } + return __self.apply(this, arguments); + }; +}; + +Function.prototype.after = function (func) { + var __self = this; + return function () { + var ret = __self.apply(this, arguments); + if (ret === false) { + return false; + } + func.apply(this, arguments); + return ret; + }; +};/** * 基本函数 * Create By GUY 2014\11\17 * @@ -3329,7 +3885,7 @@ BI.OB = function (config) { if (BI.isFunction(this.props)) { props = this.props(config); } - this.options = ($ || _).extend(this._defaultConfig(config), props, config); + this.options = (window.$ || window._).extend(this._defaultConfig(config), props, config); this._init(); this._initRef(); }; @@ -3350,7 +3906,7 @@ _.extend(BI.OB.prototype, { _initListeners: function () { var self = this; if (this.options.listeners != null) { - $.each(this.options.listeners, function (i, lis) { + _.each(this.options.listeners, function (lis) { (lis.target ? lis.target : self)[lis.once ? "once" : "on"] (lis.eventName, _.bind(lis.action, self)); }); @@ -3373,7 +3929,7 @@ _.extend(BI.OB.prototype, { }, _getEvents: function () { - if (!$.isArray(this.events)) { + if (!_.isArray(this.events)) { this.events = []; } return this.events; @@ -3387,7 +3943,7 @@ _.extend(BI.OB.prototype, { on: function (eventName, fn) { eventName = eventName.toLowerCase(); var fns = this._getEvents()[eventName]; - if (!$.isArray(fns)) { + if (!_.isArray(fns)) { fns = []; this._getEvents()[eventName] = fns; } @@ -3419,9 +3975,9 @@ _.extend(BI.OB.prototype, { delete this._getEvents()[eventName]; } else { var fns = this._getEvents()[eventName]; - if ($.isArray(fns)) { + if (_.isArray(fns)) { var newFns = []; - $.each(fns, function (idx, ifn) { + _.each(fns, function (ifn) { if (ifn != fn) { newFns.push(ifn); }