-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfusioncharts.js
40 lines (37 loc) · 10.6 KB
/
fusioncharts.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
FusionCharts JavaScript Library
Copyright FusionCharts Technologies LLP
License Information at <http://www.fusioncharts.com/license>
@version 3.12.2
FusionCharts JavaScript Library
Copyright FusionCharts Technologies LLP
License Information at <http://www.fusioncharts.com/license>
@version 3.12.2
FusionCharts JavaScript Library
Copyright FusionCharts Technologies LLP
License Information at <http://www.fusioncharts.com/license>
FusionCharts JavaScript Library - KDtree
Copyright FusionCharts Technologies LLP
License Information at <http://www.fusioncharts.com/license>
@version 3.12.2
*/
(function(Ab,Rb){"object"===typeof module&&module.exports?module.exports=Ab.document?Rb(Ab):function(Q){if(!Q.document)throw Error("Window with document not present");return Rb(Q,!0)}:Ab.FusionCharts=Rb(Ab,!0)})("undefined"!==typeof window?window:this,function(Ab,Rb){"undefined"===typeof Ab&&"object"===typeof window&&(Ab=window);var Q=function(b){if(b.FusionCharts&&b.FusionCharts.version)return b.FusionCharts;var v=b.document,J=b.navigator,C={window:b},H=C.modules={},A=C.interpreters={},u=Object.prototype.toString,
a=/msie/i.test(J.userAgent)&&!b.opera,O=/loaded|complete/,q=!1,M=function(){var a=C.ready;C.ready=!0;C.raiseEvent&&(C.readyNotified=!0,C.raiseEvent("ready",{version:C.core.version,now:!a},C.core));C.readyNow=!a},U=function(a,b){var r,k;if(b instanceof Array)for(r=0;r<b.length;r+=1)"object"!==typeof b[r]?a[r]=b[r]:("object"!==typeof a[r]&&(a[r]=b[r]instanceof Array?[]:{}),U(a[r],b[r]));else for(r in b)"object"===typeof b[r]?(k=u.call(b[r]),"[object Object]"===k?("object"!==typeof a[r]&&(a[r]={}),U(a[r],
b[r])):"[object Array]"===k?(a[r]instanceof Array||(a[r]=[]),U(a[r],b[r])):a[r]=b[r]):a[r]=b[r];return a};C.extend=function(a,b,r,k){var m;r&&a.prototype&&(a=a.prototype);if(!0===k)U(a,b);else for(m in b)a[m]=b[m];return a};C.uniqueId=function(){return"chartobject-"+(C.uniqueId.lastId+=1)};C.uniqueId.lastId=0;C.policies={options:{chartTypeSourcePath:["typeSourcePath",""],product:["product","v3"],insertMode:["insertMode","replace"],safeMode:["safeMode",!0],overlayButton:["overlayButton",void 0],containerBackgroundColor:["containerBackgroundColor",
"#ffffff"],containerBackgroundOpacity:["containerBackgroundOpacity",1],containerClassName:["containerClassName","fusioncharts-container"],chartType:["type",void 0],baseChartMessageFont:["baseChartMessageFont","Verdana,sans"],baseChartMessageFontSize:["baseChartMessageFontSize","10"],baseChartMessageColor:["baseChartMessageColor","#666666"],baseChartMessageImageHAlign:["baseChartMessageImageHAlign","middle"],baseChartMessageImageVAlign:["baseChartMessageImageVAlign","middle"],baseChartMessageImageAlpha:["baseChartMessageImageAlpha",
100],baseChartMessageImageScale:["baseChartMessageImageScale",100],dataLoadStartMessage:["dataLoadStartMessage","Retrieving data. Please wait."],dataLoadErrorMessage:["dataLoadErrorMessage","Error in loading data."],dataInvalidMessage:["dataInvalidMessage","Invalid data."],dataEmptyMessage:["dataEmptyMessage","No data to display."],typeNotSupportedMessage:["typeNotSupportedMessage","Chart type not supported."],browserNotSupportedMessage:["browserNotSupportedMessage","This browser is not supported."],
loadMessage:["loadMessage","Loading chart. Please wait."],renderErrorMessage:["renderErrorMessage","Unable to render chart."]},attributes:{lang:["lang","EN"],id:["id",void 0]},width:["width","400"],height:["height","300"],src:["swfUrl",""]};A.stat="swfUrl id width height debugMode registerWithJS backgroundColor scaleMode lang detectFlashVersion autoInstallRedirect".split(" ");C.parsePolicies=function(a,b,r){var k,m,n;for(m in b)if(C.policies[m]instanceof Array)n=r[b[m][0]],a[m]=void 0===n?b[m][1]:
n;else for(k in"object"!==typeof a[m]&&(a[m]={}),b[m])n=r[b[m][k][0]],a[m][k]=void 0===n?b[m][k][1]:n};C.parseCommands=function(a,b,r){var k,m;"string"===typeof b&&(b=A[b]||[]);k=0;for(m=b.length;k<m;k++)a[b[k]]=r[k];return a};C.registrars={module:function(){return C.core.apply(C.core,arguments)}};C.core=function(a){if(!(this instanceof C.core)){if(1===arguments.length&&a instanceof Array&&"private"===a[0]){if(H[a[1]])return;H[a[1]]={};a[3]instanceof Array&&(C.core.version[a[1]]=a[3]);return"function"===
typeof a[2]?a[2].call(C,H[a[1]]):C}if(1===arguments.length&&"string"===typeof a)return C.core.items[a];C.raiseError&&C.raiseError(this,"25081840","run","",new SyntaxError('Use the "new" keyword while creating a new FusionCharts object'))}var b={};this.__state={};1===arguments.length&&"object"===typeof arguments[0]?b=arguments[0]:C.parseCommands(b,A.stat,arguments);1<arguments.length&&"object"===typeof arguments[arguments.length-1]&&(delete b[A.stat[arguments.length-1]],C.extend(b,arguments[arguments.length-
1]));this.id="undefined"===typeof b.id?this.id=C.uniqueId():b.id;this.args=b;C.core.items[this.id]instanceof C.core&&C.raiseWarning(this,"06091847","param","",Error('A FusionCharts object with the specified id "'+this.id+'" already exists. Renaming it to '+(this.id=C.uniqueId())));C.parsePolicies(this,C.policies,b);this.attributes.id=this.id;this.resizeTo&&this.resizeTo(b.width,b.height,!0);this.chartType&&this.chartType(b.type||b.swfUrl,!0);C.raiseEvent("beforeInitialize",b,this);C.core.items[this.id]=
this;C.core.defaultOptions=C.core.options;C.raiseEvent("initialized",b,this);return this};C.core.prototype={};C.core.prototype.constructor=C.core;C.extend(C.core,{id:"FusionCharts",version:["3","12","2"],items:{},options:{},getObjectReference:function(a){return C.core.items[a].ref},register:function(a){return C.registrars[a=a&&a.toString&&a.toString().toLowerCase()]&&C.registrars[a].apply(C.core,Array.prototype.slice.call(arguments,1))},get:function(a){return C.registrars[a=a&&a.toString&&a.toString().toLowerCase()]&&
C.registrars[a].apply(C.core,Array.prototype.slice.call(arguments,1))}});b.FusionCharts=C.core;b.FusionMaps&&b.FusionMaps.legacy&&(C.core(["private","modules.core.geo",b.FusionMaps.legacy,b.FusionMaps.version]),q=!0);O.test(v.readyState)||v.loaded?(C.ready=!0,setTimeout(M,1)):function(){function N(){m||(m=!0,r&&clearTimeout(r),q||(b.FusionMaps&&b.FusionMaps.legacy&&C.core(["private","modules.core.geo",b.FusionMaps.legacy,b.FusionMaps.version]),b.FusionMaps=C.core),setTimeout(M,1))}function E(){O.test(v.readyState)?
N():r=setTimeout(E,10)}var r,k,m;v.addEventListener?v.addEventListener("DOMContentLoaded",N,!1):v.attachEvent&&b.attachEvent("onLoad",N);if(a)try{"https:"===b.location.protocol?v.write('<script id="__ie_onload_fusioncharts" defer="defer" src="//:">\x3c/script>'):v.write('<script id="__ie_onload_fusioncharts" defer="defer" src="javascript:void(0)">\x3c/script>'),k=v.getElementById("__ie_onload_fusioncharts"),k.onreadystatechange=function(){"complete"==this.readyState&&N()}}catch(n){}/WebKit/i.test(J.userAgent)&&
(r=setTimeout(E,10));b.onload=function(a){return function(){N();a&&a.call&&a.call(b)}}(b.onload)}();return b.FusionMaps=C.core}(Ab);Q.register("module",["private","modules.mantle.errormanager",function(){var b=this,v=b.window,J={type:"TypeException",range:"ValueRangeException",impl:"NotImplementedException",param:"ParameterException",run:"RuntimeException",comp:"DesignTimeError",undefined:"UnspecifiedException"},C=function(A,u,a,O,q,M){var C="#"+u+" "+(A?A.id:"unknown-source")+O+" "+M+" >> ";q instanceof
Error?(q.name=J[a],q.module="FusionCharts"+O,q.level=M,q.message=C+q.message,C=q.message,v.setTimeout(function(){throw q;},0)):C+=q;u={id:u,nature:J[a],source:"FusionCharts"+O,message:C};b.raiseEvent(M,u,A);if("function"===typeof v["FC_"+M])v["FC_"+M](u)},H;b.raiseError=function(b,u,a,O,q){C(b,u,a,O,q,"Error")};b.raiseWarning=function(b,u,a,O,q){C(b,u,a,O,q,"Warning")};H={outputHelpers:{text:function(b,u){H.outputTo("#"+b.eventId+" ["+(b.sender.id||b.sender).toString()+'] fired "'+b.eventType+'" event. '+
("error"===b.eventType||"warning"===b.eventType?u.message:""))},event:function(b,u){this.outputTo(b,u)},verbose:function(b,u){H.outputTo(b.eventId,b.sender.id,b.eventType,u)}},outputHandler:function(A,u){"function"!==typeof H.outputTo?b.core["debugger"].outputFailed=!0:(b.core["debugger"].outputFailed=!1,H.currentOutputHelper(A,u))},currentOutputHelper:void 0,outputTo:void 0,enabled:!1};H.currentOutputHelper=H.outputHelpers.text;b.extend(b.core,{"debugger":{syncStateWithCharts:!0,outputFormat:function(b){return b&&
"function"===typeof b.toLowerCase&&"function"===typeof H.outputHelpers[b=b.toLowerCase()]?(H.currentOutputHelper=H.outputHelpers[b],!0):!1},outputTo:function(v){"function"===typeof v?H.outputTo=v:null===v&&(b.core["debugger"].enable(!1),delete H.outputTo)},enable:function(v,u,a){var O;"object"===typeof v&&1===arguments.length&&(O=v,v=O.state,u=O.outputTo,a=O.outputFormat);"function"===typeof v&&("string"!==typeof u||2!==arguments.length&&!O||(a=u),u=v,v=!0);if("boolean"===typeof v&&v!==H.enabled)b.core[(H.enabled=
v)?"addEventListener":"removeEventListener"]("*",H.outputHandler);"function"===typeof u&&(H.outputTo=u);b.core["debugger"].outputFormat(a);return H.enabled},enableFirebugLite:function(){var A;v.console&&v.console.firebug?b.core["debugger"].enable(v.console.log,"verbose"):((A=v.document.getElementsByTagName("html"))&&A[0].setAttribute("debug","true"),b.loadScript("https://getfirebug.com/firebug-lite.js#overrideConsole=false,startOpened=true",function(){b.core["debugger"].enable(v.console.log,"verbose")},
"{ startOpened: true }",!0,!0))}},debugMode:{enabled:function(){v.setTimeout(function(){throw Error("Deprecated! Please use FusionCharts.debugger.enable instead.");},0);return b.core["debugger"].enable.apply(b.core["debugger"],arguments)}}},!1)}]);Q.register("module",["private","modules.renderer.js-schedular",function(){var b=this.core,v=[],J={},C=[],H={},A=0,u=this.window,a=b.schedular={},O=u.requestAnimationFrame||u.webkitRequestAnimationFrame||u.mozRequestAnimationFrame||u.oRequestAnimationFrame||
u.msRequestAnimationFrame||function(a){setTimeout(a,16)},q=function(){var a=(new Date).getTime(),b,N,E;do{a:{b=E;E=N;for(var r=void 0,k=!1,m=void 0,n=void 0;!k;)if(r=v[0]){m=r.fullFrameJob;if(b&&E&&m){b=!1;break a}v.splice(0,1);--C[r.priority];H[r.jobID]&&!r.executed&&(n=k=!0,!b&&0<v.length&&O(q),r.job(),r.executed=!0,delete H[r.jobID])}else k=!0;b={jobFound:n,fullFrameJob:m}}E=!0;N=N||b.fullFrameJob}while(b.jobFound&&15>(new Date).getTime()-a)};a.addJob=function(a,b,N,E){var r,k=0;E=E?b-1:b;"function"===
typeof a&&(r="JOB"+ ++A+(b||1),a={job:a,priority:b,fullFrameJob:N,jobID:r});for(N=0;N<=E;N++)k+=C[N]||0;v.splice(k,0,a);H[r]=a;C[b]=(C[b]||0)+1;1===v.length&&O(q);return r};a.removeJob=function(a){H[a]&&delete H[a]};a.pauseExecution=function(a){if(H[a])J[H[a]]=H[a],delete H[a];else return!1};a.resumeExecution=function(b){var q=J[b];if(q)a.addJob(q),delete