Commit 2cc805ef81f8ea081a2125da10e39ea9d088ddfc

Authored by Jeff Chen
Exists in master

Merge branch 'master' of http://gitlab.sanlien.com.tw/tom/git_test

# Conflicts:
#	changeLog.txt
#	newFile.txt
Showing 206 changed files   Show diff stats
1 //123456789
2 void main(void)
3 {
4 define Tom PHD
5 }
amcharts/amcharts.js
File was created 1 if(!AmCharts)var AmCharts={themes:{},maps:{},inheriting:{},charts:[],onReadyArray:[],useUTC:!1,updateRate:40,uid:0,lang:{},translations:{},mapTranslations:{}};
2 AmCharts.Class=function(a){var b=function(){arguments[0]!==AmCharts.inheriting&&(this.events={},this.construct.apply(this,arguments))};a.inherits?(b.prototype=new a.inherits(AmCharts.inheriting),b.base=a.inherits.prototype,delete a.inherits):(b.prototype.createEvents=function(){for(var a=0,b=arguments.length;a<b;a++)this.events[arguments[a]]=[]},b.prototype.listenTo=function(a,b,c){this.removeListener(a,b,c);a.events[b].push({handler:c,scope:this})},b.prototype.addListener=function(a,b,c){this.removeListener(this,
3 a,b);this.events[a].push({handler:b,scope:c})},b.prototype.removeListener=function(a,b,c){if(a&&a.events)for(a=a.events[b],b=a.length-1;0<=b;b--)a[b].handler===c&&a.splice(b,1)},b.prototype.fire=function(a,b){for(var c=this.events[a],g=0,h=c.length;g<h;g++){var k=c[g];k.handler.call(k.scope,b)}});for(var c in a)b.prototype[c]=a[c];return b};AmCharts.addChart=function(a){AmCharts.charts.push(a)};AmCharts.removeChart=function(a){for(var b=AmCharts.charts,c=b.length-1;0<=c;c--)b[c]==a&&b.splice(c,1)};
4 AmCharts.isModern=!0;AmCharts.getIEVersion=function(){var a=0;if("Microsoft Internet Explorer"==navigator.appName){var b=navigator.userAgent,c=/MSIE ([0-9]{1,}[.0-9]{0,})/;null!=c.exec(b)&&(a=parseFloat(RegExp.$1))}else"Netscape"==navigator.appName&&(b=navigator.userAgent,c=/Trident\/.*rv:([0-9]{1,}[.0-9]{0,})/,null!=c.exec(b)&&(a=parseFloat(RegExp.$1)));return a};
5 AmCharts.applyLang=function(a){var b=AmCharts.translations;b&&(a=b[a])&&(AmCharts.lang=a,a.monthNames&&(AmCharts.dayNames=a.dayNames,AmCharts.shortDayNames=a.shortDayNames,AmCharts.monthNames=a.monthNames,AmCharts.shortMonthNames=a.shortMonthNames))};AmCharts.IEversion=AmCharts.getIEVersion();9>AmCharts.IEversion&&0<AmCharts.IEversion&&(AmCharts.isModern=!1,AmCharts.isIE=!0);AmCharts.dx=0;AmCharts.dy=0;
6 if(document.addEventListener||window.opera)AmCharts.isNN=!0,AmCharts.isIE=!1,AmCharts.dx=.5,AmCharts.dy=.5;document.attachEvent&&(AmCharts.isNN=!1,AmCharts.isIE=!0,AmCharts.isModern||(AmCharts.dx=0,AmCharts.dy=0));window.chrome&&(AmCharts.chrome=!0);AmCharts.handleResize=function(){for(var a=AmCharts.charts,b=0;b<a.length;b++){var c=a[b];c&&c.div&&c.handleResize()}};AmCharts.handleMouseUp=function(a){for(var b=AmCharts.charts,c=0;c<b.length;c++){var d=b[c];d&&d.handleReleaseOutside(a)}};
7 AmCharts.handleMouseMove=function(a){for(var b=AmCharts.charts,c=0;c<b.length;c++){var d=b[c];d&&d.handleMouseMove(a)}};AmCharts.resetMouseOver=function(){for(var a=AmCharts.charts,b=0;b<a.length;b++){var c=a[b];c&&(c.mouseIsOver=!1)}};AmCharts.ready=function(a){AmCharts.onReadyArray.push(a)};AmCharts.handleLoad=function(){AmCharts.isReady=!0;for(var a=AmCharts.onReadyArray,b=0;b<a.length;b++){var c=a[b];isNaN(AmCharts.processDelay)?c():setTimeout(c,AmCharts.processDelay*b)}};
8 AmCharts.getUniqueId=function(){AmCharts.uid++;return"AmChartsEl-"+AmCharts.uid};AmCharts.isNN&&(document.addEventListener("mousemove",AmCharts.handleMouseMove,!0),window.addEventListener("resize",AmCharts.handleResize,!0),document.addEventListener("mouseup",AmCharts.handleMouseUp,!0),window.addEventListener("load",AmCharts.handleLoad,!0));
9 AmCharts.isIE&&(document.attachEvent("onmousemove",AmCharts.handleMouseMove),window.attachEvent("onresize",AmCharts.handleResize),document.attachEvent("onmouseup",AmCharts.handleMouseUp),window.attachEvent("onload",AmCharts.handleLoad));
10 AmCharts.clear=function(){var a=AmCharts.charts;if(a)for(var b=0;b<a.length;b++)a[b].clear();AmCharts.charts=null;AmCharts.isNN&&(document.removeEventListener("mousemove",AmCharts.handleMouseMove,!0),window.removeEventListener("resize",AmCharts.handleResize,!0),document.removeEventListener("mouseup",AmCharts.handleMouseUp,!0),window.removeEventListener("load",AmCharts.handleLoad,!0));AmCharts.isIE&&(document.detachEvent("onmousemove",AmCharts.handleMouseMove),window.detachEvent("onresize",AmCharts.handleResize),
11 document.detachEvent("onmouseup",AmCharts.handleMouseUp),window.detachEvent("onload",AmCharts.handleLoad))};
12 AmCharts.makeChart=function(a,b,c){var d=b.type,e=b.theme;AmCharts.isString(e)&&(e=AmCharts.themes[e],b.theme=e);var f;switch(d){case "serial":f=new AmCharts.AmSerialChart(e);break;case "xy":f=new AmCharts.AmXYChart(e);break;case "pie":f=new AmCharts.AmPieChart(e);break;case "radar":f=new AmCharts.AmRadarChart(e);break;case "gauge":f=new AmCharts.AmAngularGauge(e);break;case "funnel":f=new AmCharts.AmFunnelChart(e);break;case "map":f=new AmCharts.AmMap(e);break;case "stock":f=new AmCharts.AmStockChart(e)}AmCharts.extend(f,
13 b);AmCharts.isReady?isNaN(c)?f.write(a):setTimeout(function(){AmCharts.realWrite(f,a)},c):AmCharts.ready(function(){isNaN(c)?f.write(a):setTimeout(function(){AmCharts.realWrite(f,a)},c)});return f};AmCharts.realWrite=function(a,b){a.write(b)};AmCharts.toBoolean=function(a,b){if(void 0===a)return b;switch(String(a).toLowerCase()){case "true":case "yes":case "1":return!0;case "false":case "no":case "0":case null:return!1;default:return Boolean(a)}};AmCharts.removeFromArray=function(a,b){var c;for(c=a.length-1;0<=c;c--)a[c]==b&&a.splice(c,1)};AmCharts.getDecimals=function(a){var b=0;isNaN(a)||(a=String(a),-1!=a.indexOf("e-")?b=Number(a.split("-")[1]):-1!=a.indexOf(".")&&(b=a.split(".")[1].length));return b};
14 AmCharts.wrappedText=function(a,b,c,d,e,f,g,h,k){var l=AmCharts.text(a,b,c,d,e,f,g),m="\n";AmCharts.isModern||(m="<br>");if(10<k)return l;if(l){var n=l.getBBox();if(n.width>h){l.remove();for(var l=[],p=0;-1<(index=b.indexOf(" ",p));)l.push(index),p=index+1;for(var q=Math.round(b.length/2),r=1E3,s,p=0;p<l.length;p++){var v=Math.abs(l[p]-q);v<r&&(s=l[p],r=v)}if(isNaN(s)){h=Math.ceil(n.width/h);for(p=1;p<h;p++)s=Math.round(b.length/h*p),b=b.substr(0,s)+m+b.substr(s);return AmCharts.text(a,b,c,d,e,f,
15 g)}b=b.substr(0,s)+m+b.substr(s+1);return AmCharts.wrappedText(a,b,c,d,e,f,g,h,k+1)}return l}};AmCharts.getStyle=function(a,b){var c="";document.defaultView&&document.defaultView.getComputedStyle?c=document.defaultView.getComputedStyle(a,"").getPropertyValue(b):a.currentStyle&&(b=b.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()}),c=a.currentStyle[b]);return c};AmCharts.removePx=function(a){if(void 0!=a)return Number(a.substring(0,a.length-2))};
16 AmCharts.getURL=function(a,b){if(a)if("_self"!=b&&b)if("_top"==b&&window.top)window.top.location.href=a;else if("_parent"==b&&window.parent)window.parent.location.href=a;else{var c=document.getElementsByName(b)[0];c?c.src=a:window.open(a)}else window.location.href=a};AmCharts.ifArray=function(a){return a&&0<a.length?!0:!1};AmCharts.callMethod=function(a,b){var c;for(c=0;c<b.length;c++){var d=b[c];if(d){if(d[a])d[a]();var e=d.length;if(0<e){var f;for(f=0;f<e;f++){var g=d[f];if(g&&g[a])g[a]()}}}}};
17 AmCharts.toNumber=function(a){return"number"==typeof a?a:Number(String(a).replace(/[^0-9\-.]+/g,""))};AmCharts.toColor=function(a){if(""!==a&&void 0!==a)if(-1!=a.indexOf(",")){a=a.split(",");var b;for(b=0;b<a.length;b++){var c=a[b].substring(a[b].length-6,a[b].length);a[b]="#"+c}}else a=a.substring(a.length-6,a.length),a="#"+a;return a};
18 AmCharts.toCoordinate=function(a,b,c){var d;void 0!==a&&(a=String(a),c&&c<b&&(b=c),d=Number(a),-1!=a.indexOf("!")&&(d=b-Number(a.substr(1))),-1!=a.indexOf("%")&&(d=b*Number(a.substr(0,a.length-1))/100));return d};AmCharts.fitToBounds=function(a,b,c){a<b&&(a=b);a>c&&(a=c);return a};AmCharts.isDefined=function(a){return void 0===a?!1:!0};AmCharts.stripNumbers=function(a){return a.replace(/[0-9]+/g,"")};AmCharts.roundTo=function(a,b){if(0>b)return a;var c=Math.pow(10,b);return Math.round(a*c)/c};
19 AmCharts.toFixed=function(a,b){var c=String(Math.round(a*Math.pow(10,b)));if(0<b){var d=c.length;if(d<b){var e;for(e=0;e<b-d;e++)c="0"+c}d=c.substring(0,c.length-b);""===d&&(d=0);return d+"."+c.substring(c.length-b,c.length)}return String(c)};
20 AmCharts.formatDuration=function(a,b,c,d,e,f){var g=AmCharts.intervals,h=f.decimalSeparator;if(a>=g[b].contains){var k=a-Math.floor(a/g[b].contains)*g[b].contains;"ss"==b&&(k=AmCharts.formatNumber(k,f),1==k.split(h)[0].length&&(k="0"+k));("mm"==b||"hh"==b)&&10>k&&(k="0"+k);c=k+""+d[b]+""+c;a=Math.floor(a/g[b].contains);b=g[b].nextInterval;return AmCharts.formatDuration(a,b,c,d,e,f)}"ss"==b&&(a=AmCharts.formatNumber(a,f),1==a.split(h)[0].length&&(a="0"+a));("mm"==b||"hh"==b)&&10>a&&(a="0"+a);c=a+""+
21 d[b]+""+c;if(g[e].count>g[b].count)for(a=g[b].count;a<g[e].count;a++)b=g[b].nextInterval,"ss"==b||"mm"==b||"hh"==b?c="00"+d[b]+""+c:"DD"==b&&(c="0"+d[b]+""+c);":"==c.charAt(c.length-1)&&(c=c.substring(0,c.length-1));return c};
22 AmCharts.formatNumber=function(a,b,c,d,e){a=AmCharts.roundTo(a,b.precision);isNaN(c)&&(c=b.precision);var f=b.decimalSeparator;b=b.thousandsSeparator;var g;g=0>a?"-":"";a=Math.abs(a);var h=String(a),k=!1;-1!=h.indexOf("e")&&(k=!0);0<=c&&!k&&(h=AmCharts.toFixed(a,c));var l="";if(k)l=h;else{var h=h.split("."),k=String(h[0]),m;for(m=k.length;0<=m;m-=3)l=m!=k.length?0!==m?k.substring(m-3,m)+b+l:k.substring(m-3,m)+l:k.substring(m-3,m);void 0!==h[1]&&(l=l+f+h[1]);void 0!==c&&0<c&&"0"!=l&&(l=AmCharts.addZeroes(l,
23 f,c))}l=g+l;""===g&&!0===d&&0!==a&&(l="+"+l);!0===e&&(l+="%");return l};AmCharts.addZeroes=function(a,b,c){a=a.split(b);void 0===a[1]&&0<c&&(a[1]="0");return a[1].length<c?(a[1]+="0",AmCharts.addZeroes(a[0]+b+a[1],b,c)):void 0!==a[1]?a[0]+b+a[1]:a[0]};
24 AmCharts.scientificToNormal=function(a){var b;a=String(a).split("e");var c;if("-"==a[1].substr(0,1)){b="0.";for(c=0;c<Math.abs(Number(a[1]))-1;c++)b+="0";b+=a[0].split(".").join("")}else{var d=0;b=a[0].split(".");b[1]&&(d=b[1].length);b=a[0].split(".").join("");for(c=0;c<Math.abs(Number(a[1]))-d;c++)b+="0"}return b};
25 AmCharts.toScientific=function(a,b){if(0===a)return"0";var c=Math.floor(Math.log(Math.abs(a))*Math.LOG10E);Math.pow(10,c);mantissa=String(mantissa).split(".").join(b);return String(mantissa)+"e"+c};AmCharts.randomColor=function(){return"#"+("00000"+(16777216*Math.random()<<0).toString(16)).substr(-6)};
26 AmCharts.hitTest=function(a,b,c){var d=!1,e=a.x,f=a.x+a.width,g=a.y,h=a.y+a.height,k=AmCharts.isInRectangle;d||(d=k(e,g,b));d||(d=k(e,h,b));d||(d=k(f,g,b));d||(d=k(f,h,b));d||!0===c||(d=AmCharts.hitTest(b,a,!0));return d};AmCharts.isInRectangle=function(a,b,c){return a>=c.x-5&&a<=c.x+c.width+5&&b>=c.y-5&&b<=c.y+c.height+5?!0:!1};AmCharts.isPercents=function(a){if(-1!=String(a).indexOf("%"))return!0};
27 AmCharts.findPosX=function(a){var b=a,c=a.offsetLeft;if(a.offsetParent){for(;a=a.offsetParent;)c+=a.offsetLeft;for(;(b=b.parentNode)&&b!=document.body;)c-=b.scrollLeft||0}return c};AmCharts.findPosY=function(a){var b=a,c=a.offsetTop;if(a.offsetParent){for(;a=a.offsetParent;)c+=a.offsetTop;for(;(b=b.parentNode)&&b!=document.body;)c-=b.scrollTop||0}return c};AmCharts.findIfFixed=function(a){if(a.offsetParent)for(;a=a.offsetParent;)if("fixed"==AmCharts.getStyle(a,"position"))return!0;return!1};
28 AmCharts.findIfAuto=function(a){return a.style&&"auto"==AmCharts.getStyle(a,"overflow")?!0:a.parentNode?AmCharts.findIfAuto(a.parentNode):!1};AmCharts.findScrollLeft=function(a,b){a.scrollLeft&&(b+=a.scrollLeft);return a.parentNode?AmCharts.findScrollLeft(a.parentNode,b):b};AmCharts.findScrollTop=function(a,b){a.scrollTop&&(b+=a.scrollTop);return a.parentNode?AmCharts.findScrollTop(a.parentNode,b):b};
29 AmCharts.formatValue=function(a,b,c,d,e,f,g,h){if(b){void 0===e&&(e="");var k;for(k=0;k<c.length;k++){var l=c[k],m=b[l];void 0!==m&&(m=f?AmCharts.addPrefix(m,h,g,d):AmCharts.formatNumber(m,d),a=a.replace(new RegExp("\\[\\["+e+""+l+"\\]\\]","g"),m))}}return a};AmCharts.formatDataContextValue=function(a,b){if(a){var c=a.match(/\[\[.*?\]\]/g),d;for(d=0;d<c.length;d++){var e=c[d],e=e.substr(2,e.length-4);void 0!==b[e]&&(a=a.replace(new RegExp("\\[\\["+e+"\\]\\]","g"),b[e]))}}return a};
30 AmCharts.massReplace=function(a,b){for(var c in b)if(b.hasOwnProperty(c)){var d=b[c];void 0===d&&(d="");a=a.replace(c,d)}return a};AmCharts.cleanFromEmpty=function(a){return a.replace(/\[\[[^\]]*\]\]/g,"")};
31 AmCharts.addPrefix=function(a,b,c,d,e){var f=AmCharts.formatNumber(a,d),g="",h,k,l;if(0===a)return"0";0>a&&(g="-");a=Math.abs(a);if(1<a)for(h=b.length-1;-1<h;h--){if(a>=b[h].number&&(k=a/b[h].number,l=Number(d.precision),1>l&&(l=1),c=AmCharts.roundTo(k,l),l=AmCharts.formatNumber(c,{precision:-1,decimalSeparator:d.decimalSeparator,thousandsSeparator:d.thousandsSeparator}),!e||k==c)){f=g+""+l+""+b[h].prefix;break}}else for(h=0;h<c.length;h++)if(a<=c[h].number){k=a/c[h].number;l=Math.abs(Math.round(Math.log(k)*
32 Math.LOG10E));k=AmCharts.roundTo(k,l);f=g+""+k+""+c[h].prefix;break}return f};AmCharts.remove=function(a){a&&a.remove()};AmCharts.recommended=function(){var a="js";document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")||swfobject&&swfobject.hasFlashPlayerVersion("8")&&(a="flash");return a};AmCharts.getEffect=function(a){">"==a&&(a="easeOutSine");"<"==a&&(a="easeInSine");"elastic"==a&&(a="easeOutElastic");return a};
33 AmCharts.getObjById=function(a,b){var c,d;for(d=0;d<a.length;d++){var e=a[d];e.id==b&&(c=e)}return c};AmCharts.applyTheme=function(a,b,c){b||(b=AmCharts.theme);b&&b[c]&&AmCharts.extend(a,b[c])};AmCharts.isString=function(a){return"string"==typeof a?!0:!1};AmCharts.extend=function(a,b,c){for(var d in b)c?a.hasOwnProperty(d)||(a[d]=b[d]):a[d]=b[d];return a};
34 AmCharts.copyProperties=function(a,b){for(var c in a)a.hasOwnProperty(c)&&"events"!=c&&void 0!==a[c]&&"function"!=typeof a[c]&&"cname"!=c&&(b[c]=a[c])};AmCharts.processObject=function(a,b,c){!1===a instanceof b&&(a=AmCharts.extend(new b(c),a));return a};AmCharts.fixNewLines=function(a){var b=RegExp("\\n","g");a&&(a=a.replace(b,"<br />"));return a};AmCharts.fixBrakes=function(a){if(AmCharts.isModern){var b=RegExp("<br>","g");a&&(a=a.replace(b,"\n"))}else a=AmCharts.fixNewLines(a);return a};
35 AmCharts.deleteObject=function(a,b){if(a){if(void 0===b||null===b)b=20;if(0!==b)if("[object Array]"===Object.prototype.toString.call(a))for(var c=0;c<a.length;c++)AmCharts.deleteObject(a[c],b-1),a[c]=null;else if(a&&!a.tagName)try{for(c in a)a[c]&&("object"==typeof a[c]&&AmCharts.deleteObject(a[c],b-1),"function"!=typeof a[c]&&(a[c]=null))}catch(d){}}};
36 AmCharts.bounce=function(a,b,c,d,e){return(b/=e)<1/2.75?7.5625*d*b*b+c:b<2/2.75?d*(7.5625*(b-=1.5/2.75)*b+.75)+c:b<2.5/2.75?d*(7.5625*(b-=2.25/2.75)*b+.9375)+c:d*(7.5625*(b-=2.625/2.75)*b+.984375)+c};AmCharts.easeInSine=function(a,b,c,d,e){return-d*Math.cos(b/e*(Math.PI/2))+d+c};AmCharts.easeOutSine=function(a,b,c,d,e){return d*Math.sin(b/e*(Math.PI/2))+c};
37 AmCharts.easeOutElastic=function(a,b,c,d,e){a=1.70158;var f=0,g=d;if(0===b)return c;if(1==(b/=e))return c+d;f||(f=.3*e);g<Math.abs(d)?(g=d,a=f/4):a=f/(2*Math.PI)*Math.asin(d/g);return g*Math.pow(2,-10*b)*Math.sin(2*(b*e-a)*Math.PI/f)+d+c};AmCharts.AxisBase=AmCharts.Class({construct:function(a){this.createEvents("clickItem","rollOverItem","rollOutItem");this.viY=this.viX=this.y=this.x=this.dy=this.dx=0;this.axisThickness=1;this.axisColor="#000000";this.axisAlpha=1;this.gridCount=this.tickLength=5;this.gridAlpha=.15;this.gridThickness=1;this.gridColor="#000000";this.dashLength=0;this.labelFrequency=1;this.showLastLabel=this.showFirstLabel=!0;this.fillColor="#FFFFFF";this.fillAlpha=0;this.labelsEnabled=!0;this.labelRotation=0;this.autoGridCount=
38 !0;this.valueRollOverColor="#CC0000";this.offset=0;this.guides=[];this.visible=!0;this.counter=0;this.guides=[];this.ignoreAxisWidth=this.inside=!1;this.minHorizontalGap=75;this.minVerticalGap=35;this.titleBold=!0;this.minorGridEnabled=!1;this.minorGridAlpha=.07;this.autoWrap=!1;this.titleAlign="middle";this.labelOffset=0;AmCharts.applyTheme(this,a,"AxisBase")},zoom:function(a,b){this.start=a;this.end=b;this.dataChanged=!0;this.draw()},fixAxisPosition:function(){var a=this.position;"H"==this.orientation?
39 ("left"==a&&(a="bottom"),"right"==a&&(a="top")):("bottom"==a&&(a="left"),"top"==a&&(a="right"));this.position=a},draw:function(){var a=this.chart;this.allLabels=[];this.counter=0;this.destroy();this.fixAxisPosition();this.labels=[];var b=a.container,c=b.set();a.gridSet.push(c);this.set=c;b=b.set();a.axesLabelsSet.push(b);this.labelsSet=b;this.axisLine=new this.axisRenderer(this);this.autoGridCount?("V"==this.orientation?(a=this.height/this.minVerticalGap,3>a&&(a=3)):a=this.width/this.minHorizontalGap,
40 this.gridCountR=Math.max(a,1)):this.gridCountR=this.gridCount;this.axisWidth=this.axisLine.axisWidth;this.addTitle()},setOrientation:function(a){this.orientation=a?"H":"V"},addTitle:function(){var a=this.title;if(a){var b=this.chart,c=this.titleColor;void 0===c&&(c=b.color);var d=this.titleFontSize;isNaN(d)&&(d=b.fontSize+1);this.titleLabel=AmCharts.text(b.container,a,c,b.fontFamily,d,this.titleAlign,this.titleBold)}},positionTitle:function(){var a=this.titleLabel;if(a){var b,c,d=this.labelsSet,e=
41 {};0<d.length()?e=d.getBBox():(e.x=0,e.y=0,e.width=this.viW,e.height=this.viH);d.push(a);var d=e.x,f=e.y;AmCharts.VML&&(this.rotate?d-=this.x:f-=this.y);var g=e.width,e=e.height,h=this.viW,k=this.viH,l=0,m=a.getBBox().height/2,n=this.inside,p=this.titleAlign;switch(this.position){case "top":b="left"==p?-1:"right"==p?h:h/2;c=f-10-m;break;case "bottom":b="left"==p?-1:"right"==p?h:h/2;c=f+e+10+m;break;case "left":b=d-10-m;n&&(b-=5);c="left"==p?k+1:"right"==p?-1:k/2;l=-90;break;case "right":b=d+g+10+
42 m-3,n&&(b+=7),c="left"==p?k+2:"right"==p?-2:k/2,l=-90}this.marginsChanged?(a.translate(b,c),this.tx=b,this.ty=c):a.translate(this.tx,this.ty);this.marginsChanged=!1;0!==l&&a.rotate(l)}},pushAxisItem:function(a,b){var c=this,d=a.graphics();0<d.length()&&(b?c.labelsSet.push(d):c.set.push(d));if(d=a.getLabel())this.labelsSet.push(d),d.click(function(b){c.handleMouse(b,a,"clickItem")}).mouseover(function(b){c.handleMouse(b,a,"rollOverItem")}).mouseout(function(b){c.handleMouse(b,a,"rollOutItem")})},handleMouse:function(a,
43 b,c){this.fire(c,{type:c,value:b.value,serialDataItem:b.serialDataItem,axis:this,target:b.label,chart:this.chart,event:a})},addGuide:function(a){for(var b=this.guides,c=!1,d=0;d<b.length;d++)b[d]==a&&(c=!0);c||b.push(a)},removeGuide:function(a){var b=this.guides,c;for(c=0;c<b.length;c++)b[c]==a&&b.splice(c,1)},handleGuideOver:function(a){clearTimeout(this.chart.hoverInt);var b=a.graphics.getBBox(),c=b.x+b.width/2,b=b.y+b.height/2,d=a.fillColor;void 0===d&&(d=a.lineColor);this.chart.showBalloon(a.balloonText,
44 d,!0,c,b)},handleGuideOut:function(a){this.chart.hideBalloon()},addEventListeners:function(a,b){var c=this;a.mouseover(function(){c.handleGuideOver(b)});a.mouseout(function(){c.handleGuideOut(b)})},getBBox:function(){var a=this.labelsSet.getBBox();AmCharts.VML||(a={x:a.x+this.x,y:a.y+this.y,width:a.width,height:a.height});return a},destroy:function(){AmCharts.remove(this.set);AmCharts.remove(this.labelsSet);var a=this.axisLine;a&&AmCharts.remove(a.set);AmCharts.remove(this.grid0)}});AmCharts.ValueAxis=AmCharts.Class({inherits:AmCharts.AxisBase,construct:function(a){this.cname="ValueAxis";this.createEvents("axisChanged","logarithmicAxisFailed","axisSelfZoomed","axisZoomed");AmCharts.ValueAxis.base.construct.call(this,a);this.dataChanged=!0;this.stackType="none";this.position="left";this.unitPosition="right";this.recalculateToPercents=this.includeHidden=this.includeGuidesInMinMax=this.integersOnly=!1;this.durationUnits={DD:"d. ",hh:":",mm:":",ss:""};this.scrollbar=!1;this.baseValue=
45 0;this.radarCategoriesEnabled=!0;this.gridType="polygons";this.useScientificNotation=!1;this.axisTitleOffset=10;this.minMaxMultiplier=1;this.logGridLimit=2;AmCharts.applyTheme(this,a,this.cname)},updateData:function(){0>=this.gridCountR&&(this.gridCountR=1);this.totals=[];this.data=this.chart.chartData;var a=this.chart;"xy"!=a.type&&(this.stackGraphs("smoothedLine"),this.stackGraphs("line"),this.stackGraphs("column"),this.stackGraphs("step"));this.recalculateToPercents&&this.recalculate();this.synchronizationMultiplier&&
46 this.synchronizeWith?(AmCharts.isString(this.synchronizeWith)&&(this.synchronizeWith=a.getValueAxisById(this.synchronizeWith)),this.synchronizeWith&&(this.synchronizeWithAxis(this.synchronizeWith),this.foundGraphs=!0)):(this.foundGraphs=!1,this.getMinMax())},draw:function(){AmCharts.ValueAxis.base.draw.call(this);var a=this.chart,b=this.set;"duration"==this.type&&(this.duration="ss");!0===this.dataChanged&&(this.updateData(),this.dataChanged=!1);if(this.logarithmic&&(0>=this.getMin(0,this.data.length-
47 1)||0>=this.minimum))this.fire("logarithmicAxisFailed",{type:"logarithmicAxisFailed",chart:a});else{this.grid0=null;var c,d,e=a.dx,f=a.dy,g=!1,h=this.logarithmic;if(isNaN(this.min)||isNaN(this.max)||!this.foundGraphs||Infinity==this.min||-Infinity==this.max)g=!0;else{var k=this.labelFrequency,l=this.showFirstLabel,m=this.showLastLabel,n=1,p=0,q=Math.round((this.max-this.min)/this.step)+1,r;!0===h?(r=Math.log(this.max)*Math.LOG10E-Math.log(this.minReal)*Math.LOG10E,this.stepWidth=this.axisWidth/r,
48 r>this.logGridLimit&&(q=Math.ceil(Math.log(this.max)*Math.LOG10E)+1,p=Math.round(Math.log(this.minReal)*Math.LOG10E),q>this.gridCountR&&(n=Math.ceil(q/this.gridCountR)))):this.stepWidth=this.axisWidth/(this.max-this.min);var s=0;1>this.step&&-1<this.step&&(s=AmCharts.getDecimals(this.step));this.integersOnly&&(s=0);s>this.maxDecCount&&(s=this.maxDecCount);var v=this.precision;isNaN(v)||(s=v);this.max=AmCharts.roundTo(this.max,this.maxDecCount);this.min=AmCharts.roundTo(this.min,this.maxDecCount);
49 var w={};w.precision=s;w.decimalSeparator=a.nf.decimalSeparator;w.thousandsSeparator=a.nf.thousandsSeparator;this.numberFormatter=w;var t,u=this.guides,y=u.length;if(0<y){c=this.fillAlpha;for(d=this.fillAlpha=0;d<y;d++){var E=u[d],A=NaN,z=E.above;isNaN(E.toValue)||(A=this.getCoordinate(E.toValue),t=new this.axisItemRenderer(this,A,"",!0,NaN,NaN,E),this.pushAxisItem(t,z));var K=NaN;isNaN(E.value)||(K=this.getCoordinate(E.value),t=new this.axisItemRenderer(this,K,E.label,!0,NaN,(A-K)/2,E),this.pushAxisItem(t,
50 z));isNaN(A-K)||(t=new this.guideFillRenderer(this,K,A,E),this.pushAxisItem(t,z),t=t.graphics(),E.graphics=t,E.balloonText&&this.addEventListeners(t,E))}this.fillAlpha=c}u=!1;for(d=p;d<q;d+=n)y=AmCharts.roundTo(this.step*d+this.min,s),-1!=String(y).indexOf("e")&&(u=!0,String(y).split("e"));this.duration&&(this.maxInterval=AmCharts.getMaxInterval(this.max,this.duration));var s=this.step,I,y=this.minorGridAlpha;this.minorGridEnabled&&(I=this.getMinorGridStep(s,this.stepWidth*s));for(d=p;d<q;d+=n)if(p=
51 s*d+this.min,h&&this.max-this.min>5*this.min&&(p-=this.min),p=AmCharts.roundTo(p,this.maxDecCount+1),!this.integersOnly||Math.round(p)==p)if(isNaN(v)||Number(AmCharts.toFixed(p,v))==p){!0===h&&(0===p&&(p=this.minReal),r>this.logGridLimit&&(p=Math.pow(10,d)),u=-1!=String(p).indexOf("e")?!0:!1);this.useScientificNotation&&(u=!0);this.usePrefixes&&(u=!1);u?(t=-1==String(p).indexOf("e")?p.toExponential(15):String(p),c=t.split("e"),t=Number(c[0]),c=Number(c[1]),t=AmCharts.roundTo(t,14),10==t&&(t=1,c+=
52 1),t=t+"e"+c,0===p&&(t="0"),1==p&&(t="1")):(h&&(t=String(p).split("."),t[1]?(w.precision=t[1].length,0>d&&(w.precision=Math.abs(d))):w.precision=-1),t=this.usePrefixes?AmCharts.addPrefix(p,a.prefixesOfBigNumbers,a.prefixesOfSmallNumbers,w,!0):AmCharts.formatNumber(p,w,w.precision));this.duration&&(t=AmCharts.formatDuration(p,this.duration,"",this.durationUnits,this.maxInterval,w));this.recalculateToPercents?t+="%":(c=this.unit)&&(t="left"==this.unitPosition?c+t:t+c);Math.round(d/k)!=d/k&&(t=void 0);
53 if(0===d&&!l||d==q-1&&!m)t=" ";c=this.getCoordinate(p);this.labelFunction&&(t=this.labelFunction(p,t,this).toString());t=new this.axisItemRenderer(this,c,t,void 0,void 0,void 0,void 0,this.boldLabels);this.pushAxisItem(t);if(p==this.baseValue&&"radar"!=a.type){var F,H,z=this.viW,A=this.viH;t=this.viX;E=this.viY;"H"==this.orientation?0<=c&&c<=z+1&&(F=[c,c,c+e],H=[A,0,f]):0<=c&&c<=A+1&&(F=[0,z,z+e],H=[c,c,c+f]);F&&(c=AmCharts.fitToBounds(2*this.gridAlpha,0,1),c=AmCharts.line(a.container,F,H,this.gridColor,
54 c,1,this.dashLength),c.translate(t,E),this.grid0=c,a.axesSet.push(c),c.toBack())}if(!isNaN(I)&&0<y&&d<q-1){t=this.gridAlpha;this.gridAlpha=this.minorGridAlpha;for(c=1;c<s/I;c++)E=this.getCoordinate(p+I*c),E=new this.axisItemRenderer(this,E,"",!1,0,0,!1,!1,0,!0),this.pushAxisItem(E);this.gridAlpha=t}}d=this.baseValue;this.min>this.baseValue&&this.max>this.baseValue&&(d=this.min);this.min<this.baseValue&&this.max<this.baseValue&&(d=this.max);h&&d<this.minReal&&(d=this.minReal);this.baseCoord=this.getCoordinate(d);
55 d={type:"axisChanged",target:this,chart:a};d.min=h?this.minReal:this.min;d.max=this.max;this.fire("axisChanged",d);this.axisCreated=!0}h=this.axisLine.set;d=this.labelsSet;this.positionTitle();"radar"!=a.type?(a=this.viX,e=this.viY,b.translate(a,e),d.translate(a,e)):h.toFront();!this.visible||g?(b.hide(),h.hide(),d.hide()):(b.show(),h.show(),d.show());this.axisY=this.y-this.viY;this.axisX=this.x-this.viX}},getMinorGridStep:function(a,b){var c=[5,4,2];60>b&&c.shift();for(var d=Math.floor(Math.log(Math.abs(a))*
56 Math.LOG10E),e=0;e<c.length;e++){var f=a/c[e],g=Math.floor(Math.log(Math.abs(f))*Math.LOG10E);if(!(0<Math.abs(d-g)))if(1>a){if(g=Math.pow(10,-g)*f,g==Math.round(g))return f}else if(f==Math.round(f))return f}},stackGraphs:function(a){var b=this.stackType;"stacked"==b&&(b="regular");"line"==b&&(b="none");"100% stacked"==b&&(b="100%");this.stackType=b;var c=[],d=[],e=[],f=[],g,h=this.chart.graphs,k,l,m,n,p=this.baseValue,q=!1;if("line"==a||"step"==a||"smoothedLine"==a)q=!0;if(q&&("regular"==b||"100%"==
57 b))for(n=0;n<h.length;n++)m=h[n],m.hidden||(l=m.type,m.chart==this.chart&&m.valueAxis==this&&a==l&&m.stackable&&(k&&(m.stackGraph=k),k=m));for(k=this.start;k<=this.end;k++){var r=0;for(n=0;n<h.length;n++)if(m=h[n],m.hidden)m.newStack&&(e[k]=NaN,d[k]=NaN);else if(l=m.type,m.chart==this.chart&&m.valueAxis==this&&a==l&&m.stackable&&(l=this.data[k].axes[this.id].graphs[m.id],g=l.values.value,!isNaN(g))){var s=AmCharts.getDecimals(g);r<s&&(r=s);isNaN(f[k])?f[k]=Math.abs(g):f[k]+=Math.abs(g);f[k]=AmCharts.roundTo(f[k],
58 r);s=m.fillToGraph;q&&s&&(s=this.data[k].axes[this.id].graphs[s.id])&&(l.values.open=s.values.value);"regular"==b&&(q&&(isNaN(c[k])?(c[k]=g,l.values.close=g,l.values.open=this.baseValue):(isNaN(g)?l.values.close=c[k]:l.values.close=g+c[k],l.values.open=c[k],c[k]=l.values.close)),"column"!=a||isNaN(g)||(m.newStack&&(e[k]=NaN,d[k]=NaN),l.values.close=g,0>g?(l.values.close=g,isNaN(d[k])?l.values.open=p:(l.values.close+=d[k],l.values.open=d[k]),d[k]=l.values.close):(l.values.close=g,isNaN(e[k])?l.values.open=
59 p:(l.values.close+=e[k],l.values.open=e[k]),e[k]=l.values.close)))}}for(k=this.start;k<=this.end;k++)for(n=0;n<h.length;n++)(m=h[n],m.hidden)?m.newStack&&(e[k]=NaN,d[k]=NaN):(l=m.type,m.chart==this.chart&&m.valueAxis==this&&a==l&&m.stackable&&(l=this.data[k].axes[this.id].graphs[m.id],g=l.values.value,isNaN(g)||(c=g/f[k]*100,l.values.percents=c,l.values.total=f[k],m.newStack&&(e[k]=NaN,d[k]=NaN),"100%"==b&&(isNaN(d[k])&&(d[k]=0),isNaN(e[k])&&(e[k]=0),0>c?(l.values.close=AmCharts.fitToBounds(c+d[k],
60 -100,100),l.values.open=d[k],d[k]=l.values.close):(l.values.close=AmCharts.fitToBounds(c+e[k],-100,100),l.values.open=e[k],e[k]=l.values.close)))))},recalculate:function(){var a=this.chart,b=a.graphs,c;for(c=0;c<b.length;c++){var d=b[c];if(d.valueAxis==this){var e="value";if("candlestick"==d.type||"ohlc"==d.type)e="open";var f,g,h=this.end+2,h=AmCharts.fitToBounds(this.end+1,0,this.data.length-1),k=this.start;0<k&&k--;var l;g=this.start;d.compareFromStart&&(g=0);if(!isNaN(a.startTime)&&(l=a.categoryAxis)){minDuration=
61 l.minDuration();var m=new Date(a.startTime+minDuration/2),n=AmCharts.resetDateToMin(new Date(a.startTime),l.minPeriod).getTime();AmCharts.resetDateToMin(new Date(m),l.minPeriod).getTime()>n&&g++}if(l=a.recalculateFromDate)a.dataDateFormat&&(l=AmCharts.stringToDate(l,a.dataDateFormat)),g=a.getClosestIndex(a.chartData,"time",l.getTime(),!0,0,a.chartData.length),h=a.chartData.length-1;for(l=g;l<=h&&(g=this.data[l].axes[this.id].graphs[d.id],f=g.values[e],isNaN(f));l++);this.recBaseValue=f;for(e=k;e<=
62 h;e++){g=this.data[e].axes[this.id].graphs[d.id];g.percents={};var k=g.values,p;for(p in k)g.percents[p]="percents"!=p?k[p]/f*100-100:k[p]}}}},getMinMax:function(){var a=!1,b=this.chart,c=b.graphs,d;for(d=0;d<c.length;d++){var e=c[d].type;("line"==e||"step"==e||"smoothedLine"==e)&&this.expandMinMax&&(a=!0)}a&&(0<this.start&&this.start--,this.end<this.data.length-1&&this.end++);"serial"==b.type&&(!0!==b.categoryAxis.parseDates||a||this.end<this.data.length-1&&this.end++);a=this.minMaxMultiplier;this.min=
63 this.getMin(this.start,this.end);this.max=this.getMax();a=(this.max-this.min)*(a-1);this.min-=a;this.max+=a;a=this.guides.length;if(this.includeGuidesInMinMax&&0<a)for(b=0;b<a;b++)c=this.guides[b],c.toValue<this.min&&(this.min=c.toValue),c.value<this.min&&(this.min=c.value),c.toValue>this.max&&(this.max=c.toValue),c.value>this.max&&(this.max=c.value);isNaN(this.minimum)||(this.min=this.minimum);isNaN(this.maximum)||(this.max=this.maximum);this.min>this.max&&(a=this.max,this.max=this.min,this.min=
64 a);isNaN(this.minTemp)||(this.min=this.minTemp);isNaN(this.maxTemp)||(this.max=this.maxTemp);this.minReal=this.min;this.maxReal=this.max;0===this.min&&0===this.max&&(this.max=9);this.min>this.max&&(this.min=this.max-1);a=this.min;b=this.max;c=this.max-this.min;d=0===c?Math.pow(10,Math.floor(Math.log(Math.abs(this.max))*Math.LOG10E))/10:Math.pow(10,Math.floor(Math.log(Math.abs(c))*Math.LOG10E))/10;isNaN(this.maximum)&&isNaN(this.maxTemp)&&(this.max=Math.ceil(this.max/d)*d+d);isNaN(this.minimum)&&isNaN(this.minTemp)&&
65 (this.min=Math.floor(this.min/d)*d-d);0>this.min&&0<=a&&(this.min=0);0<this.max&&0>=b&&(this.max=0);"100%"==this.stackType&&(this.min=0>this.min?-100:0,this.max=0>this.max?0:100);c=this.max-this.min;d=Math.pow(10,Math.floor(Math.log(Math.abs(c))*Math.LOG10E))/10;this.step=Math.ceil(c/this.gridCountR/d)*d;c=Math.pow(10,Math.floor(Math.log(Math.abs(this.step))*Math.LOG10E));c=this.fixStepE(c);d=Math.ceil(this.step/c);5<d&&(d=10);5>=d&&2<d&&(d=5);this.step=Math.ceil(this.step/(c*d))*c*d;1>c?(this.maxDecCount=
66 Math.abs(Math.log(Math.abs(c))*Math.LOG10E),this.maxDecCount=Math.round(this.maxDecCount),this.step=AmCharts.roundTo(this.step,this.maxDecCount+1)):this.maxDecCount=0;this.min=this.step*Math.floor(this.min/this.step);this.max=this.step*Math.ceil(this.max/this.step);0>this.min&&0<=a&&(this.min=0);0<this.max&&0>=b&&(this.max=0);1<this.minReal&&1<this.max-this.minReal&&(this.minReal=Math.floor(this.minReal));c=Math.pow(10,Math.floor(Math.log(Math.abs(this.minReal))*Math.LOG10E));0===this.min&&(this.minReal=
67 c);0===this.min&&1<this.minReal&&(this.minReal=1);0<this.min&&0<this.minReal-this.step&&(this.minReal=this.min+this.step<this.minReal?this.min+this.step:this.min);c=Math.log(b)*Math.LOG10E-Math.log(a)*Math.LOG10E;this.logarithmic&&(2<c?(this.minReal=this.min=Math.pow(10,Math.floor(Math.log(Math.abs(a))*Math.LOG10E)),this.max=Math.pow(10,Math.ceil(Math.log(Math.abs(b))*Math.LOG10E))):(b=Math.pow(10,Math.floor(Math.log(Math.abs(this.min))*Math.LOG10E))/10,a=Math.pow(10,Math.floor(Math.log(Math.abs(a))*
68 Math.LOG10E))/10,b<a&&(this.minReal=this.min=10*a)))},fixStepE:function(a){a=a.toExponential(0).split("e");var b=Number(a[1]);9==Number(a[0])&&b++;return this.generateNumber(1,b)},generateNumber:function(a,b){var c="",d;d=0>b?Math.abs(b)-1:Math.abs(b);var e;for(e=0;e<d;e++)c+="0";return 0>b?Number("0."+c+String(a)):Number(String(a)+c)},getMin:function(a,b){var c,d;for(d=a;d<=b;d++){var e=this.data[d].axes[this.id].graphs,f;for(f in e)if(e.hasOwnProperty(f)){var g=this.chart.getGraphById(f);if(g.includeInMinMax&&
69 (!g.hidden||this.includeHidden)){isNaN(c)&&(c=Infinity);this.foundGraphs=!0;g=e[f].values;this.recalculateToPercents&&(g=e[f].percents);var h;if(this.minMaxField)h=g[this.minMaxField],h<c&&(c=h);else for(var k in g)g.hasOwnProperty(k)&&"percents"!=k&&"total"!=k&&(h=g[k],h<c&&(c=h))}}}return c},getMax:function(){var a,b;for(b=this.start;b<=this.end;b++){var c=this.data[b].axes[this.id].graphs,d;for(d in c)if(c.hasOwnProperty(d)){var e=this.chart.getGraphById(d);if(e.includeInMinMax&&(!e.hidden||this.includeHidden)){isNaN(a)&&
70 (a=-Infinity);this.foundGraphs=!0;e=c[d].values;this.recalculateToPercents&&(e=c[d].percents);var f;if(this.minMaxField)f=e[this.minMaxField],f>a&&(a=f);else for(var g in e)e.hasOwnProperty(g)&&"percents"!=g&&"total"!=g&&(f=e[g],f>a&&(a=f))}}}return a},dispatchZoomEvent:function(a,b){var c={type:"axisZoomed",startValue:a,endValue:b,target:this,chart:this.chart};this.fire(c.type,c)},zoomToValues:function(a,b){if(b<a){var c=b;b=a;a=c}a<this.min&&(a=this.min);b>this.max&&(b=this.max);c={type:"axisSelfZoomed"};
71 c.chart=this.chart;c.valueAxis=this;c.multiplier=this.axisWidth/Math.abs(this.getCoordinate(b)-this.getCoordinate(a));c.position="V"==this.orientation?this.reversed?this.getCoordinate(a):this.getCoordinate(b):this.reversed?this.getCoordinate(b):this.getCoordinate(a);this.fire(c.type,c)},coordinateToValue:function(a){if(isNaN(a))return NaN;var b=this.axisWidth,c=this.stepWidth,d=this.reversed,e=this.rotate,f=this.min,g=this.minReal;return!0===this.logarithmic?Math.pow(10,(e?!0===d?(b-a)/c:a/c:!0===
72 d?a/c:(b-a)/c)+Math.log(g)*Math.LOG10E):!0===d?e?f-(a-b)/c:a/c+f:e?a/c+f:f-(a-b)/c},getCoordinate:function(a){if(isNaN(a))return NaN;var b=this.rotate,c=this.reversed,d=this.axisWidth,e=this.stepWidth,f=this.min,g=this.minReal;!0===this.logarithmic?(a=Math.log(a)*Math.LOG10E-Math.log(g)*Math.LOG10E,b=b?!0===c?d-e*a:e*a:!0===c?e*a:d-e*a):b=!0===c?b?d-e*(a-f):e*(a-f):b?e*(a-f):d-e*(a-f);b=this.rotate?b+(this.x-this.viX):b+(this.y-this.viY);1E7<Math.abs(b)&&(b=1E7*(b/Math.abs(b)));return Math.round(b)},
73 synchronizeWithAxis:function(a){this.synchronizeWith=a;this.listenTo(this.synchronizeWith,"axisChanged",this.handleSynchronization)},handleSynchronization:function(a){var b=this.synchronizeWith;a=b.min;var c=b.max,b=b.step,d=this.synchronizationMultiplier;d&&(this.min=a*d,this.max=c*d,this.step=b*d,a=Math.pow(10,Math.floor(Math.log(Math.abs(this.step))*Math.LOG10E)),a=Math.abs(Math.log(Math.abs(a))*Math.LOG10E),this.maxDecCount=a=Math.round(a),this.draw())}});AmCharts.RecAxis=AmCharts.Class({construct:function(a){var b=a.chart,c=a.axisThickness,d=a.axisColor,e=a.axisAlpha,f=a.offset,g=a.dx,h=a.dy,k=a.viX,l=a.viY,m=a.viH,n=a.viW,p=b.container;"H"==a.orientation?(d=AmCharts.line(p,[0,n],[0,0],d,e,c),this.axisWidth=a.width,"bottom"==a.position?(a=c/2+f+m+l-1,c=k):(a=-c/2-f+l+h,c=g+k)):(this.axisWidth=a.height,"right"==a.position?(d=AmCharts.line(p,[0,0,-g],[0,m,m-h],d,e,c),a=l+h,c=c/2+f+g+n+k-1):(d=AmCharts.line(p,[0,0],[0,m],d,e,c),a=l,c=-c/2-f+k));d.translate(c,
74 a);b.axesSet.push(d);this.set=d}});AmCharts.RecItem=AmCharts.Class({construct:function(a,b,c,d,e,f,g,h,k,l,m){b=Math.round(b);this.value=c;void 0==c&&(c="");k||(k=0);void 0==d&&(d=!0);var n=a.chart.fontFamily,p=a.fontSize;void 0==p&&(p=a.chart.fontSize);var q=a.color;void 0==q&&(q=a.chart.color);void 0!==m&&(q=m);var r=a.chart.container,s=r.set();this.set=s;var v=a.axisThickness,w=a.axisColor,t=a.axisAlpha,u=a.tickLength,y=a.gridAlpha,E=a.gridThickness,A=a.gridColor,z=a.dashLength,K=a.fillColor,I=a.fillAlpha,F=a.labelsEnabled;m=a.labelRotation;
75 var H=a.counter,L=a.inside,ha=a.labelOffset,ba=a.dx,$=a.dy,Ra=a.orientation,na=a.position,ta=a.previousCoord,V=a.viH,X=a.viW,Z=a.offset,oa,R;g?(F=!0,isNaN(g.tickLength)||(u=g.tickLength),void 0!=g.lineColor&&(A=g.lineColor),void 0!=g.color&&(q=g.color),isNaN(g.lineAlpha)||(y=g.lineAlpha),isNaN(g.dashLength)||(z=g.dashLength),isNaN(g.lineThickness)||(E=g.lineThickness),!0===g.inside&&(L=!0),isNaN(g.labelRotation)||(m=g.labelRotation),isNaN(g.fontSize)||(p=g.fontSize),g.position&&(na=g.position),void 0!==
76 g.boldLabel&&(h=g.boldLabel),isNaN(g.labelOffset)||(ha=g.labelOffset)):""===c&&(u=0);R="start";e&&(R="middle");var Y=m*Math.PI/180,qa,G=0,B=0,W=0,ca=qa=0,ja=0;"V"==Ra&&(m=0);var x;F&&(x=a.autoWrap&&0===m?AmCharts.wrappedText(r,c,q,n,p,R,h,e,0):AmCharts.text(r,c,q,n,p,R,h),R=x.getBBox(),ca=R.width,ja=R.height);if("H"==Ra){if(0<=b&&b<=X+1&&(0<u&&0<t&&b+k<=X+1&&(oa=AmCharts.line(r,[b+k,b+k],[0,u],w,t,E),s.push(oa)),0<y&&(R=AmCharts.line(r,[b,b+ba,b+ba],[V,V+$,$],A,y,E,z),s.push(R))),B=0,G=b,g&&90==m&&
77 L&&(G-=p),!1===d?(R="start",B="bottom"==na?L?B+u:B-u:L?B-u:B+u,G+=3,e&&(G+=e/2-3,R="middle"),0<m&&(R="middle")):R="middle",1==H&&0<I&&!g&&!l&&ta<X&&(d=AmCharts.fitToBounds(b,0,X),ta=AmCharts.fitToBounds(ta,0,X),qa=d-ta,0<qa&&(fill=AmCharts.rect(r,qa,a.height,K,I),fill.translate(d-qa+ba,$),s.push(fill))),"bottom"==na?(B+=V+p/2+Z,L?(0<m?(B=V-ca/2*Math.sin(Y)-u-3,G+=ca/2*Math.cos(Y)-4+2):0>m?(B=V+ca*Math.sin(Y)-u-3+2,G+=-ca*Math.cos(Y)-ja*Math.sin(Y)-4):B-=u+p+3+3,B-=ha):(0<m?(B=V+ca/2*Math.sin(Y)+u+
78 3,G-=ca/2*Math.cos(Y)):0>m?(B=V+u+3-ca/2*Math.sin(Y)+2,G+=ca/2*Math.cos(Y)):B+=u+v+3+3,B+=ha)):(B+=$+p/2-Z,G+=ba,L?(0<m?(B=ca/2*Math.sin(Y)+u+3,G-=ca/2*Math.cos(Y)):B+=u+3,B+=ha):(0<m?(B=-(ca/2)*Math.sin(Y)-u-6,G+=ca/2*Math.cos(Y)):B-=u+p+3+v+3,B-=ha)),"bottom"==na?qa=(L?V-u-1:V+v-1)+Z:(W=ba,qa=(L?$:$-u-v+1)-Z),f&&(G+=f),f=G,0<m&&(f+=ca/2*Math.cos(Y)),x&&(p=0,L&&(p=ca/2*Math.cos(Y)),f+p>X+2||0>f))x.remove(),x=null}else{0<=b&&b<=V+1&&(0<u&&0<t&&b+k<=V+1&&(oa=AmCharts.line(r,[0,u],[b+k,b+k],w,t,E),
79 s.push(oa)),0<y&&(R=AmCharts.line(r,[0,ba,X+ba],[b,b+$,b+$],A,y,E,z),s.push(R)));R="end";if(!0===L&&"left"==na||!1===L&&"right"==na)R="start";B=b-p/2;1==H&&0<I&&!g&&!l&&(d=AmCharts.fitToBounds(b,0,V),ta=AmCharts.fitToBounds(ta,0,V),Y=d-ta,fill=AmCharts.polygon(r,[0,a.width,a.width,0],[0,0,Y,Y],K,I),fill.translate(ba,d-Y+$),s.push(fill));B+=p/2;"right"==na?(G+=ba+X+Z,B+=$,L?(f||(B-=p/2+3),G=G-(u+4)-ha):(G+=u+4+v,B-=2,G+=ha)):L?(G+=u+4-Z,f||(B-=p/2+3),g&&(G+=ba,B+=$),G+=ha):(G+=-u-v-4-2-Z,B-=2,G-=ha);
80 oa&&("right"==na?(W+=ba+Z+X,qa+=$,W=L?W-v:W+v):(W-=Z,L||(W-=u+v)));f&&(B+=f);L=-3;"right"==na&&(L+=$);x&&(B>V+1||B<L)&&(x.remove(),x=null)}oa&&oa.translate(W,qa);!1===a.visible&&(oa&&oa.remove(),x&&(x.remove(),x=null));x&&(x.attr({"text-anchor":R}),x.translate(G,B),0!==m&&x.rotate(-m,a.chart.backgroundColor),a.allLabels.push(x)," "!=c&&(this.label=x));l||(a.counter=0===H?1:0,a.previousCoord=b);0===this.set.node.childNodes.length&&this.set.remove()},graphics:function(){return this.set},getLabel:function(){return this.label}});AmCharts.RecFill=AmCharts.Class({construct:function(a,b,c,d){var e=a.dx,f=a.dy,g=a.orientation,h=0;if(c<b){var k=b;b=c;c=k}var l=d.fillAlpha;isNaN(l)&&(l=0);k=a.chart.container;d=d.fillColor;"V"==g?(b=AmCharts.fitToBounds(b,0,a.viH),c=AmCharts.fitToBounds(c,0,a.viH)):(b=AmCharts.fitToBounds(b,0,a.viW),c=AmCharts.fitToBounds(c,0,a.viW));c-=b;isNaN(c)&&(c=4,h=2,l=0);0>c&&"object"==typeof d&&(d=d.join(",").split(",").reverse());"V"==g?(a=AmCharts.rect(k,a.width,c,d,l),a.translate(e,b-h+f)):(a=AmCharts.rect(k,
81 c,a.height,d,l),a.translate(b-h+e,f));this.set=k.set([a])},graphics:function(){return this.set},getLabel:function(){}});AmCharts.AmChart=AmCharts.Class({construct:function(a){this.theme=a;this.version="3.10.0C";AmCharts.addChart(this);this.createEvents("dataUpdated","init","rendered","drawn");this.height=this.width="100%";this.dataChanged=!0;this.chartCreated=!1;this.previousWidth=this.previousHeight=0;this.backgroundColor="#FFFFFF";this.borderAlpha=this.backgroundAlpha=0;this.color=this.borderColor="#000000";this.fontFamily="Verdana";this.fontSize=11;this.usePrefixes=!1;this.precision=-1;this.percentPrecision=2;this.decimalSeparator=
82 ".";this.thousandsSeparator=",";this.labels=[];this.allLabels=[];this.titles=[];this.marginRight=this.marginLeft=this.autoMarginOffset=0;this.timeOuts=[];this.creditsPosition="top-left";var b=document.createElement("div"),c=b.style;c.overflow="hidden";c.position="relative";c.textAlign="left";this.chartDiv=b;b=document.createElement("div");c=b.style;c.overflow="hidden";c.position="relative";c.textAlign="left";this.legendDiv=b;this.titleHeight=0;this.hideBalloonTime=150;this.handDrawScatter=2;this.handDrawThickness=
83 1;this.prefixesOfBigNumbers=[{number:1E3,prefix:"k"},{number:1E6,prefix:"M"},{number:1E9,prefix:"G"},{number:1E12,prefix:"T"},{number:1E15,prefix:"P"},{number:1E18,prefix:"E"},{number:1E21,prefix:"Z"},{number:1E24,prefix:"Y"}];this.prefixesOfSmallNumbers=[{number:1E-24,prefix:"y"},{number:1E-21,prefix:"z"},{number:1E-18,prefix:"a"},{number:1E-15,prefix:"f"},{number:1E-12,prefix:"p"},{number:1E-9,prefix:"n"},{number:1E-6,prefix:"\u03bc"},{number:.001,prefix:"m"}];this.panEventsEnabled=!0;AmCharts.bezierX=
84 3;AmCharts.bezierY=6;this.product="amcharts";this.animations=[];this.balloon=new AmCharts.AmBalloon(this.theme);this.balloon.chart=this;AmCharts.applyTheme(this,a,"AmChart")},drawChart:function(){this.drawBackground();this.redrawLabels();this.drawTitles();this.brr()},drawBackground:function(){AmCharts.remove(this.background);var a=this.container,b=this.backgroundColor,c=this.backgroundAlpha,d=this.set;AmCharts.isModern||0!==c||(c=.001);var e=this.updateWidth();this.realWidth=e;var f=this.updateHeight();
85 this.realHeight=f;this.background=b=AmCharts.polygon(a,[0,e-1,e-1,0],[0,0,f-1,f-1],b,c,1,this.borderColor,this.borderAlpha);d.push(b);if(b=this.backgroundImage)this.path&&(b=this.path+b),this.bgImg=a=a.image(b,0,0,e,f),d.push(a)},drawTitles:function(){var a=this.titles;if(AmCharts.ifArray(a)){var b=20,c;for(c=0;c<a.length;c++){var d=a[c],e=d.color;void 0===e&&(e=this.color);var f=d.size;isNaN(f)&&(f=this.fontSize+2);isNaN(d.alpha);var g=this.marginLeft,e=AmCharts.text(this.container,d.text,e,this.fontFamily,
86 f);e.translate(g+(this.realWidth-this.marginRight-g)/2,b);g=!0;void 0!==d.bold&&(g=d.bold);g&&e.attr({"font-weight":"bold"});e.attr({opacity:d.alpha});b+=f+6;this.freeLabelsSet.push(e)}}},write:function(a){if(a="object"!=typeof a?document.getElementById(a):a){a.innerHTML="";this.div=a;a.style.overflow="hidden";a.style.textAlign="left";var b=this.chartDiv,c=this.legendDiv,d=this.legend,e=c.style,f=b.style;this.measure();var g,h=document.createElement("div");g=h.style;g.position="relative";this.containerDiv=
87 h;a.appendChild(h);var k=this.exportConfig;k&&AmCharts.AmExport&&!this.AmExport&&(this.AmExport=new AmCharts.AmExport(this,k));this.amExport&&AmCharts.AmExport&&(this.AmExport=AmCharts.extend(this.amExport,new AmCharts.AmExport(this),!0));this.AmExport&&this.AmExport.init&&this.AmExport.init();if(d)switch(d=this.addLegend(d,d.divId),d.position){case "bottom":h.appendChild(b);h.appendChild(c);break;case "top":h.appendChild(c);h.appendChild(b);break;case "absolute":g.width=a.style.width;g.height=a.style.height;
88 e.position="absolute";f.position="absolute";void 0!==d.left&&(e.left=d.left+"px");void 0!==d.right&&(e.right=d.right+"px");void 0!==d.top&&(e.top=d.top+"px");void 0!==d.bottom&&(e.bottom=d.bottom+"px");d.marginLeft=0;d.marginRight=0;h.appendChild(b);h.appendChild(c);break;case "right":g.width=a.style.width;g.height=a.style.height;e.position="relative";f.position="absolute";h.appendChild(b);h.appendChild(c);break;case "left":g.width=a.style.width;g.height=a.style.height;e.position="absolute";f.position=
89 "relative";h.appendChild(b);h.appendChild(c);break;case "outside":h.appendChild(b)}else h.appendChild(b);this.listenersAdded||(this.addListeners(),this.listenersAdded=!0);this.initChart()}},createLabelsSet:function(){AmCharts.remove(this.labelsSet);this.labelsSet=this.container.set();this.freeLabelsSet.push(this.labelsSet)},initChart:function(){AmCharts.applyLang(this.language);var a=this.numberFormatter;a&&(isNaN(a.precision)||(this.precision=a.precision),void 0!==a.thousandsSeparator&&(this.thousandsSeparator=
90 a.thousandsSeparator),void 0!==a.decimalSeparator&&(this.decimalSeparator=a.decimalSeparator));(a=this.percentFormatter)&&!isNaN(a.precision)&&(this.percentPrecision=a.precision);this.nf={precision:this.precision,thousandsSeparator:this.thousandsSeparator,decimalSeparator:this.decimalSeparator};this.pf={precision:this.percentPrecision,thousandsSeparator:this.thousandsSeparator,decimalSeparator:this.decimalSeparator};this.divIsFixed=AmCharts.findIfFixed(this.chartDiv);this.previousHeight=this.divRealHeight;
91 this.previousWidth=this.divRealWidth;this.destroy();this.startInterval();a=0;document.attachEvent&&!window.opera&&(a=1);this.dmouseX=this.dmouseY=0;var b=document.getElementsByTagName("html")[0];b&&window.getComputedStyle&&(b=window.getComputedStyle(b,null))&&(this.dmouseY=AmCharts.removePx(b.getPropertyValue("margin-top")),this.dmouseX=AmCharts.removePx(b.getPropertyValue("margin-left")));this.mouseMode=a;(a=this.container)?(a.container.innerHTML="",this.chartDiv.appendChild(a.container),a.setSize(this.realWidth,
92 this.realHeight)):a=new AmCharts.AmDraw(this.chartDiv,this.realWidth,this.realHeight,this);if(AmCharts.VML||AmCharts.SVG)a.handDrawn=this.handDrawn,a.handDrawScatter=this.handDrawScatter,a.handDrawThickness=this.handDrawThickness,this.container=a,this.set&&this.set.remove(),this.set=a.set(),this.gridSet&&this.gridSet.remove(),this.gridSet=a.set(),this.cursorLineSet&&this.cursorLineSet.remove(),this.cursorLineSet=a.set(),this.graphsBehindSet&&this.graphsBehindSet.remove(),this.graphsBehindSet=a.set(),
93 this.bulletBehindSet&&this.bulletBehindSet.remove(),this.bulletBehindSet=a.set(),this.columnSet&&this.columnSet.remove(),this.columnSet=a.set(),this.graphsSet&&this.graphsSet.remove(),this.graphsSet=a.set(),this.trendLinesSet&&this.trendLinesSet.remove(),this.trendLinesSet=a.set(),this.axesLabelsSet&&this.axesLabelsSet.remove(),this.axesLabelsSet=a.set(),this.axesSet&&this.axesSet.remove(),this.axesSet=a.set(),this.cursorSet&&this.cursorSet.remove(),this.cursorSet=a.set(),this.scrollbarsSet&&this.scrollbarsSet.remove(),
94 this.scrollbarsSet=a.set(),this.bulletSet&&this.bulletSet.remove(),this.bulletSet=a.set(),this.freeLabelsSet&&this.freeLabelsSet.remove(),this.freeLabelsSet=a.set(),this.balloonsSet&&this.balloonsSet.remove(),this.balloonsSet=a.set(),this.zoomButtonSet&&this.zoomButtonSet.remove(),this.zoomButtonSet=a.set(),this.linkSet&&this.linkSet.remove(),this.linkSet=a.set(),this.renderFix()},measure:function(){var a=this.div;if(a){var b=this.chartDiv,c=a.offsetWidth,d=a.offsetHeight,e=this.container;a.clientHeight&&
95 (c=a.clientWidth,d=a.clientHeight);var f=AmCharts.removePx(AmCharts.getStyle(a,"padding-left")),g=AmCharts.removePx(AmCharts.getStyle(a,"padding-right")),h=AmCharts.removePx(AmCharts.getStyle(a,"padding-top")),k=AmCharts.removePx(AmCharts.getStyle(a,"padding-bottom"));isNaN(f)||(c-=f);isNaN(g)||(c-=g);isNaN(h)||(d-=h);isNaN(k)||(d-=k);f=a.style;a=f.width;f=f.height;-1!=a.indexOf("px")&&(c=AmCharts.removePx(a));-1!=f.indexOf("px")&&(d=AmCharts.removePx(f));a=AmCharts.toCoordinate(this.width,c);f=AmCharts.toCoordinate(this.height,
96 d);this.balloon=AmCharts.processObject(this.balloon,AmCharts.AmBalloon,this.theme);this.balloon.chart=this;(a!=this.previousWidth||f!=this.previousHeight)&&0<a&&0<f&&(b.style.width=a+"px",b.style.height=f+"px",e&&e.setSize(a,f));this.balloon.setBounds(2,2,a-2,f);this.realWidth=a;this.realHeight=f;this.divRealWidth=c;this.divRealHeight=d}},destroy:function(){this.chartDiv.innerHTML="";this.clearTimeOuts();this.interval&&clearInterval(this.interval);this.interval=NaN},clearTimeOuts:function(){var a=
97 this.timeOuts;if(a){var b;for(b=0;b<a.length;b++)clearTimeout(a[b])}this.timeOuts=[]},clear:function(a){AmCharts.callMethod("clear",[this.chartScrollbar,this.scrollbarV,this.scrollbarH,this.chartCursor]);this.chartCursor=this.scrollbarH=this.scrollbarV=this.chartScrollbar=null;this.clearTimeOuts();this.interval&&clearInterval(this.interval);this.container&&(this.container.remove(this.chartDiv),this.container.remove(this.legendDiv));a||AmCharts.removeChart(this)},setMouseCursor:function(a){"auto"==
98 a&&AmCharts.isNN&&(a="default");this.chartDiv.style.cursor=a;this.legendDiv.style.cursor=a},redrawLabels:function(){this.labels=[];var a=this.allLabels;this.createLabelsSet();var b;for(b=0;b<a.length;b++)this.drawLabel(a[b])},drawLabel:function(a){if(this.container){var b=a.y,c=a.text,d=a.align,e=a.size,f=a.color,g=a.rotation,h=a.alpha,k=a.bold,l=AmCharts.toCoordinate(a.x,this.realWidth),b=AmCharts.toCoordinate(b,this.realHeight);l||(l=0);b||(b=0);void 0===f&&(f=this.color);isNaN(e)&&(e=this.fontSize);
99 d||(d="start");"left"==d&&(d="start");"right"==d&&(d="end");"center"==d&&(d="middle",g?b=this.realHeight-b+b/2:l=this.realWidth/2-l);void 0===h&&(h=1);void 0===g&&(g=0);b+=e/2;c=AmCharts.text(this.container,c,f,this.fontFamily,e,d,k,h);c.translate(l,b);0!==g&&c.rotate(g);a.url&&(c.setAttr("cursor","pointer"),c.click(function(){AmCharts.getURL(a.url)}));this.labelsSet.push(c);this.labels.push(c)}},addLabel:function(a,b,c,d,e,f,g,h,k,l){a={x:a,y:b,text:c,align:d,size:e,color:f,alpha:h,rotation:g,bold:k,
100 url:l};this.container&&this.drawLabel(a);this.allLabels.push(a)},clearLabels:function(){var a=this.labels,b;for(b=a.length-1;0<=b;b--)a[b].remove();this.labels=[];this.allLabels=[]},updateHeight:function(){var a=this.divRealHeight,b=this.legend;if(b){var c=this.legendDiv.offsetHeight,b=b.position;if("top"==b||"bottom"==b){a-=c;if(0>a||isNaN(a))a=0;this.chartDiv.style.height=a+"px"}}return a},updateWidth:function(){var a=this.divRealWidth,b=this.divRealHeight,c=this.legend;if(c){var d=this.legendDiv,
101 e=d.offsetWidth;isNaN(c.width)||(e=c.width);var f=d.offsetHeight,d=d.style,g=this.chartDiv.style,c=c.position;if("right"==c||"left"==c){a-=e;if(0>a||isNaN(a))a=0;g.width=a+"px";"left"==c?g.left=e+"px":d.left=a+"px";d.top=(b-f)/2+"px"}}return a},getTitleHeight:function(){var a=0,b=this.titles;if(0<b.length){var a=15,c;for(c=0;c<b.length;c++){var d=b[c].size;isNaN(d)&&(d=this.fontSize+2);a+=d+6}}return a},addTitle:function(a,b,c,d,e){isNaN(b)&&(b=this.fontSize+2);a={text:a,size:b,color:c,alpha:d,bold:e};
102 this.titles.push(a);return a},addMouseWheel:function(){var a=this;window.addEventListener&&!a.wheelAdded&&(window.addEventListener("DOMMouseScroll",function(b){a.handleWheel.call(a,b)},!1),document.addEventListener("mousewheel",function(b){a.handleWheel.call(a,b)},!1),a.wheelAdded=!0)},handleWheel:function(a){if(this.mouseIsOver){var b=0;a||(a=window.event);a.wheelDelta?b=a.wheelDelta/120:a.detail&&(b=-a.detail/3);b&&this.handleWheelReal(b,a.shiftKey);a.preventDefault&&a.preventDefault()}},handleWheelReal:function(a){},
103 addListeners:function(){var a=this,b=a.chartDiv;document.addEventListener?(a.panEventsEnabled&&"ontouchstart"in document.documentElement&&(b.addEventListener("touchstart",function(b){a.handleTouchMove.call(a,b);a.handleTouchStart.call(a,b)},!0),b.addEventListener("touchmove",function(b){a.handleTouchMove.call(a,b)},!0),b.addEventListener("touchend",function(b){a.handleTouchEnd.call(a,b)},!0)),b.addEventListener("mousedown",function(b){a.handleMouseDown.call(a,b)},!0),b.addEventListener("mouseover",
104 function(b){a.handleMouseOver.call(a,b)},!0),b.addEventListener("mouseout",function(b){a.handleMouseOut.call(a,b)},!0)):(b.attachEvent("onmousedown",function(b){a.handleMouseDown.call(a,b)}),b.attachEvent("onmouseover",function(b){a.handleMouseOver.call(a,b)}),b.attachEvent("onmouseout",function(b){a.handleMouseOut.call(a,b)}))},dispDUpd:function(){var a;this.dispatchDataUpdated&&(this.dispatchDataUpdated=!1,a="dataUpdated",this.fire(a,{type:a,chart:this}));this.chartCreated||(a="init",this.fire(a,
105 {type:a,chart:this}));this.chartRendered||(a="rendered",this.fire(a,{type:a,chart:this}),this.chartRendered=!0);a="drawn";this.fire(a,{type:a,chart:this})},validateSize:function(){var a=this;a.measure();var b=a.legend;if((a.realWidth!=a.previousWidth||a.realHeight!=a.previousHeight)&&0<a.realWidth&&0<a.realHeight){a.sizeChanged=!0;if(b){clearTimeout(a.legendInitTO);var c=setTimeout(function(){b.invalidateSize()},100);a.timeOuts.push(c);a.legendInitTO=c}a.marginsUpdated="xy"!=a.type?!1:!0;clearTimeout(a.initTO);
106 c=setTimeout(function(){a.initChart()},150);a.timeOuts.push(c);a.initTO=c}a.renderFix();b&&b.renderFix()},invalidateSize:function(){this.previousHeight=this.previousWidth=NaN;this.invalidateSizeReal()},invalidateSizeReal:function(){var a=this;a.marginsUpdated=!1;clearTimeout(a.validateTO);var b=setTimeout(function(){a.validateSize()},5);a.timeOuts.push(b);a.validateTO=b},validateData:function(a){this.chartCreated&&(this.dataChanged=!0,this.marginsUpdated="xy"!=this.type?!1:!0,this.initChart(a))},
107 validateNow:function(){this.chartRendered=this.listenersAdded=!1;this.write(this.div)},showItem:function(a){a.hidden=!1;this.initChart()},hideItem:function(a){a.hidden=!0;this.initChart()},hideBalloon:function(){var a=this;clearInterval(a.hoverInt);clearTimeout(a.balloonTO);a.hoverInt=setTimeout(function(){a.hideBalloonReal.call(a)},a.hideBalloonTime)},cleanChart:function(){},hideBalloonReal:function(){var a=this.balloon;a&&a.hide()},showBalloon:function(a,b,c,d,e){var f=this;clearTimeout(f.balloonTO);
108 clearInterval(f.hoverInt);f.balloonTO=setTimeout(function(){f.showBalloonReal.call(f,a,b,c,d,e)},1)},showBalloonReal:function(a,b,c,d,e){this.handleMouseMove();var f=this.balloon;f.enabled&&(f.followCursor(!1),f.changeColor(b),!c||f.fixedPosition?(f.setPosition(d,e),f.followCursor(!1)):f.followCursor(!0),a&&f.showBalloon(a))},handleTouchMove:function(a){this.hideBalloon();var b=this.chartDiv;a.touches&&(a=a.touches.item(0),this.mouseX=a.pageX-AmCharts.findPosX(b),this.mouseY=a.pageY-AmCharts.findPosY(b))},
109 handleMouseOver:function(a){AmCharts.resetMouseOver();this.mouseIsOver=!0},handleMouseOut:function(a){AmCharts.resetMouseOver();this.mouseIsOver=!1},handleMouseMove:function(a){if(this.mouseIsOver){var b=this.chartDiv;a||(a=window.event);var c,d;if(a){this.posX=AmCharts.findPosX(b);this.posY=AmCharts.findPosY(b);switch(this.mouseMode){case 1:c=a.clientX-this.posX;d=a.clientY-this.posY;if(!this.divIsFixed){var b=document.body,e,f;b&&(e=b.scrollLeft,y1=b.scrollTop);if(b=document.documentElement)f=b.scrollLeft,
110 y2=b.scrollTop;e=Math.max(e,f);f=Math.max(y1,y2);c+=e;d+=f}break;case 0:this.divIsFixed?(c=a.clientX-this.posX,d=a.clientY-this.posY):(c=a.pageX-this.posX,d=a.pageY-this.posY)}a.touches&&(a=a.touches.item(0),c=a.pageX-this.posX,d=a.pageY-this.posY);this.mouseX=c-this.dmouseX;this.mouseY=d-this.dmouseY}}},handleTouchStart:function(a){this.handleMouseDown(a)},handleTouchEnd:function(a){AmCharts.resetMouseOver();this.handleReleaseOutside(a)},handleReleaseOutside:function(a){},handleMouseDown:function(a){AmCharts.resetMouseOver();
111 this.mouseIsOver=!0;a&&a.preventDefault&&a.preventDefault()},addLegend:function(a,b){a=AmCharts.processObject(a,AmCharts.AmLegend,this.theme);a.divId=b;var c;c="object"!=typeof b&&b?document.getElementById(b):b;this.legend=a;a.chart=this;c?(a.div=c,a.position="outside",a.autoMargins=!1):a.div=this.legendDiv;c=this.handleLegendEvent;this.listenTo(a,"showItem",c);this.listenTo(a,"hideItem",c);this.listenTo(a,"clickMarker",c);this.listenTo(a,"rollOverItem",c);this.listenTo(a,"rollOutItem",c);this.listenTo(a,
112 "rollOverMarker",c);this.listenTo(a,"rollOutMarker",c);this.listenTo(a,"clickLabel",c);return a},removeLegend:function(){this.legend=void 0;this.legendDiv.innerHTML=""},handleResize:function(){(AmCharts.isPercents(this.width)||AmCharts.isPercents(this.height))&&this.invalidateSizeReal();this.renderFix()},renderFix:function(){if(!AmCharts.VML){var a=this.container;a&&a.renderFix()}},getSVG:function(){if(AmCharts.hasSVG)return this.container},animate:function(a,b,c,d,e,f,g){a["an_"+b]&&AmCharts.removeFromArray(this.animations,
113 a["an_"+b]);c={obj:a,frame:0,attribute:b,from:c,to:d,time:e,effect:f,suffix:g};a["an_"+b]=c;this.animations.push(c);return c},setLegendData:function(a){var b=this.legend;b&&b.setData(a)},startInterval:function(){var a=this;clearInterval(a.interval);a.interval=setInterval(function(){a.updateAnimations.call(a)},AmCharts.updateRate)},stopAnim:function(a){AmCharts.removeFromArray(this.animations,a)},updateAnimations:function(){var a;this.container&&this.container.update();for(a=this.animations.length-
114 1;0<=a;a--){var b=this.animations[a],c=1E3*b.time/AmCharts.updateRate,d=b.frame+1,e=b.obj,f=b.attribute;if(d<=c){b.frame++;var g=Number(b.from),h=Number(b.to)-g,c=AmCharts[b.effect](0,d,g,h,c);0===h?(this.animations.splice(a,1),e.node.style[f]=Number(b.to)+b.suffix):e.node.style[f]=c+b.suffix}else e.node.style[f]=Number(b.to)+b.suffix,this.animations.splice(a,1)}},inIframe:function(){try{return window.self!==window.top}catch(a){return!0}},brr:function(){var a=window.location.hostname.split("."),b;
115 2<=a.length&&(b=a[a.length-2]+"."+a[a.length-1]);this.amLink&&(a=this.amLink.parentNode)&&a.removeChild(this.amLink);a=this.creditsPosition;if("amcharts.com"!=b||!0===this.inIframe()){var c=b=0,d=this.realWidth,e=this.realHeight;if("serial"==this.type||"xy"==this.type)b=this.marginLeftReal,c=this.marginTopReal,d=b+this.plotAreaWidth,e=c+this.plotAreaHeight;var f="http://www.amcharts.com/javascript-charts/",g="JavaScript charts",h="JS chart by amCharts";"ammap"==this.product&&(f="http://www.ammap.com/javascript-maps/",
116 g="Interactive JavaScript maps",h="JS map by amCharts");var k=document.createElement("a"),h=document.createTextNode(h);k.setAttribute("href",f);k.setAttribute("title",g);k.appendChild(h);this.chartDiv.appendChild(k);this.amLink=k;f=k.style;f.position="absolute";f.textDecoration="none";f.color=this.color;f.fontFamily=this.fontFamily;f.fontSize=this.fontSize+"px";f.opacity=.7;f.display="block";var g=k.offsetWidth,k=k.offsetHeight,h=5+b,l=c+5;"bottom-left"==a&&(h=5+b,l=e-k-3);"bottom-right"==a&&(h=d-
117 g-5,l=e-k-3);"top-right"==a&&(h=d-g-5,l=c+5);f.left=h+"px";f.top=l+"px"}}});AmCharts.Slice=AmCharts.Class({construct:function(){}});AmCharts.SerialDataItem=AmCharts.Class({construct:function(){}});AmCharts.GraphDataItem=AmCharts.Class({construct:function(){}});AmCharts.Guide=AmCharts.Class({construct:function(a){this.cname="Guide";AmCharts.applyTheme(this,a,this.cname)}});AmCharts.AmGraph=AmCharts.Class({construct:function(a){this.cname="AmGraph";this.createEvents("rollOverGraphItem","rollOutGraphItem","clickGraphItem","doubleClickGraphItem","rightClickGraphItem","clickGraph","rollOverGraph","rollOutGraph");this.type="line";this.stackable=!0;this.columnCount=1;this.columnIndex=0;this.centerCustomBullets=this.showBalloon=!0;this.maxBulletSize=50;this.minBulletSize=4;this.balloonText="[[value]]";this.hidden=this.scrollbar=this.animationPlayed=!1;this.pointPosition="middle";
118 this.depthCount=1;this.includeInMinMax=!0;this.negativeBase=0;this.visibleInLegend=!0;this.showAllValueLabels=!1;this.showBulletsAt=this.showBalloonAt="close";this.lineThickness=1;this.dashLength=0;this.connect=!0;this.lineAlpha=1;this.bullet="none";this.bulletBorderThickness=2;this.bulletBorderAlpha=0;this.bulletAlpha=1;this.bulletSize=8;this.hideBulletsCount=this.bulletOffset=0;this.labelPosition="top";this.cornerRadiusTop=0;this.cursorBulletAlpha=1;this.gradientOrientation="vertical";this.dy=this.dx=
119 0;this.periodValue="";this.clustered=!0;this.periodSpan=1;this.y=this.x=0;this.switchable=!0;this.tcc=this.minDistance=1;AmCharts.applyTheme(this,a,this.cname)},draw:function(){var a=this.chart;isNaN(this.precision)||(this.numberFormatter?this.numberFormatter.precision=this.precision:this.numberFormatter={precision:this.precision,decimalSeparator:a.decimalSeparator,thousandsSeparator:a.thousandsSeparator});var b=a.container;this.container=b;this.destroy();var c=b.set(),d=b.set();this.behindColumns?
120 (a.graphsBehindSet.push(c),a.bulletBehindSet.push(d)):(a.graphsSet.push(c),a.bulletSet.push(d));var e=this.bulletAxis;AmCharts.isString(e)&&(this.bulletAxis=a.getValueAxisById(e));this.bulletSet=d;this.scrollbar||(e=a.marginLeftReal,a=a.marginTopReal,c.translate(e,a),d.translate(e,a));b=b.set();AmCharts.remove(this.columnsSet);c.push(b);this.set=c;this.columnsSet=b;this.columnsArray=[];this.ownColumns=[];this.allBullets=[];this.animationArray=[];AmCharts.ifArray(this.data)&&(c=!1,"xy"==this.chart.type?
121 this.xAxis.axisCreated&&this.yAxis.axisCreated&&(c=!0):this.valueAxis.axisCreated&&(c=!0),!this.hidden&&c&&this.createGraph())},createGraph:function(){var a=this,b=a.chart;"inside"==a.labelPosition&&"column"!=a.type&&(a.labelPosition="bottom");a.startAlpha=b.startAlpha;a.seqAn=b.sequencedAnimation;a.baseCoord=a.valueAxis.baseCoord;void 0===a.fillAlphas&&(a.fillAlphas=0);a.bulletColorR=a.bulletColor;void 0===a.bulletColorR&&(a.bulletColorR=a.lineColorR,a.bulletColorNegative=a.negativeLineColor);void 0===
122 a.bulletAlpha&&(a.bulletAlpha=a.lineAlpha);clearTimeout(a.playedTO);if(!isNaN(a.valueAxis.min)&&!isNaN(a.valueAxis.max)){switch(b.type){case "serial":a.categoryAxis&&(a.createSerialGraph(),"candlestick"==a.type&&1>a.valueAxis.minMaxMultiplier&&a.positiveClip(a.set));break;case "radar":a.createRadarGraph();break;case "xy":a.createXYGraph(),a.positiveClip(a.set)}a.playedTO=setTimeout(function(){a.setAnimationPlayed.call(a)},500*a.chart.startDuration)}},setAnimationPlayed:function(){this.animationPlayed=
123 !0},createXYGraph:function(){var a=[],b=[],c=this.xAxis,d=this.yAxis;this.pmh=d.viH+1;this.pmw=c.viW+1;this.pmy=this.pmx=0;var e;for(e=this.start;e<=this.end;e++){var f=this.data[e].axes[c.id].graphs[this.id],g=f.values,h=g.x,k=g.y,g=c.getCoordinate(h),l=d.getCoordinate(k);!isNaN(h)&&!isNaN(k)&&(a.push(g),b.push(l),(h=this.createBullet(f,g,l,e))||(h=0),k=this.labelText)&&(f=this.createLabel(f,g,l,k),this.allBullets.push(f),this.positionLabel(g,l,f,this.labelPosition,h))}this.drawLineGraph(a,b);this.launchAnimation()},
124 createRadarGraph:function(){var a=this.valueAxis.stackType,b=[],c=[],d,e,f;for(f=this.start;f<=this.end;f++){var g=this.data[f].axes[this.valueAxis.id].graphs[this.id],h;h="none"==a||"3d"==a?g.values.value:g.values.close;if(isNaN(h))this.drawLineGraph(b,c),b=[],c=[];else{var k=this.y-(this.valueAxis.getCoordinate(h)-this.height),l=180-360/(this.end-this.start+1)*f;h=k*Math.sin(l/180*Math.PI);k*=Math.cos(l/180*Math.PI);b.push(h);c.push(k);(l=this.createBullet(g,h,k,f))||(l=0);var m=this.labelText;
125 m&&(g=this.createLabel(g,h,k,m),this.allBullets.push(g),this.positionLabel(h,k,g,this.labelPosition,l));isNaN(d)&&(d=h);isNaN(e)&&(e=k)}}b.push(d);c.push(e);this.drawLineGraph(b,c);this.launchAnimation()},positionLabel:function(a,b,c,d,e){var f=c.getBBox();switch(d){case "left":a-=(f.width+e)/2+2;break;case "top":b-=(e+f.height)/2+1;break;case "right":a+=(f.width+e)/2+2;break;case "bottom":b+=(e+f.height)/2+1}c.translate(a,b)},getGradRotation:function(){var a=270;"horizontal"==this.gradientOrientation&&
126 (a=0);return this.gradientRotation=a},createSerialGraph:function(){this.dashLengthSwitched=this.fillColorsSwitched=this.lineColorSwitched=void 0;var a=this.chart,b=this.id,c=this.index,d=this.data,e=this.chart.container,f=this.valueAxis,g=this.type,h=this.columnWidthReal,k=this.showBulletsAt;isNaN(this.columnWidth)||(h=this.columnWidth);isNaN(h)&&(h=.8);var l=this.useNegativeColorIfDown,m=this.width,n=this.height,p=this.y,q=this.rotate,r=this.columnCount,s=AmCharts.toCoordinate(this.cornerRadiusTop,
127 h/2),v=this.connect,w=[],t=[],u,y,E,A,z=this.chart.graphs.length,K,I=this.dx/this.tcc,F=this.dy/this.tcc;var H=f.stackType,L=this.labelPosition,ha=this.start,ba=this.end,$=this.scrollbar,Ra=this.categoryAxis,na=this.baseCoord,ta=this.negativeBase,V=this.columnIndex,X=this.lineThickness,Z=this.lineAlpha,oa=this.lineColorR,R=this.dashLength,Y=this.set,qa=L,G=this.getGradRotation(),B=this.chart.columnSpacing,W=Ra.cellWidth,ca=(W*h-r)/r;B>ca&&(B=ca);var ja,x,ab,jb=n+1,kb=m+1,bb=
128 0,lb=0,mb,nb,cb,db,ob=this.fillColorsR,Da=this.negativeFillColors,wa=this.negativeLineColor,Sa=this.fillAlphas,Ta=this.negativeFillAlphas;"object"==typeof Sa&&(Sa=Sa[0]);"object"==typeof Ta&&(Ta=Ta[0]);var eb=f.getCoordinate(f.min);f.logarithmic&&(eb=f.getCoordinate(f.minReal));this.minCoord=eb;this.resetBullet&&(this.bullet="none");if(!($||"line"!=g&&"smoothedLine"!=g&&"step"!=g||(1==d.length&&"step"!=g&&"none"==this.bullet&&(this.bullet="round",this.resetBullet=!0),!Da&&void 0==wa||l))){var La=
129 ta;La>f.max&&(La=f.max);La<f.min&&(La=f.min);f.logarithmic&&(La=f.minReal);var Aa=f.getCoordinate(La),Fb=f.getCoordinate(f.max);q?(jb=n,kb=Math.abs(Fb-Aa),mb=n,nb=Math.abs(eb-Aa),db=lb=0,f.reversed?(bb=0,cb=Aa):(bb=Aa,cb=0)):(kb=m,jb=Math.abs(Fb-Aa),nb=m,mb=Math.abs(eb-Aa),cb=bb=0,f.reversed?(db=p,lb=Aa):db=Aa+1)}var Ba=Math.round;this.pmx=Ba(bb);this.pmy=Ba(lb);this.pmh=Ba(jb);this.pmw=Ba(kb);this.nmx=Ba(cb);this.nmy=Ba(db);this.nmh=Ba(mb);this.nmw=Ba(nb);AmCharts.isModern||(this.nmy=this.nmx=0,
130 this.nmh=this.height);h="column"==g?(W*h-B*(r-1))/r:W*h;1>h&&(h=1);var J;if("line"==g||"step"==g||"smoothedLine"==g){if(0<ha){for(J=ha-1;-1<J;J--)if(ja=d[J],x=ja.axes[f.id].graphs[b],ab=x.values.value,!isNaN(ab)){ha=J;break}if(this.lineColorField)for(J=ha;-1<J;J--)if(ja=d[J],x=ja.axes[f.id].graphs[b],x.lineColor){this.bulletColorSwitched=this.lineColorSwitched=x.lineColor;break}if(this.fillColorsField)for(J=ha;-1<J;J--)if(ja=d[J],x=ja.axes[f.id].graphs[b],x.fillColors){this.fillColorsSwitched=x.fillColors;
131 break}if(this.dashLengthField)for(J=ha;-1<J;J--)if(ja=d[J],x=ja.axes[f.id].graphs[b],!isNaN(x.dashLength)){this.dashLengthSwitched=x.dashLength;break}}if(ba<d.length-1)for(J=ba+1;J<d.length;J++)if(ja=d[J],x=ja.axes[f.id].graphs[b],ab=x.values.value,!isNaN(ab)){ba=J;break}}ba<d.length-1&&ba++;var O=[],P=[],Ea=!1;if("line"==g||"step"==g||"smoothedLine"==g)if(this.stackable&&"regular"==H||"100%"==H||this.fillToGraph)Ea=!0;var Gb=this.noStepRisers,fb=-1E3,gb=-1E3,hb=this.minDistance,Ma=!0,Ua=!1;for(J=
132 ha;J<=ba;J++){ja=d[J];x=ja.axes[f.id].graphs[b];x.index=J;var Va,Na=NaN;if(l&&void 0==this.openField)for(var pb=J+1;pb<d.length&&(!d[pb]||!(Va=d[J+1].axes[f.id].graphs[b])||!Va.values||(Na=Va.values.value,isNaN(Na)));pb++);var S,T,Q,da,la=NaN,D=NaN,C=NaN,N=NaN,M=NaN,Fa=NaN,xa=NaN,Ga=NaN,ya=NaN,aa=NaN,ia=NaN,ea=NaN,fa=NaN,U=NaN,qb=NaN,rb=NaN,ka=NaN,ra=void 0,Ca=ob,Wa=Sa,ua=oa,pa,sa,Xa=this.pattern;void 0!=x.pattern&&(Xa=x.pattern);void 0!=x.color&&(Ca=x.color);x.fillColors&&(Ca=x.fillColors);isNaN(x.alpha)||
133 (Wa=x.alpha);isNaN(x.dashLength)||(R=x.dashLength);var va=x.values;f.recalculateToPercents&&(va=x.percents);if(va){U=this.stackable&&"none"!=H&&"3d"!=H?va.close:va.value;if("candlestick"==g||"ohlc"==g)U=va.close,rb=va.low,xa=f.getCoordinate(rb),qb=va.high,ya=f.getCoordinate(qb);ka=va.open;C=f.getCoordinate(U);isNaN(ka)||(M=f.getCoordinate(ka),l&&(Na=ka,ka=M=NaN));l&&(void 0==this.openField?Va&&(Va.isNegative=Na<U?!0:!1):x.isNegative=Na>U?!0:!1);if(!$)switch(this.showBalloonAt){case "close":x.y=C;
134 break;case "open":x.y=M;break;case "high":x.y=ya;break;case "low":x.y=xa}var la=ja.x[Ra.id],Oa=this.periodSpan-1,ma=Math.floor(W/2)+Math.floor(Oa*W/2),za=ma,Hb=0;"left"==this.stepDirection&&(Hb=(2*W+Oa*W)/2,la-=Hb);"start"==this.pointPosition&&(la-=W/2+Math.floor(Oa*W/2),ma=0,za=Math.floor(W)+Math.floor(Oa*W));"end"==this.pointPosition&&(la+=W/2+Math.floor(Oa*W/2),ma=Math.floor(W)+Math.floor(Oa*W),za=0);if(Gb){var sb=this.columnWidth;isNaN(sb)||(ma*=sb,za*=sb)}$||(x.x=la);-1E5>la&&(la=-1E5);la>m+
135 1E5&&(la=m+1E5);q?(D=C,N=M,M=C=la,isNaN(ka)&&!this.fillToGraph&&(N=na),Fa=xa,Ga=ya):(N=D=la,isNaN(ka)&&!this.fillToGraph&&(M=na));U<ka&&(x.isNegative=!0,Da&&(Ca=Da),Ta&&(Wa=Ta),void 0!=wa&&(ua=wa));Ua=!1;isNaN(U)||(l?U>Na?(Ma&&(Ua=!0),Ma=!1):(Ma||(Ua=!0),Ma=!0):x.isNegative=U<ta?!0:!1);switch(g){case "line":if(isNaN(U))v||(this.drawLineGraph(w,t,O,P),w=[],t=[],O=[],P=[]);else{if(Math.abs(D-fb)>=hb||Math.abs(C-gb)>=hb)w.push(D),t.push(C),fb=D,gb=C;aa=D;ia=C;ea=D;fa=C;!Ea||isNaN(M)||isNaN(N)||(O.push(N),
136 P.push(M));if(Ua||void 0!=x.lineColor||void 0!=x.fillColors||!isNaN(x.dashLength))this.drawLineGraph(w,t,O,P),w=[D],t=[C],O=[],P=[],!Ea||isNaN(M)||isNaN(N)||(O.push(N),P.push(M)),l?Ma?(this.lineColorSwitched=oa,this.fillColorsSwitched=ob):(this.lineColorSwitched=wa,this.fillColorsSwitched=Da):(this.lineColorSwitched=x.lineColor,this.fillColorsSwitched=x.fillColors),this.dashLengthSwitched=x.dashLength;x.gap&&(this.drawLineGraph(w,t,O,P),w=[],t=[],O=[],P=[])}break;case "smoothedLine":if(isNaN(U))v||
137 (this.drawSmoothedGraph(w,t,O,P),w=[],t=[],O=[],P=[]);else{if(Math.abs(D-fb)>=hb||Math.abs(C-gb)>=hb)w.push(D),t.push(C),fb=D,gb=C;aa=D;ia=C;ea=D;fa=C;!Ea||isNaN(M)||isNaN(N)||(O.push(N),P.push(M));void 0==x.lineColor&&void 0==x.fillColors&&isNaN(x.dashLength)||(this.drawSmoothedGraph(w,t,O,P),w=[D],t=[C],O=[],P=[],!Ea||isNaN(M)||isNaN(N)||(O.push(N),P.push(M)),this.lineColorSwitched=x.lineColor,this.fillColorsSwitched=x.fillColors,this.dashLengthSwitched=x.dashLength);x.gap&&(this.drawSmoothedGraph(w,
138 t,O,P),w=[],t=[],O=[],P=[])}break;case "step":if(!isNaN(U)){if(void 0==x.lineColor&&void 0==x.fillColors&&isNaN(x.dashLength)||(this.drawLineGraph(w,t,O,P),w=[],t=[],O=[],P=[],this.lineColorSwitched=x.lineColor,this.fillColorsSwitched=x.fillColors,this.dashLengthSwitched=x.dashLength),q?(isNaN(u)||(w.push(u),t.push(C-ma)),t.push(C-ma),w.push(D),t.push(C+za),w.push(D),!Ea||isNaN(M)||isNaN(N)||(O.push(E),P.push(M-ma),O.push(N),P.push(M-ma),O.push(N),P.push(M+za))):(isNaN(y)||(t.push(y),w.push(u),t.push(y),
139 w.push(D-ma)),w.push(D-ma),t.push(C),w.push(D+za),t.push(C),!Ea||isNaN(M)||isNaN(N)||(O.push(N-ma),P.push(A),O.push(N-ma),P.push(M),O.push(N+za),P.push(M))),u=D,y=C,E=N,A=M,aa=D,ia=C,ea=D,fa=C,Ua&&(this.drawLineGraph(w,t,O,P),w=[],t=[],O=[],P=[],l&&(Ma?(this.lineColorSwitched=oa,this.fillColorsSwitched=ob):(this.lineColorSwitched=wa,this.fillColorsSwitched=Da))),Gb||x.gap)u=y=NaN,this.drawLineGraph(w,t,O,P),w=[],t=[],O=[],P=[]}else if(!v){if(1>=this.periodSpan||1<this.periodSpan&&D-u>ma+za)u=y=NaN;
140 this.drawLineGraph(w,t,O,P);w=[];t=[];O=[];P=[]}break;case "column":pa=ua;void 0!=x.lineColor&&(pa=x.lineColor);if(!isNaN(U)){l||(x.isNegative=U<ta?!0:!1);x.isNegative&&(Da&&(Ca=Da),void 0!=wa&&(pa=wa));var Ib=f.min,Jb=f.max;if(!(U<Ib&&ka<Ib||U>Jb&&ka>Jb))if(q){"3d"==H?(T=C-(r/2-this.depthCount+1)*(h+B)+B/2+F*V,S=N+I*V):(T=Math.floor(C-(r/2-V)*(h+B)+B/2),S=N);Q=h;aa=D;ia=T+h/2;ea=D;fa=T+h/2;T+Q>n&&(Q=n-T);0>T&&(Q+=T,T=0);da=D-N;var Vb=S;S=AmCharts.fitToBounds(S,0,m);da+=Vb-S;da=AmCharts.fitToBounds(da,
141 -S,m-S+I*V);T<n&&0<Q&&(ra=new AmCharts.Cuboid(e,da,Q,I-a.d3x,F-a.d3y,Ca,Wa,X,pa,Z,G,s,q,R,Xa),"bottom"!=L&&"inside"!=L&&"middle"!=L&&(L=f.reversed?"left":"right",0>U&&(L=f.reversed?"right":"left")),"regular"==H||"100%"==H)&&(aa+=this.dx)}else{"3d"==H?(S=D-(r/2-this.depthCount+1)*(h+B)+B/2+I*V,T=M+F*V):(S=D-(r/2-V)*(h+B)+B/2,T=M);Q=h;aa=S+h/2;ia=C;ea=S+h/2;fa=C;S+Q>m+V*I&&(Q=m-S+V*I);0>S&&(Q+=S,S=0);da=C-M;var Wb=T;T=AmCharts.fitToBounds(T,this.dy,n);da+=Wb-T;da=AmCharts.fitToBounds(da,-T+F*V,n-T);
142 if(S<m+V*I&&0<Q)if(ra=new AmCharts.Cuboid(e,Q,da,I-a.d3x,F-a.d3y,Ca,Wa,X,pa,this.lineAlpha,G,s,q,R,Xa),0>U&&"middle"!=L&&"inside"!=L)L="bottom";else if(L=qa,"regular"==H||"100%"==H)ia+=this.dy}if(ra&&(sa=ra.set,x.columnGraphics=sa,sa.translate(S,T),this.columnsSet.push(sa),(x.url||this.showHandOnHover)&&sa.setAttr("cursor","pointer"),!$)){"none"==H&&(K=q?(this.end+1-J)*z-c:z*J+c);"3d"==H&&(q?(K=(this.end+1-J)*z-c-1E3*this.depthCount,aa+=I*this.columnIndex,ea+=I*this.columnIndex,x.y+=I*this.columnIndex):
143 (K=(z-c)*(J+1)+1E3*this.depthCount,aa+=3,ia+=F*this.columnIndex+7,fa+=F*this.columnIndex,x.y+=F*this.columnIndex));if("regular"==H||"100%"==H)"inside"!=L&&(L="middle"),K=q?0<va.value?(this.end+1-J)*z+c:(this.end+1-J)*z-c:0<va.value?z*J+c:z*J-c;this.columnsArray.push({column:ra,depth:K});x.x=q?T+Q/2:S+Q/2;this.ownColumns.push(ra);this.animateColumns(ra,J,D,N,C,M);this.addListeners(sa,x)}}break;case "candlestick":if(!isNaN(ka)&&!isNaN(U)){var ib,tb;pa=ua;void 0!=x.lineColor&&(pa=x.lineColor);if(q){if(T=
144 C-h/2,S=N,Q=h,T+Q>n&&(Q=n-T),0>T&&(Q+=T,T=0),T<n&&0<Q){var ub,vb;U>ka?(ub=[D,Ga],vb=[N,Fa]):(ub=[N,Ga],vb=[D,Fa]);!isNaN(Ga)&&!isNaN(Fa)&&C<n&&0<C&&(ib=AmCharts.line(e,ub,[C,C],pa,Z,X),tb=AmCharts.line(e,vb,[C,C],pa,Z,X));da=D-N;ra=new AmCharts.Cuboid(e,da,Q,I,F,Ca,Sa,X,pa,Z,G,s,q,R,Xa)}}else if(S=D-h/2,T=M+X/2,Q=h,S+Q>m&&(Q=m-S),0>S&&(Q+=S,S=0),da=C-M,S<m&&0<Q){var ra=new AmCharts.Cuboid(e,Q,da,I,F,Ca,Wa,X,pa,Z,G,s,q,R,Xa),wb,xb;U>ka?(wb=[C,ya],xb=[M,xa]):(wb=[M,ya],xb=[C,xa]);!isNaN(ya)&&!isNaN(xa)&&
145 D<m&&0<D&&(ib=AmCharts.line(e,[D,D],wb,pa,Z,X),tb=AmCharts.line(e,[D,D],xb,pa,Z,X))}ra&&(sa=ra.set,x.columnGraphics=sa,Y.push(sa),sa.translate(S,T-X/2),(x.url||this.showHandOnHover)&&sa.setAttr("cursor","pointer"),ib&&(Y.push(ib),Y.push(tb)),aa=D,ia=C,q?(fa=C,ea=D,"open"==k&&(ea=N),"high"==k&&(ea=Ga),"low"==k&&(ea=Fa)):(fa=C,"open"==k&&(fa=M),"high"==k&&(fa=ya),"low"==k&&(fa=xa),ea=D),$||(x.x=q?T+Q/2:S+Q/2,this.animateColumns(ra,J,D,N,C,M),this.addListeners(sa,x)))}break;case "ohlc":if(!(isNaN(ka)||
146 isNaN(qb)||isNaN(rb)||isNaN(U))){U<ka&&(x.isNegative=!0,void 0!=wa&&(ua=wa));var yb,zb,Ab;if(q){var Bb=C-h/2,Bb=AmCharts.fitToBounds(Bb,0,n),Kb=AmCharts.fitToBounds(C,0,n),Cb=C+h/2,Cb=AmCharts.fitToBounds(Cb,0,n);zb=AmCharts.line(e,[N,N],[Bb,Kb],ua,Z,X,R);0<C&&C<n&&(yb=AmCharts.line(e,[Fa,Ga],[C,C],ua,Z,X,R));Ab=AmCharts.line(e,[D,D],[Kb,Cb],ua,Z,X,R);fa=C;ea=D;"open"==k&&(ea=N);"high"==k&&(ea=Ga);"low"==k&&(ea=Fa)}else{var Db=D-h/2,Db=AmCharts.fitToBounds(Db,0,m),Lb=AmCharts.fitToBounds(D,0,m),Eb=
147 D+h/2,Eb=AmCharts.fitToBounds(Eb,0,m);zb=AmCharts.line(e,[Db,Lb],[M,M],ua,Z,X,R);0<D&&D<m&&(yb=AmCharts.line(e,[D,D],[xa,ya],ua,Z,X,R));Ab=AmCharts.line(e,[Lb,Eb],[C,C],ua,Z,X,R);fa=C;"open"==k&&(fa=M);"high"==k&&(fa=ya);"low"==k&&(fa=xa);ea=D}Y.push(zb);Y.push(yb);Y.push(Ab);aa=D;ia=C}}if(!$&&!isNaN(U)){var Mb=this.hideBulletsCount;if(this.end-this.start<=Mb||0===Mb){var Ha=this.createBullet(x,ea,fa,J);Ha||(Ha=0);var Nb=this.labelText;if(Nb){var ga=this.createLabel(x,0,0,Nb),Ia=0,Ja=0,Ob=ga.getBBox(),
148 Pa=Ob.width,Ka=Ob.height;switch(L){case "left":Ia=-(Pa/2+Ha/2+3);break;case "top":Ja=-(Ka/2+Ha/2+3);break;case "right":Ia=Ha/2+2+Pa/2;break;case "bottom":q&&"column"==g?(aa=na,0>U||0<U&&f.reversed?(Ia=-6,ga.attr({"text-anchor":"end"})):(Ia=6,ga.attr({"text-anchor":"start"}))):(Ja=Ha/2+Ka/2,ga.x=-(Pa/2+2));break;case "middle":"column"==g&&(q?(Ja=-(Ka/2)+this.fontSize/2,Ia=-(D-N)/2-I,Math.abs(D-N)<Pa&&!this.showAllValueLabels&&(ga.remove(),ga=null)):(Ja=-(C-M)/2-F,Math.abs(C-M)<Ka&&!this.showAllValueLabels&&
149 (ga.remove(),ga=null)));break;case "inside":q?(Ja=-(Ka/2)+this.fontSize/2,Ia=0>da?Pa/2+6:-Pa/2-6):Ja=0>da?Ka:-Ka}if(ga){if(isNaN(ia)||isNaN(aa))ga.remove(),ga=null;else if(aa+=Ia,ia+=Ja,ga.translate(aa,ia),q){if(0>ia||ia>n)ga.remove(),ga=null}else{var Pb=0;"3d"==H&&(Pb=I*V);if(0>aa||aa>m+Pb)ga.remove(),ga=null}ga&&this.allBullets.push(ga)}}if("regular"==H||"100%"==H){var Qb=f.totalText;if(Qb){var Qa=this.createLabel(x,0,0,Qb,f.totalTextColor);this.allBullets.push(Qa);var Rb=Qa.getBBox(),Sb=Rb.width,
150 Tb=Rb.height,Ya,Za,Ub=f.totals[J];Ub&&Ub.remove();var $a=0;"column"!=g&&($a=Ha);q?(Za=C,Ya=0>U?D-Sb/2-2-$a:D+Sb/2+3+$a):(Ya=D,Za=0>U?C+Tb/2+$a:C-Tb/2-3-$a);Qa.translate(Ya,Za);f.totals[J]=Qa;q?(0>Za||Za>n)&&Qa.remove():(0>Ya||Ya>m)&&Qa.remove()}}}}}}if("line"==g||"step"==g||"smoothedLine"==g)"smoothedLine"==g?this.drawSmoothedGraph(w,t,O,P):this.drawLineGraph(w,t,O,P),$||this.launchAnimation();this.bulletsHidden&&this.hideBullets()},animateColumns:function(a,b,c,d,e,f){var g=this;c=g.chart.startDuration;
151 0<c&&!g.animationPlayed&&(g.seqAn?(a.set.hide(),g.animationArray.push(a),a=setTimeout(function(){g.animate.call(g)},c/(g.end-g.start+1)*(b-g.start)*1E3),g.timeOuts.push(a)):g.animate(a))},createLabel:function(a,b,c,d,e){var f=this.chart,g=a.labelColor;g||(g=this.color);g||(g=f.color);e&&(g=e);e=this.fontSize;void 0===e&&(this.fontSize=e=f.fontSize);var h=this.labelFunction;d=f.formatString(d,a);d=AmCharts.cleanFromEmpty(d);h&&(d=h(a,d));a=AmCharts.text(this.container,d,g,f.fontFamily,e);a.node.style.pointerEvents=
152 "none";a.translate(b,c);this.bulletSet.push(a);return a},positiveClip:function(a){a.clipRect(this.pmx,this.pmy,this.pmw,this.pmh)},negativeClip:function(a){a.clipRect(this.nmx,this.nmy,this.nmw,this.nmh)},drawLineGraph:function(a,b,c,d){var e=this;if(1<a.length){var f=e.set,g=e.chart,h=e.container,k=h.set(),l=h.set();f.push(l);f.push(k);var m=e.lineAlpha,n=e.lineThickness,f=e.fillAlphas,p=e.lineColorR,q=e.negativeLineAlpha;isNaN(q)&&(q=m);var r=e.lineColorSwitched;r&&(p=r);var r=e.fillColorsR,s=e.fillColorsSwitched;
153 s&&(r=s);var v=e.dashLength;(s=e.dashLengthSwitched)&&(v=s);var s=e.negativeLineColor,w=e.negativeFillColors,t=e.negativeFillAlphas,u=e.baseCoord;0!==e.negativeBase&&(u=e.valueAxis.getCoordinate(e.negativeBase));m=AmCharts.line(h,a,b,p,m,n,v,!1,!0);k.push(m);k.click(function(a){e.handleGraphEvent(a,"clickGraph")}).mouseover(function(a){e.handleGraphEvent(a,"rollOverGraph")}).mouseout(function(a){e.handleGraphEvent(a,"rollOutGraph")});void 0===s||e.useNegativeColorIfDown||(n=AmCharts.line(h,a,b,s,
154 q,n,v,!1,!0),l.push(n));if(0<f||0<t)if(n=a.join(";").split(";"),q=b.join(";").split(";"),m=g.type,"serial"==m?0<c.length?(c.reverse(),d.reverse(),n=a.concat(c),q=b.concat(d)):e.rotate?(q.push(q[q.length-1]),n.push(u),q.push(q[0]),n.push(u),q.push(q[0]),n.push(n[0])):(n.push(n[n.length-1]),q.push(u),n.push(n[0]),q.push(u),n.push(a[0]),q.push(q[0])):"xy"==m&&(b=e.fillToAxis)&&(AmCharts.isString(b)&&(b=g.getValueAxisById(b)),"H"==b.orientation?(u="top"==b.position?0:b.viH,n.push(n[n.length-1]),q.push(u),
155 n.push(n[0]),q.push(u),n.push(a[0]),q.push(q[0])):(u="left"==b.position?0:b.viW,q.push(q[q.length-1]),n.push(u),q.push(q[0]),n.push(u),q.push(q[0]),n.push(n[0]))),a=e.gradientRotation,0<f&&(g=AmCharts.polygon(h,n,q,r,f,1,"#000",0,a),g.pattern(e.pattern),k.push(g)),w||void 0!==s)isNaN(t)&&(t=f),w||(w=s),h=AmCharts.polygon(h,n,q,w,t,1,"#000",0,a),h.pattern(e.pattern),l.push(h),l.click(function(a){e.handleGraphEvent(a,"clickGraph")}).mouseover(function(a){e.handleGraphEvent(a,"rollOverGraph")}).mouseout(function(a){e.handleGraphEvent(a,
156 "rollOutGraph")});e.applyMask(l,k)}},applyMask:function(a,b){var c=a.length();"serial"!=this.chart.type||this.scrollbar||(this.positiveClip(b),0<c&&this.negativeClip(a))},drawSmoothedGraph:function(a,b,c,d){if(1<a.length){var e=this.set,f=this.container,g=f.set(),h=f.set();e.push(h);e.push(g);var k=this.lineAlpha,l=this.lineThickness,e=this.dashLength,m=this.fillAlphas,n=this.lineColorR,p=this.fillColorsR,q=this.negativeLineColor,r=this.negativeFillColors,s=this.negativeFillAlphas,v=this.baseCoord,
157 w=this.lineColorSwitched;w&&(n=w);(w=this.fillColorsSwitched)&&(p=w);w=this.negativeLineAlpha;isNaN(w)&&(w=k);k=new AmCharts.Bezier(f,a,b,n,k,l,p,0,e);g.push(k.path);void 0!==q&&(l=new AmCharts.Bezier(f,a,b,q,w,l,p,0,e),h.push(l.path));0<m&&(k=a.join(";").split(";"),n=b.join(";").split(";"),l="",0<c.length?(c.push("M"),d.push("M"),c.reverse(),d.reverse(),k=a.concat(c),n=b.concat(d)):(this.rotate?(l+=" L"+v+","+b[b.length-1],l+=" L"+v+","+b[0]):(l+=" L"+a[a.length-1]+","+v,l+=" L"+a[0]+","+v),l+=" L"+
158 a[0]+","+b[0]),c=new AmCharts.Bezier(f,k,n,NaN,0,0,p,m,e,l),c.path.pattern(this.pattern),g.push(c.path),r||void 0!==q)&&(s||(s=m),r||(r=q),a=new AmCharts.Bezier(f,a,b,NaN,0,0,r,s,e,l),a.path.pattern(this.pattern),h.push(a.path));this.applyMask(h,g)}},launchAnimation:function(){var a=this,b=a.chart.startDuration;if(0<b&&!a.animationPlayed){var c=a.set,d=a.bulletSet;AmCharts.VML||(c.attr({opacity:a.startAlpha}),d.attr({opacity:a.startAlpha}));c.hide();d.hide();a.seqAn?(b=setTimeout(function(){a.animateGraphs.call(a)},
159 a.index*b*1E3),a.timeOuts.push(b)):a.animateGraphs()}},animateGraphs:function(){var a=this.chart,b=this.set,c=this.bulletSet,d=this.x,e=this.y;b.show();c.show();var f=a.startDuration,a=a.startEffect;b&&(this.rotate?(b.translate(-1E3,e),c.translate(-1E3,e)):(b.translate(d,-1E3),c.translate(d,-1E3)),b.animate({opacity:1,translate:d+","+e},f,a),c.animate({opacity:1,translate:d+","+e},f,a))},animate:function(a){var b=this.chart,c=this.animationArray;!a&&0<c.length&&(a=c[0],c.shift());c=AmCharts[AmCharts.getEffect(b.startEffect)];
160 b=b.startDuration;a&&(this.rotate?a.animateWidth(b,c):a.animateHeight(b,c),a.set.show())},legendKeyColor:function(){var a=this.legendColor,b=this.lineAlpha;void 0===a&&(a=this.lineColorR,0===b&&(b=this.fillColorsR)&&(a="object"==typeof b?b[0]:b));return a},legendKeyAlpha:function(){var a=this.legendAlpha;void 0===a&&(a=this.lineAlpha,this.fillAlphas>a&&(a=this.fillAlphas),0===a&&(a=this.bulletAlpha),0===a&&(a=1));return a},createBullet:function(a,b,c,d){d=this.container;var e=this.bulletOffset,f=
161 this.bulletSize;isNaN(a.bulletSize)||(f=a.bulletSize);var g=a.values.value,h=this.maxValue,k=this.minValue,l=this.maxBulletSize,m=this.minBulletSize;isNaN(h)||(isNaN(g)||(f=(g-k)/(h-k)*(l-m)+m),k==h&&(f=l));h=f;this.bulletAxis&&(f=a.values.error,isNaN(f)||(g=f),f=this.bulletAxis.stepWidth*g);f<this.minBulletSize&&(f=this.minBulletSize);this.rotate?b=a.isNegative?b-e:b+e:c=a.isNegative?c+e:c-e;var n,m=this.bulletColorR;a.lineColor&&(this.bulletColorSwitched=a.lineColor);this.bulletColorSwitched&&(m=
162 this.bulletColorSwitched);a.isNegative&&void 0!==this.bulletColorNegative&&(m=this.bulletColorNegative);void 0!==a.color&&(m=a.color);var p;"xy"==this.chart.type&&this.valueField&&(p=this.pattern,a.pattern&&(p=a.pattern));e=this.bullet;a.bullet&&(e=a.bullet);var g=this.bulletBorderThickness,k=this.bulletBorderColorR,l=this.bulletBorderAlpha,q=this.bulletAlpha;k||(k=m);this.useLineColorForBulletBorder&&(k=this.lineColorR);var r=a.alpha;isNaN(r)||(q=r);if("none"!=this.bullet||a.bullet)n=AmCharts.bullet(d,
163 e,f,m,q,g,k,l,h,0,p);if(this.customBullet||a.customBullet)p=this.customBullet,a.customBullet&&(p=a.customBullet),p&&(n&&n.remove(),"function"==typeof p?(n=new p,n.chart=this.chart,a.bulletConfig&&(n.availableSpace=c,n.graph=this,n.graphDataItem=a,n.bulletY=c,a.bulletConfig.minCoord=this.minCoord-c,n.bulletConfig=a.bulletConfig),n.write(d),n=n.set):(this.chart.path&&(p=this.chart.path+p),n=d.set(),d=d.image(p,0,0,f,f),n.push(d),this.centerCustomBullets&&d.translate(-f/2,-f/2)));n&&((a.url||this.showHandOnHover)&&
164 n.setAttr("cursor","pointer"),"serial"==this.chart.type&&(0>b-0||b-0>this.width||c<-f/2||c-0>this.height)&&(n.remove(),n=null),n&&(this.bulletSet.push(n),n.translate(b,c),this.addListeners(n,a),this.allBullets.push(n)),a.bx=b,a.by=c);a.bulletGraphics=n;return f},showBullets:function(){var a=this.allBullets,b;this.bulletsHidden=!1;for(b=0;b<a.length;b++)a[b].show()},hideBullets:function(){var a=this.allBullets,b;this.bulletsHidden=!0;for(b=0;b<a.length;b++)a[b].hide()},addListeners:function(a,b){var c=
165 this;a.mouseover(function(a){c.handleRollOver(b,a)}).mouseout(function(a){c.handleRollOut(b,a)}).touchend(function(a){c.handleRollOver(b,a);c.chart.panEventsEnabled&&c.handleClick(b,a)}).touchstart(function(a){c.handleRollOver(b,a)}).click(function(a){c.handleClick(b,a)}).dblclick(function(a){c.handleDoubleClick(b,a)}).contextmenu(function(a){c.handleRightClick(b,a)})},handleRollOver:function(a,b){if(a){var c=this.chart,d={type:"rollOverGraphItem",item:a,index:a.index,graph:this,target:this,chart:this.chart,
166 event:b};this.fire("rollOverGraphItem",d);c.fire("rollOverGraphItem",d);clearTimeout(c.hoverInt);d=this.showBalloon;c.chartCursor&&"serial"==c.type&&(d=!1,!c.chartCursor.valueBalloonsEnabled&&this.showBalloon&&(d=!0));if(d){var d=c.formatString(this.balloonText,a,!0),e=this.balloonFunction;e&&(d=e(a,a.graph));d=AmCharts.cleanFromEmpty(d);e=c.getBalloonColor(this,a);c.balloon.showBullet=!1;c.balloon.pointerOrientation="V";var f=a.x,g=a.y;c.rotate&&(f=a.y,g=a.x);c.showBalloon(d,e,!0,f+c.marginLeftReal,
167 g+c.marginTopReal)}}this.handleGraphEvent(b,"rollOverGraph")},handleRollOut:function(a,b){this.chart.hideBalloon();if(a){var c={type:"rollOutGraphItem",item:a,index:a.index,graph:this,target:this,chart:this.chart,event:b};this.fire("rollOutGraphItem",c);this.chart.fire("rollOutGraphItem",c)}this.handleGraphEvent(b,"rollOutGraph")},handleClick:function(a,b){if(a){var c={type:"clickGraphItem",item:a,index:a.index,graph:this,target:this,chart:this.chart,event:b};this.fire("clickGraphItem",c);this.chart.fire("clickGraphItem",
168 c);AmCharts.getURL(a.url,this.urlTarget)}this.handleGraphEvent(b,"clickGraph")},handleGraphEvent:function(a,b){var c={type:b,graph:this,target:this,chart:this.chart,event:a};this.fire(b,c);this.chart.fire(b,c)},handleRightClick:function(a,b){if(a){var c={type:"rightClickGraphItem",item:a,index:a.index,graph:this,target:this,chart:this.chart,event:b};this.fire("rightClickGraphItem",c);this.chart.fire("rightClickGraphItem",c)}},handleDoubleClick:function(a,b){if(a){var c={type:"doubleClickGraphItem",
169 item:a,index:a.index,graph:this,target:this,chart:this.chart,event:b};this.fire("doubleClickGraphItem",c);this.chart.fire("doubleClickGraphItem",c)}},zoom:function(a,b){this.start=a;this.end=b;this.draw()},changeOpacity:function(a){var b=this.set;b&&b.setAttr("opacity",a);if(b=this.ownColumns){var c;for(c=0;c<b.length;c++){var d=b[c].set;d&&d.setAttr("opacity",a)}}(b=this.bulletSet)&&b.setAttr("opacity",a)},destroy:function(){AmCharts.remove(this.set);AmCharts.remove(this.bulletSet);var a=this.timeOuts;
170 if(a){var b;for(b=0;b<a.length;b++)clearTimeout(a[b])}this.timeOuts=[]}});AmCharts.ChartCursor=AmCharts.Class({construct:function(a){this.cname="ChartCursor";this.createEvents("changed","zoomed","onHideCursor","draw","selected","moved");this.enabled=!0;this.cursorAlpha=1;this.selectionAlpha=.2;this.cursorColor="#CC0000";this.categoryBalloonAlpha=1;this.color="#FFFFFF";this.type="cursor";this.zoomed=!1;this.zoomable=!0;this.pan=!1;this.categoryBalloonDateFormat="MMM DD, YYYY";this.categoryBalloonEnabled=this.valueBalloonsEnabled=!0;this.rolledOver=!1;this.cursorPosition=
171 "middle";this.bulletsEnabled=this.skipZoomDispatch=!1;this.bulletSize=8;this.selectWithoutZooming=this.oneBalloonOnly=!1;this.graphBulletSize=1.7;this.animationDuration=.3;this.zooming=!1;this.adjustment=0;this.avoidBalloonOverlapping=!0;AmCharts.applyTheme(this,a,this.cname)},draw:function(){var a=this;a.destroy();var b=a.chart,c=b.container;a.rotate=b.rotate;a.container=c;c=c.set();c.translate(a.x,a.y);a.set=c;b.cursorSet.push(c);c=new AmCharts.AmBalloon;c.chart=b;a.categoryBalloon=c;AmCharts.copyProperties(b.balloon,
172 c);c.cornerRadius=0;c.shadowAlpha=0;c.borderThickness=1;c.borderAlpha=1;c.showBullet=!1;var d=a.categoryBalloonColor;void 0===d&&(d=a.cursorColor);c.fillColor=d;c.fillAlpha=a.categoryBalloonAlpha;c.borderColor=d;c.color=a.color;a.rotate&&(c.pointerOrientation="H");a.extraWidth=0;a.prevX=[];a.prevY=[];a.prevTX=[];a.prevTY=[];if(a.valueBalloonsEnabled)for(c=0;c<b.graphs.length;c++)d=new AmCharts.AmBalloon,d.chart=b,AmCharts.copyProperties(b.balloon,d),b.graphs[c].valueBalloon=d;"cursor"==a.type?a.createCursor():
173 a.createCrosshair();a.interval=setInterval(function(){a.detectMovement.call(a)},40)},updateData:function(){var a=this.chart;this.data=a.chartData;this.firstTime=a.firstTime;this.lastTime=a.lastTime},createCursor:function(){var a=this.chart,b=this.cursorAlpha,c=a.categoryAxis,d=c.position,e=c.inside,f=c.axisThickness,g=this.categoryBalloon,h,k,l=a.dx,m=a.dy,n=this.x,p=this.y,q=this.width,r=this.height,a=a.rotate,s=c.tickLength;g.pointerWidth=s;a?(h=[0,q,q+l],k=[0,0,m]):(h=[l,0,0],k=[m,0,r]);this.line=
174 b=AmCharts.line(this.container,h,k,this.cursorColor,b,1);(h=this.fullRectSet)?(h.push(b),h.translate(this.x,this.y)):this.set.push(b);a?(e&&(g.pointerWidth=0),"right"==d?e?g.setBounds(n,p+m,n+q+l,p+r+m):g.setBounds(n+q+l+f,p+m,n+q+1E3,p+r+m):e?g.setBounds(n,p,q+n,r+p):g.setBounds(-1E3,-1E3,n-s-f,p+r+15)):(g.maxWidth=q,c.parseDates&&(s=0,g.pointerWidth=0),"top"==d?e?g.setBounds(n+l,p+m,q+l+n,r+p):g.setBounds(n+l,-1E3,q+l+n,p+m-s-f):e?g.setBounds(n,p,q+n,r+p-s):g.setBounds(n,p+r+s+f-1,n+q,p+r+s+f));
175 this.hideCursor()},createCrosshair:function(){var a=this.cursorAlpha,b=this.container,c=AmCharts.line(b,[0,0],[0,this.height],this.cursorColor,a,1),a=AmCharts.line(b,[0,this.width],[0,0],this.cursorColor,a,1);this.set.push(c);this.set.push(a);this.vLine=c;this.hLine=a;this.hideCursor()},detectMovement:function(){var a=this.chart;if(a.mouseIsOver){var b=a.mouseX-this.x,c=a.mouseY-this.y;-.5<b&&b<this.width+1&&0<c&&c<this.height?(this.drawing?this.rolledOver||a.setMouseCursor("crosshair"):this.pan&&
176 (this.rolledOver||a.setMouseCursor("move")),this.rolledOver=!0,this.setPosition()):this.rolledOver&&(this.handleMouseOut(),this.rolledOver=!1)}else this.rolledOver&&(this.handleMouseOut(),this.rolledOver=!1)},getMousePosition:function(){var a,b=this.width,c=this.height;a=this.chart;this.rotate?(a=a.mouseY-this.y,0>a&&(a=0),a>c&&(a=c)):(a=a.mouseX-this.x-1,0>a&&(a=0),a>b&&(a=b));return a},updateCrosshair:function(){var a=this.chart,b=a.mouseX-this.x,c=a.mouseY-this.y,d=this.vLine,e=this.hLine,b=AmCharts.fitToBounds(b,
177 0,this.width),c=AmCharts.fitToBounds(c,0,this.height);0<this.cursorAlpha&&(d.show(),e.show(),d.translate(b,0),e.translate(0,c));this.zooming&&(a.hideXScrollbar&&(b=NaN),a.hideYScrollbar&&(c=NaN),this.updateSelectionSize(b,c));this.fireMoved();a.mouseIsOver||this.zooming||this.hideCursor()},fireMoved:function(){var a=this.chart,b={type:"moved",target:this};b.chart=a;b.zooming=this.zooming;b.x=a.mouseX-this.x;b.y=a.mouseY-this.y;this.fire("moved",b)},updateSelectionSize:function(a,b){AmCharts.remove(this.selection);
178 var c=this.selectionPosX,d=this.selectionPosY,e=0,f=0,g=this.width,h=this.height;isNaN(a)||(c>a&&(e=a,g=c-a),c<a&&(e=c,g=a-c),c==a&&(e=a,g=0),g+=this.extraWidth,e-=this.extraWidth/2);isNaN(b)||(d>b&&(f=b,h=d-b),d<b&&(f=d,h=b-d),d==b&&(f=b,h=0),h+=this.extraWidth,f-=this.extraWidth/2);0<g&&0<h&&(c=AmCharts.rect(this.container,g,h,this.cursorColor,this.selectionAlpha),c.translate(e+this.x,f+this.y),this.selection=c)},arrangeBalloons:function(){var a=this.valueBalloons,b=this.x,c=this.y,d=this.height+
179 c;a.sort(this.compareY);var e;for(e=0;e<a.length;e++){var f=a[e].balloon;f.setBounds(b,c,b+this.width,d);f.prevX=this.prevX[e];f.prevY=this.prevY[e];f.prevTX=this.prevTX[e];f.prevTY=this.prevTY[e];f.draw();d=f.yPos-3}this.arrangeBalloons2()},compareY:function(a,b){return a.yy<b.yy?1:-1},arrangeBalloons2:function(){var a=this.valueBalloons;a.reverse();var b,c=this.x,d,e,f=a.length;for(e=0;e<f;e++){var g=a[e].balloon;b=g.bottom;var h=g.bottom-g.yPos,k=f-e-1;0<e&&b-h<d+3&&(g.setBounds(c,d+3,c+this.width,
180 d+h+3),g.prevX=this.prevX[k],g.prevY=this.prevY[k],g.prevTX=this.prevTX[k],g.prevTY=this.prevTY[k],g.draw());g.set&&g.set.show();this.prevX[k]=g.prevX;this.prevY[k]=g.prevY;this.prevTX[k]=g.prevTX;this.prevTY[k]=g.prevTY;d=g.bottom}},showBullets:function(){AmCharts.remove(this.allBullets);var a=this.container,b=a.set();this.set.push(b);this.set.show();this.allBullets=b;var b=this.chart.graphs,c;for(c=0;c<b.length;c++){var d=b[c];if(!d.hidden&&d.balloonText){var e=this.data[this.index].axes[d.valueAxis.id].graphs[d.id],
181 f=e.y;if(!isNaN(f)){var g,h;g=e.x;this.rotate?(h=f,f=g):h=g;d=AmCharts.circle(a,this.bulletSize/2,this.chart.getBalloonColor(d,e,!0),d.cursorBulletAlpha);d.translate(h,f);this.allBullets.push(d)}}}},destroy:function(){this.clear();AmCharts.remove(this.selection);this.selection=null;var a=this.categoryBalloon;a&&a.destroy();this.destroyValueBalloons();AmCharts.remove(this.set)},clear:function(){clearInterval(this.interval)},destroyValueBalloons:function(){var a=this.valueBalloons;if(a){var b;for(b=
182 0;b<a.length;b++)a[b].balloon.hide()}},zoom:function(a,b,c,d){var e=this.chart;this.destroyValueBalloons();this.zooming=!1;var f;this.rotate?this.selectionPosY=f=e.mouseY:this.selectionPosX=f=e.mouseX;this.start=a;this.end=b;this.startTime=c;this.endTime=d;this.zoomed=!0;d=e.categoryAxis;e=this.rotate;b=this.width;c=this.height;a=d.stepWidth;this.fullWidth&&(f=1,d.parseDates&&!d.equalSpacing&&(f=d.minDuration()),e?this.extraWidth=c=a*f:(this.extraWidth=b=a*f,this.categoryBalloon.minWidth=b),this.line&&
183 this.line.remove(),this.line=AmCharts.rect(this.container,b,c,this.cursorColor,this.cursorAlpha,0),this.fullRectSet&&this.fullRectSet.push(this.line));this.stepWidth=a;this.tempVal=this.valueBalloonsEnabled;this.valueBalloonsEnabled=!1;this.setPosition();this.valueBalloonsEnabled=this.tempVal;this.hideCursor()},hideObj:function(a){a&&a.hide()},hideCursor:function(a){void 0===a&&(a=!0);this.hideObj(this.set);this.hideObj(this.categoryBalloon);this.hideObj(this.line);this.hideObj(this.vLine);this.hideObj(this.hLine);
184 this.hideObj(this.allBullets);this.destroyValueBalloons();this.selectWithoutZooming||AmCharts.remove(this.selection);this.previousIndex=NaN;a&&this.fire("onHideCursor",{type:"onHideCursor",chart:this.chart,target:this});this.drawing||this.chart.setMouseCursor("auto");this.normalizeBulletSize()},setPosition:function(a,b,c){void 0===b&&(b=!0);if("cursor"==this.type){if(this.tempPosition=NaN,AmCharts.ifArray(this.data))isNaN(a)&&(a=this.getMousePosition()),(a!=this.previousMousePosition||!0===this.zoomed||
185 this.oneBalloonOnly)&&!isNaN(a)&&("mouse"==this.cursorPosition&&(this.tempPosition=a),isNaN(c)&&(c=this.chart.categoryAxis.xToIndex(a)),c!=this.previousIndex||this.zoomed||"mouse"==this.cursorPosition||this.oneBalloonOnly)&&(this.updateCursor(c,b),this.zoomed=!1),this.previousMousePosition=a}else this.updateCrosshair()},normalizeBulletSize:function(){var a=this.resizedBullets;if(a)for(var b=0;b<a.length;b++){var c=a[b],d=c.bulletGraphics;d&&(d.translate(c.bx,c.by,1),c=c.graph,isNaN(this.graphBulletAlpha)||
186 (d.setAttr("fill-opacity",c.bulletAlpha),d.setAttr("stroke-opacity",c.bulletBorderAlpha)))}},updateCursor:function(a,b){var c=this.chart,d=this.fullWidth,e=c.mouseX-this.x,f=c.mouseY-this.y;this.drawingNow&&(AmCharts.remove(this.drawingLine),this.drawingLine=AmCharts.line(this.container,[this.x+this.drawStartX,this.x+e],[this.y+this.drawStartY,this.y+f],this.cursorColor,1,1));if(this.enabled){void 0===b&&(b=!0);this.index=a+=this.adjustment;var g=c.categoryAxis,h=c.dx,k=c.dy,l=this.x+1,m=this.y+1,
187 n=this.width,p=this.height,q=this.data[a];this.fireMoved();if(q){var r=q.x[g.id],s=c.rotate,v=g.inside,w=this.stepWidth,t=this.categoryBalloon,u=this.firstTime,y=this.lastTime,E=this.cursorPosition,A=g.position,z=this.zooming,K=this.panning,I=c.graphs,F=g.axisThickness;if(c.mouseIsOver||z||K||this.forceShow)if(this.forceShow=!1,K){var h=this.panClickPos,c=this.panClickEndTime,z=this.panClickStartTime,H=this.panClickEnd,l=this.panClickStart,e=(s?h-f:h-e)/w;if(!g.parseDates||g.equalSpacing)e=Math.round(e);
188 0!==e&&(h={type:"zoomed",target:this},h.chart=this.chart,g.parseDates&&!g.equalSpacing?(c+e>y&&(e=y-c),z+e<u&&(e=u-z),h.start=Math.round(z+e),h.end=Math.round(c+e),this.fire(h.type,h)):H+e>=this.data.length||0>l+e||(h.start=l+e,h.end=H+e,this.fire(h.type,h)))}else{"start"==E?r-=g.cellWidth/2:"mouse"==E&&(c.mouseIsOver?r=s?f-2:e-2:isNaN(this.tempPosition)||(r=this.tempPosition-2));if(s){if(0>r)if(z)r=0;else{this.hideCursor();return}if(r>p+1)if(z)r=p+1;else{this.hideCursor();return}}else{if(0>r)if(z)r=
189 0;else{this.hideCursor();return}if(r>n)if(z)r=n;else{this.hideCursor();return}}if(0<this.cursorAlpha){var L=this.line;s?(u=0,y=r+k,d&&(y-=g.cellWidth/2)):(u=r,y=0,d&&(u-=g.cellWidth/2));w=this.animationDuration;0<w&&!this.zooming?isNaN(this.previousX)?L.translate(u,y):(L.translate(this.previousX,this.previousY),L.animate({translate:u+","+y},w,"easeOutSine")):L.translate(u,y);this.previousX=u;this.previousY=y;L.show()}this.linePos=s?r+k:r;z&&(d&&L.hide(),s?this.updateSelectionSize(NaN,r):this.updateSelectionSize(r,
190 NaN));w=!0;z&&(w=!1);this.categoryBalloonEnabled&&w?(s?(v&&("right"==A?t.setBounds(l,m+k,l+n+h,m+r+k):t.setBounds(l,m+k,l+n+h,m+r)),"right"==A?v?t.setPosition(l+n+h,m+r+k):t.setPosition(l+n+h+F,m+r+k):v?t.setPosition(l,m+r):t.setPosition(l-F,m+r)):"top"==A?v?t.setPosition(l+r+h,m+k):t.setPosition(l+r+h,m+k-F+1):v?t.setPosition(l+r,m+p):t.setPosition(l+r,m+p+F-1),(u=this.categoryBalloonFunction)?t.showBalloon(u(q.category)):g.parseDates?(g=AmCharts.formatDate(q.category,this.categoryBalloonDateFormat),
191 -1!=g.indexOf("fff")&&(g=AmCharts.formatMilliseconds(g,q.category)),t.showBalloon(g)):t.showBalloon(AmCharts.fixNewLines(q.category))):t.hide();I&&this.bulletsEnabled&&this.showBullets();if(this.oneBalloonOnly){k=Infinity;for(g=0;g<I.length;g++)u=I[g],u.showBalloon&&!u.hidden&&u.balloonText&&(y=q.axes[u.valueAxis.id].graphs[u.id],t=y.y,isNaN(t)||(s?Math.abs(e-t)<k&&(k=Math.abs(e-t),H=u):Math.abs(f-t)<k&&(k=Math.abs(f-t),H=u)));this.mostCloseGraph&&(H=this.mostCloseGraph)}if(a!=this.previousIndex||
192 H!=this.previousMostCloseGraph)if(this.normalizeBulletSize(),this.destroyValueBalloons(),this.resizedBullets=[],I&&this.valueBalloonsEnabled&&w&&c.balloon.enabled){this.valueBalloons=w=[];for(g=0;g<I.length;g++)if(u=I[g],t=NaN,(!this.oneBalloonOnly||u==H)&&u.showBalloon&&!u.hidden&&u.balloonText&&("step"==u.type&&"left"==u.stepDirection&&(q=this.data[a+1]),q)){if(y=q.axes[u.valueAxis.id].graphs[u.id])t=y.y;if(this.showNextAvailable&&isNaN(t)&&a+1<this.data.length)for(k=a+1;k<this.data.length;k++)if(r=
193 this.data[k])if(y=r.axes[u.valueAxis.id].graphs[u.id],t=y.y,!isNaN(t))break;if(!isNaN(t)){r=y.x;v=!0;if(s){if(k=t,0>r||r>p)v=!1}else if(k=r,r=t,0>k||k>n+h+1)v=!1;v&&(1!=this.graphBulletSize&&AmCharts.isModern&&(v=y.bulletGraphics)&&(v.getBBox(),v.translate(y.bx,y.by,this.graphBulletSize),this.resizedBullets.push(y),A=this.graphBulletAlpha,isNaN(A)||(v.setAttr("fill-opacity",A),v.setAttr("stroke-opacity",A))),v=u.valueBalloon,A=c.getBalloonColor(u,y),v.setBounds(l,m,l+n,m+p),v.pointerOrientation="H",
194 F=this.balloonPointerOrientation,"vertical"==F&&(v.pointerOrientation="V"),"horizontal"==F&&(v.pointerOrientation="H"),v.changeColor(A),void 0!==u.balloonAlpha&&(v.fillAlpha=u.balloonAlpha),void 0!==u.balloonTextColor&&(v.color=u.balloonTextColor),v.setPosition(k+l,r+m),k=c.formatString(u.balloonText,y,!0),(r=u.balloonFunction)&&(k=r(y,u).toString()),""!==k&&(s?v.showBalloon(k):(v.text=k,v.show=!0),w.push({yy:t,balloon:v})),!s&&v.set&&(v.set.hide(),u=v.textDiv)&&(u.style.visibility="hidden"))}}this.avoidBalloonOverlapping&&
195 this.arrangeBalloons()}b?(h={type:"changed"},h.index=a,h.chart=this.chart,h.zooming=z,h.mostCloseGraph=H,h.position=s?f:e,h.target=this,c.fire("changed",h),this.fire("changed",h),this.skipZoomDispatch=!1):(this.skipZoomDispatch=!0,c.updateLegendValues(a));this.previousIndex=a;this.previousMostCloseGraph=H}}}else this.hideCursor()},enableDrawing:function(a){this.enabled=!a;this.hideCursor();this.rolledOver=!1;this.drawing=a},isZooming:function(a){a&&a!=this.zooming&&this.handleMouseDown("fake");a||
196 a==this.zooming||this.handleMouseUp()},handleMouseOut:function(){if(this.enabled)if(this.zooming)this.setPosition();else{this.index=void 0;var a={type:"changed",index:void 0,target:this};a.chart=this.chart;this.fire("changed",a);this.hideCursor()}},handleReleaseOutside:function(){this.handleMouseUp()},handleMouseUp:function(){var a=this.chart,b=this.data,c;if(a){var d=a.mouseX-this.x,e=a.mouseY-this.y;if(this.drawingNow){this.drawingNow=!1;AmCharts.remove(this.drawingLine);c=this.drawStartX;var f=
197 this.drawStartY;if(2<Math.abs(c-d)||2<Math.abs(f-e))c={type:"draw",target:this,chart:a,initialX:c,initialY:f,finalX:d,finalY:e},this.fire(c.type,c)}if(this.enabled&&0<b.length){if(this.pan)this.rolledOver=!1;else if(this.zoomable&&this.zooming){c=this.selectWithoutZooming?{type:"selected"}:{type:"zoomed"};c.target=this;c.chart=a;if("cursor"==this.type)this.rotate?this.selectionPosY=e:this.selectionPosX=e=d,2>Math.abs(e-this.initialMouse)&&this.fromIndex==this.index||(this.index<this.fromIndex?(c.end=
198 this.fromIndex,c.start=this.index):(c.end=this.index,c.start=this.fromIndex),e=a.categoryAxis,e.parseDates&&!e.equalSpacing&&(c.start=b[c.start].time,c.end=a.getEndTime(b[c.end].time)),this.skipZoomDispatch||this.fire(c.type,c));else{var g=this.initialMouseX,h=this.initialMouseY;3>Math.abs(d-g)&&3>Math.abs(e-h)||(b=Math.min(g,d),f=Math.min(h,e),d=Math.abs(g-d),e=Math.abs(h-e),a.hideXScrollbar&&(b=0,d=this.width),a.hideYScrollbar&&(f=0,e=this.height),c.selectionHeight=e,c.selectionWidth=d,c.selectionY=
199 f,c.selectionX=b,this.skipZoomDispatch||this.fire(c.type,c))}this.selectWithoutZooming||AmCharts.remove(this.selection)}this.panning=this.zooming=this.skipZoomDispatch=!1}}},showCursorAt:function(a){var b=this.chart.categoryAxis;a=b.parseDates?b.dateToCoordinate(a):b.categoryToCoordinate(a);this.previousMousePosition=NaN;this.forceShow=!0;this.setPosition(a,!1)},clearSelection:function(){AmCharts.remove(this.selection)},handleMouseDown:function(a){if(this.zoomable||this.pan||this.drawing){var b=this.rotate,
200 c=this.chart,d=c.mouseX-this.x,e=c.mouseY-this.y;if(0<d&&d<this.width&&0<e&&e<this.height||"fake"==a)this.setPosition(),this.selectWithoutZooming&&AmCharts.remove(this.selection),this.drawing?(this.drawStartY=e,this.drawStartX=d,this.drawingNow=!0):this.pan?(this.zoomable=!1,c.setMouseCursor("move"),this.panning=!0,this.panClickPos=b?e:d,this.panClickStart=this.start,this.panClickEnd=this.end,this.panClickStartTime=this.startTime,this.panClickEndTime=this.endTime):this.zoomable&&("cursor"==this.type?
201 (this.fromIndex=this.index,b?(this.initialMouse=e,this.selectionPosY=this.linePos):(this.initialMouse=d,this.selectionPosX=this.linePos)):(this.initialMouseX=d,this.initialMouseY=e,this.selectionPosX=d,this.selectionPosY=e),this.zooming=!0)}}});AmCharts.SimpleChartScrollbar=AmCharts.Class({construct:function(a){this.createEvents("zoomed");this.backgroundColor="#D4D4D4";this.backgroundAlpha=1;this.selectedBackgroundColor="#EFEFEF";this.scrollDuration=this.selectedBackgroundAlpha=1;this.resizeEnabled=!0;this.hideResizeGrips=!1;this.scrollbarHeight=20;this.updateOnReleaseOnly=!1;9>document.documentMode&&(this.updateOnReleaseOnly=!0);this.dragIconWidth=18;this.dragIconHeight=25;AmCharts.applyTheme(this,a,"SimpleChartScrollbar")},draw:function(){var a=
202 this;a.destroy();a.interval=setInterval(function(){a.updateScrollbar.call(a)},40);var b=a.chart.container,c=a.rotate,d=a.chart,e=b.set();a.set=e;d.scrollbarsSet.push(e);var f,g;c?(f=a.scrollbarHeight,g=d.plotAreaHeight):(g=a.scrollbarHeight,f=d.plotAreaWidth);a.width=f;if((a.height=g)&&f){var h=AmCharts.rect(b,f,g,a.backgroundColor,a.backgroundAlpha,1,a.backgroundColor,a.backgroundAlpha);a.bg=h;e.push(h);h=AmCharts.rect(b,f,g,"#000",.005);e.push(h);a.invisibleBg=h;h.click(function(){a.handleBgClick()}).mouseover(function(){a.handleMouseOver()}).mouseout(function(){a.handleMouseOut()}).touchend(function(){a.handleBgClick()});
203 h=AmCharts.rect(b,f,g,a.selectedBackgroundColor,a.selectedBackgroundAlpha);a.selectedBG=h;e.push(h);f=AmCharts.rect(b,f,g,"#000",.005);a.dragger=f;e.push(f);f.mousedown(function(b){a.handleDragStart(b)}).mouseup(function(){a.handleDragStop()}).mouseover(function(){a.handleDraggerOver()}).mouseout(function(){a.handleMouseOut()}).touchstart(function(b){a.handleDragStart(b)}).touchend(function(){a.handleDragStop()});f=d.pathToImages;c?(h=f+"dragIconH.gif",f=a.dragIconWidth,c=a.dragIconHeight):(h=f+"dragIcon.gif",
204 c=a.dragIconWidth,f=a.dragIconHeight);g=b.image(h,0,0,c,f);var h=b.image(h,0,0,c,f),k=10,l=20;d.panEventsEnabled&&(k=25,l=a.scrollbarHeight);var m=AmCharts.rect(b,k,l,"#000",.005),n=AmCharts.rect(b,k,l,"#000",.005);n.translate(-(k-c)/2,-(l-f)/2);m.translate(-(k-c)/2,-(l-f)/2);c=b.set([g,n]);b=b.set([h,m]);a.iconLeft=c;a.iconRight=b;c.mousedown(function(){a.leftDragStart()}).mouseup(function(){a.leftDragStop()}).mouseover(function(){a.iconRollOver()}).mouseout(function(){a.iconRollOut()}).touchstart(function(b){a.leftDragStart()}).touchend(function(){a.leftDragStop()});
205 b.mousedown(function(){a.rightDragStart()}).mouseup(function(){a.rightDragStop()}).mouseover(function(){a.iconRollOver()}).mouseout(function(){a.iconRollOut()}).touchstart(function(b){a.rightDragStart()}).touchend(function(){a.rightDragStop()});AmCharts.ifArray(d.chartData)?e.show():e.hide();a.hideDragIcons();a.clipDragger(!1)}e.translate(a.x,a.y)},updateScrollbarSize:function(a,b){var c=this.dragger,d,e,f,g;this.rotate?(d=0,e=a,f=this.width+1,g=b-a,c.setAttr("height",b-a),c.setAttr("y",e)):(d=a,
206 e=0,f=b-a,g=this.height+1,c.setAttr("width",b-a),c.setAttr("x",d));this.clipAndUpdate(d,e,f,g)},updateScrollbar:function(){var a,b=!1,c,d,e=this.x,f=this.y,g=this.dragger,h=this.getDBox();c=h.x+e;d=h.y+f;var k=h.width,h=h.height,l=this.rotate,m=this.chart,n=this.width,p=this.height,q=m.mouseX,r=m.mouseY;a=this.initialMouse;m.mouseIsOver&&(this.dragging&&(m=this.initialCoord,l?(a=m+(r-a),0>a&&(a=0),m=p-h,a>m&&(a=m),g.setAttr("y",a)):(a=m+(q-a),0>a&&(a=0),m=n-k,a>m&&(a=m),g.setAttr("x",a))),this.resizingRight&&
207 (l?(a=r-d,a+d>p+f&&(a=p-d+f),0>a?(this.resizingRight=!1,b=this.resizingLeft=!0):(0===a&&(a=.1),g.setAttr("height",a))):(a=q-c,a+c>n+e&&(a=n-c+e),0>a?(this.resizingRight=!1,b=this.resizingLeft=!0):(0===a&&(a=.1),g.setAttr("width",a)))),this.resizingLeft&&(l?(c=d,d=r,d<f&&(d=f),d>p+f&&(d=p+f),a=!0===b?c-d:h+c-d,0>a?(this.resizingRight=!0,this.resizingLeft=!1,g.setAttr("y",c+h-f)):(0===a&&(a=.1),g.setAttr("y",d-f),g.setAttr("height",a))):(d=q,d<e&&(d=e),d>n+e&&(d=n+e),a=!0===b?c-d:k+c-d,0>a?(this.resizingRight=
208 !0,this.resizingLeft=!1,g.setAttr("x",c+k-e)):(0===a&&(a=.1),g.setAttr("x",d-e),g.setAttr("width",a)))),this.clipDragger(!0))},clipDragger:function(a){var b=this.getDBox();if(b){var c=b.x,d=b.y,e=b.width,b=b.height,f=!1;if(this.rotate){if(c=0,e=this.width+1,this.clipY!=d||this.clipH!=b)f=!0}else if(d=0,b=this.height+1,this.clipX!=c||this.clipW!=e)f=!0;f&&(this.clipAndUpdate(c,d,e,b),a&&(this.updateOnReleaseOnly||this.dispatchScrollbarEvent()))}},maskGraphs:function(){},clipAndUpdate:function(a,b,
209 c,d){this.clipX=a;this.clipY=b;this.clipW=c;this.clipH=d;this.selectedBG.clipRect(a,b,c,d);this.updateDragIconPositions();this.maskGraphs(a,b,c,d)},dispatchScrollbarEvent:function(){if(this.skipEvent)this.skipEvent=!1;else{var a=this.chart;a.hideBalloon();var b=this.getDBox(),c=b.x,d=b.y,e=b.width,b=b.height;this.rotate?(c=d,e=this.height/b):e=this.width/e;a={type:"zoomed",position:c,chart:a,target:this,multiplier:e};this.fire(a.type,a)}},updateDragIconPositions:function(){var a=this.getDBox(),b=
210 a.x,c=a.y,d=this.iconLeft,e=this.iconRight,f,g,h=this.scrollbarHeight;this.rotate?(f=this.dragIconWidth,g=this.dragIconHeight,d.translate(this.x+(h-g)/2,this.y+c-f/2),e.translate(this.x+(h-g)/2,this.y+c+a.height-f/2)):(f=this.dragIconHeight,g=this.dragIconWidth,d.translate(this.x+b-g/2,this.y+(h-f)/2),e.translate(this.x+b-g/2+a.width,this.y+(h-f)/2))},showDragIcons:function(){this.resizeEnabled&&(this.iconLeft.show(),this.iconRight.show())},hideDragIcons:function(){if(!this.resizingLeft&&!this.resizingRight&&
211 !this.dragging){if(this.hideResizeGrips||!this.resizeEnabled)this.iconLeft.hide(),this.iconRight.hide();this.removeCursors()}},removeCursors:function(){this.chart.setMouseCursor("auto")},relativeZoom:function(a,b){this.dragger.stop();this.multiplier=a;this.position=b;this.updateScrollbarSize(b,this.rotate?b+this.height/a:b+this.width/a)},destroy:function(){this.clear();AmCharts.remove(this.set);AmCharts.remove(this.iconRight);AmCharts.remove(this.iconLeft)},clear:function(){clearInterval(this.interval)},
212 handleDragStart:function(){var a=this.chart;this.dragger.stop();this.removeCursors();this.dragging=!0;var b=this.getDBox();this.rotate?(this.initialCoord=b.y,this.initialMouse=a.mouseY):(this.initialCoord=b.x,this.initialMouse=a.mouseX)},handleDragStop:function(){this.updateOnReleaseOnly&&(this.updateScrollbar(),this.skipEvent=!1,this.dispatchScrollbarEvent());this.dragging=!1;this.mouseIsOver&&this.removeCursors();this.updateScrollbar()},handleDraggerOver:function(){this.handleMouseOver()},leftDragStart:function(){this.dragger.stop();
213 this.resizingLeft=!0},leftDragStop:function(){this.resizingLeft=!1;this.mouseIsOver||this.removeCursors();this.updateOnRelease()},rightDragStart:function(){this.dragger.stop();this.resizingRight=!0},rightDragStop:function(){this.resizingRight=!1;this.mouseIsOver||this.removeCursors();this.updateOnRelease()},iconRollOut:function(){this.removeCursors()},iconRollOver:function(){this.rotate?this.chart.setMouseCursor("n-resize"):this.chart.setMouseCursor("e-resize");this.handleMouseOver()},getDBox:function(){if(this.dragger)return this.dragger.getBBox()},
214 handleBgClick:function(){if(!this.resizingRight&&!this.resizingLeft){this.zooming=!0;var a,b,c=this.scrollDuration,d=this.dragger;a=this.getDBox();var e=a.height,f=a.width;b=this.chart;var g=this.y,h=this.x,k=this.rotate;k?(a="y",b=b.mouseY-e/2-g,b=AmCharts.fitToBounds(b,0,this.height-e)):(a="x",b=b.mouseX-f/2-h,b=AmCharts.fitToBounds(b,0,this.width-f));this.updateOnReleaseOnly?(this.skipEvent=!1,d.setAttr(a,b),this.dispatchScrollbarEvent(),this.clipDragger()):(b=Math.round(b),k?d.animate({y:b},c,
215 ">"):d.animate({x:b},c,">"))}},updateOnRelease:function(){this.updateOnReleaseOnly&&(this.updateScrollbar(),this.skipEvent=!1,this.dispatchScrollbarEvent())},handleReleaseOutside:function(){if(this.set){if(this.resizingLeft||this.resizingRight||this.dragging)this.updateOnRelease(),this.removeCursors();this.mouseIsOver=this.dragging=this.resizingRight=this.resizingLeft=!1;this.hideDragIcons();this.updateScrollbar()}},handleMouseOver:function(){this.mouseIsOver=!0;this.showDragIcons()},handleMouseOut:function(){this.mouseIsOver=
216 !1;this.hideDragIcons()}});AmCharts.ChartScrollbar=AmCharts.Class({inherits:AmCharts.SimpleChartScrollbar,construct:function(a){this.cname="ChartScrollbar";AmCharts.ChartScrollbar.base.construct.call(this,a);this.graphLineColor="#BBBBBB";this.graphLineAlpha=0;this.graphFillColor="#BBBBBB";this.graphFillAlpha=1;this.selectedGraphLineColor="#888888";this.selectedGraphLineAlpha=0;this.selectedGraphFillColor="#888888";this.selectedGraphFillAlpha=1;this.gridCount=0;this.gridColor="#FFFFFF";this.gridAlpha=.7;this.skipEvent=this.autoGridCount=
217 !1;this.color="#FFFFFF";this.scrollbarCreated=!1;this.offset=0;AmCharts.applyTheme(this,a,this.cname)},init:function(){var a=this.categoryAxis,b=this.chart;a||(this.categoryAxis=a=new AmCharts.CategoryAxis);a.chart=b;a.id="scrollbar";a.dateFormats=b.categoryAxis.dateFormats;a.markPeriodChange=b.categoryAxis.markPeriodChange;a.boldPeriodBeginning=b.categoryAxis.boldPeriodBeginning;a.axisItemRenderer=AmCharts.RecItem;a.axisRenderer=AmCharts.RecAxis;a.guideFillRenderer=AmCharts.RecFill;a.inside=!0;a.fontSize=
218 this.fontSize;a.tickLength=0;a.axisAlpha=0;AmCharts.isString(this.graph)&&(this.graph=AmCharts.getObjById(b.graphs,this.graph));if(a=this.graph){var c=this.valueAxis;c||(this.valueAxis=c=new AmCharts.ValueAxis,c.visible=!1,c.scrollbar=!0,c.axisItemRenderer=AmCharts.RecItem,c.axisRenderer=AmCharts.RecAxis,c.guideFillRenderer=AmCharts.RecFill,c.labelsEnabled=!1,c.chart=b);b=this.unselectedGraph;b||(b=new AmCharts.AmGraph,b.scrollbar=!0,this.unselectedGraph=b,b.negativeBase=a.negativeBase,b.noStepRisers=
219 a.noStepRisers);b=this.selectedGraph;b||(b=new AmCharts.AmGraph,b.scrollbar=!0,this.selectedGraph=b,b.negativeBase=a.negativeBase,b.noStepRisers=a.noStepRisers)}this.scrollbarCreated=!0},draw:function(){var a=this;AmCharts.ChartScrollbar.base.draw.call(a);a.scrollbarCreated||a.init();var b=a.chart,c=b.chartData,d=a.categoryAxis,e=a.rotate,f=a.x,g=a.y,h=a.width,k=a.height,l=b.categoryAxis,m=a.set;d.setOrientation(!e);d.parseDates=l.parseDates;d.rotate=e;d.equalSpacing=l.equalSpacing;d.minPeriod=l.minPeriod;
220 d.startOnAxis=l.startOnAxis;d.viW=h;d.viH=k;d.width=h;d.height=k;d.gridCount=a.gridCount;d.gridColor=a.gridColor;d.gridAlpha=a.gridAlpha;d.color=a.color;d.tickLength=0;d.axisAlpha=0;d.autoGridCount=a.autoGridCount;d.parseDates&&!d.equalSpacing&&d.timeZoom(b.firstTime,b.lastTime);d.zoom(0,c.length-1);if(l=a.graph){var n=a.valueAxis,p=l.valueAxis;n.id=p.id;n.rotate=e;n.setOrientation(e);n.width=h;n.height=k;n.viW=h;n.viH=k;n.dataProvider=c;n.reversed=p.reversed;n.logarithmic=p.logarithmic;n.gridAlpha=
221 0;n.axisAlpha=0;m.push(n.set);e?(n.y=g,n.x=0):(n.x=f,n.y=0);var f=Infinity,g=-Infinity,q;for(q=0;q<c.length;q++){var r=c[q].axes[p.id].graphs[l.id].values,s;for(s in r)if(r.hasOwnProperty(s)&&"percents"!=s&&"total"!=s){var v=r[s];v<f&&(f=v);v>g&&(g=v)}}Infinity!=f&&(n.minimum=f);-Infinity!=g&&(n.maximum=g+.1*(g-f));f==g&&(n.minimum-=1,n.maximum+=1);void 0!==a.minimum&&(n.minimum=a.minimum);void 0!==a.maximum&&(n.maximum=a.maximum);n.zoom(0,c.length-1);s=a.unselectedGraph;s.id=l.id;s.rotate=e;s.chart=
222 b;s.data=c;s.valueAxis=n;s.chart=l.chart;s.categoryAxis=a.categoryAxis;s.periodSpan=l.periodSpan;s.valueField=l.valueField;s.openField=l.openField;s.closeField=l.closeField;s.highField=l.highField;s.lowField=l.lowField;s.lineAlpha=a.graphLineAlpha;s.lineColorR=a.graphLineColor;s.fillAlphas=a.graphFillAlpha;s.fillColorsR=a.graphFillColor;s.connect=l.connect;s.hidden=l.hidden;s.width=h;s.height=k;s.pointPosition=l.pointPosition;s.stepDirection=l.stepDirection;s.periodSpan=l.periodSpan;p=a.selectedGraph;
223 p.id=l.id;p.rotate=e;p.chart=b;p.data=c;p.valueAxis=n;p.chart=l.chart;p.categoryAxis=d;p.periodSpan=l.periodSpan;p.valueField=l.valueField;p.openField=l.openField;p.closeField=l.closeField;p.highField=l.highField;p.lowField=l.lowField;p.lineAlpha=a.selectedGraphLineAlpha;p.lineColorR=a.selectedGraphLineColor;p.fillAlphas=a.selectedGraphFillAlpha;p.fillColorsR=a.selectedGraphFillColor;p.connect=l.connect;p.hidden=l.hidden;p.width=h;p.height=k;p.pointPosition=l.pointPosition;p.stepDirection=l.stepDirection;
224 p.periodSpan=l.periodSpan;b=a.graphType;b||(b=l.type);s.type=b;p.type=b;c=c.length-1;s.zoom(0,c);p.zoom(0,c);p.set.click(function(){a.handleBackgroundClick()}).mouseover(function(){a.handleMouseOver()}).mouseout(function(){a.handleMouseOut()});s.set.click(function(){a.handleBackgroundClick()}).mouseover(function(){a.handleMouseOver()}).mouseout(function(){a.handleMouseOut()});m.push(s.set);m.push(p.set)}m.push(d.set);m.push(d.labelsSet);a.bg.toBack();a.invisibleBg.toFront();a.dragger.toFront();a.iconLeft.toFront();
225 a.iconRight.toFront()},timeZoom:function(a,b,c){this.startTime=a;this.endTime=b;this.timeDifference=b-a;this.skipEvent=!AmCharts.toBoolean(c);this.zoomScrollbar();this.skipEvent||this.dispatchScrollbarEvent()},zoom:function(a,b){this.start=a;this.end=b;this.skipEvent=!0;this.zoomScrollbar()},dispatchScrollbarEvent:function(){if(this.skipEvent)this.skipEvent=!1;else{var a=this.chart.chartData,b,c,d=this.dragger.getBBox();b=d.x;var e=d.y,f=d.width;c=d.height;d=this.chart;this.rotate?b=e:c=f;f={type:"zoomed",
226 target:this};f.chart=d;var g=this.categoryAxis,h=this.stepWidth,e=d.minSelectedTime;if(g.parseDates&&!g.equalSpacing){if(a=d.lastTime,d=d.firstTime,g.minDuration(),g=Math.round(b/h)+d,b=this.dragging?g+this.timeDifference:Math.round((b+c)/h)+d,g>b&&(g=b),0<e&&b-g<e&&(b=Math.round(g+(b-g)/2),c=Math.round(e/2),g=b-c,b+=c),b>a&&(b=a),b-e<g&&(g=b-e),g<d&&(g=d),g+e>b&&(b=g+e),g!=this.startTime||b!=this.endTime)this.startTime=g,this.endTime=b,f.start=g,f.end=b,f.startDate=new Date(g),f.endDate=new Date(b),
227 this.fire(f.type,f)}else if(g.startOnAxis||(b+=h/2),c-=this.stepWidth/2,e=g.xToIndex(b),b=g.xToIndex(b+c),e!=this.start||this.end!=b)g.startOnAxis&&(this.resizingRight&&e==b&&b++,this.resizingLeft&&e==b&&(0<e?e--:b=1)),this.start=e,this.end=this.dragging?this.start+this.difference:b,f.start=this.start,f.end=this.end,g.parseDates&&(a[this.start]&&(f.startDate=new Date(a[this.start].time)),a[this.end]&&(f.endDate=new Date(a[this.end].time))),this.fire(f.type,f)}this.zoomScrollbar()},zoomScrollbar:function(){var a,
228 b;a=this.chart;var c=a.chartData,d=this.categoryAxis;d.parseDates&&!d.equalSpacing?(c=d.stepWidth,d=a.firstTime,a=c*(this.startTime-d),b=c*(this.endTime-d)):(a=c[this.start].x[d.id],b=c[this.end].x[d.id],c=d.stepWidth,d.startOnAxis||(d=c/2,a-=d,b+=d));this.stepWidth=c;this.updateScrollbarSize(a,b)},maskGraphs:function(a,b,c,d){var e=this.selectedGraph;e&&e.set.clipRect(a,b,c,d)},handleDragStart:function(){AmCharts.ChartScrollbar.base.handleDragStart.call(this);this.difference=this.end-this.start;
229 this.timeDifference=this.endTime-this.startTime;0>this.timeDifference&&(this.timeDifference=0)},handleBackgroundClick:function(){AmCharts.ChartScrollbar.base.handleBackgroundClick.call(this);this.dragging||(this.difference=this.end-this.start,this.timeDifference=this.endTime-this.startTime,0>this.timeDifference&&(this.timeDifference=0))}});AmCharts.AmBalloon=AmCharts.Class({construct:function(a){this.cname="AmBalloon";this.enabled=!0;this.fillColor="#FFFFFF";this.fillAlpha=.8;this.borderThickness=2;this.borderColor="#FFFFFF";this.borderAlpha=1;this.cornerRadius=0;this.maximumWidth=220;this.horizontalPadding=8;this.verticalPadding=4;this.pointerWidth=6;this.pointerOrientation="V";this.color="#000000";this.adjustBorderColor=!0;this.show=this.follow=this.showBullet=!1;this.bulletSize=3;this.shadowAlpha=.4;this.shadowColor="#000000";this.fadeOutDuration=
230 this.animationDuration=.3;this.fixedPosition=!1;this.offsetY=6;this.offsetX=1;this.textAlign="center";AmCharts.isModern||(this.offsetY*=1.5);AmCharts.applyTheme(this,a,this.cname)},draw:function(){var a=this.pointToX,b=this.pointToY;this.deltaSignX=this.deltaSignY=1;var c=this.chart;AmCharts.VML&&(this.fadeOutDuration=0);this.xAnim&&c.stopAnim(this.xAnim);this.yAnim&&c.stopAnim(this.yAnim);if(!isNaN(a)){var d=this.follow,e=c.container,f=this.set;AmCharts.remove(f);this.removeDiv();f=e.set();f.node.style.pointerEvents=
231 "none";this.set=f;c.balloonsSet.push(f);if(this.show){var g=this.l,h=this.t,k=this.r,l=this.b,m=this.balloonColor,n=this.fillColor,p=this.borderColor,q=n;void 0!=m&&(this.adjustBorderColor?q=p=m:n=m);var r=this.horizontalPadding,s=this.verticalPadding,v=this.pointerWidth,w=this.pointerOrientation,t=this.cornerRadius,u=c.fontFamily,y=this.fontSize;void 0==y&&(y=c.fontSize);var m=document.createElement("div"),E=m.style;E.pointerEvents="none";E.position="absolute";var A=this.minWidth,z="";isNaN(A)||
232 (z="min-width:"+(A-2*r)+"px; ");m.innerHTML='<div style="text-align:'+this.textAlign+"; "+z+"max-width:"+this.maxWidth+"px; font-size:"+y+"px; color:"+this.color+"; font-family:"+u+'">'+this.text+"</div>";c.chartDiv.appendChild(m);this.textDiv=m;y=m.offsetWidth;u=m.offsetHeight;m.clientHeight&&(y=m.clientWidth,u=m.clientHeight);u+=2*s;z=y+2*r;!isNaN(A)&&z<A&&(z=A);window.opera&&(u+=2);var K=!1,y=this.offsetY;c.handDrawn&&(y+=c.handDrawScatter+2);"H"!=w?(A=a-z/2,b<h+u+10&&"down"!=w?(K=!0,d&&(b+=y),
233 y=b+v,this.deltaSignY=-1):(d&&(b-=y),y=b-u-v,this.deltaSignY=1)):(2*v>u&&(v=u/2),y=b-u/2,a<g+(k-g)/2?(A=a+v,this.deltaSignX=-1):(A=a-z-v,this.deltaSignX=1));y+u>=l&&(y=l-u);y<h&&(y=h);A<g&&(A=g);A+z>k&&(A=k-z);var h=y+s,l=A+r,s=this.shadowAlpha,I=this.shadowColor,r=this.borderThickness,F=this.bulletSize,H;0<t||0===v?(0<s&&(a=AmCharts.rect(e,z,u,n,0,r+1,I,s,this.cornerRadius),AmCharts.isModern?a.translate(1,1):a.translate(4,4),f.push(a)),n=AmCharts.rect(e,z,u,n,this.fillAlpha,r,p,this.borderAlpha,
234 this.cornerRadius),this.showBullet&&(H=AmCharts.circle(e,F,q,this.fillAlpha),f.push(H))):(q=[],t=[],"H"!=w?(g=a-A,g>z-v&&(g=z-v),g<v&&(g=v),q=[0,g-v,a-A,g+v,z,z,0,0],t=K?[0,0,b-y,0,0,u,u,0]:[u,u,b-y,u,u,0,0,u]):(q=b-y,q>u-v&&(q=u-v),q<v&&(q=v),t=[0,q-v,b-y,q+v,u,u,0,0],q=a<g+(k-g)/2?[0,0,A<a?0:a-A,0,0,z,z,0]:[z,z,A+z>a?z:a-A,z,z,0,0,z]),0<s&&(a=AmCharts.polygon(e,q,t,n,0,r,I,s),a.translate(1,1),f.push(a)),n=AmCharts.polygon(e,q,t,n,this.fillAlpha,r,p,this.borderAlpha));this.bg=n;f.push(n);n.toFront();
235 e=1*this.deltaSignX;E.left=l+"px";E.top=h+"px";f.translate(A-e,y);n=n.getBBox();this.bottom=y+u+1;this.yPos=n.y+y;H&&H.translate(this.pointToX-A+e,b-y);b=this.animationDuration;0<this.animationDuration&&!d&&!isNaN(this.prevX)&&(f.translate(this.prevX,this.prevY),f.animate({translate:A-e+","+y},b,"easeOutSine"),m&&(E.left=this.prevTX+"px",E.top=this.prevTY+"px",this.xAnim=c.animate({node:m},"left",this.prevTX,l,b,"easeOutSine","px"),this.yAnim=c.animate({node:m},"top",this.prevTY,h,b,"easeOutSine",
236 "px")));this.prevX=A-e;this.prevY=y;this.prevTX=l;this.prevTY=h}}},followMouse:function(){if(this.follow&&this.show){var a=this.chart.mouseX-this.offsetX*this.deltaSignX,b=this.chart.mouseY;this.pointToX=a;this.pointToY=b;if(a!=this.previousX||b!=this.previousY)if(this.previousX=a,this.previousY=b,0===this.cornerRadius)this.draw();else{var c=this.set;if(c){var d=c.getBBox(),a=a-d.width/2,e=b-d.height-10;a<this.l&&(a=this.l);a>this.r-d.width&&(a=this.r-d.width);e<this.t&&(e=b+10);c.translate(a,e);
237 b=this.textDiv.style;b.left=a+this.horizontalPadding+"px";b.top=e+this.verticalPadding+"px"}}}},changeColor:function(a){this.balloonColor=a},setBounds:function(a,b,c,d){this.l=a;this.t=b;this.r=c;this.b=d;this.destroyTO&&clearTimeout(this.destroyTO)},showBalloon:function(a){this.text=a;this.show=!0;this.destroyTO&&clearTimeout(this.destroyTO);a=this.chart;this.fadeAnim1&&a.stopAnim(this.fadeAnim1);this.fadeAnim2&&a.stopAnim(this.fadeAnim2);this.draw()},hide:function(){var a=this,b=a.fadeOutDuration,
238 c=a.chart;if(0<b){a.destroyTO=setTimeout(function(){a.destroy.call(a)},1E3*b);a.follow=!1;a.show=!1;var d=a.set;d&&(d.setAttr("opacity",a.fillAlpha),a.fadeAnim1=d.animate({opacity:0},b,"easeInSine"));a.textDiv&&(a.fadeAnim2=c.animate({node:a.textDiv},"opacity",1,0,b,"easeInSine",""))}else a.show=!1,a.follow=!1,a.destroy()},setPosition:function(a,b,c){this.pointToX=a;this.pointToY=b;c&&(a==this.previousX&&b==this.previousY||this.draw());this.previousX=a;this.previousY=b},followCursor:function(a){var b=
239 this;(b.follow=a)?(b.pShowBullet=b.showBullet,b.showBullet=!1):void 0!==b.pShowBullet&&(b.showBullet=b.pShowBullet);clearInterval(b.interval);var c=b.chart.mouseX,d=b.chart.mouseY;!isNaN(c)&&a&&(b.pointToX=c-b.offsetX*b.deltaSignX,b.pointToY=d,b.followMouse(),b.interval=setInterval(function(){b.followMouse.call(b)},40))},removeDiv:function(){if(this.textDiv){var a=this.textDiv.parentNode;a&&a.removeChild(this.textDiv)}},destroy:function(){clearInterval(this.interval);AmCharts.remove(this.set);this.removeDiv();
240 this.set=null}});AmCharts.AmCoordinateChart=AmCharts.Class({inherits:AmCharts.AmChart,construct:function(a){AmCharts.AmCoordinateChart.base.construct.call(this,a);this.theme=a;this.createEvents("rollOverGraphItem","rollOutGraphItem","clickGraphItem","doubleClickGraphItem","rightClickGraphItem","clickGraph","rollOverGraph","rollOutGraph");this.startAlpha=1;this.startDuration=0;this.startEffect="elastic";this.sequencedAnimation=!0;this.colors="#FF6600 #FCD202 #B0DE09 #0D8ECF #2A0CD0 #CD0D74 #CC0000 #00CC00 #0000CC #DDDDDD #999999 #333333 #990000".split(" ");
241 this.balloonDateFormat="MMM DD, YYYY";this.valueAxes=[];this.graphs=[];this.guides=[];this.gridAboveGraphs=!1;AmCharts.applyTheme(this,a,"AmCoordinateChart")},initChart:function(){AmCharts.AmCoordinateChart.base.initChart.call(this);var a=this.categoryAxis;a&&(this.categoryAxis=AmCharts.processObject(a,AmCharts.CategoryAxis,this.theme));this.processValueAxes();this.createValueAxes();this.processGraphs();this.processGuides();AmCharts.VML&&(this.startAlpha=1);this.setLegendData(this.graphs);this.gridAboveGraphs&&
242 this.gridSet.toFront()},createValueAxes:function(){if(0===this.valueAxes.length){var a=new AmCharts.ValueAxis;this.addValueAxis(a)}},parseData:function(){this.processValueAxes();this.processGraphs()},parseSerialData:function(){var a=this.graphs,b,c={},d=this.seriesIdField;d||(d=this.categoryField);this.chartData=[];var e=this.dataProvider;if(e){var f=!1,g,h=this.categoryAxis,k,l;h&&(f=h.parseDates,k=h.forceShowField,l=h.labelColorField,g=h.categoryFunction);var m,n,p={},q;f&&(b=AmCharts.extractPeriod(h.minPeriod),
243 m=b.period,n=b.count,q=AmCharts.getPeriodDuration(m,n));var r={};this.lookupTable=r;var s,v=this.dataDateFormat,w={};for(s=0;s<e.length;s++){var t={},u=e[s];b=u[this.categoryField];t.dataContext=u;t.category=g?g(b,u,h):String(b);k&&(t.forceShow=u[k]);l&&(t.labelColor=u[l]);r[u[d]]=t;if(f&&(b=h.categoryFunction?h.categoryFunction(b,u,h):b instanceof Date?AmCharts.newDate(b,h.minPeriod):v?AmCharts.stringToDate(b,v):new Date(b),b=AmCharts.resetDateToMin(b,m,n,h.firstDayOfWeek),t.category=b,t.time=b.getTime(),
244 isNaN(t.time)))continue;var y=this.valueAxes;t.axes={};t.x={};var E;for(E=0;E<y.length;E++){var A=y[E].id;t.axes[A]={};t.axes[A].graphs={};var z;for(z=0;z<a.length;z++){b=a[z];var K=b.id,I=b.periodValue;if(b.valueAxis.id==A){t.axes[A].graphs[K]={};var F={};F.index=s;var H=u;b.dataProvider&&(H=c);F.values=this.processValues(H,b,I);!b.connect&&w&&w[K]&&t.time-p[K]>1.1*q&&(w[K].gap=!0);this.processFields(b,F,H);F.category=t.category;F.serialDataItem=t;F.graph=b;t.axes[A].graphs[K]=F}p[K]=t.time;w[K]=
245 F}}this.chartData[s]=t}}for(c=0;c<a.length;c++)b=a[c],b.dataProvider&&this.parseGraphData(b)},processValues:function(a,b,c){var d={},e,f=!1;"candlestick"!=b.type&&"ohlc"!=b.type||""===c||(f=!0);e=Number(a[b.valueField+c]);isNaN(e)||(d.value=e);e=Number(a[b.errorField+c]);isNaN(e)||(d.error=e);f&&(c="Open");e=Number(a[b.openField+c]);isNaN(e)||(d.open=e);f&&(c="Close");e=Number(a[b.closeField+c]);isNaN(e)||(d.close=e);f&&(c="Low");e=Number(a[b.lowField+c]);isNaN(e)||(d.low=e);f&&(c="High");e=Number(a[b.highField+
246 c]);isNaN(e)||(d.high=e);return d},parseGraphData:function(a){var b=a.dataProvider,c=a.seriesIdField;c||(c=this.seriesIdField);c||(c=this.categoryField);var d;for(d=0;d<b.length;d++){var e=b[d],f=this.lookupTable[String(e[c])],g=a.valueAxis.id;f&&(g=f.axes[g].graphs[a.id],g.serialDataItem=f,g.values=this.processValues(e,a,a.periodValue),this.processFields(a,g,e))}},addValueAxis:function(a){a.chart=this;this.valueAxes.push(a);this.validateData()},removeValueAxesAndGraphs:function(){var a=this.valueAxes,
247 b;for(b=a.length-1;-1<b;b--)this.removeValueAxis(a[b])},removeValueAxis:function(a){var b=this.graphs,c;for(c=b.length-1;0<=c;c--){var d=b[c];d&&d.valueAxis==a&&this.removeGraph(d)}b=this.valueAxes;for(c=b.length-1;0<=c;c--)b[c]==a&&b.splice(c,1);this.validateData()},addGraph:function(a){this.graphs.push(a);this.chooseGraphColor(a,this.graphs.length-1);this.validateData()},removeGraph:function(a){var b=this.graphs,c;for(c=b.length-1;0<=c;c--)b[c]==a&&(b.splice(c,1),a.destroy());this.validateData()},
248 processValueAxes:function(){var a=this.valueAxes,b;for(b=0;b<a.length;b++){var c=a[b],c=AmCharts.processObject(c,AmCharts.ValueAxis,this.theme);a[b]=c;c.chart=this;c.id||(c.id="valueAxisAuto"+b+"_"+(new Date).getTime());void 0===c.usePrefixes&&(c.usePrefixes=this.usePrefixes)}},processGuides:function(){var a=this.guides,b=this.categoryAxis;if(a)for(var c=0;c<a.length;c++){var d=a[c];(void 0!==d.category||void 0!==d.date)&&b&&b.addGuide(d);var e=d.valueAxis;e?(AmCharts.isString(e)&&(e=this.getValueAxisById(e)),
249 e?e.addGuide(d):this.valueAxes[0].addGuide(d)):isNaN(d.value)||this.valueAxes[0].addGuide(d)}},processGraphs:function(){var a=this.graphs,b;for(b=0;b<a.length;b++){var c=a[b],c=AmCharts.processObject(c,AmCharts.AmGraph,this.theme);a[b]=c;this.chooseGraphColor(c,b);c.chart=this;AmCharts.isString(c.valueAxis)&&(c.valueAxis=this.getValueAxisById(c.valueAxis));c.valueAxis||(c.valueAxis=this.valueAxes[0]);c.id||(c.id="graphAuto"+b+"_"+(new Date).getTime())}},formatString:function(a,b,c){var d=b.graph,
250 e=d.valueAxis;e.duration&&b.values.value&&(e=AmCharts.formatDuration(b.values.value,e.duration,"",e.durationUnits,e.maxInterval,e.numberFormatter),a=a.split("[[value]]").join(e));a=AmCharts.massReplace(a,{"[[title]]":d.title,"[[description]]":b.description});a=c?AmCharts.fixNewLines(a):AmCharts.fixBrakes(a);return a=AmCharts.cleanFromEmpty(a)},getBalloonColor:function(a,b,c){var d=a.lineColor,e=a.balloonColor;c&&(e=d);c=a.fillColorsR;"object"==typeof c?d=c[0]:void 0!==c&&(d=c);b.isNegative&&(c=a.negativeLineColor,
251 a=a.negativeFillColors,"object"==typeof a?c=a[0]:void 0!==a&&(c=a),void 0!==c&&(d=c));void 0!==b.color&&(d=b.color);void 0===e&&(e=d);return e},getGraphById:function(a){return AmCharts.getObjById(this.graphs,a)},getValueAxisById:function(a){return AmCharts.getObjById(this.valueAxes,a)},processFields:function(a,b,c){if(a.itemColors){var d=a.itemColors,e=b.index;b.color=e<d.length?d[e]:AmCharts.randomColor()}d="lineColor color alpha fillColors description bullet customBullet bulletSize bulletConfig url labelColor dashLength pattern".split(" ");
252 for(e=0;e<d.length;e++){var f=d[e],g=a[f+"Field"];g&&(g=c[g],AmCharts.isDefined(g)&&(b[f]=g))}b.dataContext=c},chooseGraphColor:function(a,b){if(a.lineColor)a.lineColorR=a.lineColor;else{var c;c=this.colors.length>b?this.colors[b]:AmCharts.randomColor();a.lineColorR=c}a.fillColorsR=a.fillColors?a.fillColors:a.lineColorR;a.bulletBorderColorR=a.bulletBorderColor?a.bulletBorderColor:a.useLineColorForBulletBorder?a.lineColorR:a.bulletColor;a.bulletColorR=a.bulletColor?a.bulletColor:a.lineColorR;if(c=
253 this.patterns)a.pattern=c[b]},handleLegendEvent:function(a){var b=a.type;a=a.dataItem;if(!this.legend.data&&a){var c=a.hidden,d=a.showBalloon;switch(b){case "clickMarker":this.textClickEnabled&&(d?this.hideGraphsBalloon(a):this.showGraphsBalloon(a));break;case "clickLabel":d?this.hideGraphsBalloon(a):this.showGraphsBalloon(a);break;case "rollOverItem":c||this.highlightGraph(a);break;case "rollOutItem":c||this.unhighlightGraph();break;case "hideItem":this.hideGraph(a);break;case "showItem":this.showGraph(a)}}},
254 highlightGraph:function(a){var b=this.graphs,c,d=.2;this.legend&&(d=this.legend.rollOverGraphAlpha);if(1!=d)for(c=0;c<b.length;c++){var e=b[c];e!=a&&e.changeOpacity(d)}},unhighlightGraph:function(){var a;this.legend&&(a=this.legend.rollOverGraphAlpha);if(1!=a){a=this.graphs;var b;for(b=0;b<a.length;b++)a[b].changeOpacity(1)}},showGraph:function(a){a.switchable&&(a.hidden=!1,this.dataChanged=!0,"xy"!=this.type&&(this.marginsUpdated=!1),this.chartCreated&&this.initChart())},hideGraph:function(a){a.switchable&&
255 (this.dataChanged=!0,"xy"!=this.type&&(this.marginsUpdated=!1),a.hidden=!0,this.chartCreated&&this.initChart())},hideGraphsBalloon:function(a){a.showBalloon=!1;this.updateLegend()},showGraphsBalloon:function(a){a.showBalloon=!0;this.updateLegend()},updateLegend:function(){this.legend&&this.legend.invalidateSize()},resetAnimation:function(){var a=this.graphs;if(a){var b;for(b=0;b<a.length;b++)a[b].animationPlayed=!1}},animateAgain:function(){this.resetAnimation();this.validateNow()}});AmCharts.AmSlicedChart=AmCharts.Class({inherits:AmCharts.AmChart,construct:function(a){this.createEvents("rollOverSlice","rollOutSlice","clickSlice","pullOutSlice","pullInSlice","rightClickSlice");AmCharts.AmSlicedChart.base.construct.call(this,a);this.colors="#FF0F00 #FF6600 #FF9E01 #FCD202 #F8FF01 #B0DE09 #04D215 #0D8ECF #0D52D1 #2A0CD0 #8A0CCF #CD0D74 #754DEB #DDDDDD #999999 #333333 #000000 #57032A #CA9726 #990000 #4B0C25".split(" ");this.alpha=1;this.groupPercent=0;this.groupedTitle="Other";this.groupedPulled=
256 !1;this.groupedAlpha=1;this.marginLeft=0;this.marginBottom=this.marginTop=10;this.marginRight=0;this.hoverAlpha=1;this.outlineColor="#FFFFFF";this.outlineAlpha=0;this.outlineThickness=1;this.startAlpha=0;this.startDuration=1;this.startEffect="bounce";this.sequencedAnimation=!0;this.pullOutDuration=1;this.pullOutEffect="bounce";this.pullOnHover=this.pullOutOnlyOne=!1;this.labelsEnabled=!0;this.labelTickColor="#000000";this.labelTickAlpha=.2;this.hideLabelsPercent=0;this.urlTarget="_self";this.autoMarginOffset=
257 10;this.gradientRatio=[];this.maxLabelWidth=200;AmCharts.applyTheme(this,a,"AmSlicedChart")},initChart:function(){AmCharts.AmSlicedChart.base.initChart.call(this);this.dataChanged&&(this.parseData(),this.dispatchDataUpdated=!0,this.dataChanged=!1,this.setLegendData(this.chartData));this.drawChart()},handleLegendEvent:function(a){var b=a.type;a=a.dataItem;if(!this.legend.data&&a){var c=a.hidden;switch(b){case "clickMarker":c||this.clickSlice(a);break;case "clickLabel":c||this.clickSlice(a);break;case "rollOverItem":c||
258 this.rollOverSlice(a,!1);break;case "rollOutItem":c||this.rollOutSlice(a);break;case "hideItem":this.hideSlice(a);break;case "showItem":this.showSlice(a)}}},invalidateVisibility:function(){this.recalculatePercents();this.initChart();var a=this.legend;a&&a.invalidateSize()},addEventListeners:function(a,b){var c=this;a.mouseover(function(a){c.rollOverSlice(b,!0,a)}).mouseout(function(a){c.rollOutSlice(b,a)}).touchend(function(a){c.rollOverSlice(b,a);c.panEventsEnabled&&c.clickSlice(b,a)}).touchstart(function(a){c.rollOverSlice(b,
259 a)}).click(function(a){c.clickSlice(b,a)}).contextmenu(function(a){c.handleRightClick(b,a)})},formatString:function(a,b,c){a=AmCharts.formatValue(a,b,["value"],this.nf,"",this.usePrefixes,this.prefixesOfSmallNumbers,this.prefixesOfBigNumbers);a=AmCharts.formatValue(a,b,["percents"],this.pf);a=AmCharts.massReplace(a,{"[[title]]":b.title,"[[description]]":b.description});-1!=a.indexOf("[[")&&(a=AmCharts.formatDataContextValue(a,b.dataContext));a=c?AmCharts.fixNewLines(a):AmCharts.fixBrakes(a);return a=
260 AmCharts.cleanFromEmpty(a)},startSlices:function(){var a;for(a=0;a<this.chartData.length;a++)0<this.startDuration&&this.sequencedAnimation?this.setStartTO(a):this.startSlice(this.chartData[a])},setStartTO:function(a){var b=this;a=setTimeout(function(){b.startSequenced.call(b)},b.startDuration/b.chartData.length*500*a);b.timeOuts.push(a)},pullSlices:function(a){var b=this.chartData,c;for(c=0;c<b.length;c++){var d=b[c];d.pulled&&this.pullSlice(d,1,a)}},startSequenced:function(){var a=this.chartData,
261 b;for(b=0;b<a.length;b++)if(!a[b].started){this.startSlice(this.chartData[b]);break}},startSlice:function(a){a.started=!0;var b=a.wedge,c=this.startDuration;b&&0<c&&(0<a.alpha&&b.show(),b.translate(a.startX,a.startY),b.animate({opacity:1,translate:"0,0"},c,this.startEffect))},showLabels:function(){var a=this.chartData,b;for(b=0;b<a.length;b++){var c=a[b];if(0<c.alpha){var d=c.label;d&&d.show();(c=c.tick)&&c.show()}}},showSlice:function(a){isNaN(a)?a.hidden=!1:this.chartData[a].hidden=!1;this.invalidateVisibility()},
262 hideSlice:function(a){isNaN(a)?a.hidden=!0:this.chartData[a].hidden=!0;this.hideBalloon();this.invalidateVisibility()},rollOverSlice:function(a,b,c){isNaN(a)||(a=this.chartData[a]);clearTimeout(this.hoverInt);if(!a.hidden){this.pullOnHover&&this.pullSlice(a,1);1>this.hoverAlpha&&a.wedge&&a.wedge.attr({opacity:this.hoverAlpha});var d=a.balloonX,e=a.balloonY;a.pulled&&(d+=a.pullX,e+=a.pullY);var f=this.formatString(this.balloonText,a,!0),g=this.balloonFunction;g&&(f=g(a,f));g=AmCharts.adjustLuminosity(a.color,
263 -.15);this.showBalloon(f,g,b,d,e);a={type:"rollOverSlice",dataItem:a,chart:this,event:c};this.fire(a.type,a)}},rollOutSlice:function(a,b){isNaN(a)||(a=this.chartData[a]);a.wedge&&a.wedge.attr({opacity:1});this.hideBalloon();var c={type:"rollOutSlice",dataItem:a,chart:this,event:b};this.fire(c.type,c)},clickSlice:function(a,b){isNaN(a)||(a=this.chartData[a]);a.pulled?this.pullSlice(a,0):this.pullSlice(a,1);AmCharts.getURL(a.url,this.urlTarget);var c={type:"clickSlice",dataItem:a,chart:this,event:b};
264 this.fire(c.type,c)},handleRightClick:function(a,b){isNaN(a)||(a=this.chartData[a]);var c={type:"rightClickSlice",dataItem:a,chart:this,event:b};this.fire(c.type,c)},drawTicks:function(){var a=this.chartData,b;for(b=0;b<a.length;b++){var c=a[b];if(c.label){var d=c.ty,d=AmCharts.line(this.container,[c.tx0,c.tx,c.tx2],[c.ty0,d,d],this.labelTickColor,this.labelTickAlpha);c.tick=d;c.wedge.push(d)}}},initialStart:function(){var a=this,b=a.startDuration,c=setTimeout(function(){a.showLabels.call(a)},1E3*
265 b);a.timeOuts.push(c);a.chartCreated?a.pullSlices(!0):(a.startSlices(),0<b?(b=setTimeout(function(){a.pullSlices.call(a)},1200*b),a.timeOuts.push(b)):a.pullSlices(!0))},pullSlice:function(a,b,c){var d=this.pullOutDuration;!0===c&&(d=0);(c=a.wedge)&&(0<d?c.animate({translate:b*a.pullX+","+b*a.pullY},d,this.pullOutEffect):c.translate(b*a.pullX,b*a.pullY));1==b?(a.pulled=!0,this.pullOutOnlyOne&&this.pullInAll(a.index),a={type:"pullOutSlice",dataItem:a,chart:this}):(a.pulled=!1,a={type:"pullInSlice",
266 dataItem:a,chart:this});this.fire(a.type,a)},pullInAll:function(a){var b=this.chartData,c;for(c=0;c<this.chartData.length;c++)c!=a&&b[c].pulled&&this.pullSlice(b[c],0)},pullOutAll:function(a){a=this.chartData;var b;for(b=0;b<a.length;b++)a[b].pulled||this.pullSlice(a[b],1)},parseData:function(){var a=[];this.chartData=a;var b=this.dataProvider;isNaN(this.pieAlpha)||(this.alpha=this.pieAlpha);if(void 0!==b){var c=b.length,d=0,e,f,g;for(e=0;e<c;e++){f={};var h=b[e];f.dataContext=h;f.value=Number(h[this.valueField]);
267 (g=h[this.titleField])||(g="");f.title=g;f.pulled=AmCharts.toBoolean(h[this.pulledField],!1);(g=h[this.descriptionField])||(g="");f.description=g;f.labelRadius=Number(h[this.labelRadiusField]);f.switchable=!0;f.url=h[this.urlField];g=h[this.patternField];!g&&this.patterns&&(g=this.patterns[e]);f.pattern=g;f.visibleInLegend=AmCharts.toBoolean(h[this.visibleInLegendField],!0);g=h[this.alphaField];f.alpha=void 0!==g?Number(g):this.alpha;g=h[this.colorField];void 0!==g&&(f.color=AmCharts.toColor(g));
268 f.labelColor=AmCharts.toColor(h[this.labelColorField]);d+=f.value;f.hidden=!1;a[e]=f}for(e=b=0;e<c;e++)f=a[e],f.percents=f.value/d*100,f.percents<this.groupPercent&&b++;1<b&&(this.groupValue=0,this.removeSmallSlices(),a.push({title:this.groupedTitle,value:this.groupValue,percents:this.groupValue/d*100,pulled:this.groupedPulled,color:this.groupedColor,url:this.groupedUrl,description:this.groupedDescription,alpha:this.groupedAlpha,pattern:this.groupedPattern,dataContext:{}}));c=this.baseColor;c||(c=
269 this.pieBaseColor);d=this.brightnessStep;d||(d=this.pieBrightnessStep);for(e=0;e<a.length;e++)c?g=AmCharts.adjustLuminosity(c,e*d/100):(g=this.colors[e],void 0===g&&(g=AmCharts.randomColor())),void 0===a[e].color&&(a[e].color=g);this.recalculatePercents()}},recalculatePercents:function(){var a=this.chartData,b=0,c,d;for(c=0;c<a.length;c++)d=a[c],!d.hidden&&0<d.value&&(b+=d.value);for(c=0;c<a.length;c++)d=this.chartData[c],d.percents=!d.hidden&&0<d.value?100*d.value/b:0},removeSmallSlices:function(){var a=
270 this.chartData,b;for(b=a.length-1;0<=b;b--)a[b].percents<this.groupPercent&&(this.groupValue+=a[b].value,a.splice(b,1))},animateAgain:function(){var a=this;a.startSlices();for(var b=0;b<a.chartData.length;b++){var c=a.chartData[b];c.started=!1;var d=c.wedge;d&&d.translate(c.startX,c.startY)}b=a.startDuration;0<b?(b=setTimeout(function(){a.pullSlices.call(a)},1200*b),a.timeOuts.push(b)):a.pullSlices()},measureMaxLabel:function(){var a=this.chartData,b=0,c;for(c=0;c<a.length;c++){var d=a[c],e=this.formatString(this.labelText,
271 d),f=this.labelFunction;f&&(e=f(d,e));d=AmCharts.text(this.container,e,this.color,this.fontFamily,this.fontSize);e=d.getBBox().width;e>b&&(b=e);d.remove()}return b}});AmCharts.AmRectangularChart=AmCharts.Class({inherits:AmCharts.AmCoordinateChart,construct:function(a){AmCharts.AmRectangularChart.base.construct.call(this,a);this.theme=a;this.createEvents("zoomed");this.marginRight=this.marginBottom=this.marginTop=this.marginLeft=20;this.verticalPosition=this.horizontalPosition=this.depth3D=this.angle=0;this.heightMultiplier=this.widthMultiplier=1;this.plotAreaFillColors="#FFFFFF";this.plotAreaFillAlphas=0;this.plotAreaBorderColor="#000000";this.plotAreaBorderAlpha=
272 0;this.zoomOutButtonImageSize=17;this.zoomOutButtonImage="lens.png";this.zoomOutText="Show all";this.zoomOutButtonColor="#e5e5e5";this.zoomOutButtonAlpha=0;this.zoomOutButtonRollOverAlpha=1;this.zoomOutButtonPadding=8;this.trendLines=[];this.autoMargins=!0;this.marginsUpdated=!1;this.autoMarginOffset=10;AmCharts.applyTheme(this,a,"AmRectangularChart")},initChart:function(){AmCharts.AmRectangularChart.base.initChart.call(this);this.updateDxy();var a=!0;!this.marginsUpdated&&this.autoMargins&&(this.resetMargins(),
273 a=!1);this.processScrollbars();this.updateMargins();this.updatePlotArea();this.updateScrollbars();this.updateTrendLines();this.updateChartCursor();this.updateValueAxes();a&&(this.scrollbarOnly||this.updateGraphs())},drawChart:function(){AmCharts.AmRectangularChart.base.drawChart.call(this);this.drawPlotArea();if(AmCharts.ifArray(this.chartData)){var a=this.chartCursor;a&&a.draw();a=this.zoomOutText;""!==a&&a&&this.drawZoomOutButton()}},resetMargins:function(){var a={},b;if("serial"==this.type){var c=
274 this.valueAxes;for(b=0;b<c.length;b++){var d=c[b];d.ignoreAxisWidth||(d.setOrientation(this.rotate),d.fixAxisPosition(),a[d.position]=!0)}(b=this.categoryAxis)&&!b.ignoreAxisWidth&&(b.setOrientation(!this.rotate),b.fixAxisPosition(),b.fixAxisPosition(),a[b.position]=!0)}else{d=this.xAxes;c=this.yAxes;for(b=0;b<d.length;b++){var e=d[b];e.ignoreAxisWidth||(e.setOrientation(!0),e.fixAxisPosition(),a[e.position]=!0)}for(b=0;b<c.length;b++)d=c[b],d.ignoreAxisWidth||(d.setOrientation(!1),d.fixAxisPosition(),
275 a[d.position]=!0)}a.left&&(this.marginLeft=0);a.right&&(this.marginRight=0);a.top&&(this.marginTop=0);a.bottom&&(this.marginBottom=0);this.fixMargins=a},measureMargins:function(){var a=this.valueAxes,b,c=this.autoMarginOffset,d=this.fixMargins,e=this.realWidth,f=this.realHeight,g=c,h=c,k=e;b=f;var l;for(l=0;l<a.length;l++)b=this.getAxisBounds(a[l],g,k,h,b),g=Math.round(b.l),k=Math.round(b.r),h=Math.round(b.t),b=Math.round(b.b);if(a=this.categoryAxis)b=this.getAxisBounds(a,g,k,h,b),g=Math.round(b.l),
276 k=Math.round(b.r),h=Math.round(b.t),b=Math.round(b.b);d.left&&g<c&&(this.marginLeft=Math.round(-g+c));d.right&&k>=e-c&&(this.marginRight=Math.round(k-e+c));d.top&&h<c+this.titleHeight&&(this.marginTop=Math.round(this.marginTop-h+c+this.titleHeight));d.bottom&&b>f-c&&(this.marginBottom=Math.round(this.marginBottom+b-f+c));this.initChart()},getAxisBounds:function(a,b,c,d,e){if(!a.ignoreAxisWidth){var f=a.labelsSet,g=a.tickLength;a.inside&&(g=0);if(f)switch(f=a.getBBox(),a.position){case "top":a=f.y;
277 d>a&&(d=a);break;case "bottom":a=f.y+f.height;e<a&&(e=a);break;case "right":a=f.x+f.width+g+3;c<a&&(c=a);break;case "left":a=f.x-g,b>a&&(b=a)}}return{l:b,t:d,r:c,b:e}},drawZoomOutButton:function(){var a=this,b=a.container.set();a.zoomButtonSet.push(b);var c=a.color,d=a.fontSize,e=a.zoomOutButtonImageSize,f=a.zoomOutButtonImage,g=AmCharts.lang.zoomOutText||a.zoomOutText,h=a.zoomOutButtonColor,k=a.zoomOutButtonAlpha,l=a.zoomOutButtonFontSize,m=a.zoomOutButtonPadding;isNaN(l)||(d=l);(l=a.zoomOutButtonFontColor)&&
278 (c=l);var l=a.zoomOutButton,n;l&&(l.fontSize&&(d=l.fontSize),l.color&&(c=l.color),l.backgroundColor&&(h=l.backgroundColor),isNaN(l.backgroundAlpha)||(a.zoomOutButtonRollOverAlpha=l.backgroundAlpha));var p=l=0;void 0!==a.pathToImages&&f&&(n=a.container.image(a.pathToImages+f,0,0,e,e),b.push(n),n=n.getBBox(),l=n.width+5);void 0!==g&&(c=AmCharts.text(a.container,g,c,a.fontFamily,d,"start"),d=c.getBBox(),p=n?n.height/2-3:d.height/2,c.translate(l,p),b.push(c));n=b.getBBox();c=1;AmCharts.isModern||(c=0);
279 h=AmCharts.rect(a.container,n.width+2*m+5,n.height+2*m-2,h,1,1,h,c);h.setAttr("opacity",k);h.translate(-m,-m);b.push(h);h.toBack();a.zbBG=h;n=h.getBBox();b.translate(a.marginLeftReal+a.plotAreaWidth-n.width+m,a.marginTopReal+m);b.hide();b.mouseover(function(){a.rollOverZB()}).mouseout(function(){a.rollOutZB()}).click(function(){a.clickZB()}).touchstart(function(){a.rollOverZB()}).touchend(function(){a.rollOutZB();a.clickZB()});for(k=0;k<b.length;k++)b[k].attr({cursor:"pointer"});a.zbSet=b},rollOverZB:function(){this.zbBG.setAttr("opacity",
280 this.zoomOutButtonRollOverAlpha)},rollOutZB:function(){this.zbBG.setAttr("opacity",this.zoomOutButtonAlpha)},clickZB:function(){this.zoomOut()},zoomOut:function(){this.updateScrollbar=!0;this.zoom()},drawPlotArea:function(){var a=this.dx,b=this.dy,c=this.marginLeftReal,d=this.marginTopReal,e=this.plotAreaWidth-1,f=this.plotAreaHeight-1,g=this.plotAreaFillColors,h=this.plotAreaFillAlphas,k=this.plotAreaBorderColor,l=this.plotAreaBorderAlpha;this.trendLinesSet.clipRect(c,d,e,f);"object"==typeof h&&
281 (h=h[0]);g=AmCharts.polygon(this.container,[0,e,e,0,0],[0,0,f,f,0],g,h,1,k,l,this.plotAreaGradientAngle);g.translate(c+a,d+b);this.set.push(g);0!==a&&0!==b&&(g=this.plotAreaFillColors,"object"==typeof g&&(g=g[0]),g=AmCharts.adjustLuminosity(g,-.15),e=AmCharts.polygon(this.container,[0,a,e+a,e,0],[0,b,b,0,0],g,h,1,k,l),e.translate(c,d+f),this.set.push(e),a=AmCharts.polygon(this.container,[0,0,a,a,0],[0,f,f+b,b,0],g,h,1,k,l),a.translate(c,d),this.set.push(a));(c=this.bbset)&&this.scrollbarOnly&&c.remove()},
282 updatePlotArea:function(){var a=this.updateWidth(),b=this.updateHeight(),c=this.container;this.realWidth=a;this.realWidth=b;c&&this.container.setSize(a,b);a=a-this.marginLeftReal-this.marginRightReal-this.dx;b=b-this.marginTopReal-this.marginBottomReal;1>a&&(a=1);1>b&&(b=1);this.plotAreaWidth=Math.round(a);this.plotAreaHeight=Math.round(b)},updateDxy:function(){this.dx=Math.round(this.depth3D*Math.cos(this.angle*Math.PI/180));this.dy=Math.round(-this.depth3D*Math.sin(this.angle*Math.PI/180));this.d3x=
283 Math.round(this.columnSpacing3D*Math.cos(this.angle*Math.PI/180));this.d3y=Math.round(-this.columnSpacing3D*Math.sin(this.angle*Math.PI/180))},updateMargins:function(){var a=this.getTitleHeight();this.titleHeight=a;this.marginTopReal=this.marginTop-this.dy+a;this.marginBottomReal=this.marginBottom;this.marginLeftReal=this.marginLeft;this.marginRightReal=this.marginRight},updateValueAxes:function(){var a=this.valueAxes,b=this.marginLeftReal,c=this.marginTopReal,d=this.plotAreaHeight,e=this.plotAreaWidth,
284 f;for(f=0;f<a.length;f++){var g=a[f];g.axisRenderer=AmCharts.RecAxis;g.guideFillRenderer=AmCharts.RecFill;g.axisItemRenderer=AmCharts.RecItem;g.dx=this.dx;g.dy=this.dy;g.viW=e-1;g.viH=d-1;g.marginsChanged=!0;g.viX=b;g.viY=c;this.updateObjectSize(g)}},updateObjectSize:function(a){a.width=(this.plotAreaWidth-1)*this.widthMultiplier;a.height=(this.plotAreaHeight-1)*this.heightMultiplier;a.x=this.marginLeftReal+this.horizontalPosition;a.y=this.marginTopReal+this.verticalPosition},updateGraphs:function(){var a=
285 this.graphs,b;for(b=0;b<a.length;b++){var c=a[b];c.x=this.marginLeftReal+this.horizontalPosition;c.y=this.marginTopReal+this.verticalPosition;c.width=this.plotAreaWidth*this.widthMultiplier;c.height=this.plotAreaHeight*this.heightMultiplier;c.index=b;c.dx=this.dx;c.dy=this.dy;c.rotate=this.rotate}},updateChartCursor:function(){var a=this.chartCursor;a&&(a=AmCharts.processObject(a,AmCharts.ChartCursor,this.theme),this.addChartCursor(a),a.x=this.marginLeftReal,a.y=this.marginTopReal,a.width=this.plotAreaWidth-
286 1,a.height=this.plotAreaHeight-1,a.chart=this)},processScrollbars:function(){var a=this.chartScrollbar;a&&(a=AmCharts.processObject(a,AmCharts.ChartScrollbar,this.theme),this.addChartScrollbar(a))},updateScrollbars:function(){},addChartCursor:function(a){AmCharts.callMethod("destroy",[this.chartCursor]);a&&(this.listenTo(a,"changed",this.handleCursorChange),this.listenTo(a,"zoomed",this.handleCursorZoom));this.chartCursor=a},removeChartCursor:function(){AmCharts.callMethod("destroy",[this.chartCursor]);
287 this.chartCursor=null},zoomTrendLines:function(){var a=this.trendLines,b;for(b=0;b<a.length;b++){var c=a[b];c.valueAxis.recalculateToPercents?c.set&&c.set.hide():(c.x=this.marginLeftReal+this.horizontalPosition,c.y=this.marginTopReal+this.verticalPosition,c.draw())}},addTrendLine:function(a){this.trendLines.push(a)},removeTrendLine:function(a){var b=this.trendLines,c;for(c=b.length-1;0<=c;c--)b[c]==a&&b.splice(c,1)},adjustMargins:function(a,b){var c=a.scrollbarHeight+a.offset;"top"==a.position?b?
288 this.marginLeftReal+=c:this.marginTopReal+=c:b?this.marginRightReal+=c:this.marginBottomReal+=c},getScrollbarPosition:function(a,b,c){a.position=b?"bottom"==c||"left"==c?"bottom":"top":"top"==c||"right"==c?"bottom":"top"},updateChartScrollbar:function(a,b){if(a){a.rotate=b;var c=this.marginTopReal,d=this.marginLeftReal,e=a.scrollbarHeight,f=this.dx,g=this.dy,h=a.offset;"top"==a.position?b?(a.y=c,a.x=d-e-h):(a.y=c-e+g-1-h,a.x=d+f):b?(a.y=c+g,a.x=d+this.plotAreaWidth+f+h):(a.y=c+this.plotAreaHeight+
289 h,a.x=this.marginLeftReal)}},showZB:function(a){var b=this.zbSet;b&&(a?b.show():b.hide(),this.rollOutZB())},handleReleaseOutside:function(a){AmCharts.AmRectangularChart.base.handleReleaseOutside.call(this,a);(a=this.chartCursor)&&a.handleReleaseOutside()},handleMouseDown:function(a){AmCharts.AmRectangularChart.base.handleMouseDown.call(this,a);var b=this.chartCursor;b&&b.handleMouseDown(a)},handleCursorChange:function(a){}});AmCharts.TrendLine=AmCharts.Class({construct:function(a){this.cname="TrendLine";this.createEvents("click");this.isProtected=!1;this.dashLength=0;this.lineColor="#00CC00";this.lineThickness=this.lineAlpha=1;AmCharts.applyTheme(this,a,this.cname)},draw:function(){var a=this;a.destroy();var b=a.chart,c=b.container,d,e,f,g,h=a.categoryAxis,k=a.initialDate,l=a.initialCategory,m=a.finalDate,n=a.finalCategory,p=a.valueAxis,q=a.valueAxisX,r=a.initialXValue,s=a.finalXValue,v=a.initialValue,w=a.finalValue,
290 t=p.recalculateToPercents,u=b.dataDateFormat;h&&(k&&(k instanceof Date||(k=u?AmCharts.stringToDate(k,u):new Date(k)),a.initialDate=k,d=h.dateToCoordinate(k)),l&&(d=h.categoryToCoordinate(l)),m&&(m instanceof Date||(m=u?AmCharts.stringToDate(m,u):new Date(m)),a.finalDate=m,e=h.dateToCoordinate(m)),n&&(e=h.categoryToCoordinate(n)));q&&!t&&(isNaN(r)||(d=q.getCoordinate(r)),isNaN(s)||(e=q.getCoordinate(s)));p&&!t&&(isNaN(v)||(f=p.getCoordinate(v)),isNaN(w)||(g=p.getCoordinate(w)));isNaN(d)||isNaN(e)||
291 isNaN(f)||isNaN(f)||(b.rotate?(h=[f,g],e=[d,e]):(h=[d,e],e=[f,g]),f=a.lineColor,d=AmCharts.line(c,h,e,f,a.lineAlpha,a.lineThickness,a.dashLength),g=h,k=e,n=h[1]-h[0],p=e[1]-e[0],0===n&&(n=.01),0===p&&(p=.01),l=n/Math.abs(n),m=p/Math.abs(p),p=n*p/Math.abs(n*p)*Math.sqrt(Math.pow(n,2)+Math.pow(p,2)),n=Math.asin(n/p),p=90*Math.PI/180-n,n=Math.abs(5*Math.cos(p)),p=Math.abs(5*Math.sin(p)),g.push(h[1]-l*p,h[0]-l*p),k.push(e[1]+m*n,e[0]+m*n),h=AmCharts.polygon(c,g,k,f,.005,0),c=c.set([h,d]),c.translate(b.marginLeftReal,
292 b.marginTopReal),b.trendLinesSet.push(c),a.line=d,a.set=c,h.mouseup(function(){a.handleLineClick()}).mouseover(function(){a.handleLineOver()}).mouseout(function(){a.handleLineOut()}),h.touchend&&h.touchend(function(){a.handleLineClick()}))},handleLineClick:function(){var a={type:"click",trendLine:this,chart:this.chart};this.fire(a.type,a)},handleLineOver:function(){var a=this.rollOverColor;void 0!==a&&this.line.attr({stroke:a})},handleLineOut:function(){this.line.attr({stroke:this.lineColor})},destroy:function(){AmCharts.remove(this.set)}});AmCharts.circle=function(a,b,c,d,e,f,g,h){if(void 0==e||0===e)e=.01;void 0===f&&(f="#000000");void 0===g&&(g=0);d={fill:c,stroke:f,"fill-opacity":d,"stroke-width":e,"stroke-opacity":g};a=a.circle(0,0,b).attr(d);h&&a.gradient("radialGradient",[c,AmCharts.adjustLuminosity(c,-.6)]);return a};
293 AmCharts.text=function(a,b,c,d,e,f,g,h){f||(f="middle");"right"==f&&(f="end");isNaN(h)&&(h=1);void 0!==b&&(b=String(b),AmCharts.isIE&&!AmCharts.isModern&&(b=b.replace("&amp;","&"),b=b.replace("&","&amp;")));c={fill:c,"font-family":d,"font-size":e,opacity:h};!0===g&&(c["font-weight"]="bold");c["text-anchor"]=f;return a.text(b,c)};
294 AmCharts.polygon=function(a,b,c,d,e,f,g,h,k,l,m){isNaN(f)&&(f=.01);isNaN(h)&&(h=e);var n=d,p=!1;"object"==typeof n&&1<n.length&&(p=!0,n=n[0]);void 0===g&&(g=n);e={fill:n,stroke:g,"fill-opacity":e,"stroke-width":f,"stroke-opacity":h};void 0!==m&&0<m&&(e["stroke-dasharray"]=m);m=AmCharts.dx;f=AmCharts.dy;a.handDrawn&&(c=AmCharts.makeHD(b,c,a.handDrawScatter),b=c[0],c=c[1]);g=Math.round;l&&(g=AmCharts.doNothing);l="M"+(g(b[0])+m)+","+(g(c[0])+f);for(h=1;h<b.length;h++)l+=" L"+(g(b[h])+m)+","+(g(c[h])+
295 f);a=a.path(l+" Z").attr(e);p&&a.gradient("linearGradient",d,k);return a};
296 AmCharts.rect=function(a,b,c,d,e,f,g,h,k,l,m){isNaN(f)&&(f=0);void 0===k&&(k=0);void 0===l&&(l=270);isNaN(e)&&(e=0);var n=d,p=!1;"object"==typeof n&&(n=n[0],p=!0);void 0===g&&(g=n);void 0===h&&(h=e);b=Math.round(b);c=Math.round(c);var q=0,r=0;0>b&&(b=Math.abs(b),q=-b);0>c&&(c=Math.abs(c),r=-c);q+=AmCharts.dx;r+=AmCharts.dy;e={fill:n,stroke:g,"fill-opacity":e,"stroke-opacity":h};void 0!==m&&0<m&&(e["stroke-dasharray"]=m);a=a.rect(q,r,b,c,k,f).attr(e);p&&a.gradient("linearGradient",d,l);return a};
297 AmCharts.bullet=function(a,b,c,d,e,f,g,h,k,l,m){var n;"circle"==b&&(b="round");switch(b){case "round":n=AmCharts.circle(a,c/2,d,e,f,g,h);break;case "square":n=AmCharts.polygon(a,[-c/2,c/2,c/2,-c/2],[c/2,c/2,-c/2,-c/2],d,e,f,g,h,l-180);break;case "rectangle":n=AmCharts.polygon(a,[-c,c,c,-c],[c/2,c/2,-c/2,-c/2],d,e,f,g,h,l-180);break;case "diamond":n=AmCharts.polygon(a,[-c/2,0,c/2,0],[0,-c/2,0,c/2],d,e,f,g,h);break;case "triangleUp":n=AmCharts.triangle(a,c,0,d,e,f,g,h);break;case "triangleDown":n=AmCharts.triangle(a,
298 c,180,d,e,f,g,h);break;case "triangleLeft":n=AmCharts.triangle(a,c,270,d,e,f,g,h);break;case "triangleRight":n=AmCharts.triangle(a,c,90,d,e,f,g,h);break;case "bubble":n=AmCharts.circle(a,c/2,d,e,f,g,h,!0);break;case "line":n=AmCharts.line(a,[-c/2,c/2],[0,0],d,e,f,g,h);break;case "yError":n=a.set();n.push(AmCharts.line(a,[0,0],[-c/2,c/2],d,e,f));n.push(AmCharts.line(a,[-k,k],[-c/2,-c/2],d,e,f));n.push(AmCharts.line(a,[-k,k],[c/2,c/2],d,e,f));break;case "xError":n=a.set(),n.push(AmCharts.line(a,[-c/
299 2,c/2],[0,0],d,e,f)),n.push(AmCharts.line(a,[-c/2,-c/2],[-k,k],d,e,f)),n.push(AmCharts.line(a,[c/2,c/2],[-k,k],d,e,f))}n&&n.pattern(m);return n};
300 AmCharts.triangle=function(a,b,c,d,e,f,g,h){if(void 0===f||0===f)f=1;void 0===g&&(g="#000");void 0===h&&(h=0);d={fill:d,stroke:g,"fill-opacity":e,"stroke-width":f,"stroke-opacity":h};b/=2;var k;0===c&&(k=" M"+-b+","+b+" L0,"+-b+" L"+b+","+b+" Z");180==c&&(k=" M"+-b+","+-b+" L0,"+b+" L"+b+","+-b+" Z");90==c&&(k=" M"+-b+","+-b+" L"+b+",0 L"+-b+","+b+" Z");270==c&&(k=" M"+-b+",0 L"+b+","+b+" L"+b+","+-b+" Z");return a.path(k).attr(d)};
301 AmCharts.line=function(a,b,c,d,e,f,g,h,k,l,m){if(a.handDrawn&&!m)return AmCharts.handDrawnLine(a,b,c,d,e,f,g,h,k,l,m);f={fill:"none","stroke-width":f};void 0!==g&&0<g&&(f["stroke-dasharray"]=g);isNaN(e)||(f["stroke-opacity"]=e);d&&(f.stroke=d);d=Math.round;l&&(d=AmCharts.doNothing);l=AmCharts.dx;e=AmCharts.dy;g="M"+(d(b[0])+l)+","+(d(c[0])+e);for(h=1;h<b.length;h++)g+=" L"+(d(b[h])+l)+","+(d(c[h])+e);if(AmCharts.VML)return a.path(g,void 0,!0).attr(f);k&&(g+=" M0,0 L0,0");return a.path(g).attr(f)};
302 AmCharts.makeHD=function(a,b,c){for(var d=[],e=[],f=1;f<a.length;f++)for(var g=Number(a[f-1]),h=Number(b[f-1]),k=Number(a[f]),l=Number(b[f]),m=Math.sqrt(Math.pow(k-g,2)+Math.pow(l-h,2)),m=Math.round(m/50)+1,k=(k-g)/m,l=(l-h)/m,n=0;n<=m;n++){var p=g+n*k+Math.random()*c,q=h+n*l+Math.random()*c;d.push(p);e.push(q)}return[d,e]};
303 AmCharts.handDrawnLine=function(a,b,c,d,e,f,g,h,k,l,m){var n=a.set();for(m=1;m<b.length;m++)for(var p=[b[m-1],b[m]],q=[c[m-1],c[m]],q=AmCharts.makeHD(p,q,a.handDrawScatter),p=q[0],q=q[1],r=1;r<p.length;r++)n.push(AmCharts.line(a,[p[r-1],p[r]],[q[r-1],q[r]],d,e,f+Math.random()*a.handDrawThickness-a.handDrawThickness/2,g,h,k,l,!0));return n};AmCharts.doNothing=function(a){return a};
304 AmCharts.wedge=function(a,b,c,d,e,f,g,h,k,l,m,n){var p=Math.round;f=p(f);g=p(g);h=p(h);var q=p(g/f*h),r=AmCharts.VML,s=359.5+f/100;359.94<s&&(s=359.94);e>=s&&(e=s);var v=1/180*Math.PI,s=b+Math.sin(d*v)*h,w=c-Math.cos(d*v)*q,t=b+Math.sin(d*v)*f,u=c-Math.cos(d*v)*g,y=b+Math.sin((d+e)*v)*f,E=c-Math.cos((d+e)*v)*g,A=b+Math.sin((d+e)*v)*h,v=c-Math.cos((d+e)*v)*q,z={fill:AmCharts.adjustLuminosity(l.fill,-.2),"stroke-opacity":0,"fill-opacity":l["fill-opacity"]},K=0;180<Math.abs(e)&&(K=1);d=a.set();var I;
305 r&&(s=p(10*s),t=p(10*t),y=p(10*y),A=p(10*A),w=p(10*w),u=p(10*u),E=p(10*E),v=p(10*v),b=p(10*b),k=p(10*k),c=p(10*c),f*=10,g*=10,h*=10,q*=10,1>Math.abs(e)&&1>=Math.abs(y-t)&&1>=Math.abs(E-u)&&(I=!0));e="";var F;n&&(z["fill-opacity"]=0,z["stroke-opacity"]=l["stroke-opacity"]/2,z.stroke=l.stroke);0<k&&(r?(F=" M"+s+","+(w+k)+" L"+t+","+(u+k),I||(F+=" A"+(b-f)+","+(k+c-g)+","+(b+f)+","+(k+c+g)+","+t+","+(u+k)+","+y+","+(E+k)),F+=" L"+A+","+(v+k),0<h&&(I||(F+=" B"+(b-h)+","+(k+c-q)+","+(b+h)+","+(k+c+q)+
306 ","+A+","+(k+v)+","+s+","+(k+w)))):(F=" M"+s+","+(w+k)+" L"+t+","+(u+k)+(" A"+f+","+g+",0,"+K+",1,"+y+","+(E+k)+" L"+A+","+(v+k)),0<h&&(F+=" A"+h+","+q+",0,"+K+",0,"+s+","+(w+k))),F+=" Z",F=a.path(F,void 0,void 0,"1000,1000").attr(z),d.push(F),F=a.path(" M"+s+","+w+" L"+s+","+(w+k)+" L"+t+","+(u+k)+" L"+t+","+u+" L"+s+","+w+" Z",void 0,void 0,"1000,1000").attr(z),k=a.path(" M"+y+","+E+" L"+y+","+(E+k)+" L"+A+","+(v+k)+" L"+A+","+v+" L"+y+","+E+" Z",void 0,void 0,"1000,1000").attr(z),d.push(F),d.push(k));
307 r?(I||(e=" A"+p(b-f)+","+p(c-g)+","+p(b+f)+","+p(c+g)+","+p(t)+","+p(u)+","+p(y)+","+p(E)),f=" M"+p(s)+","+p(w)+" L"+p(t)+","+p(u)+e+" L"+p(A)+","+p(v)):f=" M"+s+","+w+" L"+t+","+u+(" A"+f+","+g+",0,"+K+",1,"+y+","+E)+" L"+A+","+v;0<h&&(r?I||(f+=" B"+(b-h)+","+(c-q)+","+(b+h)+","+(c+q)+","+A+","+v+","+s+","+w):f+=" A"+h+","+q+",0,"+K+",0,"+s+","+w);a.handDrawn&&(b=AmCharts.line(a,[s,t],[w,u],l.stroke,l.thickness*Math.random()*a.handDrawThickness,l["stroke-opacity"]),d.push(b));a=a.path(f+" Z",void 0,
308 void 0,"1000,1000").attr(l);if(m){b=[];for(c=0;c<m.length;c++)b.push(AmCharts.adjustLuminosity(l.fill,m[c]));0<b.length&&a.gradient("linearGradient",b)}a.pattern(n);d.push(a);return d};
309 AmCharts.adjustLuminosity=function(a,b){a=String(a).replace(/[^0-9a-f]/gi,"");6>a.length&&(a=String(a[0])+String(a[0])+String(a[1])+String(a[1])+String(a[2])+String(a[2]));b=b||0;var c="#",d,e;for(e=0;3>e;e++)d=parseInt(a.substr(2*e,2),16),d=Math.round(Math.min(Math.max(0,d+d*b),255)).toString(16),c+=("00"+d).substr(d.length);return c};AmCharts.Bezier=AmCharts.Class({construct:function(a,b,c,d,e,f,g,h,k,l){"object"==typeof g&&(g=g[0]);"object"==typeof h&&(h=h[0]);f={fill:g,"fill-opacity":h,"stroke-width":f};void 0!==k&&0<k&&(f["stroke-dasharray"]=k);isNaN(e)||(f["stroke-opacity"]=e);d&&(f.stroke=d);d="M"+Math.round(b[0])+","+Math.round(c[0]);e=[];for(k=0;k<b.length;k++)e.push({x:Number(b[k]),y:Number(c[k])});1<e.length&&(b=this.interpolate(e),d+=this.drawBeziers(b));l?d+=l:AmCharts.VML||(d+="M0,0 L0,0");this.path=a.path(d).attr(f)},
310 interpolate:function(a){var b=[];b.push({x:a[0].x,y:a[0].y});var c=a[1].x-a[0].x,d=a[1].y-a[0].y,e=AmCharts.bezierX,f=AmCharts.bezierY;b.push({x:a[0].x+c/e,y:a[0].y+d/f});var g;for(g=1;g<a.length-1;g++){var h=a[g-1],k=a[g],d=a[g+1];isNaN(d.x)&&(d=k);isNaN(k.x)&&(k=h);isNaN(h.x)&&(h=k);c=d.x-k.x;d=d.y-h.y;h=k.x-h.x;h>c&&(h=c);b.push({x:k.x-h/e,y:k.y-d/f});b.push({x:k.x,y:k.y});b.push({x:k.x+h/e,y:k.y+d/f})}d=a[a.length-1].y-a[a.length-2].y;c=a[a.length-1].x-a[a.length-2].x;b.push({x:a[a.length-1].x-
311 c/e,y:a[a.length-1].y-d/f});b.push({x:a[a.length-1].x,y:a[a.length-1].y});return b},drawBeziers:function(a){var b="",c;for(c=0;c<(a.length-1)/3;c++)b+=this.drawBezierMidpoint(a[3*c],a[3*c+1],a[3*c+2],a[3*c+3]);return b},drawBezierMidpoint:function(a,b,c,d){var e=Math.round,f=this.getPointOnSegment(a,b,.75),g=this.getPointOnSegment(d,c,.75),h=(d.x-a.x)/16,k=(d.y-a.y)/16,l=this.getPointOnSegment(a,b,.375);a=this.getPointOnSegment(f,g,.375);a.x-=h;a.y-=k;b=this.getPointOnSegment(g,f,.375);b.x+=h;b.y+=
312 k;c=this.getPointOnSegment(d,c,.375);h=this.getMiddle(l,a);f=this.getMiddle(f,g);g=this.getMiddle(b,c);l=" Q"+e(l.x)+","+e(l.y)+","+e(h.x)+","+e(h.y);l+=" Q"+e(a.x)+","+e(a.y)+","+e(f.x)+","+e(f.y);l+=" Q"+e(b.x)+","+e(b.y)+","+e(g.x)+","+e(g.y);return l+=" Q"+e(c.x)+","+e(c.y)+","+e(d.x)+","+e(d.y)},getMiddle:function(a,b){return{x:(a.x+b.x)/2,y:(a.y+b.y)/2}},getPointOnSegment:function(a,b,c){return{x:a.x+(b.x-a.x)*c,y:a.y+(b.y-a.y)*c}}});AmCharts.AmDraw=AmCharts.Class({construct:function(a,b,c,d){AmCharts.SVG_NS="http://www.w3.org/2000/svg";AmCharts.SVG_XLINK="http://www.w3.org/1999/xlink";AmCharts.hasSVG=!!document.createElementNS&&!!document.createElementNS(AmCharts.SVG_NS,"svg").createSVGRect;1>b&&(b=10);1>c&&(c=10);this.div=a;this.width=b;this.height=c;this.rBin=document.createElement("div");if(AmCharts.hasSVG){AmCharts.SVG=!0;var e=this.createSvgElement("svg");e.style.position="absolute";e.style.width=b+"px";e.style.height=c+
313 "px";b=this.createSvgElement("desc");b.appendChild(document.createTextNode("JavaScript chart by amCharts "+d.version));e.appendChild(b);AmCharts.rtl&&(e.setAttribute("direction","rtl"),e.style.left="auto",e.style.right="0px");e.setAttribute("version","1.1");a.appendChild(e);this.container=e;this.R=new AmCharts.SVGRenderer(this)}else AmCharts.isIE&&AmCharts.VMLRenderer&&(AmCharts.VML=!0,AmCharts.vmlStyleSheet||(document.namespaces.add("amvml","urn:schemas-microsoft-com:vml"),31>document.styleSheets.length?
314 (e=document.createStyleSheet(),e.addRule(".amvml","behavior:url(#default#VML); display:inline-block; antialias:true"),AmCharts.vmlStyleSheet=e):document.styleSheets[0].addRule(".amvml","behavior:url(#default#VML); display:inline-block; antialias:true")),this.container=a,this.R=new AmCharts.VMLRenderer(this,d),this.R.disableSelection(a))},createSvgElement:function(a){return document.createElementNS(AmCharts.SVG_NS,a)},circle:function(a,b,c,d){var e=new AmCharts.AmDObject("circle",this);e.attr({r:c,
315 cx:a,cy:b});this.addToContainer(e.node,d);return e},setSize:function(a,b){0<a&&0<b&&(this.container.style.width=a+"px",this.container.style.height=b+"px")},rect:function(a,b,c,d,e,f,g){var h=new AmCharts.AmDObject("rect",this);AmCharts.VML&&(e=100*e/Math.min(c,d),c+=2*f,d+=2*f,h.bw=f,h.node.style.marginLeft=-f,h.node.style.marginTop=-f);1>c&&(c=1);1>d&&(d=1);h.attr({x:a,y:b,width:c,height:d,rx:e,ry:e,"stroke-width":f});this.addToContainer(h.node,g);return h},image:function(a,b,c,d,e,f){var g=new AmCharts.AmDObject("image",
316 this);g.attr({x:b,y:c,width:d,height:e});this.R.path(g,a);this.addToContainer(g.node,f);return g},addToContainer:function(a,b){b||(b=this.container);b.appendChild(a)},text:function(a,b,c){return this.R.text(a,b,c)},path:function(a,b,c,d){var e=new AmCharts.AmDObject("path",this);d||(d="100,100");e.attr({cs:d});c?e.attr({dd:a}):e.attr({d:a});this.addToContainer(e.node,b);return e},set:function(a){return this.R.set(a)},remove:function(a){if(a){var b=this.rBin;b.appendChild(a);b.innerHTML=""}},renderFix:function(){var a=
317 this.container,b=a.style,c;try{c=a.getScreenCTM()||a.createSVGMatrix()}catch(d){c=a.createSVGMatrix()}a=1-c.e%1;c=1-c.f%1;.5<a&&(a-=1);.5<c&&(c-=1);a&&(b.left=a+"px");c&&(b.top=c+"px")},update:function(){this.R.update()}});AmCharts.AmDObject=AmCharts.Class({construct:function(a,b){this.D=b;this.R=b.R;this.node=this.R.create(this,a);this.y=this.x=0;this.scale=1},attr:function(a){this.R.attr(this,a);return this},getAttr:function(a){return this.node.getAttribute(a)},setAttr:function(a,b){this.R.setAttr(this,a,b);return this},clipRect:function(a,b,c,d){this.R.clipRect(this,a,b,c,d)},translate:function(a,b,c,d){d||(a=Math.round(a),b=Math.round(b));this.R.move(this,a,b,c);this.x=a;this.y=b;this.scale=c;this.angle&&this.rotate(this.angle)},
318 rotate:function(a,b){this.R.rotate(this,a,b);this.angle=a},animate:function(a,b,c){for(var d in a)if(a.hasOwnProperty(d)){var e=d,f=a[d];c=AmCharts.getEffect(c);this.R.animate(this,e,f,b,c)}},push:function(a){if(a){var b=this.node;b.appendChild(a.node);var c=a.clipPath;c&&b.appendChild(c);(a=a.grad)&&b.appendChild(a)}},text:function(a){this.R.setText(this,a)},remove:function(){this.R.remove(this)},clear:function(){var a=this.node;if(a.hasChildNodes())for(;1<=a.childNodes.length;)a.removeChild(a.firstChild)},
319 hide:function(){this.setAttr("visibility","hidden")},show:function(){this.setAttr("visibility","visible")},getBBox:function(){return this.R.getBBox(this)},toFront:function(){var a=this.node;if(a){this.prevNextNode=a.nextSibling;var b=a.parentNode;b&&b.appendChild(a)}},toPrevious:function(){var a=this.node;a&&this.prevNextNode&&(a=a.parentNode)&&a.insertBefore(this.prevNextNode,null)},toBack:function(){var a=this.node;if(a){this.prevNextNode=a.nextSibling;var b=a.parentNode;if(b){var c=b.firstChild;
320 c&&b.insertBefore(a,c)}}},mouseover:function(a){this.R.addListener(this,"mouseover",a);return this},mouseout:function(a){this.R.addListener(this,"mouseout",a);return this},click:function(a){this.R.addListener(this,"click",a);return this},dblclick:function(a){this.R.addListener(this,"dblclick",a);return this},mousedown:function(a){this.R.addListener(this,"mousedown",a);return this},mouseup:function(a){this.R.addListener(this,"mouseup",a);return this},touchstart:function(a){this.R.addListener(this,
321 "touchstart",a);return this},touchend:function(a){this.R.addListener(this,"touchend",a);return this},contextmenu:function(a){this.node.addEventListener?this.node.addEventListener("contextmenu",a,!0):this.R.addListener(this,"contextmenu",a);return this},stop:function(a){(a=this.animationX)&&AmCharts.removeFromArray(this.R.animations,a);(a=this.animationY)&&AmCharts.removeFromArray(this.R.animations,a)},length:function(){return this.node.childNodes.length},gradient:function(a,b,c){this.R.gradient(this,
322 a,b,c)},pattern:function(a,b){a&&this.R.pattern(this,a,b)}});AmCharts.VMLRenderer=AmCharts.Class({construct:function(a,b){this.chart=b;this.D=a;this.cNames={circle:"oval",rect:"roundrect",path:"shape"};this.styleMap={x:"left",y:"top",width:"width",height:"height","font-family":"fontFamily","font-size":"fontSize",visibility:"visibility"}},create:function(a,b){var c;if("group"==b)c=document.createElement("div"),a.type="div";else if("text"==b)c=document.createElement("div"),a.type="text";else if("image"==b)c=document.createElement("img"),a.type="image";else{a.type=
323 "shape";a.shapeType=this.cNames[b];c=document.createElement("amvml:"+this.cNames[b]);var d=document.createElement("amvml:stroke");c.appendChild(d);a.stroke=d;var e=document.createElement("amvml:fill");c.appendChild(e);a.fill=e;e.className="amvml";d.className="amvml";c.className="amvml"}c.style.position="absolute";c.style.top=0;c.style.left=0;return c},path:function(a,b){a.node.setAttribute("src",b)},setAttr:function(a,b,c){if(void 0!==c){var d;8===document.documentMode&&(d=!0);var e=a.node,f=a.type,
324 g=e.style;"r"==b&&(g.width=2*c,g.height=2*c);"roundrect"!=a.shapeType||"width"!=b&&"height"!=b||(c-=1);"cursor"==b&&(g.cursor=c);"cx"==b&&(g.left=c-AmCharts.removePx(g.width)/2);"cy"==b&&(g.top=c-AmCharts.removePx(g.height)/2);var h=this.styleMap[b];void 0!==h&&(g[h]=c);"text"==f&&("text-anchor"==b&&(a.anchor=c,h=e.clientWidth,"end"==c&&(g.marginLeft=-h+"px"),"middle"==c&&(g.marginLeft=-(h/2)+"px",g.textAlign="center"),"start"==c&&(g.marginLeft="0px")),"fill"==b&&(g.color=c),"font-weight"==b&&(g.fontWeight=
325 c));if(g=a.children)for(h=0;h<g.length;h++)g[h].setAttr(b,c);if("shape"==f){"cs"==b&&(e.style.width="100px",e.style.height="100px",e.setAttribute("coordsize",c));"d"==b&&e.setAttribute("path",this.svgPathToVml(c));"dd"==b&&e.setAttribute("path",c);f=a.stroke;a=a.fill;"stroke"==b&&(d?f.color=c:f.setAttribute("color",c));"stroke-width"==b&&(d?f.weight=c:f.setAttribute("weight",c));"stroke-opacity"==b&&(d?f.opacity=c:f.setAttribute("opacity",c));"stroke-dasharray"==b&&(g="solid",0<c&&3>c&&(g="dot"),
326 3<=c&&6>=c&&(g="dash"),6<c&&(g="longdash"),d?f.dashstyle=g:f.setAttribute("dashstyle",g));if("fill-opacity"==b||"opacity"==b)0===c?d?a.on=!1:a.setAttribute("on",!1):d?a.opacity=c:a.setAttribute("opacity",c);"fill"==b&&(d?a.color=c:a.setAttribute("color",c));"rx"==b&&(d?e.arcSize=c+"%":e.setAttribute("arcsize",c+"%"))}}},attr:function(a,b){for(var c in b)b.hasOwnProperty(c)&&this.setAttr(a,c,b[c])},text:function(a,b,c){var d=new AmCharts.AmDObject("text",this.D),e=d.node;e.style.whiteSpace="pre";e.innerHTML=
327 a;this.D.addToContainer(e,c);this.attr(d,b);return d},getBBox:function(a){return this.getBox(a.node)},getBox:function(a){var b=a.offsetLeft,c=a.offsetTop,d=a.offsetWidth,e=a.offsetHeight,f;if(a.hasChildNodes()){var g,h,k;for(k=0;k<a.childNodes.length;k++){f=this.getBox(a.childNodes[k]);var l=f.x;isNaN(l)||(isNaN(g)?g=l:l<g&&(g=l));var m=f.y;isNaN(m)||(isNaN(h)?h=m:m<h&&(h=m));l=f.width+l;isNaN(l)||(d=Math.max(d,l));f=f.height+m;isNaN(f)||(e=Math.max(e,f))}0>g&&(b+=g);0>h&&(c+=h)}return{x:b,y:c,width:d,
328 height:e}},setText:function(a,b){var c=a.node;c&&(c.innerHTML=b);this.setAttr(a,"text-anchor",a.anchor)},addListener:function(a,b,c){a.node["on"+b]=c},move:function(a,b,c){var d=a.node,e=d.style;"text"==a.type&&(c-=AmCharts.removePx(e.fontSize)/2-1);"oval"==a.shapeType&&(b-=AmCharts.removePx(e.width)/2,c-=AmCharts.removePx(e.height)/2);a=a.bw;isNaN(a)||(b-=a,c-=a);isNaN(b)||isNaN(c)||(d.style.left=b+"px",d.style.top=c+"px")},svgPathToVml:function(a){var b=a.split(" ");a="";var c,d=Math.round,e;for(e=
329 0;e<b.length;e++){var f=b[e],g=f.substring(0,1),f=f.substring(1),h=f.split(","),k=d(h[0])+","+d(h[1]);"M"==g&&(a+=" m "+k);"L"==g&&(a+=" l "+k);"Z"==g&&(a+=" x e");if("Q"==g){var l=c.length,m=c[l-1],n=h[0],p=h[1],k=h[2],q=h[3];c=d(c[l-2]/3+2/3*n);m=d(m/3+2/3*p);n=d(2/3*n+k/3);p=d(2/3*p+q/3);a+=" c "+c+","+m+","+n+","+p+","+k+","+q}"A"==g&&(a+=" wa "+f);"B"==g&&(a+=" at "+f);c=h}return a},animate:function(a,b,c,d,e){var f=a.node,g=this.chart;if("translate"==b){b=c.split(",");c=b[1];var h=f.offsetTop;
330 g.animate(a,"left",f.offsetLeft,b[0],d,e,"px");g.animate(a,"top",h,c,d,e,"px")}},clipRect:function(a,b,c,d,e){a=a.node;0===b&&0===c?(a.style.width=d+"px",a.style.height=e+"px",a.style.overflow="hidden"):a.style.clip="rect("+c+"px "+(b+d)+"px "+(c+e)+"px "+b+"px)"},rotate:function(a,b,c){if(0!==Number(b)){var d=a.node;a=d.style;c||(c=this.getBGColor(d.parentNode));a.backgroundColor=c;a.paddingLeft=1;c=b*Math.PI/180;var e=Math.cos(c),f=Math.sin(c),g=AmCharts.removePx(a.left),h=AmCharts.removePx(a.top),
331 k=d.offsetWidth,d=d.offsetHeight;b/=Math.abs(b);a.left=g+k/2-k/2*Math.cos(c)-b*d/2*Math.sin(c)+3;a.top=h-b*k/2*Math.sin(c)+b*d/2*Math.sin(c);a.cssText=a.cssText+"; filter:progid:DXImageTransform.Microsoft.Matrix(M11='"+e+"', M12='"+-f+"', M21='"+f+"', M22='"+e+"', sizingmethod='auto expand');"}},getBGColor:function(a){var b="#FFFFFF";if(a.style){var c=a.style.backgroundColor;""!==c?b=c:a.parentNode&&(b=this.getBGColor(a.parentNode))}return b},set:function(a){var b=new AmCharts.AmDObject("group",this.D);
332 this.D.container.appendChild(b.node);if(a){var c;for(c=0;c<a.length;c++)b.push(a[c])}return b},gradient:function(a,b,c,d){var e="";"radialGradient"==b&&(b="gradientradial",c.reverse());"linearGradient"==b&&(b="gradient");var f;for(f=0;f<c.length;f++){var g=Math.round(100*f/(c.length-1)),e=e+(g+"% "+c[f]);f<c.length-1&&(e+=",")}a=a.fill;90==d?d=0:270==d?d=180:180==d?d=90:0===d&&(d=270);8===document.documentMode?(a.type=b,a.angle=d):(a.setAttribute("type",b),a.setAttribute("angle",d));e&&(a.colors.value=
333 e)},remove:function(a){a.clipPath&&this.D.remove(a.clipPath);this.D.remove(a.node)},disableSelection:function(a){void 0!==typeof a.onselectstart&&(a.onselectstart=function(){return!1});a.style.cursor="default"},pattern:function(a,b){var c=a.node,d=a.fill,e="none";b.color&&(e=b.color);c.fillColor=e;8===document.documentMode?(d.type="tile",d.src=b.url):(d.setAttribute("type","tile"),d.setAttribute("src",b.url))},update:function(){}});AmCharts.SVGRenderer=AmCharts.Class({construct:function(a){this.D=a;this.animations=[]},create:function(a,b){return document.createElementNS(AmCharts.SVG_NS,b)},attr:function(a,b){for(var c in b)b.hasOwnProperty(c)&&this.setAttr(a,c,b[c])},setAttr:function(a,b,c){void 0!==c&&a.node.setAttribute(b,c)},animate:function(a,b,c,d,e){var f=a.node;a["an_"+b]&&AmCharts.removeFromArray(this.animations,a["an_"+b]);"translate"==b?(f=(f=f.getAttribute("transform"))?String(f).substring(10,f.length-1):"0,0",f=
334 f.split(", ").join(" "),f=f.split(" ").join(","),0===f&&(f="0,0")):f=Number(f.getAttribute(b));c={obj:a,frame:0,attribute:b,from:f,to:c,time:d,effect:e};this.animations.push(c);a["an_"+b]=c},update:function(){var a,b=this.animations;for(a=b.length-1;0<=a;a--){var c=b[a],d=1E3*c.time/AmCharts.updateRate,e=c.frame+1,f=c.obj,g=c.attribute,h,k,l;e<=d?(c.frame++,"translate"==g?(h=c.from.split(","),g=Number(h[0]),h=Number(h[1]),isNaN(h)&&(h=0),k=c.to.split(","),l=Number(k[0]),k=Number(k[1]),l=0===l-g?l:
335 Math.round(AmCharts[c.effect](0,e,g,l-g,d)),c=0===k-h?k:Math.round(AmCharts[c.effect](0,e,h,k-h,d)),g="transform",c="translate("+l+","+c+")"):(k=Number(c.from),h=Number(c.to),l=h-k,c=AmCharts[c.effect](0,e,k,l,d),isNaN(c)&&(c=h),0===l&&this.animations.splice(a,1)),this.setAttr(f,g,c)):("translate"==g?(k=c.to.split(","),l=Number(k[0]),k=Number(k[1]),f.translate(l,k)):(h=Number(c.to),this.setAttr(f,g,h)),this.animations.splice(a,1))}},getBBox:function(a){if(a=a.node)try{return a.getBBox()}catch(b){}return{width:0,
336 height:0,x:0,y:0}},path:function(a,b){a.node.setAttributeNS(AmCharts.SVG_XLINK,"xlink:href",b)},clipRect:function(a,b,c,d,e){var f=a.node,g=a.clipPath;g&&this.D.remove(g);var h=f.parentNode;h&&(f=document.createElementNS(AmCharts.SVG_NS,"clipPath"),g=AmCharts.getUniqueId(),f.setAttribute("id",g),this.D.rect(b,c,d,e,0,0,f),h.appendChild(f),b="#",AmCharts.baseHref&&!AmCharts.isIE&&(b=window.location.href+b),this.setAttr(a,"clip-path","url("+b+g+")"),this.clipPathC++,a.clipPath=f)},text:function(a,b,
337 c){var d=new AmCharts.AmDObject("text",this.D);a=String(a).split("\n");var e=b["font-size"],f;for(f=0;f<a.length;f++){var g=this.create(null,"tspan");g.appendChild(document.createTextNode(a[f]));g.setAttribute("y",(e+2)*f+Math.round(e/2));g.setAttribute("x",0);d.node.appendChild(g)}d.node.setAttribute("y",Math.round(e/2));this.attr(d,b);this.D.addToContainer(d.node,c);return d},setText:function(a,b){var c=a.node;c&&(c.removeChild(c.firstChild),c.appendChild(document.createTextNode(b)))},move:function(a,
338 b,c,d){b="translate("+b+","+c+")";d&&(b=b+" scale("+d+")");this.setAttr(a,"transform",b)},rotate:function(a,b){var c=a.node.getAttribute("transform"),d="rotate("+b+")";c&&(d=c+" "+d);this.setAttr(a,"transform",d)},set:function(a){var b=new AmCharts.AmDObject("g",this.D);this.D.container.appendChild(b.node);if(a){var c;for(c=0;c<a.length;c++)b.push(a[c])}return b},addListener:function(a,b,c){a.node["on"+b]=c},gradient:function(a,b,c,d){var e=a.node,f=a.grad;f&&this.D.remove(f);b=document.createElementNS(AmCharts.SVG_NS,
339 b);f=AmCharts.getUniqueId();b.setAttribute("id",f);if(!isNaN(d)){var g=0,h=0,k=0,l=0;90==d?k=100:270==d?l=100:180==d?g=100:0===d&&(h=100);b.setAttribute("x1",g+"%");b.setAttribute("x2",h+"%");b.setAttribute("y1",k+"%");b.setAttribute("y2",l+"%")}for(d=0;d<c.length;d++)g=document.createElementNS(AmCharts.SVG_NS,"stop"),h=100*d/(c.length-1),0===d&&(h=0),g.setAttribute("offset",h+"%"),g.setAttribute("stop-color",c[d]),b.appendChild(g);e.parentNode.appendChild(b);c="#";AmCharts.baseHref&&!AmCharts.isIE&&
340 (c=window.location.href+c);e.setAttribute("fill","url("+c+f+")");a.grad=b},pattern:function(a,b,c){var d=a.node;isNaN(c)&&(c=1);var e=a.patternNode;e&&this.D.remove(e);var e=document.createElementNS(AmCharts.SVG_NS,"pattern"),f=AmCharts.getUniqueId(),g=b;b.url&&(g=b.url);var h=Number(b.width);isNaN(h)&&(h=4);var k=Number(b.height);isNaN(k)&&(k=4);h/=c;k/=c;c=b.x;isNaN(c)&&(c=0);var l=-Math.random()*Number(b.randomX);isNaN(l)||(c=l);l=b.y;isNaN(l)&&(l=0);var m=-Math.random()*Number(b.randomY);isNaN(m)||
341 (l=m);e.setAttribute("id",f);e.setAttribute("width",h);e.setAttribute("height",k);e.setAttribute("patternUnits","userSpaceOnUse");e.setAttribute("xlink:href",g);b.color&&(m=document.createElementNS(AmCharts.SVG_NS,"rect"),m.setAttributeNS(null,"height",h),m.setAttributeNS(null,"width",k),m.setAttributeNS(null,"fill",b.color),e.appendChild(m));this.D.image(g,0,0,h,k,e).translate(c,l);g="#";AmCharts.baseHref&&!AmCharts.isIE&&(g=window.location.href+g);d.setAttribute("fill","url("+g+f+")");a.patternNode=
342 e;d.parentNode.appendChild(e)},remove:function(a){a.clipPath&&this.D.remove(a.clipPath);a.grad&&this.D.remove(a.grad);a.patternNode&&this.D.remove(a.patternNode);this.D.remove(a.node)}});AmCharts.AmDSet=AmCharts.Class({construct:function(a){this.create("g")},attr:function(a){this.R.attr(this.node,a)},move:function(a,b){this.R.move(this.node,a,b)}});AmCharts.AmLegend=AmCharts.Class({construct:function(a){this.cname="AmLegend";this.createEvents("rollOverMarker","rollOverItem","rollOutMarker","rollOutItem","showItem","hideItem","clickMarker","rollOverItem","rollOutItem","clickLabel");this.position="bottom";this.borderColor=this.color="#000000";this.borderAlpha=0;this.markerLabelGap=5;this.verticalGap=10;this.align="left";this.horizontalGap=0;this.spacing=10;this.markerDisabledColor="#AAB3B3";this.markerType="square";this.markerSize=16;this.markerBorderThickness=
343 this.markerBorderAlpha=1;this.marginBottom=this.marginTop=0;this.marginLeft=this.marginRight=20;this.autoMargins=!0;this.valueWidth=50;this.switchable=!0;this.switchType="x";this.switchColor="#FFFFFF";this.rollOverColor="#CC0000";this.reversedOrder=!1;this.labelText="[[title]]";this.valueText="[[value]]";this.useMarkerColorForLabels=!1;this.rollOverGraphAlpha=1;this.textClickEnabled=!1;this.equalWidths=!0;this.dateFormat="DD-MM-YYYY";this.backgroundColor="#FFFFFF";this.backgroundAlpha=0;this.useGraphSettings=
344 !1;this.showEntries=!0;AmCharts.applyTheme(this,a,this.cname)},setData:function(a){this.legendData=a;this.invalidateSize()},invalidateSize:function(){this.destroy();this.entries=[];this.valueLabels=[];(AmCharts.ifArray(this.legendData)||AmCharts.ifArray(this.data))&&this.drawLegend()},drawLegend:function(){var a=this.chart,b=this.position,c=this.width,d=a.divRealWidth,e=a.divRealHeight,f=this.div,g=this.legendData;this.data&&(g=this.data);isNaN(this.fontSize)&&(this.fontSize=a.fontSize);if("right"==
345 b||"left"==b)this.maxColumns=1,this.autoMargins&&(this.marginLeft=this.marginRight=10);else if(this.autoMargins){this.marginRight=a.marginRight;this.marginLeft=a.marginLeft;var h=a.autoMarginOffset;"bottom"==b?(this.marginBottom=h,this.marginTop=0):(this.marginTop=h,this.marginBottom=0)}var k;void 0!==c?k=AmCharts.toCoordinate(c,d):"right"!=b&&"left"!=b&&(k=a.realWidth);"outside"==b?(k=f.offsetWidth,e=f.offsetHeight,f.clientHeight&&(k=f.clientWidth,e=f.clientHeight)):(isNaN(k)||(f.style.width=k+"px"),
346 f.className="amChartsLegend");this.divWidth=k;(b=this.container)?(b.container.innerHTML="",f.appendChild(b.container),b.setSize(k,e)):b=new AmCharts.AmDraw(f,k,e,a);this.container=b;this.lx=0;this.ly=8;e=this.markerSize;e>this.fontSize&&(this.ly=e/2-1);0<e&&(this.lx+=e+this.markerLabelGap);this.titleWidth=0;if(e=this.title)a=AmCharts.text(this.container,e,this.color,a.fontFamily,this.fontSize,"start",!0),a.translate(this.marginLeft,this.marginTop+this.verticalGap+this.ly+1),a=a.getBBox(),this.titleWidth=
347 a.width+15,this.titleHeight=a.height+6;this.index=this.maxLabelWidth=0;if(this.showEntries){for(a=0;a<g.length;a++)this.createEntry(g[a]);for(a=this.index=0;a<g.length;a++)this.createValue(g[a])}this.arrangeEntries();this.updateValues()},arrangeEntries:function(){var a=this.position,b=this.marginLeft+this.titleWidth,c=this.marginRight,d=this.marginTop,e=this.marginBottom,f=this.horizontalGap,g=this.div,h=this.divWidth,k=this.maxColumns,l=this.verticalGap,m=this.spacing,n=h-c-b,p=0,q=0,r=this.container;
348 this.set&&this.set.remove();var s=r.set();this.set=s;r=r.set();s.push(r);var v=this.entries,w,t;for(t=0;t<v.length;t++){w=v[t].getBBox();var u=w.width;u>p&&(p=u);w=w.height;w>q&&(q=w)}var u=q=0,y=f,E=0,A=0;for(t=0;t<v.length;t++){var z=v[t];this.reversedOrder&&(z=v[v.length-t-1]);w=z.getBBox();var K;this.equalWidths?K=f+u*(p+m+this.markerLabelGap):(K=y,y=y+w.width+f+m);w.height>A&&(A=w.height);K+w.width>n&&0<t&&0!==u&&(q++,u=0,K=f,y=K+w.width+f+m,E=E+A+l,A=0);z.translate(K,E);u++;!isNaN(k)&&u>=k&&
349 (u=0,q++,E=E+A+l,A=0);r.push(z)}w=r.getBBox();k=w.height+2*l-1;"left"==a||"right"==a?(h=w.width+2*f,g.style.width=h+b+c+"px"):h=h-b-c-1;c=AmCharts.polygon(this.container,[0,h,h,0],[0,0,k,k],this.backgroundColor,this.backgroundAlpha,1,this.borderColor,this.borderAlpha);s.push(c);s.translate(b,d);c.toBack();b=f;if("top"==a||"bottom"==a||"absolute"==a||"outside"==a)"center"==this.align?b=f+(h-w.width)/2:"right"==this.align&&(b=f+h-w.width);r.translate(b,l+1);this.titleHeight>k&&(k=this.titleHeight);
350 a=k+d+e+1;0>a&&(a=0);g.style.height=Math.round(a)+"px"},createEntry:function(a){if(!1!==a.visibleInLegend){var b=this.chart,c=a.markerType;c||(c=this.markerType);var d=a.color,e=a.alpha;a.legendKeyColor&&(d=a.legendKeyColor());a.legendKeyAlpha&&(e=a.legendKeyAlpha());var f;!0===a.hidden&&(f=d=this.markerDisabledColor);var g=a.pattern,h=a.customMarker;h||(h=this.customMarker);var k=this.container,l=this.markerSize,m=0,n=0,p=l/2;if(this.useGraphSettings)if(m=a.type,this.switchType=void 0,"line"==m||
351 "step"==m||"smoothedLine"==m||"ohlc"==m)g=k.set(),a.hidden||(d=a.lineColorR,f=a.bulletBorderColorR),n=AmCharts.line(k,[0,2*l],[l/2,l/2],d,a.lineAlpha,a.lineThickness,a.dashLength),g.push(n),a.bullet&&(a.hidden||(d=a.bulletColorR),n=AmCharts.bullet(k,a.bullet,a.bulletSize,d,a.bulletAlpha,a.bulletBorderThickness,f,a.bulletBorderAlpha))&&(n.translate(l+1,l/2),g.push(n)),p=0,m=l,n=l/3;else{var q;a.getGradRotation&&(q=a.getGradRotation());m=a.fillColorsR;!0===a.hidden&&(m=d);if(g=this.createMarker("rectangle",
352 m,a.fillAlphas,a.lineThickness,d,a.lineAlpha,q,g))p=l,g.translate(p,l/2);m=l}else h?(b.path&&(h=b.path+h),g=k.image(h,0,0,l,l)):(g=this.createMarker(c,d,e,void 0,void 0,void 0,void 0,g))&&g.translate(l/2,l/2);this.addListeners(g,a);k=k.set([g]);this.switchable&&a.switchable&&k.setAttr("cursor","pointer");(f=this.switchType)&&"none"!=f&&("x"==f?(q=this.createX(),q.translate(l/2,l/2)):q=this.createV(),q.dItem=a,!0!==a.hidden?"x"==f?q.hide():q.show():"x"!=f&&q.hide(),this.switchable||q.hide(),this.addListeners(q,
353 a),a.legendSwitch=q,k.push(q));f=this.color;a.showBalloon&&this.textClickEnabled&&void 0!==this.selectedColor&&(f=this.selectedColor);this.useMarkerColorForLabels&&(f=d);!0===a.hidden&&(f=this.markerDisabledColor);d=AmCharts.massReplace(this.labelText,{"[[title]]":a.title});q=this.fontSize;g&&l<=q&&g.translate(p,l/2+this.ly-q/2+(q+2-l)/2-n);var r;d&&(d=AmCharts.fixBrakes(d),a.legendTextReal=d,r=this.labelWidth,r=isNaN(r)?AmCharts.text(this.container,d,f,b.fontFamily,q,"start"):AmCharts.wrappedText(this.container,
354 d,f,b.fontFamily,q,"start",!1,r,0),r.translate(this.lx+m,this.ly),k.push(r),b=r.getBBox().width,this.maxLabelWidth<b&&(this.maxLabelWidth=b));this.entries[this.index]=k;a.legendEntry=this.entries[this.index];a.legendLabel=r;this.index++}},addListeners:function(a,b){var c=this;a&&a.mouseover(function(){c.rollOverMarker(b)}).mouseout(function(){c.rollOutMarker(b)}).click(function(){c.clickMarker(b)})},rollOverMarker:function(a){this.switchable&&this.dispatch("rollOverMarker",a);this.dispatch("rollOverItem",
355 a)},rollOutMarker:function(a){this.switchable&&this.dispatch("rollOutMarker",a);this.dispatch("rollOutItem",a)},clickMarker:function(a){this.switchable&&(!0===a.hidden?this.dispatch("showItem",a):this.dispatch("hideItem",a));this.dispatch("clickMarker",a)},rollOverLabel:function(a){a.hidden||(this.textClickEnabled&&a.legendLabel&&a.legendLabel.attr({fill:this.rollOverColor}),this.dispatch("rollOverItem",a))},rollOutLabel:function(a){if(!a.hidden){if(this.textClickEnabled&&a.legendLabel){var b=this.color;
356 void 0!==this.selectedColor&&a.showBalloon&&(b=this.selectedColor);this.useMarkerColorForLabels&&(b=a.lineColor,void 0===b&&(b=a.color));a.legendLabel.attr({fill:b})}this.dispatch("rollOutItem",a)}},clickLabel:function(a){this.textClickEnabled?a.hidden||this.dispatch("clickLabel",a):this.switchable&&(!0===a.hidden?this.dispatch("showItem",a):this.dispatch("hideItem",a))},dispatch:function(a,b){this.fire(a,{type:a,dataItem:b,target:this,chart:this.chart})},createValue:function(a){var b=this,c=b.fontSize;
357 if(!1!==a.visibleInLegend){var d=b.maxLabelWidth;b.equalWidths||(b.valueAlign="left");"left"==b.valueAlign&&(d=a.legendEntry.getBBox().width);var e=d;if(b.valueText&&0<b.valueWidth){var f=b.color;b.useMarkerColorForValues&&(f=a.color,a.legendKeyColor&&(f=a.legendKeyColor()));!0===a.hidden&&(f=b.markerDisabledColor);var g=b.valueText,d=d+b.lx+b.markerLabelGap+b.valueWidth,h="end";"left"==b.valueAlign&&(d-=b.valueWidth,h="start");f=AmCharts.text(b.container,g,f,b.chart.fontFamily,c,h);f.translate(d,
358 b.ly);b.entries[b.index].push(f);e+=b.valueWidth+2*b.markerLabelGap;f.dItem=a;b.valueLabels.push(f)}b.index++;f=b.markerSize;f<c+7&&(f=c+7,AmCharts.VML&&(f+=3));c=b.container.rect(b.markerSize,0,e,f,0,0).attr({stroke:"none",fill:"#ffffff","fill-opacity":.005});c.dItem=a;b.entries[b.index-1].push(c);c.mouseover(function(){b.rollOverLabel(a)}).mouseout(function(){b.rollOutLabel(a)}).click(function(){b.clickLabel(a)})}},createV:function(){var a=this.markerSize;return AmCharts.polygon(this.container,
359 [a/5,a/2,a-a/5,a/2],[a/3,a-a/5,a/5,a/1.7],this.switchColor)},createX:function(){var a=(this.markerSize-4)/2,b={stroke:this.switchColor,"stroke-width":3},c=this.container,d=AmCharts.line(c,[-a,a],[-a,a]).attr(b),a=AmCharts.line(c,[-a,a],[a,-a]).attr(b);return this.container.set([d,a])},createMarker:function(a,b,c,d,e,f,g,h){var k=this.markerSize,l=this.container;e||(e=this.markerBorderColor);e||(e=b);isNaN(d)&&(d=this.markerBorderThickness);isNaN(f)&&(f=this.markerBorderAlpha);return AmCharts.bullet(l,
360 a,k,b,c,d,e,f,k,g,h)},validateNow:function(){this.invalidateSize()},updateValues:function(){var a=this.valueLabels,b=this.chart,c,d=this.data;for(c=0;c<a.length;c++){var e=a[c],f=e.dItem,g=" ";if(d)f.value?e.text(f.value):e.text("");else{if(void 0!==f.type){var h=f.currentDataItem,k=this.periodValueText;f.legendPeriodValueText&&(k=f.legendPeriodValueText);h?(g=this.valueText,f.legendValueText&&(g=f.legendValueText),g=b.formatString(g,h)):k&&(g=b.formatPeriodString(k,f))}else g=b.formatString(this.valueText,
361 f);if(k=this.valueFunction)h&&(f=h),g=k(f,g);e.text(g)}}},renderFix:function(){if(!AmCharts.VML){var a=this.container;a&&a.renderFix()}},destroy:function(){this.div.innerHTML="";AmCharts.remove(this.set)}});AmCharts.formatMilliseconds=function(a,b){if(-1!=a.indexOf("fff")){var c=b.getMilliseconds(),d=String(c);10>c&&(d="00"+c);10<=c&&100>c&&(d="0"+c);a=a.replace(/fff/g,d)}return a};AmCharts.extractPeriod=function(a){var b=AmCharts.stripNumbers(a),c=1;b!=a&&(c=Number(a.slice(0,a.indexOf(b))));return{period:b,count:c}};
362 AmCharts.newDate=function(a,b){return date="fff"==b?AmCharts.useUTC?new Date(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate(),a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds()):new Date(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()):new Date(a)};
363 AmCharts.resetDateToMin=function(a,b,c,d){void 0===d&&(d=1);var e,f,g,h,k,l,m;AmCharts.useUTC?(e=a.getUTCFullYear(),f=a.getUTCMonth(),g=a.getUTCDate(),h=a.getUTCHours(),k=a.getUTCMinutes(),l=a.getUTCSeconds(),m=a.getUTCMilliseconds(),a=a.getUTCDay()):(e=a.getFullYear(),f=a.getMonth(),g=a.getDate(),h=a.getHours(),k=a.getMinutes(),l=a.getSeconds(),m=a.getMilliseconds(),a=a.getDay());switch(b){case "YYYY":e=Math.floor(e/c)*c;f=0;g=1;m=l=k=h=0;break;case "MM":f=Math.floor(f/c)*c;g=1;m=l=k=h=0;break;case "WW":0===
364 a&&0<d&&(a=7);g=g-a+d;m=l=k=h=0;break;case "DD":m=l=k=h=0;break;case "hh":h=Math.floor(h/c)*c;m=l=k=0;break;case "mm":k=Math.floor(k/c)*c;m=l=0;break;case "ss":l=Math.floor(l/c)*c;m=0;break;case "fff":m=Math.floor(m/c)*c}AmCharts.useUTC?(a=new Date,a.setUTCFullYear(e,f,g),a.setUTCHours(h,k,l,m)):a=new Date(e,f,g,h,k,l,m);return a};
365 AmCharts.getPeriodDuration=function(a,b){void 0===b&&(b=1);var c;switch(a){case "YYYY":c=316224E5;break;case "MM":c=26784E5;break;case "WW":c=6048E5;break;case "DD":c=864E5;break;case "hh":c=36E5;break;case "mm":c=6E4;break;case "ss":c=1E3;break;case "fff":c=1}return c*b};AmCharts.intervals={s:{nextInterval:"ss",contains:1E3},ss:{nextInterval:"mm",contains:60,count:0},mm:{nextInterval:"hh",contains:60,count:1},hh:{nextInterval:"DD",contains:24,count:2},DD:{nextInterval:"",contains:Infinity,count:3}};
366 AmCharts.getMaxInterval=function(a,b){var c=AmCharts.intervals;return a>=c[b].contains?(a=Math.round(a/c[b].contains),b=c[b].nextInterval,AmCharts.getMaxInterval(a,b)):"ss"==b?c[b].nextInterval:b};AmCharts.dayNames="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" ");AmCharts.shortDayNames="Sun Mon Tue Wed Thu Fri Sat".split(" ");AmCharts.monthNames="January February March April May June July August September October November December".split(" ");AmCharts.shortMonthNames="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ");
367 AmCharts.getWeekNumber=function(a){a=new Date(a);a.setHours(0,0,0);a.setDate(a.getDate()+4-(a.getDay()||7));var b=new Date(a.getFullYear(),0,1);return Math.ceil(((a-b)/864E5+1)/7)};
368 AmCharts.stringToDate=function(a,b){var c={},d=[{pattern:"YYYY",period:"year"},{pattern:"YY",period:"year"},{pattern:"MM",period:"month"},{pattern:"M",period:"month"},{pattern:"DD",period:"date"},{pattern:"D",period:"date"},{pattern:"JJ",period:"hours"},{pattern:"J",period:"hours"},{pattern:"HH",period:"hours"},{pattern:"H",period:"hours"},{pattern:"KK",period:"hours"},{pattern:"K",period:"hours"},{pattern:"LL",period:"hours"},{pattern:"L",period:"hours"},{pattern:"NN",period:"minutes"},{pattern:"N",
369 period:"minutes"},{pattern:"SS",period:"seconds"},{pattern:"S",period:"seconds"},{pattern:"QQQ",period:"milliseconds"},{pattern:"QQ",period:"milliseconds"},{pattern:"Q",period:"milliseconds"}],e=!0,f=b.indexOf("AA");-1!=f&&(a.substr(f,2),"pm"==a.toLowerCase&&(e=!1));var f=b,g,h,k;for(k=0;k<d.length;k++)h=d[k].period,c[h]=0,"date"==h&&(c[h]=1);for(k=0;k<d.length;k++)if(g=d[k].pattern,h=d[k].period,-1!=b.indexOf(g)){var l=AmCharts.getFromDateString(g,a,f);b=b.replace(g,"");if("KK"==g||"K"==g||"LL"==
370 g||"L"==g)e||(l+=12);c[h]=l}return new Date(c.year,c.month,c.date,c.hours,c.minutes,c.seconds,c.milliseconds)};AmCharts.getFromDateString=function(a,b,c){if(void 0!==b)return c=c.indexOf(a),b=b.substr(c,a.length),"0"==b.charAt(0)&&(b=b.substr(1,b.length-1)),b=Number(b),isNaN(b)&&(b=0),-1!=a.indexOf("M")&&b--,b};
371 AmCharts.formatDate=function(a,b){var c,d,e,f,g,h,k,l,m=AmCharts.getWeekNumber(a);AmCharts.useUTC?(c=a.getUTCFullYear(),d=a.getUTCMonth(),e=a.getUTCDate(),f=a.getUTCDay(),g=a.getUTCHours(),h=a.getUTCMinutes(),k=a.getUTCSeconds(),l=a.getUTCMilliseconds()):(c=a.getFullYear(),d=a.getMonth(),e=a.getDate(),f=a.getDay(),g=a.getHours(),h=a.getMinutes(),k=a.getSeconds(),l=a.getMilliseconds());var n=String(c).substr(2,2),p=d+1;9>d&&(p="0"+p);var q="0"+f;b=b.replace(/W/g,m);m=g;24==m&&(m=0);var r=m;10>r&&(r=
372 "0"+r);b=b.replace(/JJ/g,r);b=b.replace(/J/g,m);r=g;0===r&&(r=24,-1!=b.indexOf("H")&&e--);m=e;10>e&&(m="0"+e);var s=r;10>s&&(s="0"+s);b=b.replace(/HH/g,s);b=b.replace(/H/g,r);r=g;11<r&&(r-=12);s=r;10>s&&(s="0"+s);b=b.replace(/KK/g,s);b=b.replace(/K/g,r);r=g;0===r&&(r=12);12<r&&(r-=12);s=r;10>s&&(s="0"+s);b=b.replace(/LL/g,s);b=b.replace(/L/g,r);r=h;10>r&&(r="0"+r);b=b.replace(/NN/g,r);b=b.replace(/N/g,h);h=k;10>h&&(h="0"+h);b=b.replace(/SS/g,h);b=b.replace(/S/g,k);k=l;10>k&&(k="00"+k);100>k&&(k="0"+
373 k);h=l;10>h&&(h="00"+h);b=b.replace(/QQQ/g,k);b=b.replace(/QQ/g,h);b=b.replace(/Q/g,l);b=12>g?b.replace(/A/g,"am"):b.replace(/A/g,"pm");b=b.replace(/YYYY/g,"@IIII@");b=b.replace(/YY/g,"@II@");b=b.replace(/MMMM/g,"@XXXX@");b=b.replace(/MMM/g,"@XXX@");b=b.replace(/MM/g,"@XX@");b=b.replace(/M/g,"@X@");b=b.replace(/DD/g,"@RR@");b=b.replace(/D/g,"@R@");b=b.replace(/EEEE/g,"@PPPP@");b=b.replace(/EEE/g,"@PPP@");b=b.replace(/EE/g,"@PP@");b=b.replace(/E/g,"@P@");b=b.replace(/@IIII@/g,c);b=b.replace(/@II@/g,
374 n);b=b.replace(/@XXXX@/g,AmCharts.monthNames[d]);b=b.replace(/@XXX@/g,AmCharts.shortMonthNames[d]);b=b.replace(/@XX@/g,p);b=b.replace(/@X@/g,d+1);b=b.replace(/@RR@/g,m);b=b.replace(/@R@/g,e);b=b.replace(/@PPPP@/g,AmCharts.dayNames[f]);b=b.replace(/@PPP@/g,AmCharts.shortDayNames[f]);b=b.replace(/@PP@/g,q);return b=b.replace(/@P@/g,f)};
375 AmCharts.changeDate=function(a,b,c,d,e){var f=-1;void 0===d&&(d=!0);void 0===e&&(e=!1);!0===d&&(f=1);switch(b){case "YYYY":a.setFullYear(a.getFullYear()+c*f);d||e||a.setDate(a.getDate()+1);break;case "MM":b=a.getMonth();a.setMonth(a.getMonth()+c*f);a.getMonth()>b+c*f&&a.setDate(a.getDate()-1);d||e||a.setDate(a.getDate()+1);break;case "DD":a.setDate(a.getDate()+c*f);break;case "WW":a.setDate(a.getDate()+c*f*7);break;case "hh":a.setHours(a.getHours()+c*f);break;case "mm":a.setMinutes(a.getMinutes()+
376 c*f);break;case "ss":a.setSeconds(a.getSeconds()+c*f);break;case "fff":a.setMilliseconds(a.getMilliseconds()+c*f)}return a};
amcharts/exporting/amexport.js
File was created 1 AmCharts.AmExport = AmCharts.Class({
2 construct: function(chart, cfg, init ) {
3 var _this = this;
4 _this.DEBUG = false;
5 _this.chart = chart;
6 _this.canvas = null;
7 _this.svgs = [];
8 _this.userCFG = cfg;
9
10 _this.buttonIcon = 'export.png';
11 _this.exportPNG = true;
12 _this.exportPDF = false;
13 _this.exportJPG = false;
14 _this.exportSVG = false;
15 //_this.left;
16 _this.right = 0;
17 //_this.bottom;
18 _this.top = 0;
19 //_this.color;
20 _this.buttonRollOverColor = "#EFEFEF";
21 //_this.buttonColor = "#FFFFFF";
22 //_this.buttonRollOverAlpha = 0.5;
23 _this.textRollOverColor = "#CC0000";
24 _this.buttonTitle = "Save chart as an image";
25 _this.buttonAlpha = 0.75;
26 _this.imageFileName = "amChart";
27 _this.imageBackgroundColor = "#FFFFFF";
28
29 if (init) {
30 _this.init();
31 }
32 },
33
34 toCoordinate:function(value){
35 if(value === undefined){
36 return "auto";
37 }
38 if(String(value).indexOf("%") != -1){
39 return value;
40 }
41 else{
42 return value + "px";
43 }
44 },
45
46 init: function(){
47 var _this = this;
48
49 var formats = [];
50 if (_this.exportPNG) {
51 formats.push("png");
52 }
53 if (_this.exportPDF) {
54 formats.push("pdf");
55 }
56 if (_this.exportJPG) {
57 formats.push("jpg");
58 }
59 if (_this.exportSVG) {
60 formats.push("svg");
61 }
62
63 var menuItems = [];
64 if(formats.length == 1){
65 var format = formats[0];
66 menuItems.push({format:format, iconTitle:_this.buttonTitle, icon:_this.chart.pathToImages + _this.buttonIcon})
67 }
68 else if(formats.length > 1){
69 var subItems = [];
70 for(var i = 0; i < formats.length; i++){
71 subItems.push({format:formats[i], title:formats[i].toUpperCase()});
72 }
73 menuItems.push({onclick: function() {}, icon:_this.chart.pathToImages + _this.buttonIcon, items:subItems})
74 }
75
76
77 var color = _this.color;
78 if(color === undefined){
79 color = _this.chart.color;
80 }
81
82 var buttonColor = _this.buttonColor;
83 if(buttonColor === undefined){
84 buttonColor = "transparent";
85 }
86
87
88 _this.cfg = {
89 menuTop : _this.toCoordinate(_this.top),
90 menuLeft : _this.toCoordinate(_this.left),
91 menuRight : _this.toCoordinate(_this.right),
92 menuBottom : _this.toCoordinate(_this.bottom),
93 menuItems : menuItems,
94 menuItemStyle: {
95 backgroundColor : buttonColor,
96 opacity :_this.buttonAlpha,
97 rollOverBackgroundColor : _this.buttonRollOverColor,
98 color : color,
99 rollOverColor : _this.textRollOverColor,
100 paddingTop : '6px',
101 paddingRight : '6px',
102 paddingBottom : '6px',
103 paddingLeft : '6px',
104 marginTop : '0px',
105 marginRight : '0px',
106 marginBottom : '0px',
107 marginLeft : '0px',
108 textAlign : 'left',
109 textDecoration : 'none',
110 fontFamily : _this.chart.fontFamily,
111 fontSize : _this.chart.fontSize + 'px'
112 },
113 menuItemOutput: {
114 backgroundColor : _this.imageBackgroundColor,
115 fileName : _this.imageFileName,
116 format : 'png',
117 output : 'dataurlnewwindow',
118 render : 'browser',
119 dpi : 90,
120 onclick : function(instance, config, event) {
121 event.preventDefault();
122 if(_this.chart.prepareForExport){
123 _this.chart.prepareForExport();
124 }
125 instance.output(config);
126 }
127 },
128 removeImagery: true
129 };
130
131 _this.processing = {
132 buffer: [],
133 drawn: 0,
134 timer: 0
135 };
136
137 // Config dependency adaption
138 if (typeof(window.canvg) != 'undefined' && typeof(window.RGBColor) != 'undefined') {
139 _this.cfg.menuItemOutput.render = 'canvg';
140 }
141 if (typeof(window.saveAs) != 'undefined') {
142 _this.cfg.menuItemOutput.output = 'save';
143 }
144 if (AmCharts.isIE && AmCharts.IEversion < 10) {
145 _this.cfg.menuItemOutput.output = 'dataurlnewwindow';
146 }
147
148 // Merge given configs
149 var cfg = _this.userCFG;
150 if (cfg) {
151 cfg.menuItemOutput = AmCharts.extend(_this.cfg.menuItemOutput, cfg.menuItemOutput || {});
152 cfg.menuItemStyle = AmCharts.extend(_this.cfg.menuItemStyle, cfg.menuItemStyle || {});
153 _this.cfg = AmCharts.extend(_this.cfg, cfg);
154 }
155
156 // Add reference to chart
157 _this.chart.AmExport = _this;
158
159 // Listen to the drawer
160 _this.chart.addListener('rendered', function() {
161 _this.setup();
162 });
163
164 // DEBUG; Public reference
165 if (_this.DEBUG) {
166 window.AmExport = _this;
167 }
168 },
169
170
171 /*
172 Simple log function for internal purpose
173 @param **args
174 */
175 log: function() {
176 console.log('AmExport: ', arguments);
177 },
178
179 /* PUBLIC
180 Prepares everything to get exported
181 @param none
182 */
183 setup: function() {
184 var _this = this;
185
186 if (_this.DEBUG == 10) {
187 _this.log('SETUP START');
188 } // DEBUG
189
190
191 if (!AmCharts.isIE || (AmCharts.isIE && AmCharts.IEversion > 9)) {
192 // Build Buttons
193 _this.generateButtons();
194 if (_this.DEBUG == 10) {
195 _this.log('SETUP END');
196 } // DEBUG
197 } else {
198 if (_this.DEBUG == 10) {
199 _this.log('< IE10 NOT SUPPORTED');
200 } // DEBUG
201 }
202 },
203
204 /* PUBLIC
205 Decodes base64 string to binary array
206 @param base64_string
207 @copyright Eli Grey, http://eligrey.com and Devin Samarin, https://github.com/eboyjr
208 */
209 generateBinaryArray: function(base64_string) {
210 var
211 len = base64_string.length,
212 buffer = new Uint8Array(len / 4 * 3 | 0),
213 i = 0,
214 outptr = 0,
215 last = [0, 0],
216 state = 0,
217 save = 0,
218 rank, code, undef, base64_ranks = new Uint8Array([
219 62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, 0, -1, -1, -1, 0, 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, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51
220 ]);
221 while (len--) {
222 code = base64_string.charCodeAt(i++);
223 rank = base64_ranks[code - 43];
224 if (rank !== 255 && rank !== undef) {
225 last[1] = last[0];
226 last[0] = code;
227 save = (save << 6) | rank;
228 state++;
229 if (state === 4) {
230 buffer[outptr++] = save >>> 16;
231 if (last[1] !== 61 /* padding character */ ) {
232 buffer[outptr++] = save >>> 8;
233 }
234 if (last[0] !== 61 /* padding character */ ) {
235 buffer[outptr++] = save;
236 }
237 state = 0;
238 }
239 }
240 }
241 // 2/3 chance there's going to be some null bytes at the end, but that
242 // doesn't really matter with most image formats.
243 // If it somehow matters for you, truncate the buffer up outptr.
244 return buffer;
245 },
246
247 /*
248 Creates blob object
249 @param base64_datastring string
250 @param type string
251 */
252 generateBlob: function(datastring, type) {
253 var _this = this,
254 header_end = type!='image/svg+xml'?datastring.indexOf(',') + 1:0,
255 header = datastring.substring(0, header_end),
256 data = datastring,
257 blob = new Blob();
258
259 if (header.indexOf('base64') != -1) {
260 data = _this.generateBinaryArray(datastring.substring(header_end));
261 }
262
263 // Fake blob for IE
264 if (AmCharts.isIE && AmCharts.IEversion < 10) {
265 blob.data = data;
266 blob.size = data.length;
267 blob.type = type;
268 blob.encoding = 'base64';
269 } else {
270 blob = new Blob([data], {
271 type: type
272 });
273 }
274 return blob;
275 },
276
277 /*
278 Creates PDF object
279 @param config object
280 */
281 generatePDF: function(cfg) {
282 var _this = this,
283 pdf = {
284 output: function() {
285 return '';
286 }
287 },
288 data = _this.canvas.toDataURL('image/jpeg'), // JSPDF ONLY SUPPORTS JPG
289 width = (_this.canvas.width * 25.4) / cfg.dpi,
290 height = (_this.canvas.height * 25.4) / cfg.dpi;
291
292 // Check
293 if (window.jsPDF) {
294 pdf = new jsPDF();
295 if (pdf.addImage) {
296 pdf.addImage(data, 'JPEG', 0, 0, width, height);
297 } else {
298 alert("Missing jsPDF plugin; Please add the 'addImage' plugin.");
299 }
300 } else {
301 alert("Missing jsPDF lib; Don't forget to add the addImage plugin.");
302 }
303
304 return pdf;
305 },
306
307 /*
308 Creates the CANVAS to receive the image data
309 @param format void()
310 @param callback; given callback function which returns the blob or datastring of the configured ouput type
311 */
312 output: function(cfg, externalCallback) {
313 var _this = this;
314 cfg = AmCharts.extend(AmCharts.extend({}, _this.cfg.menuItemOutput), cfg || {});
315
316 /* PRIVATE
317 Callback function which gets called after the drawing process is done
318 @param none
319 */
320 function internalCallback() {
321 var data = null;
322 var blob;
323 if (_this.DEBUG == 10) {
324 _this.log('OUTPUT', cfg.format);
325 } // DEBUG
326
327 // SVG
328 if (cfg.format == 'image/svg+xml' || cfg.format == 'svg') {
329 data = _this.generateSVG();
330 blob = _this.generateBlob(data, 'image/svg+xml');
331
332 if (cfg.output == 'save') {
333 saveAs(blob, cfg.fileName + '.svg');
334 } else if (cfg.output == 'datastring' || cfg.output == 'datauristring' || cfg.output == 'dataurlstring') {
335 blob = 'data:image/svg+xml;base64,' + btoa(data);
336 } else if (cfg.output == 'dataurlnewwindow') {
337 window.open('data:image/svg+xml;base64,' + btoa(data));
338 } else if (cfg.output == 'datauri' || cfg.output == 'dataurl') {
339 location.href = 'data:image/svg+xml;base64,' + btoa(data);
340 } else if (cfg.output == 'datastream') {
341 location.href = 'data:image/octet-stream;base64,' + data;
342 }
343
344 if (externalCallback)
345 externalCallback.apply(_this, [blob]);
346
347 // PDF
348 } else if (cfg.format == 'application/pdf' || cfg.format == 'pdf') {
349 data = _this.generatePDF(cfg).output('dataurlstring');
350 blob = _this.generateBlob(data, 'application/pdf');
351
352 if (cfg.output == 'save') {
353 saveAs(blob, cfg.fileName + '.pdf');
354 } else if (cfg.output == 'datastring' || cfg.output == 'datauristring' || cfg.output == 'dataurlstring') {
355 blob = data;
356 } else if (cfg.output == 'dataurlnewwindow') {
357 window.open(data);
358 } else if (cfg.output == 'datauri' || cfg.output == 'dataurl') {
359 location.href = data;
360 } else if (cfg.output == 'datastream') {
361 location.href = data.replace('application/pdf', 'application/octet-stream');
362 }
363
364 if (externalCallback)
365 externalCallback.apply(_this, [blob]);
366
367 // PNG
368 } else if (cfg.format == 'image/png' || cfg.format == 'png') {
369 data = _this.canvas.toDataURL('image/png');
370 blob = _this.generateBlob(data, 'image/png');
371
372 if (cfg.output == 'save') {
373 saveAs(blob, cfg.fileName + '.png');
374 } else if (cfg.output == 'datastring' || cfg.output == 'datauristring' || cfg.output == 'dataurlstring') {
375 blob = data;
376 } else if (cfg.output == 'dataurlnewwindow') {
377 window.open(data);
378 } else if (cfg.output == 'datauri' || cfg.output == 'dataurl') {
379 location.href = data;
380 } else if (cfg.output == 'datastream') {
381 location.href = data.replace('image/png', 'image/octet-stream');
382 }
383
384 if (externalCallback)
385 externalCallback.apply(_this, [blob]);
386
387 // JPG
388 } else if (cfg.format == 'image/jpeg' || cfg.format == 'jpeg' || cfg.format == 'jpg') {
389 data = _this.canvas.toDataURL('image/jpeg');
390 blob = _this.generateBlob(data, 'image/jpeg');
391
392 if (cfg.output == 'save') {
393 saveAs(blob, cfg.fileName + '.jpg');
394 } else if (cfg.output == 'datastring' || cfg.output == 'datauristring' || cfg.output == 'dataurlstring') {
395 blob = data;
396 } else if (cfg.output == 'dataurlnewwindow') {
397 window.open(data);
398 } else if (cfg.output == 'datauri' || cfg.output == 'dataurl') {
399 location.href = data;
400 } else if (cfg.output == 'datastream') {
401 location.href = data.replace('image/jpeg', 'image/octet-stream');
402 }
403
404 if (externalCallback)
405 externalCallback.apply(_this, [blob]);
406 }
407
408 }
409
410 return _this.generateOutput(cfg, internalCallback);
411 },
412
413 /* PUBLIC
414 Polifies missing attributes to the SVG and replaces images to embedded base64 images
415 @param none
416 */
417 polifySVG: function(svg) {
418 var _this = this;
419
420 // Recursive function to force the attributes
421 function recursiveChange(svg, tag) {
422 var items = svg.getElementsByTagName(tag);
423 var i = items.length;
424
425 while(i--) {
426 if (_this.cfg.removeImagery) {
427 items[i].parentNode.removeChild(items[i]);
428
429 } else {
430 var image = document.createElement('img');
431 var canvas = document.createElement('canvas');
432 var ctx = canvas.getContext('2d');
433
434 canvas.width = items[i].getAttribute('width');
435 canvas.height = items[i].getAttribute('height');
436 image.src = items[i].getAttribute('xlink:href');
437 image.width = items[i].getAttribute('width');
438 image.height = items[i].getAttribute('height');
439
440 try {
441 ctx.drawImage(image, 0, 0, image.width, image.height);
442 datastring = canvas.toDataURL(); // image.src; // canvas.toDataURL(); //
443 } catch (err) {
444 datastring = image.src; // image.src; // canvas.toDataURL(); //
445
446 _this.log('Tainted canvas, reached browser CORS security; origin from imagery must be equal to the server!');
447 throw new Error(err);
448 }
449
450 items[i].setAttribute('xlink:href', datastring);
451 }
452
453 if (_this.DEBUG == 10) {
454 _this.log('POLIFIED', items[i]);
455 } // DEBUG
456 }
457 }
458
459 // Put some attrs to it; fixed 20/03/14 xmlns is required to produce a valid svg file
460 if (AmCharts.IEversion == 0) {
461 svg.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
462 if ( !_this.cfg.removeImagery ) {
463 svg.setAttribute('xmlns:xlink','http://www.w3.org/1999/xlink');
464 }
465 }
466
467 // DEBUG
468 if (_this.DEBUG == 10) {
469 _this.log('POLIFIED', svg);
470 }
471
472 // Force link adaption
473 recursiveChange(svg, 'pattern');
474 recursiveChange(svg, 'image');
475
476 _this.svgs.push(svg);
477
478 return svg;
479 },
480
481
482 /* PUBLIC
483 Stacks multiple SVGs into one
484 @param none
485 */
486 generateSVG: function() {
487 var _this = this;
488 var context = document.createElement('svg');
489 context.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
490 context.setAttribute('xmlns:xlink','http://www.w3.org/1999/xlink');
491
492 for (var i = 0; i < _this.processing.buffer.length; i++) {
493 var group = document.createElement('g'),
494 data = _this.processing.buffer[i];
495
496 data[0].setAttribute('xmlns', 'http://www.w3.org/2000/svg');
497 data[0].setAttribute('xmlns:xlink','http://www.w3.org/1999/xlink');
498
499 group.setAttribute('transform', 'translate('+data[1].x+','+data[1].y+')');
500 group.appendChild(data[0]);
501 context.appendChild(group);
502 }
503
504 return new XMLSerializer().serializeToString(context);
505 },
506
507 /* PUBLIC
508 Generates the canvas with the given SVGs and configured renderer
509 @param callback; function(); gets called after drawing process on the canvas has been finished
510 */
511 generateOutput: function(cfg, callback) {
512 var _this = this,
513 svgs = _this.chart.div.getElementsByTagName('svg'),
514 canvas = document.createElement('canvas'),
515 context = canvas.getContext('2d'),
516 offset = {
517 y: 0,
518 x: 0
519 },
520 tmp = {};
521
522 // Reset
523 _this.processing.buffer = [];
524 _this.processing.drawn = 0;
525 _this.canvas = canvas;
526 _this.svgs = [];
527
528 // Walkthroug SVGs
529 if (_this.DEBUG == 10) {
530 _this.log('START EXPORT');
531 } // DEBUG
532 if (_this.DEBUG == 10) {
533 _this.log('START BUFFERING');
534 } // DEBUG
535 for (var i = 0; i < svgs.length; i++) {
536 var parent = svgs[i].parentNode,
537 svgX = Number(parent.style.left.slice(0, -2)),
538 svgY = Number(parent.style.top.slice(0, -2)),
539 svgClone = _this.polifySVG(svgs[i].cloneNode(true)),
540 tmp = AmCharts.extend({}, offset);
541
542 // Overtake parent position if given; fixed 20/03/14 distinguish between relativ and others
543 if (parent.style.position == 'relative') {
544 offset.x = svgX ? svgX : offset.x;
545 offset.y = svgY ? svgY : offset.y;
546 } else {
547 offset.x = svgX;
548 offset.y = svgY;
549 }
550
551 _this.processing.buffer.push([svgClone, AmCharts.extend({}, offset)]);
552
553 // Put back from "cache"
554 if (svgY && svgX) {
555 offset = tmp;
556
557 // New offset for next one
558 } else {
559 offset.y += svgY ? 0 : parent.offsetHeight;
560 }
561
562 if (_this.DEBUG == 10) {
563 _this.log('BUFFERED', svgs[i], offset);
564 } // DEBUG
565 }
566 if (_this.DEBUG == 10) {
567 _this.log('END BUFFERING');
568 } // DEBUG
569
570 // Apply background
571 if (_this.DEBUG == 10) {
572 _this.log('START DRAWING', cfg.render);
573 } // DEBUG
574 if (_this.DEBUG == 10) {
575 _this.log('FILL BACKGROUND');
576 } // DEBUG
577 canvas.id = AmCharts.getUniqueId();
578 canvas.width = _this.chart.divRealWidth;
579 canvas.height = _this.chart.divRealHeight;
580
581
582 // Stockchart exception
583 var adapted = {
584 width: false,
585 height: false
586 };
587 if ( _this.chart.periodSelector ) {
588 if ( ['left','right'].indexOf(_this.chart.periodSelector.position) != -1 ) {
589 canvas.width -= _this.chart.periodSelector.div.offsetWidth + 16;
590 adapted.width = true;
591 } else {
592 canvas.height -= _this.chart.periodSelector.div.offsetHeight;
593 adapted.height = true;
594 }
595 }
596
597 if ( _this.chart.dataSetSelector ) {
598 if ( ['left','right'].indexOf(_this.chart.dataSetSelector.position) != -1 ) {
599 if ( !adapted.width ) {
600 canvas.width -= _this.chart.dataSetSelector.div.offsetWidth + 16;
601 }
602 } else {
603 canvas.height -= _this.chart.dataSetSelector.div.offsetHeight;
604 }
605 }
606
607 // Set given background; jpeg default
608 if (cfg.backgroundColor || cfg.format == 'image/jpeg') {
609 context.fillStyle = cfg.backgroundColor || '#FFFFFF';
610 context.fillRect(0, 0, canvas.width, canvas.height);
611 }
612
613 /* PRIVATE
614 Recursive function to draw the images to the canvas;
615 @param none;
616 */
617 function drawItWhenItsLoaded() {
618 var img, buffer, offset, source;
619
620 // DRAWING PROCESS DONE
621 if (_this.processing.buffer.length == _this.processing.drawn || cfg.format == 'svg' ) {
622 if (_this.DEBUG == 10) {
623 _this.log('END DRAWING');
624 } // DEBUG
625 return callback();
626
627 // LOOPING LUI
628 } else {
629 if (_this.DEBUG == 10) {
630 _this.log('DRAW', _this.processing.drawn + 1, 'OF', _this.processing.buffer.length);
631 } // DEBUG
632
633 buffer = _this.processing.buffer[_this.processing.drawn];
634 source = new XMLSerializer().serializeToString(buffer[0]); //source = 'data:image/svg+xml;base64,' + btoa();
635 offset = buffer[1];
636
637 if (_this.DEBUG == 10) {
638 _this.log('SOURCE', source);
639 } // DEBUG
640
641 // NATIVE
642 if (cfg.render == 'browser') {
643 img = new Image();
644 img.id = AmCharts.getUniqueId();
645 source = 'data:image/svg+xml;base64,' + btoa(source);
646
647 //img.crossOrigin = "Anonymous";
648 img.onload = function() {
649 context.drawImage(this, buffer[1].x, buffer[1].y);
650 _this.processing.drawn++;
651
652 if (_this.DEBUG == 10) {
653 _this.log('ONLOAD', this);
654 } // DEBUG
655 drawItWhenItsLoaded();
656 };
657 img.onerror = function() {
658 if (_this.DEBUG == 10) {
659 _this.log('ONERROR', this);
660 } // DEBUG
661 context.drawImage(this, buffer[1].x, buffer[1].y);
662 _this.processing.drawn++;
663 drawItWhenItsLoaded();
664 };
665 img.src = source;
666
667 if (_this.DEBUG == 10) {
668 _this.log('ADD', img);
669 } // DEBUG
670 if (img.complete || typeof(img.complete) == 'undefined' || img.complete === undefined) {
671 if (_this.DEBUG == 10) {
672 _this.log('FORCE ONLOAD', img);
673 } // DEBUG
674 img.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";
675 img.src = source;
676 }
677
678 // CANVG
679 } else if (cfg.render == 'canvg') {
680 canvg(canvas, source, {
681 offsetX: offset.x,
682 offsetY: offset.y,
683 ignoreMouse: true,
684 ignoreAnimation: true,
685 ignoreDimensions: true,
686 ignoreClear: true,
687 renderCallback: function() {
688 _this.processing.drawn++;
689 drawItWhenItsLoaded();
690 }
691 });
692 }
693 }
694 }
695 return drawItWhenItsLoaded();
696 },
697
698 /*
699 Generates the export menu to trigger the exportation
700 @param none;
701 */
702 generateButtons: function() {
703 var _this = this,
704 div = document.createElement('div'),
705 lvl = 0;
706
707 // Push sublings
708 function createList(items) {
709 var ul = document.createElement('ul');
710
711 ul.setAttribute('style', 'list-style: none; margin: 0; padding: 0;');
712
713 // Walkthrough items
714 for (var i = 0; i < items.length; i++) {
715 var li = document.createElement('li'),
716 img = document.createElement('img'),
717 a = document.createElement('a'),
718 item = items[i],
719 children = null,
720 itemStyle = AmCharts.extend(AmCharts.extend({}, _this.cfg.menuItemStyle), items[i]);
721
722 // MERGE CFG
723 item = AmCharts.extend(AmCharts.extend({}, _this.cfg.menuItemOutput), item);
724
725 // ICON
726 if (item['icon']) {
727 img.alt = '';
728 img.src = item['icon'];
729 img.setAttribute('style', 'margin: 0 auto;border: none;outline: none');
730 if (item['iconTitle']) {
731 img.title = item['iconTitle'];
732 }
733 a.appendChild(img);
734 }
735
736 // TITLE; STYLING
737 a.href = '#';
738 if (item['title']) {
739 img.setAttribute('style', 'margin-right: 5px;');
740 a.innerHTML += item.title;
741 }
742 a.setAttribute('style', 'display: block;');
743 AmCharts.extend(a.style, itemStyle);
744
745 // ONCLICK
746 a.onclick = item.onclick.bind(a, _this, item);
747 li.appendChild(a);
748
749 // APPEND SIBLINGS
750 if (item.items) {
751 children = createList(item.items);
752 li.appendChild(children);
753
754 li.onmouseover = function() {
755 children.style.display = 'block';
756 };
757 li.onmouseout = function() {
758 children.style.display = 'none';
759 };
760 children.style.display = 'none';
761 }
762
763 // Append to parent
764 ul.appendChild(li);
765
766 // Apply hover
767 a.onmouseover = function() {
768 this.style.backgroundColor = itemStyle.rollOverBackgroundColor;
769 this.style.color = itemStyle.rollOverColor;
770 this.style.borderColor = itemStyle.rollOverBorderColor;
771 };
772 a.onmouseout = function() {
773 this.style.backgroundColor = itemStyle.backgroundColor;
774 this.style.color = itemStyle.color;
775 this.style.borderColor = itemStyle.borderColor;
776 };
777 }
778 lvl++;
779
780 if (_this.DEBUG == 10) {
781 _this.log('MENU', ul);
782 } // DEBUG
783
784 return ul;
785 }
786
787 // Style wrapper; Push into chart div
788 div.setAttribute('style', 'width:39px; height:28px; position: absolute;top:' + _this.cfg.menuTop + ';right:' + _this.cfg.menuRight + ';bottom:' + _this.cfg.menuBottom + ';left:' + _this.cfg.menuLeft + ';box-shadow:0px 0px 1px 0px rgba(0,0,0,0);');
789 div.setAttribute('class', 'amExportButton');
790 div.appendChild(createList(_this.cfg.menuItems));
791 _this.chart.containerDiv.appendChild(div);
792 }
793 });
amcharts/exporting/canvg.js
File was created 1 /*
2 * canvg.js - Javascript SVG parser and renderer on Canvas
3 * MIT Licensed
4 * Gabe Lerner (gabelerner@gmail.com)
5 * http://code.google.com/p/canvg/
6 *
7 * Requires: rgbcolor.js - http://www.phpied.com/rgb-color-parser-in-javascript/
8 */
9 (function(){
10 // canvg(target, s)
11 // empty parameters: replace all 'svg' elements on page with 'canvas' elements
12 // target: canvas element or the id of a canvas element
13 // s: svg string, url to svg file, or xml document
14 // opts: optional hash of options
15 // ignoreMouse: true => ignore mouse events
16 // ignoreAnimation: true => ignore animations
17 // ignoreDimensions: true => does not try to resize canvas
18 // ignoreClear: true => does not clear canvas
19 // offsetX: int => draws at a x offset
20 // offsetY: int => draws at a y offset
21 // scaleWidth: int => scales horizontally to width
22 // scaleHeight: int => scales vertically to height
23 // renderCallback: function => will call the function after the first render is completed
24 // forceRedraw: function => will call the function on every frame, if it returns true, will redraw
25 this.canvg = function (target, s, opts) {
26 // no parameters
27 if (target == null && s == null && opts == null) {
28 var svgTags = document.getElementsByTagName('svg');
29 for (var i=0; i<svgTags.length; i++) {
30 var svgTag = svgTags[i];
31 var c = document.createElement('canvas');
32 c.width = svgTag.clientWidth;
33 c.height = svgTag.clientHeight;
34 svgTag.parentNode.insertBefore(c, svgTag);
35 svgTag.parentNode.removeChild(svgTag);
36 var div = document.createElement('div');
37 div.appendChild(svgTag);
38 canvg(c, div.innerHTML);
39 }
40 return;
41 }
42 opts = opts || {};
43
44 if (typeof target == 'string') {
45 target = document.getElementById(target);
46 }
47
48 // store class on canvas
49 if (target.svg != null) target.svg.stop();
50 var svg = build();
51 // on i.e. 8 for flash canvas, we can't assign the property so check for it
52 if (!(target.childNodes.length == 1 && target.childNodes[0].nodeName == 'OBJECT')) target.svg = svg;
53 svg.opts = opts;
54
55 var ctx = target.getContext('2d');
56 if (typeof(s.documentElement) != 'undefined') {
57 // load from xml doc
58 svg.loadXmlDoc(ctx, s);
59 }
60 else if (s.substr(0,1) == '<') {
61 // load from xml string
62 svg.loadXml(ctx, s);
63 }
64 else {
65 // load from url
66 svg.load(ctx, s);
67 }
68 }
69
70 function build() {
71 var svg = { };
72
73 svg.FRAMERATE = 30;
74 svg.MAX_VIRTUAL_PIXELS = 30000;
75
76 // globals
77 svg.init = function(ctx) {
78 var uniqueId = 0;
79 svg.UniqueId = function () { uniqueId++; return 'canvg' + uniqueId; };
80 svg.Definitions = {};
81 svg.Styles = {};
82 svg.Animations = [];
83 svg.Images = [];
84 svg.ctx = ctx;
85 svg.ViewPort = new (function () {
86 this.viewPorts = [];
87 this.Clear = function() { this.viewPorts = []; }
88 this.SetCurrent = function(width, height) { this.viewPorts.push({ width: width, height: height }); }
89 this.RemoveCurrent = function() { this.viewPorts.pop(); }
90 this.Current = function() { return this.viewPorts[this.viewPorts.length - 1]; }
91 this.width = function() { return this.Current().width; }
92 this.height = function() { return this.Current().height; }
93 this.ComputeSize = function(d) {
94 if (d != null && typeof(d) == 'number') return d;
95 if (d == 'x') return this.width();
96 if (d == 'y') return this.height();
97 return Math.sqrt(Math.pow(this.width(), 2) + Math.pow(this.height(), 2)) / Math.sqrt(2);
98 }
99 });
100 }
101 svg.init();
102
103 // images loaded
104 svg.ImagesLoaded = function() {
105 for (var i=0; i<svg.Images.length; i++) {
106 if (!svg.Images[i].loaded) return false;
107 }
108 return true;
109 }
110
111 // trim
112 svg.trim = function(s) { return s.replace(/^\s+|\s+$/g, ''); }
113
114 // compress spaces
115 svg.compressSpaces = function(s) { return s.replace(/[\s\r\t\n]+/gm,' '); }
116
117 // ajax
118 svg.ajax = function(url) {
119 var AJAX;
120 if(window.XMLHttpRequest){AJAX=new XMLHttpRequest();}
121 else{AJAX=new ActiveXObject('Microsoft.XMLHTTP');}
122 if(AJAX){
123 AJAX.open('GET',url,false);
124 AJAX.send(null);
125 return AJAX.responseText;
126 }
127 return null;
128 }
129
130 // parse xml
131
132 svg.parseXml = function(xml) {
133 if (window.DOMParser)
134 {
135 var parser = new DOMParser();
136 return parser.parseFromString(xml, 'text/xml');
137 }
138 else
139 {
140 xml = xml.replace(/<!DOCTYPE svg[^>]*>/, '');
141 var xmlDoc = new ActiveXObject('Microsoft.XMLDOM');
142 xmlDoc.async = 'false';
143 xmlDoc.loadXML(xml);
144 return xmlDoc;
145 }
146 }
147
148 svg.Property = function(name, value) {
149 this.name = name;
150 this.value = value;
151 }
152 svg.Property.prototype.getValue = function() {
153 return this.value;
154 }
155
156 svg.Property.prototype.hasValue = function() {
157 return (this.value != null && this.value !== '');
158 }
159
160 // return the numerical value of the property
161 svg.Property.prototype.numValue = function() {
162 if (!this.hasValue()) return 0;
163
164 var n = parseFloat(this.value);
165 if ((this.value + '').match(/%$/)) {
166 n = n / 100.0;
167 }
168 return n;
169 }
170
171 svg.Property.prototype.valueOrDefault = function(def) {
172 if (this.hasValue()) return this.value;
173 return def;
174 }
175
176 svg.Property.prototype.numValueOrDefault = function(def) {
177 if (this.hasValue()) return this.numValue();
178 return def;
179 }
180
181 // color extensions
182 // augment the current color value with the opacity
183 svg.Property.prototype.addOpacity = function(opacity) {
184 var newValue = this.value;
185 if (opacity != null && opacity != '' && typeof(this.value)=='string') { // can only add opacity to colors, not patterns
186 var color = new RGBColor(this.value);
187 if (color.ok) {
188 newValue = 'rgba(' + color.r + ', ' + color.g + ', ' + color.b + ', ' + opacity + ')';
189 }
190 }
191 return new svg.Property(this.name, newValue);
192 }
193
194 // definition extensions
195 // get the definition from the definitions table
196 svg.Property.prototype.getDefinition = function() {
197 var name = this.value.match(/#([^\)'"]+)/);
198 if (name) { name = name[1]; }
199 if (!name) { name = this.value; }
200 return svg.Definitions[name];
201 }
202
203 svg.Property.prototype.isUrlDefinition = function() {
204 return this.value.indexOf('url(') == 0
205 }
206
207 svg.Property.prototype.getFillStyleDefinition = function(e, opacityProp) {
208 var def = this.getDefinition();
209
210 // gradient
211 if (def != null && def.createGradient) {
212 return def.createGradient(svg.ctx, e, opacityProp);
213 }
214
215 // pattern
216 if (def != null && def.createPattern) {
217 if (def.getHrefAttribute().hasValue()) {
218 var pt = def.attribute('patternTransform');
219 def = def.getHrefAttribute().getDefinition();
220 if (pt.hasValue()) { def.attribute('patternTransform', true).value = pt.value; }
221 }
222 return def.createPattern(svg.ctx, e);
223 }
224
225 return null;
226 }
227
228 // length extensions
229 svg.Property.prototype.getDPI = function(viewPort) {
230 return 96.0; // TODO: compute?
231 }
232
233 svg.Property.prototype.getEM = function(viewPort) {
234 var em = 12;
235
236 var fontSize = new svg.Property('fontSize', svg.Font.Parse(svg.ctx.font).fontSize);
237 if (fontSize.hasValue()) em = fontSize.toPixels(viewPort);
238
239 return em;
240 }
241
242 svg.Property.prototype.getUnits = function() {
243 var s = this.value+'';
244 return s.replace(/[0-9\.\-]/g,'');
245 }
246
247 // get the length as pixels
248 svg.Property.prototype.toPixels = function(viewPort, processPercent) {
249 if (!this.hasValue()) return 0;
250 var s = this.value+'';
251 if (s.match(/em$/)) return this.numValue() * this.getEM(viewPort);
252 if (s.match(/ex$/)) return this.numValue() * this.getEM(viewPort) / 2.0;
253 if (s.match(/px$/)) return this.numValue();
254 if (s.match(/pt$/)) return this.numValue() * this.getDPI(viewPort) * (1.0 / 72.0);
255 if (s.match(/pc$/)) return this.numValue() * 15;
256 if (s.match(/cm$/)) return this.numValue() * this.getDPI(viewPort) / 2.54;
257 if (s.match(/mm$/)) return this.numValue() * this.getDPI(viewPort) / 25.4;
258 if (s.match(/in$/)) return this.numValue() * this.getDPI(viewPort);
259 if (s.match(/%$/)) return this.numValue() * svg.ViewPort.ComputeSize(viewPort);
260 var n = this.numValue();
261 if (processPercent && n < 1.0) return n * svg.ViewPort.ComputeSize(viewPort);
262 return n;
263 }
264
265 // time extensions
266 // get the time as milliseconds
267 svg.Property.prototype.toMilliseconds = function() {
268 if (!this.hasValue()) return 0;
269 var s = this.value+'';
270 if (s.match(/s$/)) return this.numValue() * 1000;
271 if (s.match(/ms$/)) return this.numValue();
272 return this.numValue();
273 }
274
275 // angle extensions
276 // get the angle as radians
277 svg.Property.prototype.toRadians = function() {
278 if (!this.hasValue()) return 0;
279 var s = this.value+'';
280 if (s.match(/deg$/)) return this.numValue() * (Math.PI / 180.0);
281 if (s.match(/grad$/)) return this.numValue() * (Math.PI / 200.0);
282 if (s.match(/rad$/)) return this.numValue();
283 return this.numValue() * (Math.PI / 180.0);
284 }
285
286 // fonts
287 svg.Font = new (function() {
288 this.Styles = 'normal|italic|oblique|inherit';
289 this.Variants = 'normal|small-caps|inherit';
290 this.Weights = 'normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit';
291
292 this.CreateFont = function(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit) {
293 var f = inherit != null ? this.Parse(inherit) : this.CreateFont('', '', '', '', '', svg.ctx.font);
294 return {
295 fontFamily: fontFamily || f.fontFamily,
296 fontSize: fontSize || f.fontSize,
297 fontStyle: fontStyle || f.fontStyle,
298 fontWeight: fontWeight || f.fontWeight,
299 fontVariant: fontVariant || f.fontVariant,
300 toString: function () { return [this.fontStyle, this.fontVariant, this.fontWeight, this.fontSize, this.fontFamily].join(' ') }
301 }
302 }
303
304 var that = this;
305 this.Parse = function(s) {
306 var f = {};
307 var d = svg.trim(svg.compressSpaces(s || '')).split(' ');
308 var set = { fontSize: false, fontStyle: false, fontWeight: false, fontVariant: false }
309 var ff = '';
310 for (var i=0; i<d.length; i++) {
311 if (!set.fontStyle && that.Styles.indexOf(d[i]) != -1) { if (d[i] != 'inherit') f.fontStyle = d[i]; set.fontStyle = true; }
312 else if (!set.fontVariant && that.Variants.indexOf(d[i]) != -1) { if (d[i] != 'inherit') f.fontVariant = d[i]; set.fontStyle = set.fontVariant = true; }
313 else if (!set.fontWeight && that.Weights.indexOf(d[i]) != -1) { if (d[i] != 'inherit') f.fontWeight = d[i]; set.fontStyle = set.fontVariant = set.fontWeight = true; }
314 else if (!set.fontSize) { if (d[i] != 'inherit') f.fontSize = d[i].split('/')[0]; set.fontStyle = set.fontVariant = set.fontWeight = set.fontSize = true; }
315 else { if (d[i] != 'inherit') ff += d[i]; }
316 } if (ff != '') f.fontFamily = ff;
317 return f;
318 }
319 });
320
321 // points and paths
322 svg.ToNumberArray = function(s) {
323 var a = svg.trim(svg.compressSpaces((s || '').replace(/,/g, ' '))).split(' ');
324 for (var i=0; i<a.length; i++) {
325 a[i] = parseFloat(a[i]);
326 }
327 return a;
328 }
329 svg.Point = function(x, y) {
330 this.x = x;
331 this.y = y;
332 }
333 svg.Point.prototype.angleTo = function(p) {
334 return Math.atan2(p.y - this.y, p.x - this.x);
335 }
336
337 svg.Point.prototype.applyTransform = function(v) {
338 var xp = this.x * v[0] + this.y * v[2] + v[4];
339 var yp = this.x * v[1] + this.y * v[3] + v[5];
340 this.x = xp;
341 this.y = yp;
342 }
343
344 svg.CreatePoint = function(s) {
345 var a = svg.ToNumberArray(s);
346 return new svg.Point(a[0], a[1]);
347 }
348 svg.CreatePath = function(s) {
349 var a = svg.ToNumberArray(s);
350 var path = [];
351 for (var i=0; i<a.length; i+=2) {
352 path.push(new svg.Point(a[i], a[i+1]));
353 }
354 return path;
355 }
356
357 // bounding box
358 svg.BoundingBox = function(x1, y1, x2, y2) { // pass in initial points if you want
359 this.x1 = Number.NaN;
360 this.y1 = Number.NaN;
361 this.x2 = Number.NaN;
362 this.y2 = Number.NaN;
363
364 this.x = function() { return this.x1; }
365 this.y = function() { return this.y1; }
366 this.width = function() { return this.x2 - this.x1; }
367 this.height = function() { return this.y2 - this.y1; }
368
369 this.addPoint = function(x, y) {
370 if (x != null) {
371 if (isNaN(this.x1) || isNaN(this.x2)) {
372 this.x1 = x;
373 this.x2 = x;
374 }
375 if (x < this.x1) this.x1 = x;
376 if (x > this.x2) this.x2 = x;
377 }
378
379 if (y != null) {
380 if (isNaN(this.y1) || isNaN(this.y2)) {
381 this.y1 = y;
382 this.y2 = y;
383 }
384 if (y < this.y1) this.y1 = y;
385 if (y > this.y2) this.y2 = y;
386 }
387 }
388 this.addX = function(x) { this.addPoint(x, null); }
389 this.addY = function(y) { this.addPoint(null, y); }
390
391 this.addBoundingBox = function(bb) {
392 this.addPoint(bb.x1, bb.y1);
393 this.addPoint(bb.x2, bb.y2);
394 }
395
396 this.addQuadraticCurve = function(p0x, p0y, p1x, p1y, p2x, p2y) {
397 var cp1x = p0x + 2/3 * (p1x - p0x); // CP1 = QP0 + 2/3 *(QP1-QP0)
398 var cp1y = p0y + 2/3 * (p1y - p0y); // CP1 = QP0 + 2/3 *(QP1-QP0)
399 var cp2x = cp1x + 1/3 * (p2x - p0x); // CP2 = CP1 + 1/3 *(QP2-QP0)
400 var cp2y = cp1y + 1/3 * (p2y - p0y); // CP2 = CP1 + 1/3 *(QP2-QP0)
401 this.addBezierCurve(p0x, p0y, cp1x, cp2x, cp1y, cp2y, p2x, p2y);
402 }
403
404 this.addBezierCurve = function(p0x, p0y, p1x, p1y, p2x, p2y, p3x, p3y) {
405 // from http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html
406 var p0 = [p0x, p0y], p1 = [p1x, p1y], p2 = [p2x, p2y], p3 = [p3x, p3y];
407 this.addPoint(p0[0], p0[1]);
408 this.addPoint(p3[0], p3[1]);
409
410 for (i=0; i<=1; i++) {
411 var f = function(t) {
412 return Math.pow(1-t, 3) * p0[i]
413 + 3 * Math.pow(1-t, 2) * t * p1[i]
414 + 3 * (1-t) * Math.pow(t, 2) * p2[i]
415 + Math.pow(t, 3) * p3[i];
416 }
417
418 var b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i];
419 var a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i];
420 var c = 3 * p1[i] - 3 * p0[i];
421
422 if (a == 0) {
423 if (b == 0) continue;
424 var t = -c / b;
425 if (0 < t && t < 1) {
426 if (i == 0) this.addX(f(t));
427 if (i == 1) this.addY(f(t));
428 }
429 continue;
430 }
431
432 var b2ac = Math.pow(b, 2) - 4 * c * a;
433 if (b2ac < 0) continue;
434 var t1 = (-b + Math.sqrt(b2ac)) / (2 * a);
435 if (0 < t1 && t1 < 1) {
436 if (i == 0) this.addX(f(t1));
437 if (i == 1) this.addY(f(t1));
438 }
439 var t2 = (-b - Math.sqrt(b2ac)) / (2 * a);
440 if (0 < t2 && t2 < 1) {
441 if (i == 0) this.addX(f(t2));
442 if (i == 1) this.addY(f(t2));
443 }
444 }
445 }
446
447 this.isPointInBox = function(x, y) {
448 return (this.x1 <= x && x <= this.x2 && this.y1 <= y && y <= this.y2);
449 }
450
451 this.addPoint(x1, y1);
452 this.addPoint(x2, y2);
453 }
454
455 // transforms
456 svg.Transform = function(v) {
457 var that = this;
458 this.Type = {}
459
460 // translate
461 this.Type.translate = function(s) {
462 this.p = svg.CreatePoint(s);
463 this.apply = function(ctx) {
464 ctx.translate(this.p.x || 0.0, this.p.y || 0.0);
465 }
466 this.unapply = function(ctx) {
467 ctx.translate(-1.0 * this.p.x || 0.0, -1.0 * this.p.y || 0.0);
468 }
469 this.applyToPoint = function(p) {
470 p.applyTransform([1, 0, 0, 1, this.p.x || 0.0, this.p.y || 0.0]);
471 }
472 }
473
474 // rotate
475 this.Type.rotate = function(s) {
476 var a = svg.ToNumberArray(s);
477 this.angle = new svg.Property('angle', a[0]);
478 this.cx = a[1] || 0;
479 this.cy = a[2] || 0;
480 this.apply = function(ctx) {
481 ctx.translate(this.cx, this.cy);
482 ctx.rotate(this.angle.toRadians());
483 ctx.translate(-this.cx, -this.cy);
484 }
485 this.unapply = function(ctx) {
486 ctx.translate(this.cx, this.cy);
487 ctx.rotate(-1.0 * this.angle.toRadians());
488 ctx.translate(-this.cx, -this.cy);
489 }
490 this.applyToPoint = function(p) {
491 var a = this.angle.toRadians();
492 p.applyTransform([1, 0, 0, 1, this.p.x || 0.0, this.p.y || 0.0]);
493 p.applyTransform([Math.cos(a), Math.sin(a), -Math.sin(a), Math.cos(a), 0, 0]);
494 p.applyTransform([1, 0, 0, 1, -this.p.x || 0.0, -this.p.y || 0.0]);
495 }
496 }
497
498 this.Type.scale = function(s) {
499 this.p = svg.CreatePoint(s);
500 this.apply = function(ctx) {
501 ctx.scale(this.p.x || 1.0, this.p.y || this.p.x || 1.0);
502 }
503 this.unapply = function(ctx) {
504 ctx.scale(1.0 / this.p.x || 1.0, 1.0 / this.p.y || this.p.x || 1.0);
505 }
506 this.applyToPoint = function(p) {
507 p.applyTransform([this.p.x || 0.0, 0, 0, this.p.y || 0.0, 0, 0]);
508 }
509 }
510
511 this.Type.matrix = function(s) {
512 this.m = svg.ToNumberArray(s);
513 this.apply = function(ctx) {
514 ctx.transform(this.m[0], this.m[1], this.m[2], this.m[3], this.m[4], this.m[5]);
515 }
516 this.applyToPoint = function(p) {
517 p.applyTransform(this.m);
518 }
519 }
520
521 this.Type.SkewBase = function(s) {
522 this.base = that.Type.matrix;
523 this.base(s);
524 this.angle = new svg.Property('angle', s);
525 }
526 this.Type.SkewBase.prototype = new this.Type.matrix;
527
528 this.Type.skewX = function(s) {
529 this.base = that.Type.SkewBase;
530 this.base(s);
531 this.m = [1, 0, Math.tan(this.angle.toRadians()), 1, 0, 0];
532 }
533 this.Type.skewX.prototype = new this.Type.SkewBase;
534
535 this.Type.skewY = function(s) {
536 this.base = that.Type.SkewBase;
537 this.base(s);
538 this.m = [1, Math.tan(this.angle.toRadians()), 0, 1, 0, 0];
539 }
540 this.Type.skewY.prototype = new this.Type.SkewBase;
541
542 this.transforms = [];
543
544 this.apply = function(ctx) {
545 for (var i=0; i<this.transforms.length; i++) {
546 this.transforms[i].apply(ctx);
547 }
548 }
549
550 this.unapply = function(ctx) {
551 for (var i=this.transforms.length-1; i>=0; i--) {
552 this.transforms[i].unapply(ctx);
553 }
554 }
555
556 this.applyToPoint = function(p) {
557 for (var i=0; i<this.transforms.length; i++) {
558 this.transforms[i].applyToPoint(p);
559 }
560 }
561
562 var data = svg.trim(svg.compressSpaces(v)).replace(/\)(\s?,\s?)/g,') ').split(/\s(?=[a-z])/);
563 for (var i=0; i<data.length; i++) {
564 var type = svg.trim(data[i].split('(')[0]);
565 var s = data[i].split('(')[1].replace(')','');
566 var transform = new this.Type[type](s);
567 transform.type = type;
568 this.transforms.push(transform);
569 }
570 }
571
572 // aspect ratio
573 svg.AspectRatio = function(ctx, aspectRatio, width, desiredWidth, height, desiredHeight, minX, minY, refX, refY) {
574 // aspect ratio - http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute
575 aspectRatio = svg.compressSpaces(aspectRatio);
576 aspectRatio = aspectRatio.replace(/^defer\s/,''); // ignore defer
577 var align = aspectRatio.split(' ')[0] || 'xMidYMid';
578 var meetOrSlice = aspectRatio.split(' ')[1] || 'meet';
579
580 // calculate scale
581 var scaleX = width / desiredWidth;
582 var scaleY = height / desiredHeight;
583 var scaleMin = Math.min(scaleX, scaleY);
584 var scaleMax = Math.max(scaleX, scaleY);
585 if (meetOrSlice == 'meet') { desiredWidth *= scaleMin; desiredHeight *= scaleMin; }
586 if (meetOrSlice == 'slice') { desiredWidth *= scaleMax; desiredHeight *= scaleMax; }
587
588 refX = new svg.Property('refX', refX);
589 refY = new svg.Property('refY', refY);
590 if (refX.hasValue() && refY.hasValue()) {
591 ctx.translate(-scaleMin * refX.toPixels('x'), -scaleMin * refY.toPixels('y'));
592 }
593 else {
594 // align
595 if (align.match(/^xMid/) && ((meetOrSlice == 'meet' && scaleMin == scaleY) || (meetOrSlice == 'slice' && scaleMax == scaleY))) ctx.translate(width / 2.0 - desiredWidth / 2.0, 0);
596 if (align.match(/YMid$/) && ((meetOrSlice == 'meet' && scaleMin == scaleX) || (meetOrSlice == 'slice' && scaleMax == scaleX))) ctx.translate(0, height / 2.0 - desiredHeight / 2.0);
597 if (align.match(/^xMax/) && ((meetOrSlice == 'meet' && scaleMin == scaleY) || (meetOrSlice == 'slice' && scaleMax == scaleY))) ctx.translate(width - desiredWidth, 0);
598 if (align.match(/YMax$/) && ((meetOrSlice == 'meet' && scaleMin == scaleX) || (meetOrSlice == 'slice' && scaleMax == scaleX))) ctx.translate(0, height - desiredHeight);
599 }
600
601 // scale
602 if (align == 'none') ctx.scale(scaleX, scaleY);
603 else if (meetOrSlice == 'meet') ctx.scale(scaleMin, scaleMin);
604 else if (meetOrSlice == 'slice') ctx.scale(scaleMax, scaleMax);
605
606 // translate
607 ctx.translate(minX == null ? 0 : -minX, minY == null ? 0 : -minY);
608 }
609
610 // elements
611 svg.Element = {}
612
613 svg.EmptyProperty = new svg.Property('EMPTY', '');
614
615 svg.Element.ElementBase = function(node) {
616 this.attributes = {};
617 this.styles = {};
618 this.children = [];
619
620 // get or create attribute
621 this.attribute = function(name, createIfNotExists) {
622 var a = this.attributes[name];
623 if (a != null) return a;
624
625 if (createIfNotExists == true) { a = new svg.Property(name, ''); this.attributes[name] = a; }
626 return a || svg.EmptyProperty;
627 }
628
629 this.getHrefAttribute = function() {
630 for (var a in this.attributes) {
631 if (a.match(/:href$/)) {
632 return this.attributes[a];
633 }
634 }
635 return svg.EmptyProperty;
636 }
637
638 // get or create style, crawls up node tree
639 this.style = function(name, createIfNotExists) {
640 var s = this.styles[name];
641 if (s != null) return s;
642
643 var a = this.attribute(name);
644 if (a != null && a.hasValue()) {
645 this.styles[name] = a; // move up to me to cache
646 return a;
647 }
648
649 var p = this.parent;
650 if (p != null) {
651 var ps = p.style(name);
652 if (ps != null && ps.hasValue()) {
653 return ps;
654 }
655 }
656
657 if (createIfNotExists == true) { s = new svg.Property(name, ''); this.styles[name] = s; }
658 return s || svg.EmptyProperty;
659 }
660
661 // base render
662 this.render = function(ctx) {
663 // don't render display=none
664 if (this.style('display').value == 'none') return;
665
666 // don't render visibility=hidden
667 if (this.attribute('visibility').value == 'hidden') return;
668
669 ctx.save();
670 if (this.attribute('mask').hasValue()) { // mask
671 var mask = this.attribute('mask').getDefinition();
672 if (mask != null) mask.apply(ctx, this);
673 }
674 else if (this.style('filter').hasValue()) { // filter
675 var filter = this.style('filter').getDefinition();
676 if (filter != null) filter.apply(ctx, this);
677 }
678 else {
679 this.setContext(ctx);
680 this.renderChildren(ctx);
681 this.clearContext(ctx);
682 }
683 ctx.restore();
684 }
685
686 // base set context
687 this.setContext = function(ctx) {
688 // OVERRIDE ME!
689 }
690
691 // base clear context
692 this.clearContext = function(ctx) {
693 // OVERRIDE ME!
694 }
695
696 // base render children
697 this.renderChildren = function(ctx) {
698 for (var i=0; i<this.children.length; i++) {
699 this.children[i].render(ctx);
700 }
701 }
702
703 this.addChild = function(childNode, create) {
704 var child = childNode;
705 if (create) child = svg.CreateElement(childNode);
706 child.parent = this;
707 this.children.push(child);
708 }
709
710 if (node != null && node.nodeType == 1) { //ELEMENT_NODE
711 // add children
712 for (var i=0; i<node.childNodes.length; i++) {
713 var childNode = node.childNodes[i];
714 if (childNode.nodeType == 1) this.addChild(childNode, true); //ELEMENT_NODE
715 if (this.captureTextNodes && childNode.nodeType == 3) {
716 var text = childNode.nodeValue || childNode.text || '';
717 if (svg.trim(svg.compressSpaces(text)) != '') {
718 this.addChild(new svg.Element.tspan(childNode), false); // TEXT_NODE
719 }
720 }
721 }
722
723 // add attributes
724 for (var i=0; i<node.attributes.length; i++) {
725 var attribute = node.attributes[i];
726 this.attributes[attribute.nodeName] = new svg.Property(attribute.nodeName, attribute.nodeValue);
727 }
728
729 // add tag styles
730 var styles = svg.Styles[node.nodeName];
731 if (styles != null) {
732 for (var name in styles) {
733 this.styles[name] = styles[name];
734 }
735 }
736
737 // add class styles
738 if (this.attribute('class').hasValue()) {
739 var classes = svg.compressSpaces(this.attribute('class').value).split(' ');
740 for (var j=0; j<classes.length; j++) {
741 styles = svg.Styles['.'+classes[j]];
742 if (styles != null) {
743 for (var name in styles) {
744 this.styles[name] = styles[name];
745 }
746 }
747 styles = svg.Styles[node.nodeName+'.'+classes[j]];
748 if (styles != null) {
749 for (var name in styles) {
750 this.styles[name] = styles[name];
751 }
752 }
753 }
754 }
755
756 // add id styles
757 if (this.attribute('id').hasValue()) {
758 var styles = svg.Styles['#' + this.attribute('id').value];
759 if (styles != null) {
760 for (var name in styles) {
761 this.styles[name] = styles[name];
762 }
763 }
764 }
765
766 // add inline styles
767 if (this.attribute('style').hasValue()) {
768 var styles = this.attribute('style').value.split(';');
769 for (var i=0; i<styles.length; i++) {
770 if (svg.trim(styles[i]) != '') {
771 var style = styles[i].split(':');
772 var name = svg.trim(style[0]);
773 var value = svg.trim(style[1]);
774 this.styles[name] = new svg.Property(name, value);
775 }
776 }
777 }
778
779 // add id
780 if (this.attribute('id').hasValue()) {
781 if (svg.Definitions[this.attribute('id').value] == null) {
782 svg.Definitions[this.attribute('id').value] = this;
783 }
784 }
785 }
786 }
787
788 svg.Element.RenderedElementBase = function(node) {
789 this.base = svg.Element.ElementBase;
790 this.base(node);
791
792 this.setContext = function(ctx) {
793 // fill
794 if (this.style('fill').isUrlDefinition()) {
795 var fs = this.style('fill').getFillStyleDefinition(this, this.style('fill-opacity'));
796 if (fs != null) ctx.fillStyle = fs;
797 }
798 else if (this.style('fill').hasValue()) {
799 var fillStyle = this.style('fill');
800 if (fillStyle.value == 'currentColor') fillStyle.value = this.style('color').value;
801 ctx.fillStyle = (fillStyle.value == 'none' ? 'rgba(0,0,0,0)' : fillStyle.value);
802 }
803 if (this.style('fill-opacity').hasValue()) {
804 var fillStyle = new svg.Property('fill', ctx.fillStyle);
805 fillStyle = fillStyle.addOpacity(this.style('fill-opacity').value);
806 ctx.fillStyle = fillStyle.value;
807 }
808
809 // stroke
810 if (this.style('stroke').isUrlDefinition()) {
811 var fs = this.style('stroke').getFillStyleDefinition(this, this.style('stroke-opacity'));
812 if (fs != null) ctx.strokeStyle = fs;
813 }
814 else if (this.style('stroke').hasValue()) {
815 var strokeStyle = this.style('stroke');
816 if (strokeStyle.value == 'currentColor') strokeStyle.value = this.style('color').value;
817 ctx.strokeStyle = (strokeStyle.value == 'none' ? 'rgba(0,0,0,0)' : strokeStyle.value);
818 }
819 if (this.style('stroke-opacity').hasValue()) {
820 var strokeStyle = new svg.Property('stroke', ctx.strokeStyle);
821 strokeStyle = strokeStyle.addOpacity(this.style('stroke-opacity').value);
822 ctx.strokeStyle = strokeStyle.value;
823 }
824 if (this.style('stroke-width').hasValue()) {
825 var newLineWidth = this.style('stroke-width').toPixels();
826 ctx.lineWidth = newLineWidth == 0 ? 0.001 : newLineWidth; // browsers don't respect 0
827 }
828 if (this.style('stroke-linecap').hasValue()) ctx.lineCap = this.style('stroke-linecap').value;
829 if (this.style('stroke-linejoin').hasValue()) ctx.lineJoin = this.style('stroke-linejoin').value;
830 if (this.style('stroke-miterlimit').hasValue()) ctx.miterLimit = this.style('stroke-miterlimit').value;
831 if (this.style('stroke-dasharray').hasValue()) {
832 var gaps = svg.ToNumberArray(this.style('stroke-dasharray').value);
833 if (typeof(ctx.setLineDash) != 'undefined') { ctx.setLineDash(gaps); }
834 else if (typeof(ctx.webkitLineDash) != 'undefined') { ctx.webkitLineDash = gaps; }
835 else if (typeof(ctx.mozDash ) != 'undefined') { ctx.mozDash = gaps; }
836
837 var offset = this.style('stroke-dashoffset').numValueOrDefault(1);
838 if (typeof(ctx.lineDashOffset) != 'undefined') { ctx.lineDashOffset = offset; }
839 else if (typeof(ctx.webkitLineDashOffset) != 'undefined') { ctx.webkitLineDashOffset = offset; }
840 else if (typeof(ctx.mozDashOffset) != 'undefined') { ctx.mozDashOffset = offset; }
841 }
842
843 // font
844 if (typeof(ctx.font) != 'undefined') {
845 ctx.font = svg.Font.CreateFont(
846 this.style('font-style').value,
847 this.style('font-variant').value,
848 this.style('font-weight').value,
849 this.style('font-size').hasValue() ? this.style('font-size').toPixels() + 'px' : '',
850 this.style('font-family').value).toString();
851 }
852
853 // transform
854 if (this.attribute('transform').hasValue()) {
855 var transform = new svg.Transform(this.attribute('transform').value);
856 transform.apply(ctx);
857 }
858
859 // clip
860 if (this.style('clip-path').hasValue()) {
861 var clip = this.style('clip-path').getDefinition();
862 if (clip != null) clip.apply(ctx);
863 }
864
865 // opacity
866 if (this.style('opacity').hasValue()) {
867 ctx.globalAlpha = this.style('opacity').numValue();
868 }
869 }
870 }
871 svg.Element.RenderedElementBase.prototype = new svg.Element.ElementBase;
872
873 svg.Element.PathElementBase = function(node) {
874 this.base = svg.Element.RenderedElementBase;
875 this.base(node);
876
877 this.path = function(ctx) {
878 if (ctx != null) ctx.beginPath();
879 return new svg.BoundingBox();
880 }
881
882 this.renderChildren = function(ctx) {
883 this.path(ctx);
884 svg.Mouse.checkPath(this, ctx);
885 if (ctx.fillStyle != '') {
886 if (this.attribute('fill-rule').hasValue()) { ctx.fill(this.attribute('fill-rule').value); }
887 else { ctx.fill(); }
888 }
889 if (ctx.strokeStyle != '') ctx.stroke();
890
891 var markers = this.getMarkers();
892 if (markers != null) {
893 if (this.style('marker-start').isUrlDefinition()) {
894 var marker = this.style('marker-start').getDefinition();
895 marker.render(ctx, markers[0][0], markers[0][1]);
896 }
897 if (this.style('marker-mid').isUrlDefinition()) {
898 var marker = this.style('marker-mid').getDefinition();
899 for (var i=1;i<markers.length-1;i++) {
900 marker.render(ctx, markers[i][0], markers[i][1]);
901 }
902 }
903 if (this.style('marker-end').isUrlDefinition()) {
904 var marker = this.style('marker-end').getDefinition();
905 marker.render(ctx, markers[markers.length-1][0], markers[markers.length-1][1]);
906 }
907 }
908 }
909
910 this.getBoundingBox = function() {
911 return this.path();
912 }
913
914 this.getMarkers = function() {
915 return null;
916 }
917 }
918 svg.Element.PathElementBase.prototype = new svg.Element.RenderedElementBase;
919
920 // svg element
921 svg.Element.svg = function(node) {
922 this.base = svg.Element.RenderedElementBase;
923 this.base(node);
924
925 this.baseClearContext = this.clearContext;
926 this.clearContext = function(ctx) {
927 this.baseClearContext(ctx);
928 svg.ViewPort.RemoveCurrent();
929 }
930
931 this.baseSetContext = this.setContext;
932 this.setContext = function(ctx) {
933 // initial values
934 ctx.strokeStyle = 'rgba(0,0,0,0)';
935 ctx.lineCap = 'butt';
936 ctx.lineJoin = 'miter';
937 ctx.miterLimit = 4;
938
939 this.baseSetContext(ctx);
940
941 // create new view port
942 if (!this.attribute('x').hasValue()) this.attribute('x', true).value = 0;
943 if (!this.attribute('y').hasValue()) this.attribute('y', true).value = 0;
944 ctx.translate(this.attribute('x').toPixels('x'), this.attribute('y').toPixels('y'));
945
946 var width = svg.ViewPort.width();
947 var height = svg.ViewPort.height();
948
949 if (!this.attribute('width').hasValue()) this.attribute('width', true).value = '100%';
950 if (!this.attribute('height').hasValue()) this.attribute('height', true).value = '100%';
951 if (typeof(this.root) == 'undefined') {
952 width = this.attribute('width').toPixels('x');
953 height = this.attribute('height').toPixels('y');
954
955 var x = 0;
956 var y = 0;
957 if (this.attribute('refX').hasValue() && this.attribute('refY').hasValue()) {
958 x = -this.attribute('refX').toPixels('x');
959 y = -this.attribute('refY').toPixels('y');
960 }
961
962 ctx.beginPath();
963 ctx.moveTo(x, y);
964 ctx.lineTo(width, y);
965 ctx.lineTo(width, height);
966 ctx.lineTo(x, height);
967 ctx.closePath();
968 ctx.clip();
969 }
970 svg.ViewPort.SetCurrent(width, height);
971
972 // viewbox
973 if (this.attribute('viewBox').hasValue()) {
974 var viewBox = svg.ToNumberArray(this.attribute('viewBox').value);
975 var minX = viewBox[0];
976 var minY = viewBox[1];
977 width = viewBox[2];
978 height = viewBox[3];
979
980 svg.AspectRatio(ctx,
981 this.attribute('preserveAspectRatio').value,
982 svg.ViewPort.width(),
983 width,
984 svg.ViewPort.height(),
985 height,
986 minX,
987 minY,
988 this.attribute('refX').value,
989 this.attribute('refY').value);
990
991 svg.ViewPort.RemoveCurrent();
992 svg.ViewPort.SetCurrent(viewBox[2], viewBox[3]);
993 }
994 }
995 }
996 svg.Element.svg.prototype = new svg.Element.RenderedElementBase;
997
998 // rect element
999 svg.Element.rect = function(node) {
1000 this.base = svg.Element.PathElementBase;
1001 this.base(node);
1002
1003 this.path = function(ctx) {
1004 var x = this.attribute('x').toPixels('x');
1005 var y = this.attribute('y').toPixels('y');
1006 var width = this.attribute('width').toPixels('x');
1007 var height = this.attribute('height').toPixels('y');
1008 var rx = this.attribute('rx').toPixels('x');
1009 var ry = this.attribute('ry').toPixels('y');
1010 if (this.attribute('rx').hasValue() && !this.attribute('ry').hasValue()) ry = rx;
1011 if (this.attribute('ry').hasValue() && !this.attribute('rx').hasValue()) rx = ry;
1012 rx = Math.min(rx, width / 2.0);
1013 ry = Math.min(ry, height / 2.0);
1014 if (ctx != null) {
1015 ctx.beginPath();
1016 ctx.moveTo(x + rx, y);
1017 ctx.lineTo(x + width - rx, y);
1018 ctx.quadraticCurveTo(x + width, y, x + width, y + ry)
1019 ctx.lineTo(x + width, y + height - ry);
1020 ctx.quadraticCurveTo(x + width, y + height, x + width - rx, y + height)
1021 ctx.lineTo(x + rx, y + height);
1022 ctx.quadraticCurveTo(x, y + height, x, y + height - ry)
1023 ctx.lineTo(x, y + ry);
1024 ctx.quadraticCurveTo(x, y, x + rx, y)
1025 ctx.closePath();
1026 }
1027
1028 return new svg.BoundingBox(x, y, x + width, y + height);
1029 }
1030 }
1031 svg.Element.rect.prototype = new svg.Element.PathElementBase;
1032
1033 // circle element
1034 svg.Element.circle = function(node) {
1035 this.base = svg.Element.PathElementBase;
1036 this.base(node);
1037
1038 this.path = function(ctx) {
1039 var cx = this.attribute('cx').toPixels('x');
1040 var cy = this.attribute('cy').toPixels('y');
1041 var r = this.attribute('r').toPixels();
1042
1043 if (ctx != null) {
1044 ctx.beginPath();
1045 ctx.arc(cx, cy, r, 0, Math.PI * 2, true);
1046 ctx.closePath();
1047 }
1048
1049 return new svg.BoundingBox(cx - r, cy - r, cx + r, cy + r);
1050 }
1051 }
1052 svg.Element.circle.prototype = new svg.Element.PathElementBase;
1053
1054 // ellipse element
1055 svg.Element.ellipse = function(node) {
1056 this.base = svg.Element.PathElementBase;
1057 this.base(node);
1058
1059 this.path = function(ctx) {
1060 var KAPPA = 4 * ((Math.sqrt(2) - 1) / 3);
1061 var rx = this.attribute('rx').toPixels('x');
1062 var ry = this.attribute('ry').toPixels('y');
1063 var cx = this.attribute('cx').toPixels('x');
1064 var cy = this.attribute('cy').toPixels('y');
1065
1066 if (ctx != null) {
1067 ctx.beginPath();
1068 ctx.moveTo(cx, cy - ry);
1069 ctx.bezierCurveTo(cx + (KAPPA * rx), cy - ry, cx + rx, cy - (KAPPA * ry), cx + rx, cy);
1070 ctx.bezierCurveTo(cx + rx, cy + (KAPPA * ry), cx + (KAPPA * rx), cy + ry, cx, cy + ry);
1071 ctx.bezierCurveTo(cx - (KAPPA * rx), cy + ry, cx - rx, cy + (KAPPA * ry), cx - rx, cy);
1072 ctx.bezierCurveTo(cx - rx, cy - (KAPPA * ry), cx - (KAPPA * rx), cy - ry, cx, cy - ry);
1073 ctx.closePath();
1074 }
1075
1076 return new svg.BoundingBox(cx - rx, cy - ry, cx + rx, cy + ry);
1077 }
1078 }
1079 svg.Element.ellipse.prototype = new svg.Element.PathElementBase;
1080
1081 // line element
1082 svg.Element.line = function(node) {
1083 this.base = svg.Element.PathElementBase;
1084 this.base(node);
1085
1086 this.getPoints = function() {
1087 return [
1088 new svg.Point(this.attribute('x1').toPixels('x'), this.attribute('y1').toPixels('y')),
1089 new svg.Point(this.attribute('x2').toPixels('x'), this.attribute('y2').toPixels('y'))];
1090 }
1091
1092 this.path = function(ctx) {
1093 var points = this.getPoints();
1094
1095 if (ctx != null) {
1096 ctx.beginPath();
1097 ctx.moveTo(points[0].x, points[0].y);
1098 ctx.lineTo(points[1].x, points[1].y);
1099 }
1100
1101 return new svg.BoundingBox(points[0].x, points[0].y, points[1].x, points[1].y);
1102 }
1103
1104 this.getMarkers = function() {
1105 var points = this.getPoints();
1106 var a = points[0].angleTo(points[1]);
1107 return [[points[0], a], [points[1], a]];
1108 }
1109 }
1110 svg.Element.line.prototype = new svg.Element.PathElementBase;
1111
1112 // polyline element
1113 svg.Element.polyline = function(node) {
1114 this.base = svg.Element.PathElementBase;
1115 this.base(node);
1116
1117 this.points = svg.CreatePath(this.attribute('points').value);
1118 this.path = function(ctx) {
1119 var bb = new svg.BoundingBox(this.points[0].x, this.points[0].y);
1120 if (ctx != null) {
1121 ctx.beginPath();
1122 ctx.moveTo(this.points[0].x, this.points[0].y);
1123 }
1124 for (var i=1; i<this.points.length; i++) {
1125 bb.addPoint(this.points[i].x, this.points[i].y);
1126 if (ctx != null) ctx.lineTo(this.points[i].x, this.points[i].y);
1127 }
1128 return bb;
1129 }
1130
1131 this.getMarkers = function() {
1132 var markers = [];
1133 for (var i=0; i<this.points.length - 1; i++) {
1134 markers.push([this.points[i], this.points[i].angleTo(this.points[i+1])]);
1135 }
1136 markers.push([this.points[this.points.length-1], markers[markers.length-1][1]]);
1137 return markers;
1138 }
1139 }
1140 svg.Element.polyline.prototype = new svg.Element.PathElementBase;
1141
1142 // polygon element
1143 svg.Element.polygon = function(node) {
1144 this.base = svg.Element.polyline;
1145 this.base(node);
1146
1147 this.basePath = this.path;
1148 this.path = function(ctx) {
1149 var bb = this.basePath(ctx);
1150 if (ctx != null) {
1151 ctx.lineTo(this.points[0].x, this.points[0].y);
1152 ctx.closePath();
1153 }
1154 return bb;
1155 }
1156 }
1157 svg.Element.polygon.prototype = new svg.Element.polyline;
1158
1159 // path element
1160 svg.Element.path = function(node) {
1161 this.base = svg.Element.PathElementBase;
1162 this.base(node);
1163
1164 var d = this.attribute('d').value;
1165 // TODO: convert to real lexer based on http://www.w3.org/TR/SVG11/paths.html#PathDataBNF
1166 d = d.replace(/,/gm,' '); // get rid of all commas
1167 d = d.replace(/([MmZzLlHhVvCcSsQqTtAa])([MmZzLlHhVvCcSsQqTtAa])/gm,'$1 $2'); // separate commands from commands
1168 d = d.replace(/([MmZzLlHhVvCcSsQqTtAa])([MmZzLlHhVvCcSsQqTtAa])/gm,'$1 $2'); // separate commands from commands
1169 d = d.replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm,'$1 $2'); // separate commands from points
1170 d = d.replace(/([^\s])([MmZzLlHhVvCcSsQqTtAa])/gm,'$1 $2'); // separate commands from points
1171 d = d.replace(/([0-9])([+\-])/gm,'$1 $2'); // separate digits when no comma
1172 d = d.replace(/(\.[0-9]*)(\.)/gm,'$1 $2'); // separate digits when no comma
1173 d = d.replace(/([Aa](\s+[0-9]+){3})\s+([01])\s*([01])/gm,'$1 $3 $4 '); // shorthand elliptical arc path syntax
1174 d = svg.compressSpaces(d); // compress multiple spaces
1175 d = svg.trim(d);
1176 this.PathParser = new (function(d) {
1177 this.tokens = d.split(' ');
1178
1179 this.reset = function() {
1180 this.i = -1;
1181 this.command = '';
1182 this.previousCommand = '';
1183 this.start = new svg.Point(0, 0);
1184 this.control = new svg.Point(0, 0);
1185 this.current = new svg.Point(0, 0);
1186 this.points = [];
1187 this.angles = [];
1188 }
1189
1190 this.isEnd = function() {
1191 return this.i >= this.tokens.length - 1;
1192 }
1193
1194 this.isCommandOrEnd = function() {
1195 if (this.isEnd()) return true;
1196 return this.tokens[this.i + 1].match(/^[A-Za-z]$/) != null;
1197 }
1198
1199 this.isRelativeCommand = function() {
1200 switch(this.command)
1201 {
1202 case 'm':
1203 case 'l':
1204 case 'h':
1205 case 'v':
1206 case 'c':
1207 case 's':
1208 case 'q':
1209 case 't':
1210 case 'a':
1211 case 'z':
1212 return true;
1213 break;
1214 }
1215 return false;
1216 }
1217
1218 this.getToken = function() {
1219 this.i++;
1220 return this.tokens[this.i];
1221 }
1222
1223 this.getScalar = function() {
1224 return parseFloat(this.getToken());
1225 }
1226
1227 this.nextCommand = function() {
1228 this.previousCommand = this.command;
1229 this.command = this.getToken();
1230 }
1231
1232 this.getPoint = function() {
1233 var p = new svg.Point(this.getScalar(), this.getScalar());
1234 return this.makeAbsolute(p);
1235 }
1236
1237 this.getAsControlPoint = function() {
1238 var p = this.getPoint();
1239 this.control = p;
1240 return p;
1241 }
1242
1243 this.getAsCurrentPoint = function() {
1244 var p = this.getPoint();
1245 this.current = p;
1246 return p;
1247 }
1248
1249 this.getReflectedControlPoint = function() {
1250 if (this.previousCommand.toLowerCase() != 'c' &&
1251 this.previousCommand.toLowerCase() != 's' &&
1252 this.previousCommand.toLowerCase() != 'q' &&
1253 this.previousCommand.toLowerCase() != 't' ){
1254 return this.current;
1255 }
1256
1257 // reflect point
1258 var p = new svg.Point(2 * this.current.x - this.control.x, 2 * this.current.y - this.control.y);
1259 return p;
1260 }
1261
1262 this.makeAbsolute = function(p) {
1263 if (this.isRelativeCommand()) {
1264 p.x += this.current.x;
1265 p.y += this.current.y;
1266 }
1267 return p;
1268 }
1269
1270 this.addMarker = function(p, from, priorTo) {
1271 // if the last angle isn't filled in because we didn't have this point yet ...
1272 if (priorTo != null && this.angles.length > 0 && this.angles[this.angles.length-1] == null) {
1273 this.angles[this.angles.length-1] = this.points[this.points.length-1].angleTo(priorTo);
1274 }
1275 this.addMarkerAngle(p, from == null ? null : from.angleTo(p));
1276 }
1277
1278 this.addMarkerAngle = function(p, a) {
1279 this.points.push(p);
1280 this.angles.push(a);
1281 }
1282
1283 this.getMarkerPoints = function() { return this.points; }
1284 this.getMarkerAngles = function() {
1285 for (var i=0; i<this.angles.length; i++) {
1286 if (this.angles[i] == null) {
1287 for (var j=i+1; j<this.angles.length; j++) {
1288 if (this.angles[j] != null) {
1289 this.angles[i] = this.angles[j];
1290 break;
1291 }
1292 }
1293 }
1294 }
1295 return this.angles;
1296 }
1297 })(d);
1298
1299 this.path = function(ctx) {
1300 var pp = this.PathParser;
1301 pp.reset();
1302
1303 var bb = new svg.BoundingBox();
1304 if (ctx != null) ctx.beginPath();
1305 while (!pp.isEnd()) {
1306 pp.nextCommand();
1307 switch (pp.command) {
1308 case 'M':
1309 case 'm':
1310 var p = pp.getAsCurrentPoint();
1311 pp.addMarker(p);
1312 bb.addPoint(p.x, p.y);
1313 if (ctx != null) ctx.moveTo(p.x, p.y);
1314 pp.start = pp.current;
1315 while (!pp.isCommandOrEnd()) {
1316 var p = pp.getAsCurrentPoint();
1317 pp.addMarker(p, pp.start);
1318 bb.addPoint(p.x, p.y);
1319 if (ctx != null) ctx.lineTo(p.x, p.y);
1320 }
1321 break;
1322 case 'L':
1323 case 'l':
1324 while (!pp.isCommandOrEnd()) {
1325 var c = pp.current;
1326 var p = pp.getAsCurrentPoint();
1327 pp.addMarker(p, c);
1328 bb.addPoint(p.x, p.y);
1329 if (ctx != null) ctx.lineTo(p.x, p.y);
1330 }
1331 break;
1332 case 'H':
1333 case 'h':
1334 while (!pp.isCommandOrEnd()) {
1335 var newP = new svg.Point((pp.isRelativeCommand() ? pp.current.x : 0) + pp.getScalar(), pp.current.y);
1336 pp.addMarker(newP, pp.current);
1337 pp.current = newP;
1338 bb.addPoint(pp.current.x, pp.current.y);
1339 if (ctx != null) ctx.lineTo(pp.current.x, pp.current.y);
1340 }
1341 break;
1342 case 'V':
1343 case 'v':
1344 while (!pp.isCommandOrEnd()) {
1345 var newP = new svg.Point(pp.current.x, (pp.isRelativeCommand() ? pp.current.y : 0) + pp.getScalar());
1346 pp.addMarker(newP, pp.current);
1347 pp.current = newP;
1348 bb.addPoint(pp.current.x, pp.current.y);
1349 if (ctx != null) ctx.lineTo(pp.current.x, pp.current.y);
1350 }
1351 break;
1352 case 'C':
1353 case 'c':
1354 while (!pp.isCommandOrEnd()) {
1355 var curr = pp.current;
1356 var p1 = pp.getPoint();
1357 var cntrl = pp.getAsControlPoint();
1358 var cp = pp.getAsCurrentPoint();
1359 pp.addMarker(cp, cntrl, p1);
1360 bb.addBezierCurve(curr.x, curr.y, p1.x, p1.y, cntrl.x, cntrl.y, cp.x, cp.y);
1361 if (ctx != null) ctx.bezierCurveTo(p1.x, p1.y, cntrl.x, cntrl.y, cp.x, cp.y);
1362 }
1363 break;
1364 case 'S':
1365 case 's':
1366 while (!pp.isCommandOrEnd()) {
1367 var curr = pp.current;
1368 var p1 = pp.getReflectedControlPoint();
1369 var cntrl = pp.getAsControlPoint();
1370 var cp = pp.getAsCurrentPoint();
1371 pp.addMarker(cp, cntrl, p1);
1372 bb.addBezierCurve(curr.x, curr.y, p1.x, p1.y, cntrl.x, cntrl.y, cp.x, cp.y);
1373 if (ctx != null) ctx.bezierCurveTo(p1.x, p1.y, cntrl.x, cntrl.y, cp.x, cp.y);
1374 }
1375 break;
1376 case 'Q':
1377 case 'q':
1378 while (!pp.isCommandOrEnd()) {
1379 var curr = pp.current;
1380 var cntrl = pp.getAsControlPoint();
1381 var cp = pp.getAsCurrentPoint();
1382 pp.addMarker(cp, cntrl, cntrl);
1383 bb.addQuadraticCurve(curr.x, curr.y, cntrl.x, cntrl.y, cp.x, cp.y);
1384 if (ctx != null) ctx.quadraticCurveTo(cntrl.x, cntrl.y, cp.x, cp.y);
1385 }
1386 break;
1387 case 'T':
1388 case 't':
1389 while (!pp.isCommandOrEnd()) {
1390 var curr = pp.current;
1391 var cntrl = pp.getReflectedControlPoint();
1392 pp.control = cntrl;
1393 var cp = pp.getAsCurrentPoint();
1394 pp.addMarker(cp, cntrl, cntrl);
1395 bb.addQuadraticCurve(curr.x, curr.y, cntrl.x, cntrl.y, cp.x, cp.y);
1396 if (ctx != null) ctx.quadraticCurveTo(cntrl.x, cntrl.y, cp.x, cp.y);
1397 }
1398 break;
1399 case 'A':
1400 case 'a':
1401 while (!pp.isCommandOrEnd()) {
1402 var curr = pp.current;
1403 var rx = pp.getScalar();
1404 var ry = pp.getScalar();
1405 var xAxisRotation = pp.getScalar() * (Math.PI / 180.0);
1406 var largeArcFlag = pp.getScalar();
1407 var sweepFlag = pp.getScalar();
1408 var cp = pp.getAsCurrentPoint();
1409
1410 // Conversion from endpoint to center parameterization
1411 // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes
1412 // x1', y1'
1413 var currp = new svg.Point(
1414 Math.cos(xAxisRotation) * (curr.x - cp.x) / 2.0 + Math.sin(xAxisRotation) * (curr.y - cp.y) / 2.0,
1415 -Math.sin(xAxisRotation) * (curr.x - cp.x) / 2.0 + Math.cos(xAxisRotation) * (curr.y - cp.y) / 2.0
1416 );
1417 // adjust radii
1418 var l = Math.pow(currp.x,2)/Math.pow(rx,2)+Math.pow(currp.y,2)/Math.pow(ry,2);
1419 if (l > 1) {
1420 rx *= Math.sqrt(l);
1421 ry *= Math.sqrt(l);
1422 }
1423 // cx', cy'
1424 var s = (largeArcFlag == sweepFlag ? -1 : 1) * Math.sqrt(
1425 ((Math.pow(rx,2)*Math.pow(ry,2))-(Math.pow(rx,2)*Math.pow(currp.y,2))-(Math.pow(ry,2)*Math.pow(currp.x,2))) /
1426 (Math.pow(rx,2)*Math.pow(currp.y,2)+Math.pow(ry,2)*Math.pow(currp.x,2))
1427 );
1428 if (isNaN(s)) s = 0;
1429 var cpp = new svg.Point(s * rx * currp.y / ry, s * -ry * currp.x / rx);
1430 // cx, cy
1431 var centp = new svg.Point(
1432 (curr.x + cp.x) / 2.0 + Math.cos(xAxisRotation) * cpp.x - Math.sin(xAxisRotation) * cpp.y,
1433 (curr.y + cp.y) / 2.0 + Math.sin(xAxisRotation) * cpp.x + Math.cos(xAxisRotation) * cpp.y
1434 );
1435 // vector magnitude
1436 var m = function(v) { return Math.sqrt(Math.pow(v[0],2) + Math.pow(v[1],2)); }
1437 // ratio between two vectors
1438 var r = function(u, v) { return (u[0]*v[0]+u[1]*v[1]) / (m(u)*m(v)) }
1439 // angle between two vectors
1440 var a = function(u, v) { return (u[0]*v[1] < u[1]*v[0] ? -1 : 1) * Math.acos(r(u,v)); }
1441 // initial angle
1442 var a1 = a([1,0], [(currp.x-cpp.x)/rx,(currp.y-cpp.y)/ry]);
1443 // angle delta
1444 var u = [(currp.x-cpp.x)/rx,(currp.y-cpp.y)/ry];
1445 var v = [(-currp.x-cpp.x)/rx,(-currp.y-cpp.y)/ry];
1446 var ad = a(u, v);
1447 if (r(u,v) <= -1) ad = Math.PI;
1448 if (r(u,v) >= 1) ad = 0;
1449
1450 // for markers
1451 var dir = 1 - sweepFlag ? 1.0 : -1.0;
1452 var ah = a1 + dir * (ad / 2.0);
1453 var halfWay = new svg.Point(
1454 centp.x + rx * Math.cos(ah),
1455 centp.y + ry * Math.sin(ah)
1456 );
1457 pp.addMarkerAngle(halfWay, ah - dir * Math.PI / 2);
1458 pp.addMarkerAngle(cp, ah - dir * Math.PI);
1459
1460 bb.addPoint(cp.x, cp.y); // TODO: this is too naive, make it better
1461 if (ctx != null) {
1462 var r = rx > ry ? rx : ry;
1463 var sx = rx > ry ? 1 : rx / ry;
1464 var sy = rx > ry ? ry / rx : 1;
1465
1466 ctx.translate(centp.x, centp.y);
1467 ctx.rotate(xAxisRotation);
1468 ctx.scale(sx, sy);
1469 ctx.arc(0, 0, r, a1, a1 + ad, 1 - sweepFlag);
1470 ctx.scale(1/sx, 1/sy);
1471 ctx.rotate(-xAxisRotation);
1472 ctx.translate(-centp.x, -centp.y);
1473 }
1474 }
1475 break;
1476 case 'Z':
1477 case 'z':
1478 if (ctx != null) ctx.closePath();
1479 pp.current = pp.start;
1480 }
1481 }
1482
1483 return bb;
1484 }
1485
1486 this.getMarkers = function() {
1487 var points = this.PathParser.getMarkerPoints();
1488 var angles = this.PathParser.getMarkerAngles();
1489
1490 var markers = [];
1491 for (var i=0; i<points.length; i++) {
1492 markers.push([points[i], angles[i]]);
1493 }
1494 return markers;
1495 }
1496 }
1497 svg.Element.path.prototype = new svg.Element.PathElementBase;
1498
1499 // pattern element
1500 svg.Element.pattern = function(node) {
1501 this.base = svg.Element.ElementBase;
1502 this.base(node);
1503
1504 this.createPattern = function(ctx, element) {
1505 var width = this.attribute('width').toPixels('x', true);
1506 var height = this.attribute('height').toPixels('y', true);
1507
1508 // render me using a temporary svg element
1509 var tempSvg = new svg.Element.svg();
1510 tempSvg.attributes['viewBox'] = new svg.Property('viewBox', this.attribute('viewBox').value);
1511 tempSvg.attributes['width'] = new svg.Property('width', width + 'px');
1512 tempSvg.attributes['height'] = new svg.Property('height', height + 'px');
1513 tempSvg.attributes['transform'] = new svg.Property('transform', this.attribute('patternTransform').value);
1514 tempSvg.children = this.children;
1515
1516 var c = document.createElement('canvas');
1517 c.width = width;
1518 c.height = height;
1519 var cctx = c.getContext('2d');
1520 if (this.attribute('x').hasValue() && this.attribute('y').hasValue()) {
1521 cctx.translate(this.attribute('x').toPixels('x', true), this.attribute('y').toPixels('y', true));
1522 }
1523 // render 3x3 grid so when we transform there's no white space on edges
1524 for (var x=-1; x<=1; x++) {
1525 for (var y=-1; y<=1; y++) {
1526 cctx.save();
1527 cctx.translate(x * c.width, y * c.height);
1528 tempSvg.render(cctx);
1529 cctx.restore();
1530 }
1531 }
1532 var pattern = ctx.createPattern(c, 'repeat');
1533 return pattern;
1534 }
1535 }
1536 svg.Element.pattern.prototype = new svg.Element.ElementBase;
1537
1538 // marker element
1539 svg.Element.marker = function(node) {
1540 this.base = svg.Element.ElementBase;
1541 this.base(node);
1542
1543 this.baseRender = this.render;
1544 this.render = function(ctx, point, angle) {
1545 ctx.translate(point.x, point.y);
1546 if (this.attribute('orient').valueOrDefault('auto') == 'auto') ctx.rotate(angle);
1547 if (this.attribute('markerUnits').valueOrDefault('strokeWidth') == 'strokeWidth') ctx.scale(ctx.lineWidth, ctx.lineWidth);
1548 ctx.save();
1549
1550 // render me using a temporary svg element
1551 var tempSvg = new svg.Element.svg();
1552 tempSvg.attributes['viewBox'] = new svg.Property('viewBox', this.attribute('viewBox').value);
1553 tempSvg.attributes['refX'] = new svg.Property('refX', this.attribute('refX').value);
1554 tempSvg.attributes['refY'] = new svg.Property('refY', this.attribute('refY').value);
1555 tempSvg.attributes['width'] = new svg.Property('width', this.attribute('markerWidth').value);
1556 tempSvg.attributes['height'] = new svg.Property('height', this.attribute('markerHeight').value);
1557 tempSvg.attributes['fill'] = new svg.Property('fill', this.attribute('fill').valueOrDefault('black'));
1558 tempSvg.attributes['stroke'] = new svg.Property('stroke', this.attribute('stroke').valueOrDefault('none'));
1559 tempSvg.children = this.children;
1560 tempSvg.render(ctx);
1561
1562 ctx.restore();
1563 if (this.attribute('markerUnits').valueOrDefault('strokeWidth') == 'strokeWidth') ctx.scale(1/ctx.lineWidth, 1/ctx.lineWidth);
1564 if (this.attribute('orient').valueOrDefault('auto') == 'auto') ctx.rotate(-angle);
1565 ctx.translate(-point.x, -point.y);
1566 }
1567 }
1568 svg.Element.marker.prototype = new svg.Element.ElementBase;
1569
1570 // definitions element
1571 svg.Element.defs = function(node) {
1572 this.base = svg.Element.ElementBase;
1573 this.base(node);
1574
1575 this.render = function(ctx) {
1576 // NOOP
1577 }
1578 }
1579 svg.Element.defs.prototype = new svg.Element.ElementBase;
1580
1581 // base for gradients
1582 svg.Element.GradientBase = function(node) {
1583 this.base = svg.Element.ElementBase;
1584 this.base(node);
1585
1586 this.gradientUnits = this.attribute('gradientUnits').valueOrDefault('objectBoundingBox');
1587
1588 this.stops = [];
1589 for (var i=0; i<this.children.length; i++) {
1590 var child = this.children[i];
1591 if (child.type == 'stop') this.stops.push(child);
1592 }
1593
1594 this.getGradient = function() {
1595 // OVERRIDE ME!
1596 }
1597
1598 this.createGradient = function(ctx, element, parentOpacityProp) {
1599 var stopsContainer = this;
1600 if (this.getHrefAttribute().hasValue()) {
1601 stopsContainer = this.getHrefAttribute().getDefinition();
1602 }
1603
1604 var addParentOpacity = function (color) {
1605 if (parentOpacityProp.hasValue()) {
1606 var p = new svg.Property('color', color);
1607 return p.addOpacity(parentOpacityProp.value).value;
1608 }
1609 return color;
1610 };
1611
1612 var g = this.getGradient(ctx, element);
1613 if (g == null) return addParentOpacity(stopsContainer.stops[stopsContainer.stops.length - 1].color);
1614 for (var i=0; i<stopsContainer.stops.length; i++) {
1615 g.addColorStop(stopsContainer.stops[i].offset, addParentOpacity(stopsContainer.stops[i].color));
1616 }
1617
1618 if (this.attribute('gradientTransform').hasValue()) {
1619 // render as transformed pattern on temporary canvas
1620 var rootView = svg.ViewPort.viewPorts[0];
1621
1622 var rect = new svg.Element.rect();
1623 rect.attributes['x'] = new svg.Property('x', -svg.MAX_VIRTUAL_PIXELS/3.0);
1624 rect.attributes['y'] = new svg.Property('y', -svg.MAX_VIRTUAL_PIXELS/3.0);
1625 rect.attributes['width'] = new svg.Property('width', svg.MAX_VIRTUAL_PIXELS);
1626 rect.attributes['height'] = new svg.Property('height', svg.MAX_VIRTUAL_PIXELS);
1627
1628 var group = new svg.Element.g();
1629 group.attributes['transform'] = new svg.Property('transform', this.attribute('gradientTransform').value);
1630 group.children = [ rect ];
1631
1632 var tempSvg = new svg.Element.svg();
1633 tempSvg.attributes['x'] = new svg.Property('x', 0);
1634 tempSvg.attributes['y'] = new svg.Property('y', 0);
1635 tempSvg.attributes['width'] = new svg.Property('width', rootView.width);
1636 tempSvg.attributes['height'] = new svg.Property('height', rootView.height);
1637 tempSvg.children = [ group ];
1638
1639 var c = document.createElement('canvas');
1640 c.width = rootView.width;
1641 c.height = rootView.height;
1642 var tempCtx = c.getContext('2d');
1643 tempCtx.fillStyle = g;
1644 tempSvg.render(tempCtx);
1645 return tempCtx.createPattern(c, 'no-repeat');
1646 }
1647
1648 return g;
1649 }
1650 }
1651 svg.Element.GradientBase.prototype = new svg.Element.ElementBase;
1652
1653 // linear gradient element
1654 svg.Element.linearGradient = function(node) {
1655 this.base = svg.Element.GradientBase;
1656 this.base(node);
1657
1658 this.getGradient = function(ctx, element) {
1659 var bb = element.getBoundingBox();
1660
1661 if (!this.attribute('x1').hasValue()
1662 && !this.attribute('y1').hasValue()
1663 && !this.attribute('x2').hasValue()
1664 && !this.attribute('y2').hasValue()) {
1665 this.attribute('x1', true).value = 0;
1666 this.attribute('y1', true).value = 0;
1667 this.attribute('x2', true).value = 1;
1668 this.attribute('y2', true).value = 0;
1669 }
1670
1671 var x1 = (this.gradientUnits == 'objectBoundingBox'
1672 ? bb.x() + bb.width() * this.attribute('x1').numValue()
1673 : this.attribute('x1').toPixels('x'));
1674 var y1 = (this.gradientUnits == 'objectBoundingBox'
1675 ? bb.y() + bb.height() * this.attribute('y1').numValue()
1676 : this.attribute('y1').toPixels('y'));
1677 var x2 = (this.gradientUnits == 'objectBoundingBox'
1678 ? bb.x() + bb.width() * this.attribute('x2').numValue()
1679 : this.attribute('x2').toPixels('x'));
1680 var y2 = (this.gradientUnits == 'objectBoundingBox'
1681 ? bb.y() + bb.height() * this.attribute('y2').numValue()
1682 : this.attribute('y2').toPixels('y'));
1683
1684 if (x1 == x2 && y1 == y2) return null;
1685 return ctx.createLinearGradient(x1, y1, x2, y2);
1686 }
1687 }
1688 svg.Element.linearGradient.prototype = new svg.Element.GradientBase;
1689
1690 // radial gradient element
1691 svg.Element.radialGradient = function(node) {
1692 this.base = svg.Element.GradientBase;
1693 this.base(node);
1694
1695 this.getGradient = function(ctx, element) {
1696 var bb = element.getBoundingBox();
1697
1698 if (!this.attribute('cx').hasValue()) this.attribute('cx', true).value = '50%';
1699 if (!this.attribute('cy').hasValue()) this.attribute('cy', true).value = '50%';
1700 if (!this.attribute('r').hasValue()) this.attribute('r', true).value = '50%';
1701
1702 var cx = (this.gradientUnits == 'objectBoundingBox'
1703 ? bb.x() + bb.width() * this.attribute('cx').numValue()
1704 : this.attribute('cx').toPixels('x'));
1705 var cy = (this.gradientUnits == 'objectBoundingBox'
1706 ? bb.y() + bb.height() * this.attribute('cy').numValue()
1707 : this.attribute('cy').toPixels('y'));
1708
1709 var fx = cx;
1710 var fy = cy;
1711 if (this.attribute('fx').hasValue()) {
1712 fx = (this.gradientUnits == 'objectBoundingBox'
1713 ? bb.x() + bb.width() * this.attribute('fx').numValue()
1714 : this.attribute('fx').toPixels('x'));
1715 }
1716 if (this.attribute('fy').hasValue()) {
1717 fy = (this.gradientUnits == 'objectBoundingBox'
1718 ? bb.y() + bb.height() * this.attribute('fy').numValue()
1719 : this.attribute('fy').toPixels('y'));
1720 }
1721
1722 var r = (this.gradientUnits == 'objectBoundingBox'
1723 ? (bb.width() + bb.height()) / 2.0 * this.attribute('r').numValue()
1724 : this.attribute('r').toPixels());
1725
1726 return ctx.createRadialGradient(fx, fy, 0, cx, cy, r);
1727 }
1728 }
1729 svg.Element.radialGradient.prototype = new svg.Element.GradientBase;
1730
1731 // gradient stop element
1732 svg.Element.stop = function(node) {
1733 this.base = svg.Element.ElementBase;
1734 this.base(node);
1735
1736 this.offset = this.attribute('offset').numValue();
1737 if (this.offset < 0) this.offset = 0;
1738 if (this.offset > 1) this.offset = 1;
1739
1740 var stopColor = this.style('stop-color');
1741 if (this.style('stop-opacity').hasValue()) stopColor = stopColor.addOpacity(this.style('stop-opacity').value);
1742 this.color = stopColor.value;
1743 }
1744 svg.Element.stop.prototype = new svg.Element.ElementBase;
1745
1746 // animation base element
1747 svg.Element.AnimateBase = function(node) {
1748 this.base = svg.Element.ElementBase;
1749 this.base(node);
1750
1751 svg.Animations.push(this);
1752
1753 this.duration = 0.0;
1754 this.begin = this.attribute('begin').toMilliseconds();
1755 this.maxDuration = this.begin + this.attribute('dur').toMilliseconds();
1756
1757 this.getProperty = function() {
1758 var attributeType = this.attribute('attributeType').value;
1759 var attributeName = this.attribute('attributeName').value;
1760
1761 if (attributeType == 'CSS') {
1762 return this.parent.style(attributeName, true);
1763 }
1764 return this.parent.attribute(attributeName, true);
1765 };
1766
1767 this.initialValue = null;
1768 this.initialUnits = '';
1769 this.removed = false;
1770
1771 this.calcValue = function() {
1772 // OVERRIDE ME!
1773 return '';
1774 }
1775
1776 this.update = function(delta) {
1777 // set initial value
1778 if (this.initialValue == null) {
1779 this.initialValue = this.getProperty().value;
1780 this.initialUnits = this.getProperty().getUnits();
1781 }
1782
1783 // if we're past the end time
1784 if (this.duration > this.maxDuration) {
1785 // loop for indefinitely repeating animations
1786 if (this.attribute('repeatCount').value == 'indefinite'
1787 || this.attribute('repeatDur').value == 'indefinite') {
1788 this.duration = 0.0
1789 }
1790 else if (this.attribute('fill').valueOrDefault('remove') == 'remove' && !this.removed) {
1791 this.removed = true;
1792 this.getProperty().value = this.initialValue;
1793 return true;
1794 }
1795 else {
1796 return false; // no updates made
1797 }
1798 }
1799 this.duration = this.duration + delta;
1800
1801 // if we're past the begin time
1802 var updated = false;
1803 if (this.begin < this.duration) {
1804 var newValue = this.calcValue(); // tween
1805
1806 if (this.attribute('type').hasValue()) {
1807 // for transform, etc.
1808 var type = this.attribute('type').value;
1809 newValue = type + '(' + newValue + ')';
1810 }
1811
1812 this.getProperty().value = newValue;
1813 updated = true;
1814 }
1815
1816 return updated;
1817 }
1818
1819 this.from = this.attribute('from');
1820 this.to = this.attribute('to');
1821 this.values = this.attribute('values');
1822 if (this.values.hasValue()) this.values.value = this.values.value.split(';');
1823
1824 // fraction of duration we've covered
1825 this.progress = function() {
1826 var ret = { progress: (this.duration - this.begin) / (this.maxDuration - this.begin) };
1827 if (this.values.hasValue()) {
1828 var p = ret.progress * (this.values.value.length - 1);
1829 var lb = Math.floor(p), ub = Math.ceil(p);
1830 ret.from = new svg.Property('from', parseFloat(this.values.value[lb]));
1831 ret.to = new svg.Property('to', parseFloat(this.values.value[ub]));
1832 ret.progress = (p - lb) / (ub - lb);
1833 }
1834 else {
1835 ret.from = this.from;
1836 ret.to = this.to;
1837 }
1838 return ret;
1839 }
1840 }
1841 svg.Element.AnimateBase.prototype = new svg.Element.ElementBase;
1842
1843 // animate element
1844 svg.Element.animate = function(node) {
1845 this.base = svg.Element.AnimateBase;
1846 this.base(node);
1847
1848 this.calcValue = function() {
1849 var p = this.progress();
1850
1851 // tween value linearly
1852 var newValue = p.from.numValue() + (p.to.numValue() - p.from.numValue()) * p.progress;
1853 return newValue + this.initialUnits;
1854 };
1855 }
1856 svg.Element.animate.prototype = new svg.Element.AnimateBase;
1857
1858 // animate color element
1859 svg.Element.animateColor = function(node) {
1860 this.base = svg.Element.AnimateBase;
1861 this.base(node);
1862
1863 this.calcValue = function() {
1864 var p = this.progress();
1865 var from = new RGBColor(p.from.value);
1866 var to = new RGBColor(p.to.value);
1867
1868 if (from.ok && to.ok) {
1869 // tween color linearly
1870 var r = from.r + (to.r - from.r) * p.progress;
1871 var g = from.g + (to.g - from.g) * p.progress;
1872 var b = from.b + (to.b - from.b) * p.progress;
1873 return 'rgb('+parseInt(r,10)+','+parseInt(g,10)+','+parseInt(b,10)+')';
1874 }
1875 return this.attribute('from').value;
1876 };
1877 }
1878 svg.Element.animateColor.prototype = new svg.Element.AnimateBase;
1879
1880 // animate transform element
1881 svg.Element.animateTransform = function(node) {
1882 this.base = svg.Element.AnimateBase;
1883 this.base(node);
1884
1885 this.calcValue = function() {
1886 var p = this.progress();
1887
1888 // tween value linearly
1889 var from = svg.ToNumberArray(p.from.value);
1890 var to = svg.ToNumberArray(p.to.value);
1891 var newValue = '';
1892 for (var i=0; i<from.length; i++) {
1893 newValue += from[i] + (to[i] - from[i]) * p.progress + ' ';
1894 }
1895 return newValue;
1896 };
1897 }
1898 svg.Element.animateTransform.prototype = new svg.Element.animate;
1899
1900 // font element
1901 svg.Element.font = function(node) {
1902 this.base = svg.Element.ElementBase;
1903 this.base(node);
1904
1905 this.horizAdvX = this.attribute('horiz-adv-x').numValue();
1906
1907 this.isRTL = false;
1908 this.isArabic = false;
1909 this.fontFace = null;
1910 this.missingGlyph = null;
1911 this.glyphs = [];
1912 for (var i=0; i<this.children.length; i++) {
1913 var child = this.children[i];
1914 if (child.type == 'font-face') {
1915 this.fontFace = child;
1916 if (child.style('font-family').hasValue()) {
1917 svg.Definitions[child.style('font-family').value] = this;
1918 }
1919 }
1920 else if (child.type == 'missing-glyph') this.missingGlyph = child;
1921 else if (child.type == 'glyph') {
1922 if (child.arabicForm != '') {
1923 this.isRTL = true;
1924 this.isArabic = true;
1925 if (typeof(this.glyphs[child.unicode]) == 'undefined') this.glyphs[child.unicode] = [];
1926 this.glyphs[child.unicode][child.arabicForm] = child;
1927 }
1928 else {
1929 this.glyphs[child.unicode] = child;
1930 }
1931 }
1932 }
1933 }
1934 svg.Element.font.prototype = new svg.Element.ElementBase;
1935
1936 // font-face element
1937 svg.Element.fontface = function(node) {
1938 this.base = svg.Element.ElementBase;
1939 this.base(node);
1940
1941 this.ascent = this.attribute('ascent').value;
1942 this.descent = this.attribute('descent').value;
1943 this.unitsPerEm = this.attribute('units-per-em').numValue();
1944 }
1945 svg.Element.fontface.prototype = new svg.Element.ElementBase;
1946
1947 // missing-glyph element
1948 svg.Element.missingglyph = function(node) {
1949 this.base = svg.Element.path;
1950 this.base(node);
1951
1952 this.horizAdvX = 0;
1953 }
1954 svg.Element.missingglyph.prototype = new svg.Element.path;
1955
1956 // glyph element
1957 svg.Element.glyph = function(node) {
1958 this.base = svg.Element.path;
1959 this.base(node);
1960
1961 this.horizAdvX = this.attribute('horiz-adv-x').numValue();
1962 this.unicode = this.attribute('unicode').value;
1963 this.arabicForm = this.attribute('arabic-form').value;
1964 }
1965 svg.Element.glyph.prototype = new svg.Element.path;
1966
1967 // text element
1968 svg.Element.text = function(node) {
1969 this.captureTextNodes = true;
1970 this.base = svg.Element.RenderedElementBase;
1971 this.base(node);
1972
1973 this.baseSetContext = this.setContext;
1974 this.setContext = function(ctx) {
1975 this.baseSetContext(ctx);
1976 if (this.style('dominant-baseline').hasValue()) ctx.textBaseline = this.style('dominant-baseline').value;
1977 if (this.style('alignment-baseline').hasValue()) ctx.textBaseline = this.style('alignment-baseline').value;
1978 }
1979
1980 this.getBoundingBox = function () {
1981 // TODO: implement
1982 return new svg.BoundingBox(this.attribute('x').toPixels('x'), this.attribute('y').toPixels('y'), 0, 0);
1983 }
1984
1985 this.renderChildren = function(ctx) {
1986 this.x = this.attribute('x').toPixels('x');
1987 this.y = this.attribute('y').toPixels('y');
1988 this.x += this.getAnchorDelta(ctx, this, 0);
1989 for (var i=0; i<this.children.length; i++) {
1990 this.renderChild(ctx, this, i);
1991 }
1992 }
1993
1994 this.getAnchorDelta = function (ctx, parent, startI) {
1995 var textAnchor = this.style('text-anchor').valueOrDefault('start');
1996 if (textAnchor != 'start') {
1997 var width = 0;
1998 for (var i=startI; i<parent.children.length; i++) {
1999 var child = parent.children[i];
2000 if (i > startI && child.attribute('x').hasValue()) break; // new group
2001 width += child.measureTextRecursive(ctx);
2002 }
2003 return -1 * (textAnchor == 'end' ? width : width / 2.0);
2004 }
2005 return 0;
2006 }
2007
2008 this.renderChild = function(ctx, parent, i) {
2009 var child = parent.children[i];
2010 if (child.attribute('x').hasValue()) {
2011 child.x = child.attribute('x').toPixels('x') + this.getAnchorDelta(ctx, parent, i);
2012 }
2013 else {
2014 if (this.attribute('dx').hasValue()) this.x += this.attribute('dx').toPixels('x');
2015 if (child.attribute('dx').hasValue()) this.x += child.attribute('dx').toPixels('x');
2016 child.x = this.x;
2017 }
2018 this.x = child.x + child.measureText(ctx);
2019
2020 if (child.attribute('y').hasValue()) {
2021 child.y = child.attribute('y').toPixels('y');
2022 }
2023 else {
2024 if (this.attribute('dy').hasValue()) this.y += this.attribute('dy').toPixels('y');
2025 if (child.attribute('dy').hasValue()) this.y += child.attribute('dy').toPixels('y');
2026 child.y = this.y;
2027 }
2028 this.y = child.y;
2029
2030 child.render(ctx);
2031
2032 for (var i=0; i<child.children.length; i++) {
2033 this.renderChild(ctx, child, i);
2034 }
2035 }
2036 }
2037 svg.Element.text.prototype = new svg.Element.RenderedElementBase;
2038
2039 // text base
2040 svg.Element.TextElementBase = function(node) {
2041 this.base = svg.Element.RenderedElementBase;
2042 this.base(node);
2043
2044 this.getGlyph = function(font, text, i) {
2045 var c = text[i];
2046 var glyph = null;
2047 if (font.isArabic) {
2048 var arabicForm = 'isolated';
2049 if ((i==0 || text[i-1]==' ') && i<text.length-2 && text[i+1]!=' ') arabicForm = 'terminal';
2050 if (i>0 && text[i-1]!=' ' && i<text.length-2 && text[i+1]!=' ') arabicForm = 'medial';
2051 if (i>0 && text[i-1]!=' ' && (i == text.length-1 || text[i+1]==' ')) arabicForm = 'initial';
2052 if (typeof(font.glyphs[c]) != 'undefined') {
2053 glyph = font.glyphs[c][arabicForm];
2054 if (glyph == null && font.glyphs[c].type == 'glyph') glyph = font.glyphs[c];
2055 }
2056 }
2057 else {
2058 glyph = font.glyphs[c];
2059 }
2060 if (glyph == null) glyph = font.missingGlyph;
2061 return glyph;
2062 }
2063
2064 this.renderChildren = function(ctx) {
2065 var customFont = this.parent.style('font-family').getDefinition();
2066 if (customFont != null) {
2067 var fontSize = this.parent.style('font-size').numValueOrDefault(svg.Font.Parse(svg.ctx.font).fontSize);
2068 var fontStyle = this.parent.style('font-style').valueOrDefault(svg.Font.Parse(svg.ctx.font).fontStyle);
2069 var text = this.getText();
2070 if (customFont.isRTL) text = text.split("").reverse().join("");
2071
2072 var dx = svg.ToNumberArray(this.parent.attribute('dx').value);
2073 for (var i=0; i<text.length; i++) {
2074 var glyph = this.getGlyph(customFont, text, i);
2075 var scale = fontSize / customFont.fontFace.unitsPerEm;
2076 ctx.translate(this.x, this.y);
2077 ctx.scale(scale, -scale);
2078 var lw = ctx.lineWidth;
2079 ctx.lineWidth = ctx.lineWidth * customFont.fontFace.unitsPerEm / fontSize;
2080 if (fontStyle == 'italic') ctx.transform(1, 0, .4, 1, 0, 0);
2081 glyph.render(ctx);
2082 if (fontStyle == 'italic') ctx.transform(1, 0, -.4, 1, 0, 0);
2083 ctx.lineWidth = lw;
2084 ctx.scale(1/scale, -1/scale);
2085 ctx.translate(-this.x, -this.y);
2086
2087 this.x += fontSize * (glyph.horizAdvX || customFont.horizAdvX) / customFont.fontFace.unitsPerEm;
2088 if (typeof(dx[i]) != 'undefined' && !isNaN(dx[i])) {
2089 this.x += dx[i];
2090 }
2091 }
2092 return;
2093 }
2094
2095 if (ctx.fillStyle != '') ctx.fillText(svg.compressSpaces(this.getText()), this.x, this.y);
2096 if (ctx.strokeStyle != '') ctx.strokeText(svg.compressSpaces(this.getText()), this.x, this.y);
2097 }
2098
2099 this.getText = function() {
2100 // OVERRIDE ME
2101 }
2102
2103 this.measureTextRecursive = function(ctx) {
2104 var width = this.measureText(ctx);
2105 for (var i=0; i<this.children.length; i++) {
2106 width += this.children[i].measureTextRecursive(ctx);
2107 }
2108 return width;
2109 }
2110
2111 this.measureText = function(ctx) {
2112 var customFont = this.parent.style('font-family').getDefinition();
2113 if (customFont != null) {
2114 var fontSize = this.parent.style('font-size').numValueOrDefault(svg.Font.Parse(svg.ctx.font).fontSize);
2115 var measure = 0;
2116 var text = this.getText();
2117 if (customFont.isRTL) text = text.split("").reverse().join("");
2118 var dx = svg.ToNumberArray(this.parent.attribute('dx').value);
2119 for (var i=0; i<text.length; i++) {
2120 var glyph = this.getGlyph(customFont, text, i);
2121 measure += (glyph.horizAdvX || customFont.horizAdvX) * fontSize / customFont.fontFace.unitsPerEm;
2122 if (typeof(dx[i]) != 'undefined' && !isNaN(dx[i])) {
2123 measure += dx[i];
2124 }
2125 }
2126 return measure;
2127 }
2128
2129 var textToMeasure = svg.compressSpaces(this.getText());
2130 if (!ctx.measureText) return textToMeasure.length * 10;
2131
2132 ctx.save();
2133 this.setContext(ctx);
2134 var width = ctx.measureText(textToMeasure).width;
2135 ctx.restore();
2136 return width;
2137 }
2138 }
2139 svg.Element.TextElementBase.prototype = new svg.Element.RenderedElementBase;
2140
2141 // tspan
2142 svg.Element.tspan = function(node) {
2143 this.captureTextNodes = true;
2144 this.base = svg.Element.TextElementBase;
2145 this.base(node);
2146
2147 this.text = node.nodeValue || node.text || '';
2148 this.getText = function() {
2149 return this.text;
2150 }
2151 }
2152 svg.Element.tspan.prototype = new svg.Element.TextElementBase;
2153
2154 // tref
2155 svg.Element.tref = function(node) {
2156 this.base = svg.Element.TextElementBase;
2157 this.base(node);
2158
2159 this.getText = function() {
2160 var element = this.getHrefAttribute().getDefinition();
2161 if (element != null) return element.children[0].getText();
2162 }
2163 }
2164 svg.Element.tref.prototype = new svg.Element.TextElementBase;
2165
2166 // a element
2167 svg.Element.a = function(node) {
2168 this.base = svg.Element.TextElementBase;
2169 this.base(node);
2170
2171 this.hasText = true;
2172 for (var i=0; i<node.childNodes.length; i++) {
2173 if (node.childNodes[i].nodeType != 3) this.hasText = false;
2174 }
2175
2176 // this might contain text
2177 this.text = this.hasText ? node.childNodes[0].nodeValue : '';
2178 this.getText = function() {
2179 return this.text;
2180 }
2181
2182 this.baseRenderChildren = this.renderChildren;
2183 this.renderChildren = function(ctx) {
2184 if (this.hasText) {
2185 // render as text element
2186 this.baseRenderChildren(ctx);
2187 var fontSize = new svg.Property('fontSize', svg.Font.Parse(svg.ctx.font).fontSize);
2188 svg.Mouse.checkBoundingBox(this, new svg.BoundingBox(this.x, this.y - fontSize.toPixels('y'), this.x + this.measureText(ctx), this.y));
2189 }
2190 else {
2191 // render as temporary group
2192 var g = new svg.Element.g();
2193 g.children = this.children;
2194 g.parent = this;
2195 g.render(ctx);
2196 }
2197 }
2198
2199 this.onclick = function() {
2200 window.open(this.getHrefAttribute().value);
2201 }
2202
2203 this.onmousemove = function() {
2204 svg.ctx.canvas.style.cursor = 'pointer';
2205 }
2206 }
2207 svg.Element.a.prototype = new svg.Element.TextElementBase;
2208
2209 // image element
2210 svg.Element.image = function(node) {
2211 this.base = svg.Element.RenderedElementBase;
2212 this.base(node);
2213
2214 var href = this.getHrefAttribute().value;
2215 var isSvg = href.match(/\.svg$/)
2216
2217 svg.Images.push(this);
2218 this.loaded = false;
2219 if (!isSvg) {
2220 this.img = document.createElement('img');
2221 var self = this;
2222 this.img.onload = function() { self.loaded = true; }
2223 this.img.onerror = function() { if (typeof(console) != 'undefined') { console.log('ERROR: image "' + href + '" not found'); self.loaded = true; } }
2224 this.img.src = href;
2225 }
2226 else {
2227 this.img = svg.ajax(href);
2228 this.loaded = true;
2229 }
2230
2231 this.renderChildren = function(ctx) {
2232 var x = this.attribute('x').toPixels('x');
2233 var y = this.attribute('y').toPixels('y');
2234
2235 var width = this.attribute('width').toPixels('x');
2236 var height = this.attribute('height').toPixels('y');
2237 if (width == 0 || height == 0) return;
2238
2239 ctx.save();
2240 if (isSvg) {
2241 ctx.drawSvg(this.img, x, y, width, height);
2242 }
2243 else {
2244 ctx.translate(x, y);
2245 svg.AspectRatio(ctx,
2246 this.attribute('preserveAspectRatio').value,
2247 width,
2248 this.img.width,
2249 height,
2250 this.img.height,
2251 0,
2252 0);
2253 ctx.drawImage(this.img, 0, 0);
2254 }
2255 ctx.restore();
2256 }
2257
2258 this.getBoundingBox = function() {
2259 var x = this.attribute('x').toPixels('x');
2260 var y = this.attribute('y').toPixels('y');
2261 var width = this.attribute('width').toPixels('x');
2262 var height = this.attribute('height').toPixels('y');
2263 return new svg.BoundingBox(x, y, x + width, y + height);
2264 }
2265 }
2266 svg.Element.image.prototype = new svg.Element.RenderedElementBase;
2267
2268 // group element
2269 svg.Element.g = function(node) {
2270 this.base = svg.Element.RenderedElementBase;
2271 this.base(node);
2272
2273 this.getBoundingBox = function() {
2274 var bb = new svg.BoundingBox();
2275 for (var i=0; i<this.children.length; i++) {
2276 bb.addBoundingBox(this.children[i].getBoundingBox());
2277 }
2278 return bb;
2279 };
2280 }
2281 svg.Element.g.prototype = new svg.Element.RenderedElementBase;
2282
2283 // symbol element
2284 svg.Element.symbol = function(node) {
2285 this.base = svg.Element.RenderedElementBase;
2286 this.base(node);
2287
2288 this.baseSetContext = this.setContext;
2289 this.setContext = function(ctx) {
2290 this.baseSetContext(ctx);
2291
2292 // viewbox
2293 if (this.attribute('viewBox').hasValue()) {
2294 var viewBox = svg.ToNumberArray(this.attribute('viewBox').value);
2295 var minX = viewBox[0];
2296 var minY = viewBox[1];
2297 width = viewBox[2];
2298 height = viewBox[3];
2299
2300 svg.AspectRatio(ctx,
2301 this.attribute('preserveAspectRatio').value,
2302 this.attribute('width').toPixels('x'),
2303 width,
2304 this.attribute('height').toPixels('y'),
2305 height,
2306 minX,
2307 minY);
2308
2309 svg.ViewPort.SetCurrent(viewBox[2], viewBox[3]);
2310 }
2311 }
2312 }
2313 svg.Element.symbol.prototype = new svg.Element.RenderedElementBase;
2314
2315 // style element
2316 svg.Element.style = function(node) {
2317 this.base = svg.Element.ElementBase;
2318 this.base(node);
2319
2320 // text, or spaces then CDATA
2321 var css = ''
2322 for (var i=0; i<node.childNodes.length; i++) {
2323 css += node.childNodes[i].nodeValue;
2324 }
2325 css = css.replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm, ''); // remove comments
2326 css = svg.compressSpaces(css); // replace whitespace
2327 var cssDefs = css.split('}');
2328 for (var i=0; i<cssDefs.length; i++) {
2329 if (svg.trim(cssDefs[i]) != '') {
2330 var cssDef = cssDefs[i].split('{');
2331 var cssClasses = cssDef[0].split(',');
2332 var cssProps = cssDef[1].split(';');
2333 for (var j=0; j<cssClasses.length; j++) {
2334 var cssClass = svg.trim(cssClasses[j]);
2335 if (cssClass != '') {
2336 var props = {};
2337 for (var k=0; k<cssProps.length; k++) {
2338 var prop = cssProps[k].indexOf(':');
2339 var name = cssProps[k].substr(0, prop);
2340 var value = cssProps[k].substr(prop + 1, cssProps[k].length - prop);
2341 if (name != null && value != null) {
2342 props[svg.trim(name)] = new svg.Property(svg.trim(name), svg.trim(value));
2343 }
2344 }
2345 svg.Styles[cssClass] = props;
2346 if (cssClass == '@font-face') {
2347 var fontFamily = props['font-family'].value.replace(/"/g,'');
2348 var srcs = props['src'].value.split(',');
2349 for (var s=0; s<srcs.length; s++) {
2350 if (srcs[s].indexOf('format("svg")') > 0) {
2351 var urlStart = srcs[s].indexOf('url');
2352 var urlEnd = srcs[s].indexOf(')', urlStart);
2353 var url = srcs[s].substr(urlStart + 5, urlEnd - urlStart - 6);
2354 var doc = svg.parseXml(svg.ajax(url));
2355 var fonts = doc.getElementsByTagName('font');
2356 for (var f=0; f<fonts.length; f++) {
2357 var font = svg.CreateElement(fonts[f]);
2358 svg.Definitions[fontFamily] = font;
2359 }
2360 }
2361 }
2362 }
2363 }
2364 }
2365 }
2366 }
2367 }
2368 svg.Element.style.prototype = new svg.Element.ElementBase;
2369
2370 // use element
2371 svg.Element.use = function(node) {
2372 this.base = svg.Element.RenderedElementBase;
2373 this.base(node);
2374
2375 this.baseSetContext = this.setContext;
2376 this.setContext = function(ctx) {
2377 this.baseSetContext(ctx);
2378 if (this.attribute('x').hasValue()) ctx.translate(this.attribute('x').toPixels('x'), 0);
2379 if (this.attribute('y').hasValue()) ctx.translate(0, this.attribute('y').toPixels('y'));
2380 }
2381
2382 this.getDefinition = function() {
2383 var element = this.getHrefAttribute().getDefinition();
2384 if (this.attribute('width').hasValue()) element.attribute('width', true).value = this.attribute('width').value;
2385 if (this.attribute('height').hasValue()) element.attribute('height', true).value = this.attribute('height').value;
2386 return element;
2387 }
2388
2389 this.path = function(ctx) {
2390 var element = this.getDefinition();
2391 if (element != null) element.path(ctx);
2392 }
2393
2394 this.getBoundingBox = function() {
2395 var element = this.getDefinition();
2396 if (element != null) return element.getBoundingBox();
2397 }
2398
2399 this.renderChildren = function(ctx) {
2400 var element = this.getDefinition();
2401 if (element != null) {
2402 // temporarily detach from parent and render
2403 var oldParent = element.parent;
2404 element.parent = null;
2405 element.render(ctx);
2406 element.parent = oldParent;
2407 }
2408 }
2409 }
2410 svg.Element.use.prototype = new svg.Element.RenderedElementBase;
2411
2412 // mask element
2413 svg.Element.mask = function(node) {
2414 this.base = svg.Element.ElementBase;
2415 this.base(node);
2416
2417 this.apply = function(ctx, element) {
2418 // render as temp svg
2419 var x = this.attribute('x').toPixels('x');
2420 var y = this.attribute('y').toPixels('y');
2421 var width = this.attribute('width').toPixels('x');
2422 var height = this.attribute('height').toPixels('y');
2423
2424 if (width == 0 && height == 0) {
2425 var bb = new svg.BoundingBox();
2426 for (var i=0; i<this.children.length; i++) {
2427 bb.addBoundingBox(this.children[i].getBoundingBox());
2428 }
2429 var x = Math.floor(bb.x1);
2430 var y = Math.floor(bb.y1);
2431 var width = Math.floor(bb.width());
2432 var height = Math.floor(bb.height());
2433 }
2434
2435 // temporarily remove mask to avoid recursion
2436 var mask = element.attribute('mask').value;
2437 element.attribute('mask').value = '';
2438
2439 var cMask = document.createElement('canvas');
2440 cMask.width = x + width;
2441 cMask.height = y + height;
2442 var maskCtx = cMask.getContext('2d');
2443 this.renderChildren(maskCtx);
2444
2445 var c = document.createElement('canvas');
2446 c.width = x + width;
2447 c.height = y + height;
2448 var tempCtx = c.getContext('2d');
2449 element.render(tempCtx);
2450 tempCtx.globalCompositeOperation = 'destination-in';
2451 tempCtx.fillStyle = maskCtx.createPattern(cMask, 'no-repeat');
2452 tempCtx.fillRect(0, 0, x + width, y + height);
2453
2454 ctx.fillStyle = tempCtx.createPattern(c, 'no-repeat');
2455 ctx.fillRect(0, 0, x + width, y + height);
2456
2457 // reassign mask
2458 element.attribute('mask').value = mask;
2459 }
2460
2461 this.render = function(ctx) {
2462 // NO RENDER
2463 }
2464 }
2465 svg.Element.mask.prototype = new svg.Element.ElementBase;
2466
2467 // clip element
2468 svg.Element.clipPath = function(node) {
2469 this.base = svg.Element.ElementBase;
2470 this.base(node);
2471
2472 this.apply = function(ctx) {
2473 for (var i=0; i<this.children.length; i++) {
2474 var child = this.children[i];
2475 if (typeof(child.path) != 'undefined') {
2476 var transform = null;
2477 if (child.attribute('transform').hasValue()) {
2478 transform = new svg.Transform(child.attribute('transform').value);
2479 transform.apply(ctx);
2480 }
2481 child.path(ctx);
2482 ctx.clip();
2483 if (transform) { transform.unapply(ctx); }
2484 }
2485 }
2486 }
2487
2488 this.render = function(ctx) {
2489 // NO RENDER
2490 }
2491 }
2492 svg.Element.clipPath.prototype = new svg.Element.ElementBase;
2493
2494 // filters
2495 svg.Element.filter = function(node) {
2496 this.base = svg.Element.ElementBase;
2497 this.base(node);
2498
2499 this.apply = function(ctx, element) {
2500 // render as temp svg
2501 var bb = element.getBoundingBox();
2502 var x = Math.floor(bb.x1);
2503 var y = Math.floor(bb.y1);
2504 var width = Math.floor(bb.width());
2505 var height = Math.floor(bb.height());
2506
2507 // temporarily remove filter to avoid recursion
2508 var filter = element.style('filter').value;
2509 element.style('filter').value = '';
2510
2511 var px = 0, py = 0;
2512 for (var i=0; i<this.children.length; i++) {
2513 var efd = this.children[i].extraFilterDistance || 0;
2514 px = Math.max(px, efd);
2515 py = Math.max(py, efd);
2516 }
2517
2518 var c = document.createElement('canvas');
2519 c.width = width + 2*px;
2520 c.height = height + 2*py;
2521 var tempCtx = c.getContext('2d');
2522 tempCtx.translate(-x + px, -y + py);
2523 element.render(tempCtx);
2524
2525 // apply filters
2526 for (var i=0; i<this.children.length; i++) {
2527 this.children[i].apply(tempCtx, 0, 0, width + 2*px, height + 2*py);
2528 }
2529
2530 // render on me
2531 ctx.drawImage(c, 0, 0, width + 2*px, height + 2*py, x - px, y - py, width + 2*px, height + 2*py);
2532
2533 // reassign filter
2534 element.style('filter', true).value = filter;
2535 }
2536
2537 this.render = function(ctx) {
2538 // NO RENDER
2539 }
2540 }
2541 svg.Element.filter.prototype = new svg.Element.ElementBase;
2542
2543 svg.Element.feMorphology = function(node) {
2544 this.base = svg.Element.ElementBase;
2545 this.base(node);
2546
2547 this.apply = function(ctx, x, y, width, height) {
2548 // TODO: implement
2549 }
2550 }
2551 svg.Element.feMorphology.prototype = new svg.Element.ElementBase;
2552
2553 svg.Element.feColorMatrix = function(node) {
2554 this.base = svg.Element.ElementBase;
2555 this.base(node);
2556
2557 function imGet(img, x, y, width, height, rgba) {
2558 return img[y*width*4 + x*4 + rgba];
2559 }
2560
2561 function imSet(img, x, y, width, height, rgba, val) {
2562 img[y*width*4 + x*4 + rgba] = val;
2563 }
2564
2565 this.apply = function(ctx, x, y, width, height) {
2566 // only supporting grayscale for now per Issue 195, need to extend to all matrix
2567 // assuming x==0 && y==0 for now
2568 var srcData = ctx.getImageData(0, 0, width, height);
2569 for (var y = 0; y < height; y++) {
2570 for (var x = 0; x < width; x++) {
2571 var r = imGet(srcData.data, x, y, width, height, 0);
2572 var g = imGet(srcData.data, x, y, width, height, 1);
2573 var b = imGet(srcData.data, x, y, width, height, 2);
2574 var gray = (r + g + b) / 3;
2575 imSet(srcData.data, x, y, width, height, 0, gray);
2576 imSet(srcData.data, x, y, width, height, 1, gray);
2577 imSet(srcData.data, x, y, width, height, 2, gray);
2578 }
2579 }
2580 ctx.clearRect(0, 0, width, height);
2581 ctx.putImageData(srcData, 0, 0);
2582 }
2583 }
2584 svg.Element.feColorMatrix.prototype = new svg.Element.ElementBase;
2585
2586 svg.Element.feGaussianBlur = function(node) {
2587 this.base = svg.Element.ElementBase;
2588 this.base(node);
2589
2590 this.blurRadius = Math.floor(this.attribute('stdDeviation').numValue());
2591 this.extraFilterDistance = this.blurRadius;
2592
2593 this.apply = function(ctx, x, y, width, height) {
2594 if (typeof(stackBlurCanvasRGBA) == 'undefined') {
2595 if (typeof(console) != 'undefined') { console.log('ERROR: StackBlur.js must be included for blur to work'); }
2596 return;
2597 }
2598
2599 // StackBlur requires canvas be on document
2600 ctx.canvas.id = svg.UniqueId();
2601 ctx.canvas.style.display = 'none';
2602 document.body.appendChild(ctx.canvas);
2603 stackBlurCanvasRGBA(ctx.canvas.id, x, y, width, height, this.blurRadius);
2604 document.body.removeChild(ctx.canvas);
2605 }
2606 }
2607 svg.Element.feGaussianBlur.prototype = new svg.Element.ElementBase;
2608
2609 // title element, do nothing
2610 svg.Element.title = function(node) {
2611 }
2612 svg.Element.title.prototype = new svg.Element.ElementBase;
2613
2614 // desc element, do nothing
2615 svg.Element.desc = function(node) {
2616 }
2617 svg.Element.desc.prototype = new svg.Element.ElementBase;
2618
2619 svg.Element.MISSING = function(node) {
2620 if (typeof(console) != 'undefined') { console.log('ERROR: Element \'' + node.nodeName + '\' not yet implemented.'); }
2621 }
2622 svg.Element.MISSING.prototype = new svg.Element.ElementBase;
2623
2624 // element factory
2625 svg.CreateElement = function(node) {
2626 var className = node.nodeName.replace(/^[^:]+:/,''); // remove namespace
2627 className = className.replace(/\-/g,''); // remove dashes
2628 var e = null;
2629 if (typeof(svg.Element[className]) != 'undefined') {
2630 e = new svg.Element[className](node);
2631 }
2632 else {
2633 e = new svg.Element.MISSING(node);
2634 }
2635
2636 e.type = node.nodeName;
2637 return e;
2638 }
2639
2640 // load from url
2641 svg.load = function(ctx, url) {
2642 svg.loadXml(ctx, svg.ajax(url));
2643 }
2644
2645 // load from xml
2646 svg.loadXml = function(ctx, xml) {
2647 svg.loadXmlDoc(ctx, svg.parseXml(xml));
2648 }
2649
2650 svg.loadXmlDoc = function(ctx, dom) {
2651 svg.init(ctx);
2652
2653 var mapXY = function(p) {
2654 var e = ctx.canvas;
2655 while (e) {
2656 p.x -= e.offsetLeft;
2657 p.y -= e.offsetTop;
2658 e = e.offsetParent;
2659 }
2660 if (window.scrollX) p.x += window.scrollX;
2661 if (window.scrollY) p.y += window.scrollY;
2662 return p;
2663 }
2664
2665 // bind mouse
2666 if (svg.opts['ignoreMouse'] != true) {
2667 ctx.canvas.onclick = function(e) {
2668 var p = mapXY(new svg.Point(e != null ? e.clientX : event.clientX, e != null ? e.clientY : event.clientY));
2669 svg.Mouse.onclick(p.x, p.y);
2670 };
2671 ctx.canvas.onmousemove = function(e) {
2672 var p = mapXY(new svg.Point(e != null ? e.clientX : event.clientX, e != null ? e.clientY : event.clientY));
2673 svg.Mouse.onmousemove(p.x, p.y);
2674 };
2675 }
2676
2677 var e = svg.CreateElement(dom.documentElement);
2678 e.root = true;
2679
2680 // render loop
2681 var isFirstRender = true;
2682 var draw = function() {
2683 svg.ViewPort.Clear();
2684 if (ctx.canvas.parentNode) svg.ViewPort.SetCurrent(ctx.canvas.parentNode.clientWidth, ctx.canvas.parentNode.clientHeight);
2685
2686 if (svg.opts['ignoreDimensions'] != true) {
2687 // set canvas size
2688 if (e.style('width').hasValue()) {
2689 ctx.canvas.width = e.style('width').toPixels('x');
2690 ctx.canvas.style.width = ctx.canvas.width + 'px';
2691 }
2692 if (e.style('height').hasValue()) {
2693 ctx.canvas.height = e.style('height').toPixels('y');
2694 ctx.canvas.style.height = ctx.canvas.height + 'px';
2695 }
2696 }
2697 var cWidth = ctx.canvas.clientWidth || ctx.canvas.width;
2698 var cHeight = ctx.canvas.clientHeight || ctx.canvas.height;
2699 if (svg.opts['ignoreDimensions'] == true && e.style('width').hasValue() && e.style('height').hasValue()) {
2700 cWidth = e.style('width').toPixels('x');
2701 cHeight = e.style('height').toPixels('y');
2702 }
2703 svg.ViewPort.SetCurrent(cWidth, cHeight);
2704
2705 if (svg.opts['offsetX'] != null) e.attribute('x', true).value = svg.opts['offsetX'];
2706 if (svg.opts['offsetY'] != null) e.attribute('y', true).value = svg.opts['offsetY'];
2707 if (svg.opts['scaleWidth'] != null && svg.opts['scaleHeight'] != null) {
2708 var xRatio = 1, yRatio = 1, viewBox = svg.ToNumberArray(e.attribute('viewBox').value);
2709 if (e.attribute('width').hasValue()) xRatio = e.attribute('width').toPixels('x') / svg.opts['scaleWidth'];
2710 else if (!isNaN(viewBox[2])) xRatio = viewBox[2] / svg.opts['scaleWidth'];
2711 if (e.attribute('height').hasValue()) yRatio = e.attribute('height').toPixels('y') / svg.opts['scaleHeight'];
2712 else if (!isNaN(viewBox[3])) yRatio = viewBox[3] / svg.opts['scaleHeight'];
2713
2714 e.attribute('width', true).value = svg.opts['scaleWidth'];
2715 e.attribute('height', true).value = svg.opts['scaleHeight'];
2716 e.attribute('viewBox', true).value = '0 0 ' + (cWidth * xRatio) + ' ' + (cHeight * yRatio);
2717 e.attribute('preserveAspectRatio', true).value = 'none';
2718 }
2719
2720 // clear and render
2721 if (svg.opts['ignoreClear'] != true) {
2722 ctx.clearRect(0, 0, cWidth, cHeight);
2723 }
2724 e.render(ctx);
2725 if (isFirstRender) {
2726 isFirstRender = false;
2727 if (typeof(svg.opts['renderCallback']) == 'function') svg.opts['renderCallback'](dom);
2728 }
2729 }
2730
2731 var waitingForImages = true;
2732 if (svg.ImagesLoaded()) {
2733 waitingForImages = false;
2734 draw();
2735 }
2736 svg.intervalID = setInterval(function() {
2737 var needUpdate = false;
2738
2739 if (waitingForImages && svg.ImagesLoaded()) {
2740 waitingForImages = false;
2741 needUpdate = true;
2742 }
2743
2744 // need update from mouse events?
2745 if (svg.opts['ignoreMouse'] != true) {
2746 needUpdate = needUpdate | svg.Mouse.hasEvents();
2747 }
2748
2749 // need update from animations?
2750 if (svg.opts['ignoreAnimation'] != true) {
2751 for (var i=0; i<svg.Animations.length; i++) {
2752 needUpdate = needUpdate | svg.Animations[i].update(1000 / svg.FRAMERATE);
2753 }
2754 }
2755
2756 // need update from redraw?
2757 if (typeof(svg.opts['forceRedraw']) == 'function') {
2758 if (svg.opts['forceRedraw']() == true) needUpdate = true;
2759 }
2760
2761 // render if needed
2762 if (needUpdate) {
2763 draw();
2764 svg.Mouse.runEvents(); // run and clear our events
2765 }
2766 }, 1000 / svg.FRAMERATE);
2767 }
2768
2769 svg.stop = function() {
2770 if (svg.intervalID) {
2771 clearInterval(svg.intervalID);
2772 }
2773 }
2774
2775 svg.Mouse = new (function() {
2776 this.events = [];
2777 this.hasEvents = function() { return this.events.length != 0; }
2778
2779 this.onclick = function(x, y) {
2780 this.events.push({ type: 'onclick', x: x, y: y,
2781 run: function(e) { if (e.onclick) e.onclick(); }
2782 });
2783 }
2784
2785 this.onmousemove = function(x, y) {
2786 this.events.push({ type: 'onmousemove', x: x, y: y,
2787 run: function(e) { if (e.onmousemove) e.onmousemove(); }
2788 });
2789 }
2790
2791 this.eventElements = [];
2792
2793 this.checkPath = function(element, ctx) {
2794 for (var i=0; i<this.events.length; i++) {
2795 var e = this.events[i];
2796 if (ctx.isPointInPath && ctx.isPointInPath(e.x, e.y)) this.eventElements[i] = element;
2797 }
2798 }
2799
2800 this.checkBoundingBox = function(element, bb) {
2801 for (var i=0; i<this.events.length; i++) {
2802 var e = this.events[i];
2803 if (bb.isPointInBox(e.x, e.y)) this.eventElements[i] = element;
2804 }
2805 }
2806
2807 this.runEvents = function() {
2808 svg.ctx.canvas.style.cursor = '';
2809
2810 for (var i=0; i<this.events.length; i++) {
2811 var e = this.events[i];
2812 var element = this.eventElements[i];
2813 while (element) {
2814 e.run(element);
2815 element = element.parent;
2816 }
2817 }
2818
2819 // done running, clear
2820 this.events = [];
2821 this.eventElements = [];
2822 }
2823 });
2824
2825 return svg;
2826 }
2827 })();
2828
2829 if (typeof(CanvasRenderingContext2D) != 'undefined') {
2830 CanvasRenderingContext2D.prototype.drawSvg = function(s, dx, dy, dw, dh) {
2831 canvg(this.canvas, s, {
2832 ignoreMouse: true,
2833 ignoreAnimation: true,
2834 ignoreDimensions: true,
2835 ignoreClear: true,
2836 offsetX: dx,
2837 offsetY: dy,
2838 scaleWidth: dw,
2839 scaleHeight: dh
2840 });
2841 }
2842 }
amcharts/exporting/filesaver.js
File was created 1 /* FileSaver.js
2 * A saveAs() FileSaver implementation.
3 * 2013-10-21
4 *
5 * By Eli Grey, http://eligrey.com
6 * License: X11/MIT
7 * See LICENSE.md
8 */
9
10 /*global self */
11 /*jslint bitwise: true, regexp: true, confusion: true, es5: true, vars: true, white: true,
12 plusplus: true */
13
14 /*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */
15 if(AmCharts.isModern){ /// added by AmCharts to avoid old IE problems if this file is included
16 var saveAs = saveAs
17 || (typeof navigator !== 'undefined' && navigator.msSaveOrOpenBlob && navigator.msSaveOrOpenBlob.bind(navigator))
18 || (function(view) {
19 "use strict";
20 var
21 doc = view.document
22 // only get URL when necessary in case BlobBuilder.js hasn't overridden it yet
23 , get_URL = function() {
24 return view.URL || view.webkitURL || view;
25 }
26 , URL = view.URL || view.webkitURL || view
27 , save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a")
28 , can_use_save_link = !view.externalHost && "download" in save_link
29 , click = function(node) {
30 var event = doc.createEvent("MouseEvents");
31 event.initMouseEvent(
32 "click", true, false, view, 0, 0, 0, 0, 0
33 , false, false, false, false, 0, null
34 );
35 node.dispatchEvent(event);
36 }
37 , webkit_req_fs = view.webkitRequestFileSystem
38 , req_fs = view.requestFileSystem || webkit_req_fs || view.mozRequestFileSystem
39 , throw_outside = function (ex) {
40 (view.setImmediate || view.setTimeout)(function() {
41 throw ex;
42 }, 0);
43 }
44 , force_saveable_type = "application/octet-stream"
45 , fs_min_size = 0
46 , deletion_queue = []
47 , process_deletion_queue = function() {
48 var i = deletion_queue.length;
49 while (i--) {
50 var file = deletion_queue[i];
51 if (typeof file === "string") { // file is an object URL
52 URL.revokeObjectURL(file);
53 } else { // file is a File
54 file.remove();
55 }
56 }
57 deletion_queue.length = 0; // clear queue
58 }
59 , dispatch = function(filesaver, event_types, event) {
60 event_types = [].concat(event_types);
61 var i = event_types.length;
62 while (i--) {
63 var listener = filesaver["on" + event_types[i]];
64 if (typeof listener === "function") {
65 try {
66 listener.call(filesaver, event || filesaver);
67 } catch (ex) {
68 throw_outside(ex);
69 }
70 }
71 }
72 }
73 , FileSaver = function(blob, name) {
74 // First try a.download, then web filesystem, then object URLs
75 var
76 filesaver = this
77 , type = blob.type
78 , blob_changed = false
79 , object_url
80 , target_view
81 , get_object_url = function() {
82 var object_url = get_URL().createObjectURL(blob);
83 deletion_queue.push(object_url);
84 return object_url;
85 }
86 , dispatch_all = function() {
87 dispatch(filesaver, "writestart progress write writeend".split(" "));
88 }
89 // on any filesys errors revert to saving with object URLs
90 , fs_error = function() {
91 // don't create more object URLs than needed
92 if (blob_changed || !object_url) {
93 object_url = get_object_url(blob);
94 }
95 if (target_view) {
96 target_view.location.href = object_url;
97 } else {
98 window.open(object_url, "_blank");
99 }
100 filesaver.readyState = filesaver.DONE;
101 dispatch_all();
102 }
103 , abortable = function(func) {
104 return function() {
105 if (filesaver.readyState !== filesaver.DONE) {
106 return func.apply(this, arguments);
107 }
108 };
109 }
110 , create_if_not_found = {create: true, exclusive: false}
111 , slice
112 ;
113 filesaver.readyState = filesaver.INIT;
114 if (!name) {
115 name = "download";
116 }
117 if (can_use_save_link) {
118 object_url = get_object_url(blob);
119 // FF for Android has a nasty garbage collection mechanism
120 // that turns all objects that are not pure javascript into 'deadObject'
121 // this means `doc` and `save_link` are unusable and need to be recreated
122 // `view` is usable though:
123 doc = view.document;
124 save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a");
125 save_link.href = object_url;
126 save_link.download = name;
127 var event = doc.createEvent("MouseEvents");
128 event.initMouseEvent(
129 "click", true, false, view, 0, 0, 0, 0, 0
130 , false, false, false, false, 0, null
131 );
132 save_link.dispatchEvent(event);
133 filesaver.readyState = filesaver.DONE;
134 dispatch_all();
135 return;
136 }
137 // Object and web filesystem URLs have a problem saving in Google Chrome when
138 // viewed in a tab, so I force save with application/octet-stream
139 // http://code.google.com/p/chromium/issues/detail?id=91158
140 if (view.chrome && type && type !== force_saveable_type) {
141 slice = blob.slice || blob.webkitSlice;
142 blob = slice.call(blob, 0, blob.size, force_saveable_type);
143 blob_changed = true;
144 }
145 // Since I can't be sure that the guessed media type will trigger a download
146 // in WebKit, I append .download to the filename.
147 // https://bugs.webkit.org/show_bug.cgi?id=65440
148 if (webkit_req_fs && name !== "download") {
149 name += ".download";
150 }
151 if (type === force_saveable_type || webkit_req_fs) {
152 target_view = view;
153 }
154 if (!req_fs) {
155 fs_error();
156 return;
157 }
158 fs_min_size += blob.size;
159 req_fs(view.TEMPORARY, fs_min_size, abortable(function(fs) {
160 fs.root.getDirectory("saved", create_if_not_found, abortable(function(dir) {
161 var save = function() {
162 dir.getFile(name, create_if_not_found, abortable(function(file) {
163 file.createWriter(abortable(function(writer) {
164 writer.onwriteend = function(event) {
165 target_view.location.href = file.toURL();
166 deletion_queue.push(file);
167 filesaver.readyState = filesaver.DONE;
168 dispatch(filesaver, "writeend", event);
169 };
170 writer.onerror = function() {
171 var error = writer.error;
172 if (error.code !== error.ABORT_ERR) {
173 fs_error();
174 }
175 };
176 "writestart progress write abort".split(" ").forEach(function(event) {
177 writer["on" + event] = filesaver["on" + event];
178 });
179 writer.write(blob);
180 filesaver.abort = function() {
181 writer.abort();
182 filesaver.readyState = filesaver.DONE;
183 };
184 filesaver.readyState = filesaver.WRITING;
185 }), fs_error);
186 }), fs_error);
187 };
188 dir.getFile(name, {create: false}, abortable(function(file) {
189 // delete file if it already exists
190 file.remove();
191 save();
192 }), abortable(function(ex) {
193 if (ex.code === ex.NOT_FOUND_ERR) {
194 save();
195 } else {
196 fs_error();
197 }
198 }));
199 }), fs_error);
200 }), fs_error);
201 }
202 , FS_proto = FileSaver.prototype
203 , saveAs = function(blob, name) {
204 return new FileSaver(blob, name);
205 }
206 ;
207 FS_proto.abort = function() {
208 var filesaver = this;
209 filesaver.readyState = filesaver.DONE;
210 dispatch(filesaver, "abort");
211 };
212 FS_proto.readyState = FS_proto.INIT = 0;
213 FS_proto.WRITING = 1;
214 FS_proto.DONE = 2;
215
216 FS_proto.error =
217 FS_proto.onwritestart =
218 FS_proto.onprogress =
219 FS_proto.onwrite =
220 FS_proto.onabort =
221 FS_proto.onerror =
222 FS_proto.onwriteend =
223 null;
224
225 view.addEventListener("unload", process_deletion_queue, false);
226 return saveAs;
227 }(this.self || this.window || this.content));
228 // `self` is undefined in Firefox for Android content script context
229 // while `this` is nsIContentFrameMessageManager
230 // with an attribute `content` that corresponds to the window
231
232 if (typeof module !== 'undefined') module.exports = saveAs;
233 }/// added by AmCharts to avoid old IE problems if this file is included
amcharts/exporting/jspdf.js
File was created 1 /** @preserve jsPDF 0.9.0rc2 ( ${buildDate} ${commitID} )
2 Copyright (c) 2010-2012 James Hall, james@snapshotmedia.co.uk, https://github.com/MrRio/jsPDF
3 Copyright (c) 2012 Willow Systems Corporation, willow-systems.com
4 MIT license.
5 */
6
7 /*
8 * Permission is hereby granted, free of charge, to any person obtaining
9 * a copy of this software and associated documentation files (the
10 * "Software"), to deal in the Software without restriction, including
11 * without limitation the rights to use, copy, modify, merge, publish,
12 * distribute, sublicense, and/or sell copies of the Software, and to
13 * permit persons to whom the Software is furnished to do so, subject to
14 * the following conditions:
15 *
16 * The above copyright notice and this permission notice shall be
17 * included in all copies or substantial portions of the Software.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
23 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
24 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
25 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 * ====================================================================
27 */
28
29
30 /**
31 Creates new jsPDF document object instance
32 @class
33 @param orientation One of "portrait" or "landscape" (or shortcuts "p" (Default), "l")
34 @param unit Measurement unit to be used when coordinates are specified. One of "pt" (points), "mm" (Default), "cm", "in"
35 @param format One of 'a0', 'a1', 'a2', 'a3', 'a4' (Default) etc to 'a10', 'b0' to 'b10', 'c0' to 'c10', 'letter', 'government-letter', 'legal', 'junior-legal', 'ledger' or 'tabloid'
36 @returns {jsPDF}
37 @name jsPDF
38 */
39 var jsPDF = (function () {
40 'use strict';
41 /*jslint browser:true, plusplus: true, bitwise: true, nomen: true */
42 /*global document: false, btoa, atob, zpipe, Uint8Array, ArrayBuffer, Blob, saveAs, adler32cs, Deflater */
43
44 // this will run on <=IE9, possibly some niche browsers
45 // new webkit-based, FireFox, IE10 already have native version of this.
46 if (typeof btoa === 'undefined') {
47 window.btoa = function (data) {
48 // DO NOT ADD UTF8 ENCODING CODE HERE!!!!
49
50 // UTF8 encoding encodes bytes over char code 128
51 // and, essentially, turns an 8-bit binary streams
52 // (that base64 can deal with) into 7-bit binary streams.
53 // (by default server does not know that and does not recode the data back to 8bit)
54 // You destroy your data.
55
56 // binary streams like jpeg image data etc, while stored in JavaScript strings,
57 // (which are 16bit arrays) are in 8bit format already.
58 // You do NOT need to char-encode that before base64 encoding.
59
60 // if you, by act of fate
61 // have string which has individual characters with code
62 // above 255 (pure unicode chars), encode that BEFORE you base64 here.
63 // you can use absolutely any approch there, as long as in the end,
64 // base64 gets an 8bit (char codes 0 - 255) stream.
65 // when you get it on the server after un-base64, you must
66 // UNencode it too, to get back to 16, 32bit or whatever original bin stream.
67
68 // Note, Yes, JavaScript strings are, in most cases UCS-2 -
69 // 16-bit character arrays. This does not mean, however,
70 // that you always have to UTF8 it before base64.
71 // it means that if you have actual characters anywhere in
72 // that string that have char code above 255, you need to
73 // recode *entire* string from 16-bit (or 32bit) to 8-bit array.
74 // You can do binary split to UTF16 (BE or LE)
75 // you can do utf8, you can split the thing by hand and prepend BOM to it,
76 // but whatever you do, make sure you mirror the opposite on
77 // the server. If server does not expect to post-process un-base64
78 // 8-bit binary stream, think very very hard about messing around with encoding.
79
80 // so, long story short:
81 // DO NOT ADD UTF8 ENCODING CODE HERE!!!!
82
83 /* @preserve
84 ====================================================================
85 base64 encoder
86 MIT, GPL
87
88 version: 1109.2015
89 discuss at: http://phpjs.org/functions/base64_encode
90 + original by: Tyler Akins (http://rumkin.com)
91 + improved by: Bayron Guevara
92 + improved by: Thunder.m
93 + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
94 + bugfixed by: Pellentesque Malesuada
95 + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
96 + improved by: Rafal Kukawski (http://kukawski.pl)
97 + Daniel Dotsenko, Willow Systems Corp, willow-systems.com
98 ====================================================================
99 */
100
101 var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
102 b64a = b64.split(''),
103 o1,
104 o2,
105 o3,
106 h1,
107 h2,
108 h3,
109 h4,
110 bits,
111 i = 0,
112 ac = 0,
113 enc = "",
114 tmp_arr = [],
115 r;
116
117 do { // pack three octets into four hexets
118 o1 = data.charCodeAt(i++);
119 o2 = data.charCodeAt(i++);
120 o3 = data.charCodeAt(i++);
121
122 bits = o1 << 16 | o2 << 8 | o3;
123
124 h1 = bits >> 18 & 0x3f;
125 h2 = bits >> 12 & 0x3f;
126 h3 = bits >> 6 & 0x3f;
127 h4 = bits & 0x3f;
128
129 // use hexets to index into b64, and append result to encoded string
130 tmp_arr[ac++] = b64a[h1] + b64a[h2] + b64a[h3] + b64a[h4];
131 } while (i < data.length);
132
133 enc = tmp_arr.join('');
134 r = data.length % 3;
135 return (r ? enc.slice(0, r - 3) : enc) + '==='.slice(r || 3);
136 // end of base64 encoder MIT, GPL
137 };
138 }
139
140 if (typeof atob === 'undefined') {
141 window.atob = function (data) {
142 // http://kevin.vanzonneveld.net
143 // + original by: Tyler Akins (http://rumkin.com)
144 // + improved by: Thunder.m
145 // + input by: Aman Gupta
146 // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
147 // + bugfixed by: Onno Marsman
148 // + bugfixed by: Pellentesque Malesuada
149 // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
150 // + input by: Brett Zamir (http://brett-zamir.me)
151 // + bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
152 // * example 1: base64_decode('S2V2aW4gdmFuIFpvbm5ldmVsZA==');
153 // * returns 1: 'Kevin van Zonneveld'
154 // mozilla has this native
155 // - but breaks in 2.0.0.12!
156 //if (typeof this.window['atob'] == 'function') {
157 // return atob(data);
158 //}
159 var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
160 o1,
161 o2,
162 o3,
163 h1,
164 h2,
165 h3,
166 h4,
167 bits,
168 i = 0,
169 ac = 0,
170 dec = "",
171 tmp_arr = [];
172
173 if (!data) {
174 return data;
175 }
176
177 data += '';
178
179 do { // unpack four hexets into three octets using index points in b64
180 h1 = b64.indexOf(data.charAt(i++));
181 h2 = b64.indexOf(data.charAt(i++));
182 h3 = b64.indexOf(data.charAt(i++));
183 h4 = b64.indexOf(data.charAt(i++));
184
185 bits = h1 << 18 | h2 << 12 | h3 << 6 | h4;
186
187 o1 = bits >> 16 & 0xff;
188 o2 = bits >> 8 & 0xff;
189 o3 = bits & 0xff;
190
191 if (h3 === 64) {
192 tmp_arr[ac++] = String.fromCharCode(o1);
193 } else if (h4 === 64) {
194 tmp_arr[ac++] = String.fromCharCode(o1, o2);
195 } else {
196 tmp_arr[ac++] = String.fromCharCode(o1, o2, o3);
197 }
198 } while (i < data.length);
199 dec = tmp_arr.join('');
200 return dec;
201 };
202 }
203
204 var getObjectLength = typeof Object.keys === 'function' ?
205 function (object) {
206 return Object.keys(object).length;
207 } :
208 function (object) {
209 var i = 0, e;
210 for (e in object) {
211 if (object.hasOwnProperty(e)) {
212 i++;
213 }
214 }
215 return i;
216 },
217
218 /**
219 PubSub implementation
220
221 @class
222 @name PubSub
223 */
224 PubSub = function (context) {
225 /** @preserve
226 -----------------------------------------------------------------------------------------------
227 JavaScript PubSub library
228 2012 (c) ddotsenko@willowsystems.com
229 based on Peter Higgins (dante@dojotoolkit.org)
230 Loosely based on Dojo publish/subscribe API, limited in scope. Rewritten blindly.
231 Original is (c) Dojo Foundation 2004-2010. Released under either AFL or new BSD, see:
232 http://dojofoundation.org/license for more information.
233 -----------------------------------------------------------------------------------------------
234 */
235 /**
236 @private
237 @fieldOf PubSub
238 */
239 this.topics = {};
240 /**
241 Stores what will be `this` within the callback functions.
242
243 @private
244 @fieldOf PubSub#
245 */
246 this.context = context;
247 /**
248 Allows caller to emit an event and pass arguments to event listeners.
249 @public
250 @function
251 @param topic {String} Name of the channel on which to voice this event
252 @param args Any number of arguments you want to pass to the listeners of this event.
253 @methodOf PubSub#
254 @name publish
255 */
256 this.publish = function (topic, args) {
257 if (this.topics[topic]) {
258 var currentTopic = this.topics[topic],
259 toremove = [],
260 fn,
261 i,
262 l,
263 pair,
264 emptyFunc = function () {};
265 args = Array.prototype.slice.call(arguments, 1);
266 for (i = 0, l = currentTopic.length; i < l; i++) {
267 pair = currentTopic[i]; // this is a [function, once_flag] array
268 fn = pair[0];
269 if (pair[1]) { /* 'run once' flag set */
270 pair[0] = emptyFunc;
271 toremove.push(i);
272 }
273 fn.apply(this.context, args);
274 }
275 for (i = 0, l = toremove.length; i < l; i++) {
276 currentTopic.splice(toremove[i], 1);
277 }
278 }
279 };
280 /**
281 Allows listener code to subscribe to channel and be called when data is available
282 @public
283 @function
284 @param topic {String} Name of the channel on which to voice this event
285 @param callback {Function} Executable (function pointer) that will be ran when event is voiced on this channel.
286 @param once {Boolean} (optional. False by default) Flag indicating if the function is to be triggered only once.
287 @returns {Object} A token object that cen be used for unsubscribing.
288 @methodOf PubSub#
289 @name subscribe
290 */
291 this.subscribe = function (topic, callback, once) {
292 if (!this.topics[topic]) {
293 this.topics[topic] = [[callback, once]];
294 } else {
295 this.topics[topic].push([callback, once]);
296 }
297 return {
298 "topic": topic,
299 "callback": callback
300 };
301 };
302 /**
303 Allows listener code to unsubscribe from a channel
304 @public
305 @function
306 @param token {Object} A token object that was returned by `subscribe` method
307 @methodOf PubSub#
308 @name unsubscribe
309 */
310 this.unsubscribe = function (token) {
311 if (this.topics[token.topic]) {
312 var currentTopic = this.topics[token.topic], i, l;
313
314 for (i = 0, l = currentTopic.length; i < l; i++) {
315 if (currentTopic[i][0] === token.callback) {
316 currentTopic.splice(i, 1);
317 }
318 }
319 }
320 };
321 };
322
323
324 /**
325 @constructor
326 @private
327 */
328 function jsPDF(orientation, unit, format, compressPdf) { /** String orientation, String unit, String format, Boolean compressed */
329
330 // Default parameter values
331 if (typeof orientation === 'undefined') {
332 orientation = 'p';
333 } else {
334 orientation = orientation.toString().toLowerCase();
335 }
336 if (typeof unit === 'undefined') { unit = 'mm'; }
337 if (typeof format === 'undefined') { format = 'a4'; }
338 if (typeof compressPdf === 'undefined' && typeof zpipe === 'undefined') { compressPdf = false; }
339
340 var format_as_string = format.toString().toLowerCase(),
341 version = '0.9.0rc2',
342 content = [],
343 content_length = 0,
344 compress = compressPdf,
345 pdfVersion = '1.3', // PDF Version
346 pageFormats = { // Size in pt of various paper formats
347 'a0': [2383.94, 3370.39],
348 'a1': [1683.78, 2383.94],
349 'a2': [1190.55, 1683.78],
350 'a3': [841.89, 1190.55],
351 'a4': [595.28, 841.89],
352 'a5': [419.53, 595.28],
353 'a6': [297.64, 419.53],
354 'a7': [209.76, 297.64],
355 'a8': [147.4 , 209.76],
356 'a9': [104.88, 147.4],
357 'a10': [73.7, 104.88],
358 'b0': [2834.65, 4008.19],
359 'b1': [2004.09, 2834.65],
360 'b2': [1417.32, 2004.09],
361 'b3': [1000.63, 1417.32],
362 'b4': [708.66, 1000.63],
363 'b5': [498.9, 708.66],
364 'b6': [354.33, 498.9],
365 'b7': [249.45, 354.33],
366 'b8': [175.75, 249.45],
367 'b9': [124.72, 175.75],
368 'b10': [87.87, 124.72],
369 'c0': [2599.37, 3676.54],
370 'c1': [1836.85, 2599.37],
371 'c2': [1298.27, 1836.85],
372 'c3': [918.43, 1298.27],
373 'c4': [649.13, 918.43],
374 'c5': [459.21, 649.13],
375 'c6': [323.15, 459.21],
376 'c7': [229.61, 323.15],
377 'c8': [161.57, 229.61],
378 'c9': [113.39, 161.57],
379 'c10': [79.37, 113.39],
380 'letter': [612, 792],
381 'government-letter': [576, 756],
382 'legal': [612, 1008],
383 'junior-legal': [576, 360],
384 'ledger': [1224, 792],
385 'tabloid': [792, 1224]
386 },
387 textColor = '0 g',
388 drawColor = '0 G',
389 page = 0,
390 pages = [],
391 objectNumber = 2, // 'n' Current object number
392 outToPages = false, // switches where out() prints. outToPages true = push to pages obj. outToPages false = doc builder content
393 offsets = [], // List of offsets. Activated and reset by buildDocument(). Pupulated by various calls buildDocument makes.
394 fonts = {}, // collection of font objects, where key is fontKey - a dynamically created label for a given font.
395 fontmap = {}, // mapping structure fontName > fontStyle > font key - performance layer. See addFont()
396 activeFontSize = 16,
397 activeFontKey, // will be string representing the KEY of the font as combination of fontName + fontStyle
398 lineWidth = 0.200025, // 2mm
399 lineHeightProportion = 1.15,
400 pageHeight,
401 pageWidth,
402 k, // Scale factor
403 documentProperties = {'title': '', 'subject': '', 'author': '', 'keywords': '', 'creator': ''},
404 lineCapID = 0,
405 lineJoinID = 0,
406 API = {},
407 events = new PubSub(API),
408 tmp,
409 plugin,
410 /////////////////////
411 // Private functions
412 /////////////////////
413 // simplified (speedier) replacement for sprintf's %.2f conversion
414 f2 = function (number) {
415 return number.toFixed(2);
416 },
417 // simplified (speedier) replacement for sprintf's %.3f conversion
418 f3 = function (number) {
419 return number.toFixed(3);
420 },
421 // simplified (speedier) replacement for sprintf's %02d
422 padd2 = function (number) {
423 var n = (number).toFixed(0);
424 if (number < 10) {
425 return '0' + n;
426 } else {
427 return n;
428 }
429 },
430 // simplified (speedier) replacement for sprintf's %02d
431 padd10 = function (number) {
432 var n = (number).toFixed(0);
433 if (n.length < 10) {
434 return new Array( 11 - n.length ).join('0') + n;
435 } else {
436 return n;
437 }
438 },
439 out = function (string) {
440 if (outToPages) { /* set by beginPage */
441 pages[page].push(string);
442 } else {
443 content.push(string);
444 content_length += string.length + 1; // +1 is for '\n' that will be used to join contents of content
445 }
446 },
447 newObject = function () {
448 // Begin a new object
449 objectNumber++;
450 offsets[objectNumber] = content_length;
451 out(objectNumber + ' 0 obj');
452 return objectNumber;
453 },
454 putStream = function (str) {
455 out('stream');
456 out(str);
457 out('endstream');
458 },
459 wPt,
460 hPt,
461 kids,
462 i,
463 putPages = function () {
464 wPt = pageWidth * k;
465 hPt = pageHeight * k;
466
467 // outToPages = false as set in endDocument(). out() writes to content.
468
469 var n, p, arr, uint, i, deflater, adler32;
470 for (n = 1; n <= page; n++) {
471 newObject();
472 out('<</Type /Page');
473 out('/Parent 1 0 R');
474 out('/Resources 2 0 R');
475 out('/Contents ' + (objectNumber + 1) + ' 0 R>>');
476 out('endobj');
477
478 // Page content
479 p = pages[n].join('\n');
480 newObject();
481 if (compress) {
482 arr = [];
483 for (i = 0; i < p.length; ++i) {
484 arr[i] = p.charCodeAt(i);
485 }
486 adler32 = adler32cs.from(p);
487 deflater = new Deflater(6);
488 deflater.append(new Uint8Array(arr));
489 p = deflater.flush();
490 arr = [new Uint8Array([120, 156]), new Uint8Array(p),
491 new Uint8Array([adler32 & 0xFF, (adler32 >> 8) & 0xFF, (adler32 >> 16) & 0xFF, (adler32 >> 24) & 0xFF])];
492 p = '';
493 for (i in arr) {
494 if (arr.hasOwnProperty(i)) {
495 p += String.fromCharCode.apply(null, arr[i]);
496 }
497 }
498 out('<</Length ' + p.length + ' /Filter [/FlateDecode]>>');
499 } else {
500 out('<</Length ' + p.length + '>>');
501 }
502 putStream(p);
503 out('endobj');
504 }
505 offsets[1] = content_length;
506 out('1 0 obj');
507 out('<</Type /Pages');
508 kids = '/Kids [';
509 for (i = 0; i < page; i++) {
510 kids += (3 + 2 * i) + ' 0 R ';
511 }
512 out(kids + ']');
513 out('/Count ' + page);
514 out('/MediaBox [0 0 ' + f2(wPt) + ' ' + f2(hPt) + ']');
515 out('>>');
516 out('endobj');
517 },
518 putFont = function (font) {
519 font.objectNumber = newObject();
520 out('<</BaseFont/' + font.PostScriptName + '/Type/Font');
521 if (typeof font.encoding === 'string') {
522 out('/Encoding/' + font.encoding);
523 }
524 out('/Subtype/Type1>>');
525 out('endobj');
526 },
527 putFonts = function () {
528 var fontKey;
529 for (fontKey in fonts) {
530 if (fonts.hasOwnProperty(fontKey)) {
531 putFont(fonts[fontKey]);
532 }
533 }
534 },
535 putXobjectDict = function () {
536 // Loop through images, or other data objects
537 events.publish('putXobjectDict');
538 },
539 putResourceDictionary = function () {
540 out('/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]');
541 out('/Font <<');
542 // Do this for each font, the '1' bit is the index of the font
543 var fontKey;
544 for (fontKey in fonts) {
545 if (fonts.hasOwnProperty(fontKey)) {
546 out('/' + fontKey + ' ' + fonts[fontKey].objectNumber + ' 0 R');
547 }
548 }
549 out('>>');
550 out('/XObject <<');
551 putXobjectDict();
552 out('>>');
553 },
554 putResources = function () {
555 putFonts();
556 events.publish('putResources');
557 // Resource dictionary
558 offsets[2] = content_length;
559 out('2 0 obj');
560 out('<<');
561 putResourceDictionary();
562 out('>>');
563 out('endobj');
564 events.publish('postPutResources');
565 },
566 addToFontDictionary = function (fontKey, fontName, fontStyle) {
567 // this is mapping structure for quick font key lookup.
568 // returns the KEY of the font (ex: "F1") for a given pair of font name and type (ex: "Arial". "Italic")
569 var undef;
570 if (fontmap[fontName] === undef) {
571 fontmap[fontName] = {}; // fontStyle is a var interpreted and converted to appropriate string. don't wrap in quotes.
572 }
573 fontmap[fontName][fontStyle] = fontKey;
574 },
575 /**
576 FontObject describes a particular font as member of an instnace of jsPDF
577
578 It's a collection of properties like 'id' (to be used in PDF stream),
579 'fontName' (font's family name), 'fontStyle' (font's style variant label)
580
581 @class
582 @public
583 @property id {String} PDF-document-instance-specific label assinged to the font.
584 @property PostScriptName {String} PDF specification full name for the font
585 @property encoding {Object} Encoding_name-to-Font_metrics_object mapping.
586 @name FontObject
587 */
588 FontObject = {},
589 addFont = function (PostScriptName, fontName, fontStyle, encoding) {
590 var fontKey = 'F' + (getObjectLength(fonts) + 1).toString(10),
591 // This is FontObject
592 font = fonts[fontKey] = {
593 'id': fontKey,
594 // , 'objectNumber': will be set by putFont()
595 'PostScriptName': PostScriptName,
596 'fontName': fontName,
597 'fontStyle': fontStyle,
598 'encoding': encoding,
599 'metadata': {}
600 };
601
602 addToFontDictionary(fontKey, fontName, fontStyle);
603
604 events.publish('addFont', font);
605
606 return fontKey;
607 },
608 addFonts = function () {
609
610 var HELVETICA = "helvetica",
611 TIMES = "times",
612 COURIER = "courier",
613 NORMAL = "normal",
614 BOLD = "bold",
615 ITALIC = "italic",
616 BOLD_ITALIC = "bolditalic",
617 encoding = 'StandardEncoding',
618 standardFonts = [
619 ['Helvetica', HELVETICA, NORMAL],
620 ['Helvetica-Bold', HELVETICA, BOLD],
621 ['Helvetica-Oblique', HELVETICA, ITALIC],
622 ['Helvetica-BoldOblique', HELVETICA, BOLD_ITALIC],
623 ['Courier', COURIER, NORMAL],
624 ['Courier-Bold', COURIER, BOLD],
625 ['Courier-Oblique', COURIER, ITALIC],
626 ['Courier-BoldOblique', COURIER, BOLD_ITALIC],
627 ['Times-Roman', TIMES, NORMAL],
628 ['Times-Bold', TIMES, BOLD],
629 ['Times-Italic', TIMES, ITALIC],
630 ['Times-BoldItalic', TIMES, BOLD_ITALIC]
631 ],
632 i,
633 l,
634 fontKey,
635 parts;
636 for (i = 0, l = standardFonts.length; i < l; i++) {
637 fontKey = addFont(
638 standardFonts[i][0],
639 standardFonts[i][1],
640 standardFonts[i][2],
641 encoding
642 );
643
644 // adding aliases for standard fonts, this time matching the capitalization
645 parts = standardFonts[i][0].split('-');
646 addToFontDictionary(fontKey, parts[0], parts[1] || '');
647 }
648
649 events.publish('addFonts', {'fonts': fonts, 'dictionary': fontmap});
650 },
651 /**
652
653 @public
654 @function
655 @param text {String}
656 @param flags {Object} Encoding flags.
657 @returns {String} Encoded string
658 */
659 to8bitStream = function (text, flags) {
660 /* PDF 1.3 spec:
661 "For text strings encoded in Unicode, the first two bytes must be 254 followed by
662 255, representing the Unicode byte order marker, U+FEFF. (This sequence conflicts
663 with the PDFDocEncoding character sequence thorn ydieresis, which is unlikely
664 to be a meaningful beginning of a word or phrase.) The remainder of the
665 string consists of Unicode character codes, according to the UTF-16 encoding
666 specified in the Unicode standard, version 2.0. Commonly used Unicode values
667 are represented as 2 bytes per character, with the high-order byte appearing first
668 in the string."
669
670 In other words, if there are chars in a string with char code above 255, we
671 recode the string to UCS2 BE - string doubles in length and BOM is prepended.
672
673 HOWEVER!
674 Actual *content* (body) text (as opposed to strings used in document properties etc)
675 does NOT expect BOM. There, it is treated as a literal GID (Glyph ID)
676
677 Because of Adobe's focus on "you subset your fonts!" you are not supposed to have
678 a font that maps directly Unicode (UCS2 / UTF16BE) code to font GID, but you could
679 fudge it with "Identity-H" encoding and custom CIDtoGID map that mimics Unicode
680 code page. There, however, all characters in the stream are treated as GIDs,
681 including BOM, which is the reason we need to skip BOM in content text (i.e. that
682 that is tied to a font).
683
684 To signal this "special" PDFEscape / to8bitStream handling mode,
685 API.text() function sets (unless you overwrite it with manual values
686 given to API.text(.., flags) )
687 flags.autoencode = true
688 flags.noBOM = true
689
690 */
691
692 /*
693 `flags` properties relied upon:
694 .sourceEncoding = string with encoding label.
695 "Unicode" by default. = encoding of the incoming text.
696 pass some non-existing encoding name
697 (ex: 'Do not touch my strings! I know what I am doing.')
698 to make encoding code skip the encoding step.
699 .outputEncoding = Either valid PDF encoding name
700 (must be supported by jsPDF font metrics, otherwise no encoding)
701 or a JS object, where key = sourceCharCode, value = outputCharCode
702 missing keys will be treated as: sourceCharCode === outputCharCode
703 .noBOM
704 See comment higher above for explanation for why this is important
705 .autoencode
706 See comment higher above for explanation for why this is important
707 */
708
709 var i, l, undef, sourceEncoding, encodingBlock, outputEncoding, newtext, isUnicode, ch, bch;
710
711 if (flags === undef) {
712 flags = {};
713 }
714
715 sourceEncoding = flags.sourceEncoding ? sourceEncoding : 'Unicode';
716
717 outputEncoding = flags.outputEncoding;
718
719 // This 'encoding' section relies on font metrics format
720 // attached to font objects by, among others,
721 // "Willow Systems' standard_font_metrics plugin"
722 // see jspdf.plugin.standard_font_metrics.js for format
723 // of the font.metadata.encoding Object.
724 // It should be something like
725 // .encoding = {'codePages':['WinANSI....'], 'WinANSI...':{code:code, ...}}
726 // .widths = {0:width, code:width, ..., 'fof':divisor}
727 // .kerning = {code:{previous_char_code:shift, ..., 'fof':-divisor},...}
728 if ((flags.autoencode || outputEncoding) &&
729 fonts[activeFontKey].metadata &&
730 fonts[activeFontKey].metadata[sourceEncoding] &&
731 fonts[activeFontKey].metadata[sourceEncoding].encoding
732 ) {
733 encodingBlock = fonts[activeFontKey].metadata[sourceEncoding].encoding;
734
735 // each font has default encoding. Some have it clearly defined.
736 if (!outputEncoding && fonts[activeFontKey].encoding) {
737 outputEncoding = fonts[activeFontKey].encoding;
738 }
739
740 // Hmmm, the above did not work? Let's try again, in different place.
741 if (!outputEncoding && encodingBlock.codePages) {
742 outputEncoding = encodingBlock.codePages[0]; // let's say, first one is the default
743 }
744
745 if (typeof outputEncoding === 'string') {
746 outputEncoding = encodingBlock[outputEncoding];
747 }
748 // we want output encoding to be a JS Object, where
749 // key = sourceEncoding's character code and
750 // value = outputEncoding's character code.
751 if (outputEncoding) {
752 isUnicode = false;
753 newtext = [];
754 for (i = 0, l = text.length; i < l; i++) {
755 ch = outputEncoding[text.charCodeAt(i)];
756 if (ch) {
757 newtext.push(
758 String.fromCharCode(ch)
759 );
760 } else {
761 newtext.push(
762 text[i]
763 );
764 }
765
766 // since we are looping over chars anyway, might as well
767 // check for residual unicodeness
768 if (newtext[i].charCodeAt(0) >> 8) { /* more than 255 */
769 isUnicode = true;
770 }
771 }
772 text = newtext.join('');
773 }
774 }
775
776 i = text.length;
777 // isUnicode may be set to false above. Hence the triple-equal to undefined
778 while (isUnicode === undef && i !== 0) {
779 if (text.charCodeAt(i - 1) >> 8) { /* more than 255 */
780 isUnicode = true;
781 }
782 i--;
783 }
784 if (!isUnicode) {
785 return text;
786 } else {
787 newtext = flags.noBOM ? [] : [254, 255];
788 for (i = 0, l = text.length; i < l; i++) {
789 ch = text.charCodeAt(i);
790 bch = ch >> 8; // divide by 256
791 if (bch >> 8) { /* something left after dividing by 256 second time */
792 throw new Error("Character at position " + i.toString(10) + " of string '" + text + "' exceeds 16bits. Cannot be encoded into UCS-2 BE");
793 }
794 newtext.push(bch);
795 newtext.push(ch - (bch << 8));
796 }
797 return String.fromCharCode.apply(undef, newtext);
798 }
799 },
800 // Replace '/', '(', and ')' with pdf-safe versions
801 pdfEscape = function (text, flags) {
802 // doing to8bitStream does NOT make this PDF display unicode text. For that
803 // we also need to reference a unicode font and embed it - royal pain in the rear.
804
805 // There is still a benefit to to8bitStream - PDF simply cannot handle 16bit chars,
806 // which JavaScript Strings are happy to provide. So, while we still cannot display
807 // 2-byte characters property, at least CONDITIONALLY converting (entire string containing)
808 // 16bit chars to (USC-2-BE) 2-bytes per char + BOM streams we ensure that entire PDF
809 // is still parseable.
810 // This will allow immediate support for unicode in document properties strings.
811 return to8bitStream(text, flags).replace(/\\/g, '\\\\').replace(/\(/g, '\\(').replace(/\)/g, '\\)');
812 },
813 putInfo = function () {
814 out('/Producer (jsPDF ' + version + ')');
815 if (documentProperties.title) {
816 out('/Title (' + pdfEscape(documentProperties.title) + ')');
817 }
818 if (documentProperties.subject) {
819 out('/Subject (' + pdfEscape(documentProperties.subject) + ')');
820 }
821 if (documentProperties.author) {
822 out('/Author (' + pdfEscape(documentProperties.author) + ')');
823 }
824 if (documentProperties.keywords) {
825 out('/Keywords (' + pdfEscape(documentProperties.keywords) + ')');
826 }
827 if (documentProperties.creator) {
828 out('/Creator (' + pdfEscape(documentProperties.creator) + ')');
829 }
830 var created = new Date();
831 out('/CreationDate (D:' +
832 [
833 created.getFullYear(),
834 padd2(created.getMonth() + 1),
835 padd2(created.getDate()),
836 padd2(created.getHours()),
837 padd2(created.getMinutes()),
838 padd2(created.getSeconds())
839 ].join('') +
840 ')'
841 );
842 },
843 putCatalog = function () {
844 out('/Type /Catalog');
845 out('/Pages 1 0 R');
846 // @TODO: Add zoom and layout modes
847 out('/OpenAction [3 0 R /FitH null]');
848 out('/PageLayout /OneColumn');
849 events.publish('putCatalog');
850 },
851 putTrailer = function () {
852 out('/Size ' + (objectNumber + 1));
853 out('/Root ' + objectNumber + ' 0 R');
854 out('/Info ' + (objectNumber - 1) + ' 0 R');
855 },
856 beginPage = function () {
857 page++;
858 // Do dimension stuff
859 outToPages = true;
860 pages[page] = [];
861 },
862 _addPage = function () {
863 beginPage();
864 // Set line width
865 out(f2(lineWidth * k) + ' w');
866 // Set draw color
867 out(drawColor);
868 // resurrecting non-default line caps, joins
869 if (lineCapID !== 0) {
870 out(lineCapID.toString(10) + ' J');
871 }
872 if (lineJoinID !== 0) {
873 out(lineJoinID.toString(10) + ' j');
874 }
875 events.publish('addPage', {'pageNumber': page});
876 },
877 /**
878 Returns a document-specific font key - a label assigned to a
879 font name + font type combination at the time the font was added
880 to the font inventory.
881
882 Font key is used as label for the desired font for a block of text
883 to be added to the PDF document stream.
884 @private
885 @function
886 @param fontName {String} can be undefined on "falthy" to indicate "use current"
887 @param fontStyle {String} can be undefined on "falthy" to indicate "use current"
888 @returns {String} Font key.
889 */
890 getFont = function (fontName, fontStyle) {
891 var key, undef;
892
893 if (fontName === undef) {
894 fontName = fonts[activeFontKey].fontName;
895 }
896 if (fontStyle === undef) {
897 fontStyle = fonts[activeFontKey].fontStyle;
898 }
899
900 try {
901 key = fontmap[fontName][fontStyle]; // returns a string like 'F3' - the KEY corresponding tot he font + type combination.
902 } catch (e) {
903 key = undef;
904 }
905 if (!key) {
906 throw new Error("Unable to look up font label for font '" + fontName + "', '" + fontStyle + "'. Refer to getFontList() for available fonts.");
907 }
908
909 return key;
910 },
911 buildDocument = function () {
912
913 outToPages = false; // switches out() to content
914 content = [];
915 offsets = [];
916
917 // putHeader()
918 out('%PDF-' + pdfVersion);
919
920 putPages();
921
922 putResources();
923
924 // Info
925 newObject();
926 out('<<');
927 putInfo();
928 out('>>');
929 out('endobj');
930
931 // Catalog
932 newObject();
933 out('<<');
934 putCatalog();
935 out('>>');
936 out('endobj');
937
938 // Cross-ref
939 var o = content_length, i;
940 out('xref');
941 out('0 ' + (objectNumber + 1));
942 out('0000000000 65535 f ');
943 for (i = 1; i <= objectNumber; i++) {
944 out(padd10(offsets[i]) + ' 00000 n ');
945 }
946 // Trailer
947 out('trailer');
948 out('<<');
949 putTrailer();
950 out('>>');
951 out('startxref');
952 out(o);
953 out('%%EOF');
954
955 outToPages = true;
956
957 return content.join('\n');
958 },
959 getStyle = function (style) {
960 // see Path-Painting Operators of PDF spec
961 var op = 'S'; // stroke
962 if (style === 'F') {
963 op = 'f'; // fill
964 } else if (style === 'FD' || style === 'DF') {
965 op = 'B'; // both
966 }
967 return op;
968 },
969
970 /**
971 Generates the PDF document.
972 Possible values:
973 datauristring (alias dataurlstring) - Data-Url-formatted data returned as string.
974 datauri (alias datauri) - Data-Url-formatted data pushed into current window's location (effectively reloading the window with contents of the PDF).
975
976 If `type` argument is undefined, output is raw body of resulting PDF returned as a string.
977
978 @param {String} type A string identifying one of the possible output types.
979 @param {Object} options An object providing some additional signalling to PDF generator.
980 @function
981 @returns {jsPDF}
982 @methodOf jsPDF#
983 @name output
984 */
985 output = function (type, options) {
986 var undef, data, length, array, i, blob;
987 switch (type) {
988 case undef:
989 return buildDocument();
990 case 'save':
991 if (navigator.getUserMedia) {
992 if (window.URL === undefined) {
993 return API.output('dataurlnewwindow');
994 } else if (window.URL.createObjectURL === undefined) {
995 return API.output('dataurlnewwindow');
996 }
997 }
998 data = buildDocument();
999
1000 // Need to add the file to BlobBuilder as a Uint8Array
1001 length = data.length;
1002 array = new Uint8Array(new ArrayBuffer(length));
1003
1004 for (i = 0; i < length; i++) {
1005 array[i] = data.charCodeAt(i);
1006 }
1007
1008 blob = new Blob([array], {type: "application/pdf"});
1009
1010 saveAs(blob, options);
1011 break;
1012 case 'datauristring':
1013 case 'dataurlstring':
1014 return 'data:application/pdf;base64,' + btoa(buildDocument());
1015 case 'datauri':
1016 case 'dataurl':
1017 document.location.href = 'data:application/pdf;base64,' + btoa(buildDocument());
1018 break;
1019 case 'dataurlnewwindow':
1020 window.open('data:application/pdf;base64,' + btoa(buildDocument()));
1021 break;
1022 default:
1023 throw new Error('Output type "' + type + '" is not supported.');
1024 }
1025 // @TODO: Add different output options
1026 };
1027
1028 if (unit === 'pt') {
1029 k = 1;
1030 } else if (unit === 'mm') {
1031 k = 72 / 25.4;
1032 } else if (unit === 'cm') {
1033 k = 72 / 2.54;
1034 } else if (unit === 'in') {
1035 k = 72;
1036 } else {
1037 throw ('Invalid unit: ' + unit);
1038 }
1039
1040 // Dimensions are stored as user units and converted to points on output
1041 if (pageFormats.hasOwnProperty(format_as_string)) {
1042 pageHeight = pageFormats[format_as_string][1] / k;
1043 pageWidth = pageFormats[format_as_string][0] / k;
1044 } else {
1045 try {
1046 pageHeight = format[1];
1047 pageWidth = format[0];
1048 } catch (err) {
1049 throw ('Invalid format: ' + format);
1050 }
1051 }
1052
1053 if (orientation === 'p' || orientation === 'portrait') {
1054 orientation = 'p';
1055 if (pageWidth > pageHeight) {
1056 tmp = pageWidth;
1057 pageWidth = pageHeight;
1058 pageHeight = tmp;
1059 }
1060 } else if (orientation === 'l' || orientation === 'landscape') {
1061 orientation = 'l';
1062 if (pageHeight > pageWidth) {
1063 tmp = pageWidth;
1064 pageWidth = pageHeight;
1065 pageHeight = tmp;
1066 }
1067 } else {
1068 throw ('Invalid orientation: ' + orientation);
1069 }
1070
1071
1072
1073 //---------------------------------------
1074 // Public API
1075
1076 /*
1077 Object exposing internal API to plugins
1078 @public
1079 */
1080 API.internal = {
1081 'pdfEscape': pdfEscape,
1082 'getStyle': getStyle,
1083 /**
1084 Returns {FontObject} describing a particular font.
1085 @public
1086 @function
1087 @param fontName {String} (Optional) Font's family name
1088 @param fontStyle {String} (Optional) Font's style variation name (Example:"Italic")
1089 @returns {FontObject}
1090 */
1091 'getFont': function () { return fonts[getFont.apply(API, arguments)]; },
1092 'getFontSize': function () { return activeFontSize; },
1093 'getLineHeight': function () { return activeFontSize * lineHeightProportion; },
1094 'btoa': btoa,
1095 'write': function (string1, string2, string3, etc) {
1096 out(
1097 arguments.length === 1 ? string1 : Array.prototype.join.call(arguments, ' ')
1098 );
1099 },
1100 'getCoordinateString': function (value) {
1101 return f2(value * k);
1102 },
1103 'getVerticalCoordinateString': function (value) {
1104 return f2((pageHeight - value) * k);
1105 },
1106 'collections': {},
1107 'newObject': newObject,
1108 'putStream': putStream,
1109 'events': events,
1110 // ratio that you use in multiplication of a given "size" number to arrive to 'point'
1111 // units of measurement.
1112 // scaleFactor is set at initialization of the document and calculated against the stated
1113 // default measurement units for the document.
1114 // If default is "mm", k is the number that will turn number in 'mm' into 'points' number.
1115 // through multiplication.
1116 'scaleFactor': k,
1117 'pageSize': {'width': pageWidth, 'height': pageHeight},
1118 'output': function (type, options) {
1119 return output(type, options);
1120 },
1121 'getNumberOfPages': function () {return pages.length - 1; },
1122 'pages': pages
1123 };
1124
1125 /**
1126 Adds (and transfers the focus to) new page to the PDF document.
1127 @function
1128 @returns {jsPDF}
1129
1130 @methodOf jsPDF#
1131 @name addPage
1132 */
1133 API.addPage = function () {
1134 _addPage();
1135 return this;
1136 };
1137
1138 /**
1139 Adds text to page. Supports adding multiline text when 'text' argument is an Array of Strings.
1140 @function
1141 @param {String|Array} text String or array of strings to be added to the page. Each line is shifted one line down per font, spacing settings declared before this call.
1142 @param {Number} x Coordinate (in units declared at inception of PDF document) against left edge of the page
1143 @param {Number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page
1144 @param {Object} flags Collection of settings signalling how the text must be encoded. Defaults are sane. If you think you want to pass some flags, you likely can read the source.
1145 @returns {jsPDF}
1146 @methodOf jsPDF#
1147 @name text
1148 */
1149 API.text = function (text, x, y, flags) {
1150 /**
1151 * Inserts something like this into PDF
1152 BT
1153 /F1 16 Tf % Font name + size
1154 16 TL % How many units down for next line in multiline text
1155 0 g % color
1156 28.35 813.54 Td % position
1157 (line one) Tj
1158 T* (line two) Tj
1159 T* (line three) Tj
1160 ET
1161 */
1162
1163 var undef, _first, _second, _third, newtext, str, i;
1164 // Pre-August-2012 the order of arguments was function(x, y, text, flags)
1165 // in effort to make all calls have similar signature like
1166 // function(data, coordinates... , miscellaneous)
1167 // this method had its args flipped.
1168 // code below allows backward compatibility with old arg order.
1169 if (typeof text === 'number') {
1170 _first = y;
1171 _second = text;
1172 _third = x;
1173
1174 text = _first;
1175 x = _second;
1176 y = _third;
1177 }
1178
1179 // If there are any newlines in text, we assume
1180 // the user wanted to print multiple lines, so break the
1181 // text up into an array. If the text is already an array,
1182 // we assume the user knows what they are doing.
1183 if (typeof text === 'string' && text.match(/[\n\r]/)) {
1184 text = text.split(/\r\n|\r|\n/g);
1185 }
1186
1187 if (typeof flags === 'undefined') {
1188 flags = {'noBOM': true, 'autoencode': true};
1189 } else {
1190
1191 if (flags.noBOM === undef) {
1192 flags.noBOM = true;
1193 }
1194
1195 if (flags.autoencode === undef) {
1196 flags.autoencode = true;
1197 }
1198
1199 }
1200
1201 if (typeof text === 'string') {
1202 str = pdfEscape(text, flags);
1203 } else if (text instanceof Array) { /* Array */
1204 // we don't want to destroy original text array, so cloning it
1205 newtext = text.concat();
1206 // we do array.join('text that must not be PDFescaped")
1207 // thus, pdfEscape each component separately
1208 for (i = newtext.length - 1; i !== -1; i--) {
1209 newtext[i] = pdfEscape(newtext[i], flags);
1210 }
1211 str = newtext.join(") Tj\nT* (");
1212 } else {
1213 throw new Error('Type of text must be string or Array. "' + text + '" is not recognized.');
1214 }
1215 // Using "'" ("go next line and render text" mark) would save space but would complicate our rendering code, templates
1216
1217 // BT .. ET does NOT have default settings for Tf. You must state that explicitely every time for BT .. ET
1218 // if you want text transformation matrix (+ multiline) to work reliably (which reads sizes of things from font declarations)
1219 // Thus, there is NO useful, *reliable* concept of "default" font for a page.
1220 // The fact that "default" (reuse font used before) font worked before in basic cases is an accident
1221 // - readers dealing smartly with brokenness of jsPDF's markup.
1222 out(
1223 'BT\n/' +
1224 activeFontKey + ' ' + activeFontSize + ' Tf\n' + // font face, style, size
1225 (activeFontSize * lineHeightProportion) + ' TL\n' + // line spacing
1226 textColor +
1227 '\n' + f2(x * k) + ' ' + f2((pageHeight - y) * k) + ' Td\n(' +
1228 str +
1229 ') Tj\nET'
1230 );
1231 return this;
1232 };
1233
1234 API.line = function (x1, y1, x2, y2) {
1235 out(
1236 f2(x1 * k) + ' ' + f2((pageHeight - y1) * k) + ' m ' +
1237 f2(x2 * k) + ' ' + f2((pageHeight - y2) * k) + ' l S'
1238 );
1239 return this;
1240 };
1241
1242 /**
1243 Adds series of curves (straight lines or cubic bezier curves) to canvas, starting at `x`, `y` coordinates.
1244 All data points in `lines` are relative to last line origin.
1245 `x`, `y` become x1,y1 for first line / curve in the set.
1246 For lines you only need to specify [x2, y2] - (ending point) vector against x1, y1 starting point.
1247 For bezier curves you need to specify [x2,y2,x3,y3,x4,y4] - vectors to control points 1, 2, ending point. All vectors are against the start of the curve - x1,y1.
1248
1249 @example .lines([[2,2],[-2,2],[1,1,2,2,3,3],[2,1]], 212,110, 10) // line, line, bezier curve, line
1250 @param {Array} lines Array of *vector* shifts as pairs (lines) or sextets (cubic bezier curves).
1251 @param {Number} x Coordinate (in units declared at inception of PDF document) against left edge of the page
1252 @param {Number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page
1253 @param {Number} scale (Defaults to [1.0,1.0]) x,y Scaling factor for all vectors. Elements can be any floating number Sub-one makes drawing smaller. Over-one grows the drawing. Negative flips the direction.
1254 @param {String} style One of 'S' (the default), 'F', 'FD' or 'DF'. 'S' draws just the curve. 'F' fills the region defined by the curves. 'DF' or 'FD' draws the curves and fills the region.
1255 @param {Boolean} closed If true, the path is closed with a straight line from the end of the last curve to the starting point.
1256 @function
1257 @returns {jsPDF}
1258 @methodOf jsPDF#
1259 @name lines
1260 */
1261 API.lines = function (lines, x, y, scale, style, closed) {
1262 var undef, _first, _second, _third, scalex, scaley, i, l, leg, x2, y2, x3, y3, x4, y4;
1263
1264 // Pre-August-2012 the order of arguments was function(x, y, lines, scale, style)
1265 // in effort to make all calls have similar signature like
1266 // function(content, coordinateX, coordinateY , miscellaneous)
1267 // this method had its args flipped.
1268 // code below allows backward compatibility with old arg order.
1269 if (typeof lines === 'number') {
1270 _first = y;
1271 _second = lines;
1272 _third = x;
1273
1274 lines = _first;
1275 x = _second;
1276 y = _third;
1277 }
1278
1279 style = getStyle(style);
1280 scale = scale === undef ? [1, 1] : scale;
1281
1282 // starting point
1283 out(f3(x * k) + ' ' + f3((pageHeight - y) * k) + ' m ');
1284
1285 scalex = scale[0];
1286 scaley = scale[1];
1287 l = lines.length;
1288 //, x2, y2 // bezier only. In page default measurement "units", *after* scaling
1289 //, x3, y3 // bezier only. In page default measurement "units", *after* scaling
1290 // ending point for all, lines and bezier. . In page default measurement "units", *after* scaling
1291 x4 = x; // last / ending point = starting point for first item.
1292 y4 = y; // last / ending point = starting point for first item.
1293
1294 for (i = 0; i < l; i++) {
1295 leg = lines[i];
1296 if (leg.length === 2) {
1297 // simple line
1298 x4 = leg[0] * scalex + x4; // here last x4 was prior ending point
1299 y4 = leg[1] * scaley + y4; // here last y4 was prior ending point
1300 out(f3(x4 * k) + ' ' + f3((pageHeight - y4) * k) + ' l');
1301 } else {
1302 // bezier curve
1303 x2 = leg[0] * scalex + x4; // here last x4 is prior ending point
1304 y2 = leg[1] * scaley + y4; // here last y4 is prior ending point
1305 x3 = leg[2] * scalex + x4; // here last x4 is prior ending point
1306 y3 = leg[3] * scaley + y4; // here last y4 is prior ending point
1307 x4 = leg[4] * scalex + x4; // here last x4 was prior ending point
1308 y4 = leg[5] * scaley + y4; // here last y4 was prior ending point
1309 out(
1310 f3(x2 * k) + ' ' +
1311 f3((pageHeight - y2) * k) + ' ' +
1312 f3(x3 * k) + ' ' +
1313 f3((pageHeight - y3) * k) + ' ' +
1314 f3(x4 * k) + ' ' +
1315 f3((pageHeight - y4) * k) + ' c'
1316 );
1317 }
1318 }
1319
1320 if (closed == true) {
1321 out(' h');
1322 }
1323
1324 // stroking / filling / both the path
1325 out(style);
1326 return this;
1327 };
1328
1329 /**
1330 Adds a rectangle to PDF
1331
1332 @param {Number} x Coordinate (in units declared at inception of PDF document) against left edge of the page
1333 @param {Number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page
1334 @param {Number} w Width (in units declared at inception of PDF document)
1335 @param {Number} h Height (in units declared at inception of PDF document)
1336 @param {String} style (Defaults to active fill/stroke style) A string signalling if stroke, fill or both are to be applied.
1337 @function
1338 @returns {jsPDF}
1339 @methodOf jsPDF#
1340 @name rect
1341 */
1342 API.rect = function (x, y, w, h, style) {
1343 var op = getStyle(style);
1344 out([
1345 f2(x * k),
1346 f2((pageHeight - y) * k),
1347 f2(w * k),
1348 f2(-h * k),
1349 're',
1350 op
1351 ].join(' '));
1352 return this;
1353 };
1354
1355 /**
1356 Adds a triangle to PDF
1357
1358 @param {Number} x1 Coordinate (in units declared at inception of PDF document) against left edge of the page
1359 @param {Number} y1 Coordinate (in units declared at inception of PDF document) against upper edge of the page
1360 @param {Number} x2 Coordinate (in units declared at inception of PDF document) against left edge of the page
1361 @param {Number} y2 Coordinate (in units declared at inception of PDF document) against upper edge of the page
1362 @param {Number} x3 Coordinate (in units declared at inception of PDF document) against left edge of the page
1363 @param {Number} y3 Coordinate (in units declared at inception of PDF document) against upper edge of the page
1364 @param {String} style (Defaults to active fill/stroke style) A string signalling if stroke, fill or both are to be applied.
1365 @function
1366 @returns {jsPDF}
1367 @methodOf jsPDF#
1368 @name triangle
1369 */
1370 API.triangle = function (x1, y1, x2, y2, x3, y3, style) {
1371 this.lines(
1372 [
1373 [ x2 - x1, y2 - y1 ], // vector to point 2
1374 [ x3 - x2, y3 - y2 ], // vector to point 3
1375 [ x1 - x3, y1 - y3 ] // closing vector back to point 1
1376 ],
1377 x1,
1378 y1, // start of path
1379 [1, 1],
1380 style,
1381 true
1382 );
1383 return this;
1384 };
1385
1386 /**
1387 Adds a rectangle with rounded corners to PDF
1388
1389 @param {Number} x Coordinate (in units declared at inception of PDF document) against left edge of the page
1390 @param {Number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page
1391 @param {Number} w Width (in units declared at inception of PDF document)
1392 @param {Number} h Height (in units declared at inception of PDF document)
1393 @param {Number} rx Radius along x axis (in units declared at inception of PDF document)
1394 @param {Number} rx Radius along y axis (in units declared at inception of PDF document)
1395 @param {String} style (Defaults to active fill/stroke style) A string signalling if stroke, fill or both are to be applied.
1396 @function
1397 @returns {jsPDF}
1398 @methodOf jsPDF#
1399 @name roundedRect
1400 */
1401 API.roundedRect = function (x, y, w, h, rx, ry, style) {
1402 var MyArc = 4 / 3 * (Math.SQRT2 - 1);
1403 this.lines(
1404 [
1405 [ (w - 2 * rx), 0 ],
1406 [ (rx * MyArc), 0, rx, ry - (ry * MyArc), rx, ry ],
1407 [ 0, (h - 2 * ry) ],
1408 [ 0, (ry * MyArc), -(rx * MyArc), ry, -rx, ry],
1409 [ (-w + 2 * rx), 0],
1410 [ -(rx * MyArc), 0, -rx, -(ry * MyArc), -rx, -ry],
1411 [ 0, (-h + 2 * ry)],
1412 [ 0, -(ry * MyArc), (rx * MyArc), -ry, rx, -ry]
1413 ],
1414 x + rx,
1415 y, // start of path
1416 [1, 1],
1417 style
1418 );
1419 return this;
1420 };
1421
1422 /**
1423 Adds an ellipse to PDF
1424
1425 @param {Number} x Coordinate (in units declared at inception of PDF document) against left edge of the page
1426 @param {Number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page
1427 @param {Number} rx Radius along x axis (in units declared at inception of PDF document)
1428 @param {Number} rx Radius along y axis (in units declared at inception of PDF document)
1429 @param {String} style (Defaults to active fill/stroke style) A string signalling if stroke, fill or both are to be applied.
1430 @function
1431 @returns {jsPDF}
1432 @methodOf jsPDF#
1433 @name ellipse
1434 */
1435 API.ellipse = function (x, y, rx, ry, style) {
1436 var op = getStyle(style),
1437 lx = 4 / 3 * (Math.SQRT2 - 1) * rx,
1438 ly = 4 / 3 * (Math.SQRT2 - 1) * ry;
1439
1440 out([
1441 f2((x + rx) * k),
1442 f2((pageHeight - y) * k),
1443 'm',
1444 f2((x + rx) * k),
1445 f2((pageHeight - (y - ly)) * k),
1446 f2((x + lx) * k),
1447 f2((pageHeight - (y - ry)) * k),
1448 f2(x * k),
1449 f2((pageHeight - (y - ry)) * k),
1450 'c'
1451 ].join(' '));
1452 out([
1453 f2((x - lx) * k),
1454 f2((pageHeight - (y - ry)) * k),
1455 f2((x - rx) * k),
1456 f2((pageHeight - (y - ly)) * k),
1457 f2((x - rx) * k),
1458 f2((pageHeight - y) * k),
1459 'c'
1460 ].join(' '));
1461 out([
1462 f2((x - rx) * k),
1463 f2((pageHeight - (y + ly)) * k),
1464 f2((x - lx) * k),
1465 f2((pageHeight - (y + ry)) * k),
1466 f2(x * k),
1467 f2((pageHeight - (y + ry)) * k),
1468 'c'
1469 ].join(' '));
1470 out([
1471 f2((x + lx) * k),
1472 f2((pageHeight - (y + ry)) * k),
1473 f2((x + rx) * k),
1474 f2((pageHeight - (y + ly)) * k),
1475 f2((x + rx) * k),
1476 f2((pageHeight - y) * k),
1477 'c',
1478 op
1479 ].join(' '));
1480 return this;
1481 };
1482
1483 /**
1484 Adds an circle to PDF
1485
1486 @param {Number} x Coordinate (in units declared at inception of PDF document) against left edge of the page
1487 @param {Number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page
1488 @param {Number} r Radius (in units declared at inception of PDF document)
1489 @param {String} style (Defaults to active fill/stroke style) A string signalling if stroke, fill or both are to be applied.
1490 @function
1491 @returns {jsPDF}
1492 @methodOf jsPDF#
1493 @name circle
1494 */
1495 API.circle = function (x, y, r, style) {
1496 return this.ellipse(x, y, r, r, style);
1497 };
1498
1499 /**
1500 Adds a properties to the PDF document
1501
1502 @param {Object} A property_name-to-property_value object structure.
1503 @function
1504 @returns {jsPDF}
1505 @methodOf jsPDF#
1506 @name setProperties
1507 */
1508 API.setProperties = function (properties) {
1509 // copying only those properties we can render.
1510 var property;
1511 for (property in documentProperties) {
1512 if (documentProperties.hasOwnProperty(property) && properties[property]) {
1513 documentProperties[property] = properties[property];
1514 }
1515 }
1516 return this;
1517 };
1518
1519 /**
1520 Sets font size for upcoming text elements.
1521
1522 @param {Number} size Font size in points.
1523 @function
1524 @returns {jsPDF}
1525 @methodOf jsPDF#
1526 @name setFontSize
1527 */
1528 API.setFontSize = function (size) {
1529 activeFontSize = size;
1530 return this;
1531 };
1532
1533 /**
1534 Sets text font face, variant for upcoming text elements.
1535 See output of jsPDF.getFontList() for possible font names, styles.
1536
1537 @param {String} fontName Font name or family. Example: "times"
1538 @param {String} fontStyle Font style or variant. Example: "italic"
1539 @function
1540 @returns {jsPDF}
1541 @methodOf jsPDF#
1542 @name setFont
1543 */
1544 API.setFont = function (fontName, fontStyle) {
1545 activeFontKey = getFont(fontName, fontStyle);
1546 // if font is not found, the above line blows up and we never go further
1547 return this;
1548 };
1549
1550 /**
1551 Switches font style or variant for upcoming text elements,
1552 while keeping the font face or family same.
1553 See output of jsPDF.getFontList() for possible font names, styles.
1554
1555 @param {String} style Font style or variant. Example: "italic"
1556 @function
1557 @returns {jsPDF}
1558 @methodOf jsPDF#
1559 @name setFontStyle
1560 */
1561 API.setFontStyle = API.setFontType = function (style) {
1562 var undef;
1563 activeFontKey = getFont(undef, style);
1564 // if font is not found, the above line blows up and we never go further
1565 return this;
1566 };
1567
1568 /**
1569 Returns an object - a tree of fontName to fontStyle relationships available to
1570 active PDF document.
1571
1572 @public
1573 @function
1574 @returns {Object} Like {'times':['normal', 'italic', ... ], 'arial':['normal', 'bold', ... ], ... }
1575 @methodOf jsPDF#
1576 @name getFontList
1577 */
1578 API.getFontList = function () {
1579 // TODO: iterate over fonts array or return copy of fontmap instead in case more are ever added.
1580 var list = {},
1581 fontName,
1582 fontStyle,
1583 tmp;
1584
1585 for (fontName in fontmap) {
1586 if (fontmap.hasOwnProperty(fontName)) {
1587 list[fontName] = tmp = [];
1588 for (fontStyle in fontmap[fontName]) {
1589 if (fontmap[fontName].hasOwnProperty(fontStyle)) {
1590 tmp.push(fontStyle);
1591 }
1592 }
1593 }
1594 }
1595
1596 return list;
1597 };
1598
1599 /**
1600 Sets line width for upcoming lines.
1601
1602 @param {Number} width Line width (in units declared at inception of PDF document)
1603 @function
1604 @returns {jsPDF}
1605 @methodOf jsPDF#
1606 @name setLineWidth
1607 */
1608 API.setLineWidth = function (width) {
1609 out((width * k).toFixed(2) + ' w');
1610 return this;
1611 };
1612
1613 /**
1614 Sets the stroke color for upcoming elements.
1615
1616 Depending on the number of arguments given, Gray, RGB, or CMYK
1617 color space is implied.
1618
1619 When only ch1 is given, "Gray" color space is implied and it
1620 must be a value in the range from 0.00 (solid black) to to 1.00 (white)
1621 if values are communicated as String types, or in range from 0 (black)
1622 to 255 (white) if communicated as Number type.
1623 The RGB-like 0-255 range is provided for backward compatibility.
1624
1625 When only ch1,ch2,ch3 are given, "RGB" color space is implied and each
1626 value must be in the range from 0.00 (minimum intensity) to to 1.00
1627 (max intensity) if values are communicated as String types, or
1628 from 0 (min intensity) to to 255 (max intensity) if values are communicated
1629 as Number types.
1630 The RGB-like 0-255 range is provided for backward compatibility.
1631
1632 When ch1,ch2,ch3,ch4 are given, "CMYK" color space is implied and each
1633 value must be a in the range from 0.00 (0% concentration) to to
1634 1.00 (100% concentration)
1635
1636 Because JavaScript treats fixed point numbers badly (rounds to
1637 floating point nearest to binary representation) it is highly advised to
1638 communicate the fractional numbers as String types, not JavaScript Number type.
1639
1640 @param {Number|String} ch1 Color channel value
1641 @param {Number|String} ch2 Color channel value
1642 @param {Number|String} ch3 Color channel value
1643 @param {Number|String} ch4 Color channel value
1644
1645 @function
1646 @returns {jsPDF}
1647 @methodOf jsPDF#
1648 @name setDrawColor
1649 */
1650 API.setDrawColor = function (ch1, ch2, ch3, ch4) {
1651 var color;
1652 if (ch2 === undefined || (ch4 === undefined && ch1 === ch2 === ch3)) {
1653 // Gray color space.
1654 if (typeof ch1 === 'string') {
1655 color = ch1 + ' G';
1656 } else {
1657 color = f2(ch1 / 255) + ' G';
1658 }
1659 } else if (ch4 === undefined) {
1660 // RGB
1661 if (typeof ch1 === 'string') {
1662 color = [ch1, ch2, ch3, 'RG'].join(' ');
1663 } else {
1664 color = [f2(ch1 / 255), f2(ch2 / 255), f2(ch3 / 255), 'RG'].join(' ');
1665 }
1666 } else {
1667 // CMYK
1668 if (typeof ch1 === 'string') {
1669 color = [ch1, ch2, ch3, ch4, 'K'].join(' ');
1670 } else {
1671 color = [f2(ch1), f2(ch2), f2(ch3), f2(ch4), 'K'].join(' ');
1672 }
1673 }
1674
1675 out(color);
1676 return this;
1677 };
1678
1679 /**
1680 Sets the fill color for upcoming elements.
1681
1682 Depending on the number of arguments given, Gray, RGB, or CMYK
1683 color space is implied.
1684
1685 When only ch1 is given, "Gray" color space is implied and it
1686 must be a value in the range from 0.00 (solid black) to to 1.00 (white)
1687 if values are communicated as String types, or in range from 0 (black)
1688 to 255 (white) if communicated as Number type.
1689 The RGB-like 0-255 range is provided for backward compatibility.
1690
1691 When only ch1,ch2,ch3 are given, "RGB" color space is implied and each
1692 value must be in the range from 0.00 (minimum intensity) to to 1.00
1693 (max intensity) if values are communicated as String types, or
1694 from 0 (min intensity) to to 255 (max intensity) if values are communicated
1695 as Number types.
1696 The RGB-like 0-255 range is provided for backward compatibility.
1697
1698 When ch1,ch2,ch3,ch4 are given, "CMYK" color space is implied and each
1699 value must be a in the range from 0.00 (0% concentration) to to
1700 1.00 (100% concentration)
1701
1702 Because JavaScript treats fixed point numbers badly (rounds to
1703 floating point nearest to binary representation) it is highly advised to
1704 communicate the fractional numbers as String types, not JavaScript Number type.
1705
1706 @param {Number|String} ch1 Color channel value
1707 @param {Number|String} ch2 Color channel value
1708 @param {Number|String} ch3 Color channel value
1709 @param {Number|String} ch4 Color channel value
1710
1711 @function
1712 @returns {jsPDF}
1713 @methodOf jsPDF#
1714 @name setFillColor
1715 */
1716 API.setFillColor = function (ch1, ch2, ch3, ch4) {
1717 var color;
1718
1719 if (ch2 === undefined || (ch4 === undefined && ch1 === ch2 === ch3)) {
1720 // Gray color space.
1721 if (typeof ch1 === 'string') {
1722 color = ch1 + ' g';
1723 } else {
1724 color = f2(ch1 / 255) + ' g';
1725 }
1726 } else if (ch4 === undefined) {
1727 // RGB
1728 if (typeof ch1 === 'string') {
1729 color = [ch1, ch2, ch3, 'rg'].join(' ');
1730 } else {
1731 color = [f2(ch1 / 255), f2(ch2 / 255), f2(ch3 / 255), 'rg'].join(' ');
1732 }
1733 } else {
1734 // CMYK
1735 if (typeof ch1 === 'string') {
1736 color = [ch1, ch2, ch3, ch4, 'k'].join(' ');
1737 } else {
1738 color = [f2(ch1), f2(ch2), f2(ch3), f2(ch4), 'k'].join(' ');
1739 }
1740 }
1741
1742 out(color);
1743 return this;
1744 };
1745
1746 /**
1747 Sets the text color for upcoming elements.
1748 If only one, first argument is given,
1749 treats the value as gray-scale color value.
1750
1751 @param {Number} r Red channel color value in range 0-255 or {String} r color value in hexadecimal, example: '#FFFFFF'
1752 @param {Number} g Green channel color value in range 0-255
1753 @param {Number} b Blue channel color value in range 0-255
1754 @function
1755 @returns {jsPDF}
1756 @methodOf jsPDF#
1757 @name setTextColor
1758 */
1759 API.setTextColor = function (r, g, b) {
1760 var patt = /#[0-9A-Fa-f]{6}/;
1761 if ((typeof r == 'string') && patt.test(r)) {
1762 var hex = r.replace('#','');
1763 var bigint = parseInt(hex, 16);
1764 r = (bigint >> 16) & 255;
1765 g = (bigint >> 8) & 255;
1766 b = bigint & 255;
1767 }
1768
1769 if ((r === 0 && g === 0 && b === 0) || (typeof g === 'undefined')) {
1770 textColor = f3(r / 255) + ' g';
1771 } else {
1772 textColor = [f3(r / 255), f3(g / 255), f3(b / 255), 'rg'].join(' ');
1773 }
1774 return this;
1775 };
1776
1777 /**
1778 Is an Object providing a mapping from human-readable to
1779 integer flag values designating the varieties of line cap
1780 and join styles.
1781
1782 @returns {Object}
1783 @fieldOf jsPDF#
1784 @name CapJoinStyles
1785 */
1786 API.CapJoinStyles = {
1787 0: 0,
1788 'butt': 0,
1789 'but': 0,
1790 'miter': 0,
1791 1: 1,
1792 'round': 1,
1793 'rounded': 1,
1794 'circle': 1,
1795 2: 2,
1796 'projecting': 2,
1797 'project': 2,
1798 'square': 2,
1799 'bevel': 2
1800 };
1801
1802 /**
1803 Sets the line cap styles
1804 See {jsPDF.CapJoinStyles} for variants
1805
1806 @param {String|Number} style A string or number identifying the type of line cap
1807 @function
1808 @returns {jsPDF}
1809 @methodOf jsPDF#
1810 @name setLineCap
1811 */
1812 API.setLineCap = function (style) {
1813 var id = this.CapJoinStyles[style];
1814 if (id === undefined) {
1815 throw new Error("Line cap style of '" + style + "' is not recognized. See or extend .CapJoinStyles property for valid styles");
1816 }
1817 lineCapID = id;
1818 out(id.toString(10) + ' J');
1819
1820 return this;
1821 };
1822
1823 /**
1824 Sets the line join styles
1825 See {jsPDF.CapJoinStyles} for variants
1826
1827 @param {String|Number} style A string or number identifying the type of line join
1828 @function
1829 @returns {jsPDF}
1830 @methodOf jsPDF#
1831 @name setLineJoin
1832 */
1833 API.setLineJoin = function (style) {
1834 var id = this.CapJoinStyles[style];
1835 if (id === undefined) {
1836 throw new Error("Line join style of '" + style + "' is not recognized. See or extend .CapJoinStyles property for valid styles");
1837 }
1838 lineJoinID = id;
1839 out(id.toString(10) + ' j');
1840
1841 return this;
1842 };
1843
1844 // Output is both an internal (for plugins) and external function
1845 API.output = output;
1846
1847 /**
1848 * Saves as PDF document. An alias of jsPDF.output('save', 'filename.pdf')
1849 * @param {String} filename The filename including extension.
1850 *
1851 * @function
1852 * @returns {jsPDF}
1853 * @methodOf jsPDF#
1854 * @name save
1855 */
1856 API.save = function (filename) {
1857 API.output('save', filename);
1858 };
1859
1860 // applying plugins (more methods) ON TOP of built-in API.
1861 // this is intentional as we allow plugins to override
1862 // built-ins
1863 for (plugin in jsPDF.API) {
1864 if (jsPDF.API.hasOwnProperty(plugin)) {
1865 if (plugin === 'events' && jsPDF.API.events.length) {
1866 (function (events, newEvents) {
1867
1868 // jsPDF.API.events is a JS Array of Arrays
1869 // where each Array is a pair of event name, handler
1870 // Events were added by plugins to the jsPDF instantiator.
1871 // These are always added to the new instance and some ran
1872 // during instantiation.
1873
1874 var eventname, handler_and_args, i;
1875
1876 for (i = newEvents.length - 1; i !== -1; i--) {
1877 // subscribe takes 3 args: 'topic', function, runonce_flag
1878 // if undefined, runonce is false.
1879 // users can attach callback directly,
1880 // or they can attach an array with [callback, runonce_flag]
1881 // that's what the "apply" magic is for below.
1882 eventname = newEvents[i][0];
1883 handler_and_args = newEvents[i][1];
1884 events.subscribe.apply(
1885 events,
1886 [eventname].concat(
1887 typeof handler_and_args === 'function' ?
1888 [ handler_and_args ] :
1889 handler_and_args
1890 )
1891 );
1892 }
1893 }(events, jsPDF.API.events));
1894 } else {
1895 API[plugin] = jsPDF.API[plugin];
1896 }
1897 }
1898 }
1899
1900 /////////////////////////////////////////
1901 // continuing initilisation of jsPDF Document object
1902 /////////////////////////////////////////
1903
1904
1905 // Add the first page automatically
1906 addFonts();
1907 activeFontKey = 'F1';
1908 _addPage();
1909
1910 events.publish('initialized');
1911
1912 return API;
1913 }
1914
1915 /**
1916 jsPDF.API is a STATIC property of jsPDF class.
1917 jsPDF.API is an object you can add methods and properties to.
1918 The methods / properties you add will show up in new jsPDF objects.
1919
1920 One property is prepopulated. It is the 'events' Object. Plugin authors can add topics, callbacks to this object. These will be reassigned to all new instances of jsPDF.
1921 Examples:
1922 jsPDF.API.events['initialized'] = function(){ 'this' is API object }
1923 jsPDF.API.events['addFont'] = function(added_font_object){ 'this' is API object }
1924
1925 @static
1926 @public
1927 @memberOf jsPDF
1928 @name API
1929
1930 @example
1931 jsPDF.API.mymethod = function(){
1932 // 'this' will be ref to internal API object. see jsPDF source
1933 // , so you can refer to built-in methods like so:
1934 // this.line(....)
1935 // this.text(....)
1936 }
1937 var pdfdoc = new jsPDF()
1938 pdfdoc.mymethod() // <- !!!!!!
1939 */
1940 jsPDF.API = {'events': []};
1941
1942 return jsPDF;
1943 }());
amcharts/exporting/jspdf.plugin.addimage.js
File was created 1 /** @preserve
2 jsPDF addImage plugin (JPEG only at this time)
3 Copyright (c) 2012 https://github.com/siefkenj/
4 */
5
6 /**
7 * Permission is hereby granted, free of charge, to any person obtaining
8 * a copy of this software and associated documentation files (the
9 * "Software"), to deal in the Software without restriction, including
10 * without limitation the rights to use, copy, modify, merge, publish,
11 * distribute, sublicense, and/or sell copies of the Software, and to
12 * permit persons to whom the Software is furnished to do so, subject to
13 * the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be
16 * included in all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
22 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
24 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 * ====================================================================
26 */
27
28 ;(function(jsPDFAPI) {
29 'use strict'
30
31 var namespace = 'addImage_'
32
33 // takes a string imgData containing the raw bytes of
34 // a jpeg image and returns [width, height]
35 // Algorithm from: http://www.64lines.com/jpeg-width-height
36 var getJpegSize = function(imgData) {
37 'use strict'
38 var width, height;
39 // Verify we have a valid jpeg header 0xff,0xd8,0xff,0xe0,?,?,'J','F','I','F',0x00
40 if (!imgData.charCodeAt(0) === 0xff ||
41 !imgData.charCodeAt(1) === 0xd8 ||
42 !imgData.charCodeAt(2) === 0xff ||
43 !imgData.charCodeAt(3) === 0xe0 ||
44 !imgData.charCodeAt(6) === 'J'.charCodeAt(0) ||
45 !imgData.charCodeAt(7) === 'F'.charCodeAt(0) ||
46 !imgData.charCodeAt(8) === 'I'.charCodeAt(0) ||
47 !imgData.charCodeAt(9) === 'F'.charCodeAt(0) ||
48 !imgData.charCodeAt(10) === 0x00) {
49 throw new Error('getJpegSize requires a binary jpeg file')
50 }
51 var blockLength = imgData.charCodeAt(4)*256 + imgData.charCodeAt(5);
52 var i = 4, len = imgData.length;
53 while ( i < len ) {
54 i += blockLength;
55 if (imgData.charCodeAt(i) !== 0xff) {
56 throw new Error('getJpegSize could not find the size of the image');
57 }
58 if (imgData.charCodeAt(i+1) === 0xc0 || //(SOF) Huffman - Baseline DCT
59 imgData.charCodeAt(i+1) === 0xc1 || //(SOF) Huffman - Extended sequential DCT
60 imgData.charCodeAt(i+1) === 0xc2 || // Progressive DCT (SOF2)
61 imgData.charCodeAt(i+1) === 0xc3 || // Spatial (sequential) lossless (SOF3)
62 imgData.charCodeAt(i+1) === 0xc4 || // Differential sequential DCT (SOF5)
63 imgData.charCodeAt(i+1) === 0xc5 || // Differential progressive DCT (SOF6)
64 imgData.charCodeAt(i+1) === 0xc6 || // Differential spatial (SOF7)
65 imgData.charCodeAt(i+1) === 0xc7) {
66 height = imgData.charCodeAt(i+5)*256 + imgData.charCodeAt(i+6);
67 width = imgData.charCodeAt(i+7)*256 + imgData.charCodeAt(i+8);
68 return [width, height];
69 } else {
70 i += 2;
71 blockLength = imgData.charCodeAt(i)*256 + imgData.charCodeAt(i+1)
72 }
73 }
74 }
75 // Image functionality ported from pdf.js
76 , putImage = function(img) {
77 var objectNumber = this.internal.newObject()
78 , out = this.internal.write
79 , putStream = this.internal.putStream
80
81 img['n'] = objectNumber
82
83 out('<</Type /XObject')
84 out('/Subtype /Image')
85 out('/Width ' + img['w'])
86 out('/Height ' + img['h'])
87 if (img['cs'] === 'Indexed') {
88 out('/ColorSpace [/Indexed /DeviceRGB '
89 + (img['pal'].length / 3 - 1) + ' ' + (objectNumber + 1)
90 + ' 0 R]');
91 } else {
92 out('/ColorSpace /' + img['cs']);
93 if (img['cs'] === 'DeviceCMYK') {
94 out('/Decode [1 0 1 0 1 0 1 0]');
95 }
96 }
97 out('/BitsPerComponent ' + img['bpc']);
98 if ('f' in img) {
99 out('/Filter /' + img['f']);
100 }
101 if ('dp' in img) {
102 out('/DecodeParms <<' + img['dp'] + '>>');
103 }
104 if ('trns' in img && img['trns'].constructor == Array) {
105 var trns = '';
106 for ( var i = 0; i < img['trns'].length; i++) {
107 trns += (img[trns][i] + ' ' + img['trns'][i] + ' ');
108 out('/Mask [' + trns + ']');
109 }
110 }
111 if ('smask' in img) {
112 out('/SMask ' + (objectNumber + 1) + ' 0 R');
113 }
114 out('/Length ' + img['data'].length + '>>');
115
116 putStream(img['data']);
117
118 out('endobj');
119 }
120 , putResourcesCallback = function() {
121 var images = this.internal.collections[namespace + 'images']
122 for ( var i in images ) {
123 putImage.call(this, images[i])
124 }
125 }
126 , putXObjectsDictCallback = function(){
127 var images = this.internal.collections[namespace + 'images']
128 , out = this.internal.write
129 , image
130 for (var i in images) {
131 image = images[i]
132 out(
133 '/I' + image['i']
134 , image['n']
135 , '0'
136 , 'R'
137 )
138 }
139 }
140
141 jsPDFAPI.addImage = function(imageData, format, x, y, w, h) {
142 'use strict'
143 if (typeof imageData === 'object' && imageData.nodeType === 1) {
144 var canvas = document.createElement('canvas');
145 canvas.width = imageData.clientWidth;
146 canvas.height = imageData.clientHeight;
147
148 var ctx = canvas.getContext('2d');
149 if (!ctx) {
150 throw ('addImage requires canvas to be supported by browser.');
151 }
152 ctx.drawImage(imageData, 0, 0, canvas.width, canvas.height);
153 imageData = canvas.toDataURL('image/jpeg');
154 format = "JPEG";
155 }
156 if (format.toUpperCase() !== 'JPEG') {
157 throw new Error('addImage currently only supports format \'JPEG\', not \''+format+'\'');
158 }
159
160 var imageIndex
161 , images = this.internal.collections[namespace + 'images']
162 , coord = this.internal.getCoordinateString
163 , vcoord = this.internal.getVerticalCoordinateString;
164
165 // Detect if the imageData is raw binary or Data URL
166 if (imageData.substring(0, 23) === 'data:image/jpeg;base64,') {
167 imageData = atob(imageData.replace('data:image/jpeg;base64,', ''));
168 }
169
170 if (images){
171 // this is NOT the first time this method is ran on this instance of jsPDF object.
172 imageIndex = Object.keys ?
173 Object.keys(images).length :
174 (function(o){
175 var i = 0
176 for (var e in o){if(o.hasOwnProperty(e)){ i++ }}
177 return i
178 })(images)
179 } else {
180 // this is the first time this method is ran on this instance of jsPDF object.
181 imageIndex = 0
182 this.internal.collections[namespace + 'images'] = images = {}
183 this.internal.events.subscribe('putResources', putResourcesCallback)
184 this.internal.events.subscribe('putXobjectDict', putXObjectsDictCallback)
185 }
186
187 var dims = getJpegSize(imageData);
188 var info = {
189 w : dims[0],
190 h : dims[1],
191 cs : 'DeviceRGB',
192 bpc : 8,
193 f : 'DCTDecode',
194 i : imageIndex,
195 data : imageData
196 // n: objectNumber will be added by putImage code
197
198 };
199 images[imageIndex] = info
200 if (!w && !h) {
201 w = -96;
202 h = -96;
203 }
204 if (w < 0) {
205 w = (-1) * info['w'] * 72 / w / this.internal.scaleFactor;
206 }
207 if (h < 0) {
208 h = (-1) * info['h'] * 72 / h / this.internal.scaleFactor;
209 }
210 if (w === 0) {
211 w = h * info['w'] / info['h'];
212 }
213 if (h === 0) {
214 h = w * info['h'] / info['w'];
215 }
216
217 this.internal.write(
218 'q'
219 , coord(w)
220 , '0 0'
221 , coord(h) // TODO: check if this should be shifted by vcoord
222 , coord(x)
223 , vcoord(y + h)
224 , 'cm /I'+info['i']
225 , 'Do Q'
226 )
227
228 return this
229 }
230 })(jsPDF.API)
amcharts/exporting/rgbcolor.js
File was created 1 /**
2 * A class to parse color values
3 * @author Stoyan Stefanov <sstoo@gmail.com>
4 * @link http://www.phpied.com/rgb-color-parser-in-javascript/
5 * @license Use it if you like it
6 */
7 function RGBColor(color_string)
8 {
9 this.ok = false;
10
11 // strip any leading #
12 if (color_string.charAt(0) == '#') { // remove # if any
13 color_string = color_string.substr(1,6);
14 }
15
16 color_string = color_string.replace(/ /g,'');
17 color_string = color_string.toLowerCase();
18
19 // before getting into regexps, try simple matches
20 // and overwrite the input
21 var simple_colors = {
22 aliceblue: 'f0f8ff',
23 antiquewhite: 'faebd7',
24 aqua: '00ffff',
25 aquamarine: '7fffd4',
26 azure: 'f0ffff',
27 beige: 'f5f5dc',
28 bisque: 'ffe4c4',
29 black: '000000',
30 blanchedalmond: 'ffebcd',
31 blue: '0000ff',
32 blueviolet: '8a2be2',
33 brown: 'a52a2a',
34 burlywood: 'deb887',
35 cadetblue: '5f9ea0',
36 chartreuse: '7fff00',
37 chocolate: 'd2691e',
38 coral: 'ff7f50',
39 cornflowerblue: '6495ed',
40 cornsilk: 'fff8dc',
41 crimson: 'dc143c',
42 cyan: '00ffff',
43 darkblue: '00008b',
44 darkcyan: '008b8b',
45 darkgoldenrod: 'b8860b',
46 darkgray: 'a9a9a9',
47 darkgreen: '006400',
48 darkkhaki: 'bdb76b',
49 darkmagenta: '8b008b',
50 darkolivegreen: '556b2f',
51 darkorange: 'ff8c00',
52 darkorchid: '9932cc',
53 darkred: '8b0000',
54 darksalmon: 'e9967a',
55 darkseagreen: '8fbc8f',
56 darkslateblue: '483d8b',
57 darkslategray: '2f4f4f',
58 darkturquoise: '00ced1',
59 darkviolet: '9400d3',
60 deeppink: 'ff1493',
61 deepskyblue: '00bfff',
62 dimgray: '696969',
63 dodgerblue: '1e90ff',
64 feldspar: 'd19275',
65 firebrick: 'b22222',
66 floralwhite: 'fffaf0',
67 forestgreen: '228b22',
68 fuchsia: 'ff00ff',
69 gainsboro: 'dcdcdc',
70 ghostwhite: 'f8f8ff',
71 gold: 'ffd700',
72 goldenrod: 'daa520',
73 gray: '808080',
74 green: '008000',
75 greenyellow: 'adff2f',
76 honeydew: 'f0fff0',
77 hotpink: 'ff69b4',
78 indianred : 'cd5c5c',
79 indigo : '4b0082',
80 ivory: 'fffff0',
81 khaki: 'f0e68c',
82 lavender: 'e6e6fa',
83 lavenderblush: 'fff0f5',
84 lawngreen: '7cfc00',
85 lemonchiffon: 'fffacd',
86 lightblue: 'add8e6',
87 lightcoral: 'f08080',
88 lightcyan: 'e0ffff',
89 lightgoldenrodyellow: 'fafad2',
90 lightgrey: 'd3d3d3',
91 lightgreen: '90ee90',
92 lightpink: 'ffb6c1',
93 lightsalmon: 'ffa07a',
94 lightseagreen: '20b2aa',
95 lightskyblue: '87cefa',
96 lightslateblue: '8470ff',
97 lightslategray: '778899',
98 lightsteelblue: 'b0c4de',
99 lightyellow: 'ffffe0',
100 lime: '00ff00',
101 limegreen: '32cd32',
102 linen: 'faf0e6',
103 magenta: 'ff00ff',
104 maroon: '800000',
105 mediumaquamarine: '66cdaa',
106 mediumblue: '0000cd',
107 mediumorchid: 'ba55d3',
108 mediumpurple: '9370d8',
109 mediumseagreen: '3cb371',
110 mediumslateblue: '7b68ee',
111 mediumspringgreen: '00fa9a',
112 mediumturquoise: '48d1cc',
113 mediumvioletred: 'c71585',
114 midnightblue: '191970',
115 mintcream: 'f5fffa',
116 mistyrose: 'ffe4e1',
117 moccasin: 'ffe4b5',
118 navajowhite: 'ffdead',
119 navy: '000080',
120 oldlace: 'fdf5e6',
121 olive: '808000',
122 olivedrab: '6b8e23',
123 orange: 'ffa500',
124 orangered: 'ff4500',
125 orchid: 'da70d6',
126 palegoldenrod: 'eee8aa',
127 palegreen: '98fb98',
128 paleturquoise: 'afeeee',
129 palevioletred: 'd87093',
130 papayawhip: 'ffefd5',
131 peachpuff: 'ffdab9',
132 peru: 'cd853f',
133 pink: 'ffc0cb',
134 plum: 'dda0dd',
135 powderblue: 'b0e0e6',
136 purple: '800080',
137 red: 'ff0000',
138 rosybrown: 'bc8f8f',
139 royalblue: '4169e1',
140 saddlebrown: '8b4513',
141 salmon: 'fa8072',
142 sandybrown: 'f4a460',
143 seagreen: '2e8b57',
144 seashell: 'fff5ee',
145 sienna: 'a0522d',
146 silver: 'c0c0c0',
147 skyblue: '87ceeb',
148 slateblue: '6a5acd',
149 slategray: '708090',
150 snow: 'fffafa',
151 springgreen: '00ff7f',
152 steelblue: '4682b4',
153 tan: 'd2b48c',
154 teal: '008080',
155 thistle: 'd8bfd8',
156 tomato: 'ff6347',
157 turquoise: '40e0d0',
158 violet: 'ee82ee',
159 violetred: 'd02090',
160 wheat: 'f5deb3',
161 white: 'ffffff',
162 whitesmoke: 'f5f5f5',
163 yellow: 'ffff00',
164 yellowgreen: '9acd32'
165 };
166 for (var key in simple_colors) {
167 if (color_string == key) {
168 color_string = simple_colors[key];
169 }
170 }
171 // emd of simple type-in colors
172
173 // array of color definition objects
174 var color_defs = [
175 {
176 re: /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,
177 example: ['rgb(123, 234, 45)', 'rgb(255,234,245)'],
178 process: function (bits){
179 return [
180 parseInt(bits[1]),
181 parseInt(bits[2]),
182 parseInt(bits[3])
183 ];
184 }
185 },
186 {
187 re: /^(\w{2})(\w{2})(\w{2})$/,
188 example: ['#00ff00', '336699'],
189 process: function (bits){
190 return [
191 parseInt(bits[1], 16),
192 parseInt(bits[2], 16),
193 parseInt(bits[3], 16)
194 ];
195 }
196 },
197 {
198 re: /^(\w{1})(\w{1})(\w{1})$/,
199 example: ['#fb0', 'f0f'],
200 process: function (bits){
201 return [
202 parseInt(bits[1] + bits[1], 16),
203 parseInt(bits[2] + bits[2], 16),
204 parseInt(bits[3] + bits[3], 16)
205 ];
206 }
207 }
208 ];
209
210 // search through the definitions to find a match
211 for (var i = 0; i < color_defs.length; i++) {
212 var re = color_defs[i].re;
213 var processor = color_defs[i].process;
214 var bits = re.exec(color_string);
215 if (bits) {
216 channels = processor(bits);
217 this.r = channels[0];
218 this.g = channels[1];
219 this.b = channels[2];
220 this.ok = true;
221 }
222
223 }
224
225 // validate/cleanup values
226 this.r = (this.r < 0 || isNaN(this.r)) ? 0 : ((this.r > 255) ? 255 : this.r);
227 this.g = (this.g < 0 || isNaN(this.g)) ? 0 : ((this.g > 255) ? 255 : this.g);
228 this.b = (this.b < 0 || isNaN(this.b)) ? 0 : ((this.b > 255) ? 255 : this.b);
229
230 // some getters
231 this.toRGB = function () {
232 return 'rgb(' + this.r + ', ' + this.g + ', ' + this.b + ')';
233 }
234 this.toHex = function () {
235 var r = this.r.toString(16);
236 var g = this.g.toString(16);
237 var b = this.b.toString(16);
238 if (r.length == 1) r = '0' + r;
239 if (g.length == 1) g = '0' + g;
240 if (b.length == 1) b = '0' + b;
241 return '#' + r + g + b;
242 }
243
244 // help
245 this.getHelpXML = function () {
246
247 var examples = new Array();
248 // add regexps
249 for (var i = 0; i < color_defs.length; i++) {
250 var example = color_defs[i].example;
251 for (var j = 0; j < example.length; j++) {
252 examples[examples.length] = example[j];
253 }
254 }
255 // add type-in colors
256 for (var sc in simple_colors) {
257 examples[examples.length] = sc;
258 }
259
260 var xml = document.createElement('ul');
261 xml.setAttribute('id', 'rgbcolor-examples');
262 for (var i = 0; i < examples.length; i++) {
263 try {
264 var list_item = document.createElement('li');
265 var list_color = new RGBColor(examples[i]);
266 var example_div = document.createElement('div');
267 example_div.style.cssText =
268 'margin: 3px; '
269 + 'border: 1px solid black; '
270 + 'background:' + list_color.toHex() + '; '
271 + 'color:' + list_color.toHex()
272 ;
273 example_div.appendChild(document.createTextNode('test'));
274 var list_item_value = document.createTextNode(
275 ' ' + examples[i] + ' -> ' + list_color.toRGB() + ' -> ' + list_color.toHex()
276 );
277 list_item.appendChild(example_div);
278 list_item.appendChild(list_item_value);
279 xml.appendChild(list_item);
280
281 } catch(e){}
282 }
283 return xml;
284
285 }
286
287 }
288
1 /** 289
amcharts/funnel.js
File was created 1 AmCharts.AmFunnelChart=AmCharts.Class({inherits:AmCharts.AmSlicedChart,construct:function(u){this.type="funnel";AmCharts.AmFunnelChart.base.construct.call(this,u);this.cname="AmFunnelChart";this.startX=this.startY=0;this.baseWidth="100%";this.neckHeight=this.neckWidth=0;this.rotate=!1;this.valueRepresents="height";this.pullDistance=30;this.labelPosition="center";this.labelText="[[title]]: [[value]]";this.balloonText="[[title]]: [[value]]\n[[description]]";AmCharts.applyTheme(this,u,this.cname)},drawChart:function(){AmCharts.AmFunnelChart.base.drawChart.call(this);
2 var u=this.chartData;if(AmCharts.ifArray(u))if(0<this.realWidth&&0<this.realHeight){var t=this.container,D=this.startDuration,k=this.rotate,x=this.updateWidth();this.realWidth=x;var g=this.updateHeight();this.realHeight=g;var q=AmCharts.toCoordinate,A=q(this.marginLeft,x),v=q(this.marginRight,x),a=q(this.marginTop,g)+this.getTitleHeight(),q=q(this.marginBottom,g),v=x-A-v,y=AmCharts.toCoordinate(this.baseWidth,v),l=AmCharts.toCoordinate(this.neckWidth,v),z=g-q-a,w=AmCharts.toCoordinate(this.neckHeight,
3 z),r=a+z-w;k&&(a=g-q,r=a-z+w);this.firstSliceY=a;AmCharts.VML&&(this.startAlpha=1);for(var h=v/2+A,E=(z-w)/((y-l)/2),m=y/2,y=(z-w)*(y+l)/2+l*w,B=a,F=0,w=0;w<u.length;w++){var c=u[w],d;if(!0!==c.hidden){var n=[],e=[],b;if("height"==this.valueRepresents)b=z*c.percents/100;else{var p=-y*c.percents/100/2,C=m;d=-1/(2*E);b=Math.pow(C,2)-4*d*p;0>b&&(b=0);b=(Math.sqrt(b)-C)/(2*d);if(!k&&a>=r||k&&a<=r)b=2*-p/l;else if(!k&&a+b>r||k&&a-b<r)d=k?Math.round(b+(a-b-r)):Math.round(b-(a+b-r)),b=d/E,b=d+2*(-p-(C-b/
4 2)*d)/l}p=m-b/E;C=!1;!k&&a+b>r||k&&a-b<r?(p=l/2,n.push(h-m,h+m,h+p,h+p,h-p,h-p),k?(d=b+(a-b-r),a<r&&(d=0),e.push(a,a,a-d,a-b,a-b,a-d,a)):(d=b-(a+b-r),a>r&&(d=0),e.push(a,a,a+d,a+b,a+b,a+d,a)),C=!0):(n.push(h-m,h+m,h+p,h-p),k?e.push(a,a,a-b,a-b):e.push(a,a,a+b,a+b));t.set();d=t.set();n=AmCharts.polygon(t,n,e,c.color,c.alpha,this.outlineThickness,this.outlineColor,this.outlineAlpha);d.push(n);this.graphsSet.push(d);c.wedge=d;c.index=w;if(e=this.gradientRatio){var s=[],f;for(f=0;f<e.length;f++)s.push(AmCharts.adjustLuminosity(c.color,
5 e[f]));0<s.length&&n.gradient("linearGradient",s);c.pattern&&n.pattern(c.pattern)}0<D&&(this.chartCreated||d.setAttr("opacity",this.startAlpha));this.addEventListeners(d,c);c.ty0=a-b/2;this.labelsEnabled&&this.labelText&&c.percents>=this.hideLabelsPercent&&(e=this.formatString(this.labelText,c),(n=this.labelFunction)&&(e=n(c,e)),s=c.labelColor,s||(s=this.color),n=this.labelPosition,f="left","center"==n&&(f="middle"),"left"==n&&(f="right"),e=AmCharts.wrappedText(t,e,s,this.fontFamily,this.fontSize,
6 f,!1,this.maxLabelWidth),e.node.style.pointerEvents="none",d.push(e),s=h,k?(f=a-b/2,c.ty0=f):(f=a+b/2,c.ty0=f,f<B+F+5&&(f=B+F+5),f>g-q&&(f=g-q)),"right"==n&&(s=v+10+A,c.tx0=h+(m-b/2/E),C&&(c.tx0=h+p)),"left"==n&&(c.tx0=h-(m-b/2/E),C&&(c.tx0=h-p),s=A),c.label=e,c.labelX=s,c.labelY=f,c.labelHeight=e.getBBox().height,e.translate(s,f),m=e.getBBox(),B=AmCharts.rect(t,m.width+5,m.height+5,"#ffffff",.005),B.translate(s+m.x,f+m.y),d.push(B),c.hitRect=B,F=e.getBBox().height,B=f);(0===c.alpha||0<D&&!this.chartCreated)&&
7 d.hide();a=k?a-b:a+b;m=p;c.startX=AmCharts.toCoordinate(this.startX,x);c.startY=AmCharts.toCoordinate(this.startY,g);c.pullX=AmCharts.toCoordinate(this.pullDistance,x);c.pullY=0;c.balloonX=h;c.balloonY=c.ty0}}this.arrangeLabels();this.initialStart();(u=this.legend)&&u.invalidateSize()}else this.cleanChart();this.dispDUpd();this.chartCreated=!0},arrangeLabels:function(){var u=this.rotate,t;t=u?0:this.realHeight;for(var D=0,k=this.chartData,x=k.length,g,q=0;q<x;q++){g=k[x-q-1];var A=g.label,v=g.labelY,
8 a=g.labelX,y=g.labelHeight,l=v;u?t+D+5>v&&(l=t+D+5):v+y+5>t&&(l=t-5-y);t=l;D=y;if(A){A.translate(a,l);var z=A.getBBox()}g.hitRect.translate(a+z.x,l+z.y);g.labelY=l;g.tx=a;g.ty=l;g.tx2=a}"center"!=this.labelPosition&&this.drawTicks()}});
amcharts/gauge.js
File was created 1 AmCharts.GaugeAxis=AmCharts.Class({construct:function(a){this.cname="GaugeAxis";this.radius="95%";this.startAngle=-120;this.endAngle=120;this.startValue=0;this.endValue=200;this.gridCount=5;this.tickLength=10;this.minorTickLength=5;this.tickColor="#555555";this.labelFrequency=this.tickThickness=this.tickAlpha=1;this.inside=!0;this.labelOffset=10;this.showLastLabel=this.showFirstLabel=!0;this.axisThickness=1;this.axisColor="#000000";this.axisAlpha=1;this.gridInside=!0;this.topTextYOffset=0;this.topTextBold=
2 !0;this.bottomTextYOffset=0;this.bottomTextBold=!0;this.centerY=this.centerX="0%";this.bandOutlineAlpha=this.bandOutlineThickness=0;this.bandOutlineColor="#000000";this.bandAlpha=1;AmCharts.applyTheme(this,a,"GaugeAxis")},value2angle:function(a){return(a-this.startValue)/(this.endValue-this.startValue)*(this.endAngle-this.startAngle)+this.startAngle},setTopText:function(a){if(void 0!==a){this.topText=a;var b=this.chart;if(this.axisCreated){this.topTF&&this.topTF.remove();var c=this.topTextFontSize;
3 c||(c=b.fontSize);var d=this.topTextColor;d||(d=b.color);a=AmCharts.text(b.container,a,d,b.fontFamily,c,void 0,this.topTextBold);a.translate(this.centerXReal,this.centerYReal-this.radiusReal/2+this.topTextYOffset);this.chart.graphsSet.push(a);this.topTF=a}}},setBottomText:function(a){if(void 0!==a){this.bottomText=a;var b=this.chart;if(this.axisCreated){this.bottomTF&&this.bottomTF.remove();var c=this.bottomTextFontSize;c||(c=b.fontSize);var d=this.bottomTextColor;d||(d=b.color);a=AmCharts.text(b.container,
4 a,d,b.fontFamily,c,void 0,this.bottomTextBold);a.translate(this.centerXReal,this.centerYReal+this.radiusReal/2+this.bottomTextYOffset);this.bottomTF=a;this.chart.graphsSet.push(a)}}},draw:function(){var a=this.chart,b=a.graphsSet,c=this.startValue,d=this.endValue,f=this.valueInterval;isNaN(f)&&(f=(d-c)/this.gridCount);var m=this.minorTickInterval;isNaN(m)&&(m=f/5);var p=this.startAngle,k=this.endAngle,e=this.tickLength,l=(d-c)/f+1,g=(k-p)/(l-1);this.singleValueAngle=d=g/f;var h=a.container,q=this.tickColor,
5 u=this.tickAlpha,C=this.tickThickness,D=f/m,F=g/D,m=this.minorTickLength,I=this.labelFrequency,s=this.radiusReal;this.inside||(s-=15);var y=a.centerX+AmCharts.toCoordinate(this.centerX,a.realWidth),z=a.centerY+AmCharts.toCoordinate(this.centerY,a.realHeight);this.centerXReal=y;this.centerYReal=z;var J={fill:this.axisColor,"fill-opacity":this.axisAlpha,"stroke-width":0,"stroke-opacity":0},n,A;this.gridInside?A=n=s:(n=s-e,A=n+m);var r=this.axisThickness/2,k=AmCharts.wedge(h,y,z,p,k-p,n+r,n+r,n-r,0,
6 J);b.push(k);k=AmCharts.doNothing;AmCharts.isModern||(k=Math.round);J=AmCharts.getDecimals(f);for(n=0;n<l;n++){var w=c+n*f,r=p+n*g,v=k(y+s*Math.sin(r/180*Math.PI)),B=k(z-s*Math.cos(r/180*Math.PI)),x=k(y+(s-e)*Math.sin(r/180*Math.PI)),t=k(z-(s-e)*Math.cos(r/180*Math.PI)),v=AmCharts.line(h,[v,x],[B,t],q,u,C,0,!1,!1,!0);b.push(v);v=-1;x=this.labelOffset;this.inside||(x=-x-e,v=1);var B=Math.sin(r/180*Math.PI),t=Math.cos(r/180*Math.PI),B=y+(s-e-x)*B,x=z-(s-e-x)*t,E=this.fontSize;isNaN(E)&&(E=a.fontSize);
7 var t=Math.sin((r-90)/180*Math.PI),K=Math.cos((r-90)/180*Math.PI);if(0<I&&n/I==Math.round(n/I)&&(this.showLastLabel||n!=l-1)&&(this.showFirstLabel||0!==n)){var G=AmCharts.formatNumber(w,a.nf,J),H=this.unit;H&&(G="left"==this.unitPosition?H+G:G+H);(H=this.labelFunction)&&(G=H(w));w=AmCharts.text(h,G,a.color,a.fontFamily,E);E=w.getBBox();w.translate(B+v*E.width/2*K,x+v*E.height/2*t);b.push(w)}if(n<l-1)for(w=1;w<D;w++)t=r+F*w,v=k(y+A*Math.sin(t/180*Math.PI)),B=k(z-A*Math.cos(t/180*Math.PI)),x=k(y+(A-
8 m)*Math.sin(t/180*Math.PI)),t=k(z-(A-m)*Math.cos(t/180*Math.PI)),v=AmCharts.line(h,[v,x],[B,t],q,u,C,0,!1,!1,!0),b.push(v)}if(b=this.bands)for(c=0;c<b.length;c++)if(f=b[c])q=f.startValue,u=f.endValue,e=AmCharts.toCoordinate(f.radius,s),isNaN(e)&&(e=A),l=AmCharts.toCoordinate(f.innerRadius,s),isNaN(l)&&(l=e-m),g=p+d*(q-this.startValue),u=d*(u-q),C=f.outlineColor,void 0==C&&(C=this.bandOutlineColor),D=f.outlineThickness,isNaN(D)&&(D=this.bandOutlineThickness),F=f.outlineAlpha,isNaN(F)&&(F=this.bandOutlineAlpha),
9 q=f.alpha,isNaN(q)&&(q=this.bandAlpha),e=AmCharts.wedge(h,y,z,g,u,e,e,l,0,{fill:f.color,stroke:C,"stroke-width":D,"stroke-opacity":F}),e.setAttr("opacity",q),a.gridSet.push(e),this.addEventListeners(e,f);this.axisCreated=!0;this.setTopText(this.topText);this.setBottomText(this.bottomText);a=a.graphsSet.getBBox();this.width=a.width;this.height=a.height},addEventListeners:function(a,b){var c=this.chart;a.mouseover(function(a){c.showBalloon(b.balloonText,b.color,!0)}).mouseout(function(a){c.hideBalloon()})}});AmCharts.GaugeArrow=AmCharts.Class({construct:function(a){this.cname="GaugeArrow";this.color="#000000";this.nailAlpha=this.alpha=1;this.startWidth=this.nailRadius=8;this.endWidth=0;this.borderAlpha=1;this.radius="90%";this.nailBorderAlpha=this.innerRadius=0;this.nailBorderThickness=1;this.frame=0;AmCharts.applyTheme(this,a,"GaugeArrow")},setValue:function(a){var b=this.chart;b?b.setValue?b.setValue(this,a):this.previousValue=this.value=a:this.previousValue=this.value=a}});
10 AmCharts.GaugeBand=AmCharts.Class({construct:function(){this.cname="GaugeBand"}});AmCharts.AmAngularGauge=AmCharts.Class({inherits:AmCharts.AmChart,construct:function(a){this.cname="AmAngularGauge";AmCharts.AmAngularGauge.base.construct.call(this,a);this.theme=a;this.type="gauge";this.minRadius=this.marginRight=this.marginBottom=this.marginTop=this.marginLeft=10;this.faceColor="#FAFAFA";this.faceAlpha=0;this.faceBorderWidth=1;this.faceBorderColor="#555555";this.faceBorderAlpha=0;this.arrows=[];this.axes=[];this.startDuration=1;this.startEffect="easeOutSine";this.adjustSize=!0;
11 this.extraHeight=this.extraWidth=0;AmCharts.applyTheme(this,a,this.cname)},addAxis:function(a){this.axes.push(a)},formatString:function(a,b){return a=AmCharts.formatValue(a,b,["value"],this.nf,"",this.usePrefixes,this.prefixesOfSmallNumbers,this.prefixesOfBigNumbers)},initChart:function(){AmCharts.AmAngularGauge.base.initChart.call(this);var a;0===this.axes.length&&(a=new AmCharts.GaugeAxis(this.theme),this.addAxis(a));var b;for(b=0;b<this.axes.length;b++)a=this.axes[b],a=AmCharts.processObject(a,
12 AmCharts.GaugeAxis,this.theme),a.chart=this,this.axes[b]=a;var c=this.arrows;for(b=0;b<c.length;b++){a=c[b];a=AmCharts.processObject(a,AmCharts.GaugeArrow,this.theme);a.chart=this;c[b]=a;var d=a.axis;AmCharts.isString(d)&&(a.axis=AmCharts.getObjById(this.axes,d));a.axis||(a.axis=this.axes[0]);isNaN(a.value)&&a.setValue(a.axis.startValue);isNaN(a.previousValue)&&(a.previousValue=a.axis.startValue)}this.setLegendData(c);this.drawChart();this.totalFrames=1E3*this.startDuration/AmCharts.updateRate},drawChart:function(){AmCharts.AmAngularGauge.base.drawChart.call(this);
13 var a=this.container,b=this.updateWidth();this.realWidth=b;var c=this.updateHeight();this.realHeight=c;var d=AmCharts.toCoordinate,f=d(this.marginLeft,b),m=d(this.marginRight,b),p=d(this.marginTop,c)+this.getTitleHeight(),k=d(this.marginBottom,c),e=d(this.radius,b,c),d=b-f-m,l=c-p-k+this.extraHeight;e||(e=Math.min(d,l)/2);e<this.minRadius&&(e=this.minRadius);this.radiusReal=e;this.centerX=(b-f-m)/2+f;this.centerY=(c-p-k)/2+p+this.extraHeight/2;isNaN(this.gaugeX)||(this.centerX=this.gaugeX);isNaN(this.gaugeY)||
14 (this.centerY=this.gaugeY);var b=this.faceAlpha,c=this.faceBorderAlpha,g;if(0<b||0<c)g=AmCharts.circle(a,e,this.faceColor,b,this.faceBorderWidth,this.faceBorderColor,c,!1),g.translate(this.centerX,this.centerY),g.toBack(),(a=this.facePattern)&&g.pattern(a);for(b=e=a=0;b<this.axes.length;b++){c=this.axes[b];f=c.radius;c.radiusReal=AmCharts.toCoordinate(f,this.radiusReal);c.draw();if(-1!==f.indexOf("%"))var h=1+(100-Number(f.substr(0,f.length-1)))/100;c.width*h>a&&(a=c.width*h);c.height*h>e&&(e=c.height*
15 h)}(h=this.legend)&&h.invalidateSize();if(this.adjustSize&&!this.chartCreated){g&&(g=g.getBBox(),g.width>a&&(a=g.width),g.height>e&&(e=g.height));g=0;if(l>e||d>a)g=Math.min(l-e,d-a);0<g&&(this.extraHeight=l-e,this.chartCreated=!0,this.validateNow())}this.dispDUpd();this.chartCreated=!0},validateSize:function(){this.extraHeight=this.extraWidth=0;this.chartCreated=!1;AmCharts.AmAngularGauge.base.validateSize.call(this)},addArrow:function(a){this.arrows.push(a)},removeArrow:function(a){AmCharts.removeFromArray(this.arrows,
16 a);this.validateNow()},removeAxis:function(a){AmCharts.removeFromArray(this.axes,a);this.validateNow()},drawArrow:function(a,b){a.set&&a.set.remove();var c=this.container;a.set=c.set();if(!a.hidden){var d=a.axis,f=d.radiusReal,m=d.centerXReal,p=d.centerYReal,k=a.startWidth,e=a.endWidth,l=AmCharts.toCoordinate(a.innerRadius,d.radiusReal),g=AmCharts.toCoordinate(a.radius,d.radiusReal);d.inside||(g-=15);var h=a.nailColor;h||(h=a.color);var q=a.nailColor;q||(q=a.color);h=AmCharts.circle(c,a.nailRadius,
17 h,a.nailAlpha,a.nailBorderThickness,h,a.nailBorderAlpha);a.set.push(h);h.translate(m,p);isNaN(g)&&(g=f-d.tickLength);var d=Math.sin(b/180*Math.PI),f=Math.cos(b/180*Math.PI),h=Math.sin((b+90)/180*Math.PI),u=Math.cos((b+90)/180*Math.PI),c=AmCharts.polygon(c,[m-k/2*h+l*d,m+g*d-e/2*h,m+g*d+e/2*h,m+k/2*h+l*d],[p+k/2*u-l*f,p-g*f+e/2*u,p-g*f-e/2*u,p-k/2*u-l*f],a.color,a.alpha,1,q,a.borderAlpha,void 0,!0);a.set.push(c);this.graphsSet.push(a.set)}},setValue:function(a,b){a.axis&&a.axis.value2angle&&(a.axis.value2angle(b),
18 a.frame=0,a.previousValue=a.value);a.value=b;var c=this.legend;c&&c.updateValues()},handleLegendEvent:function(a){var b=a.type;a=a.dataItem;if(!this.legend.data&&a)switch(b){case "hideItem":this.hideArrow(a);break;case "showItem":this.showArrow(a)}},hideArrow:function(a){a.set.hide();a.hidden=!0},showArrow:function(a){a.set.show();a.hidden=!1},updateAnimations:function(){AmCharts.AmAngularGauge.base.updateAnimations.call(this);for(var a=this.arrows.length,b,c=0;c<a;c++){b=this.arrows[c];var d;b.frame>=
19 this.totalFrames?d=b.value:(b.frame++,b.clockWiseOnly&&b.value<b.previousValue&&(d=b.axis,b.previousValue-=d.endValue-d.startValue),d=AmCharts.getEffect(this.startEffect),d=AmCharts[d](0,b.frame,b.previousValue,b.value-b.previousValue,this.totalFrames),isNaN(d)&&(d=b.value));d=b.axis.value2angle(d);this.drawArrow(b,d)}}});
amcharts/images/dragIcon.gif

122 Bytes

amcharts/images/dragIconBlack.gif

122 Bytes

amcharts/images/dragIconH.gif

111 Bytes

amcharts/images/dragIconHBlack.gif

111 Bytes

amcharts/images/export.png

216 Bytes

amcharts/images/exportWhite.png

213 Bytes

amcharts/images/lens.png

257 Bytes

amcharts/images/lensWhite.png

262 Bytes

amcharts/lang/az.js
File was created 1 AmCharts.translations.az = {"monthNames":["Yanvar","Fevral","Mart","Aprel","May","Iyun","Iyul","Avqust","Sentyabr","Oktyabr","Noyabr","Dekabr"],"shortMonthNames":["Yan","Fev","Mar","Apr","May","Iyn","Iyl","Avq","Sen","Okt","Noy","Dek"],"dayNames":["Bazar ertษ™si","ร‡ษ™rลŸษ™nbษ™ axลŸamฤฑ","ร‡ษ™rลŸษ™nbษ™","Cรผmษ™ axลŸamฤฑ","Cรผmษ™","ลžษ™nbษ™","Bazar gรผnรผ"],"shortDayNames":["Ber","ร‡ax","ร‡ษ™r","Cax","Cรผm","ลžnb","Baz"],"zoomOutText":"Bรผtรผn gรถstษ™r"}
amcharts/lang/bg.js
File was created 1 AmCharts.translations.bg = {"monthNames":["ะฏะฝัƒะฐั€ะธ","ะคะตะฒั€ัƒะฐั€ะธ","ะœะฐั€ั‚","ะะฟั€ะธะป","ะœะฐะน","ะฎะฝะธ","ะฎะปะธ","ะะฒะณัƒัั‚","ะกะตะฟั‚ะตะผะฒั€ะธ","ะžะบั‚ะพะผะฒั€ะธ","ะะพะตะผะฒั€ะธ","ะ”ะตะบะตะผะฒั€ะธ"],"shortMonthNames":["ะฏะฝัƒ","ะคะตะฒ","ะœะฐั€","ะะฟั€","ะœะฐะน","ะฎะฝะธ","ะฎะปะธ","ะะฒะณ","ะกะตะฟ","ะžะบั‚","ะะพะต","ะ”ะตะบ"],"dayNames":["ะŸะพะฝะตะดะตะปะฝะธะบ","ะ’ั‚ะพั€ะฝะธะบ","ะกั€ัะดะฐ","ะงะตั‚ะฒัŠั€ั‚ัŠะบ","ะŸะตั‚ัŠะบ","ะกัŠะฑะพั‚ะฐ","ะะตะดะตะปั"],"shortDayNames":["ะŸะฝ","ะ’ั‚","ะกั€","ะงั‚","ะŸั‚","ะกะฑ","ะะด"],"zoomOutText":"ะŸะพะบะฐะถะธ ะฒัะธั‡ะบะธ"}
amcharts/lang/de.js
File was created 1 AmCharts.translations.de = {
2 "monthNames": ["Januar", "Februar", "Mรคrz", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"],
3 "shortMonthNames": ["Jan", "Feb", "Mรคr", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"],
4 "dayNames": ["Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag", "Sonntag"],
5 "shortDayNames": ["Mo", "Di", "Mi", "Do", "Fr", "Sa", "So"],
6 "zoomOutText": "Alle anzeigen",
7 "fromText": "Von:",
8 "toText":"Bis:",
9 "periodsText":"Ansicht:",
10 "selectText":"Auswahl:",
11 "comboBoxSelectText":"Auswahl...",
12 "compareText":"Vergleichen mit:"
13 }
amcharts/lang/es.js
File was created 1 AmCharts.translations.es = {"monthNames":["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],"shortMonthNames":["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],"dayNames":["Lunes","Martes","Miรฉrcoles","Jueves","Viernes","Sรกbado","Domingo"],"shortDayNames":["Lun","Mar","Miรฉ","Jue","Vie","Sรกb","Dom"],"zoomOutText":"Mostrar todos"}
amcharts/lang/fi.js
File was created 1 AmCharts.translations.fi = {"monthNames":["Tammikuu","Helmikuu","Maaliskuu","Huhtikuu","Toukokuu","Kesรคkuu","Heinรคkuu","Elokuu","Syyskuu","Lokakuu","Marraskuu","Joulukuu"],"shortMonthNames":["Tammiย ","Helmiย ","Maalis","Huhtiย ","Toukoย ","Kesรคย ย ","Heinรคย ","Eloย ย ย ","Syysย ย ","Lokaย ย ","Marras","Jouluย "],"dayNames":["Maanantai","Tiistai","Keskiviikko","Torstai","Perjantai","Lauantai","Sunnuntai"],"shortDayNames":["Ma","Ti","Ke","To","Pe","La","Su"],"zoomOutText":"Nรคytรค kaikki"}
amcharts/lang/fo.js
File was created 1 AmCharts.translations.fo = {"monthNames":["Januar","Februar","Mars","Aprรญl","Mai","Juni","Juli","August","September","Oktober","November","Desember"],"shortMonthNames":["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],"dayNames":["Mรกnadagur","Tรฝsdagur","Mikudagur","Hรณsdagur","Frรญggjadagur","Leygardagur","Sunnudagur"],"shortDayNames":["Mรกn","Tรฝs","Mik","Hรณs","Frรญ","Ley","Sun"],"zoomOutText":"Show all"}
amcharts/lang/fr.js
File was created 1 AmCharts.translations.fr = {"monthNames":["Janvier","Fรฉvrier","Mars","Avril","Mai","Juin","Juillet","Aoรปt","Septembre","Octobre","Novembre","Dรฉcembre"],"shortMonthNames":["Janv.","Fรฉvr.","Mars","Avril","Mai","Juin","Juil.","Aoรปt","Sept.","Oct.","Nov.","Dรฉc."],"dayNames":["Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi","Dimanche"],"shortDayNames":["Lun.","Mar.","Mer.","Jeu.","Ven.","Sam.","Dim."],"zoomOutText":"Voir tous"}
amcharts/lang/hr.js
File was created 1 AmCharts.translations.hr = {"monthNames":["Sijeฤanj","Veljaฤa","Oลพujak","Travanj","Svibanj","Lipanj","Srpanj","Kolovoz","Rujan","Listopad","Studeni","Prosinac"],"shortMonthNames":["Sij","Vel","Oลพu","Tra","Svi","Lip","Srp","Kol","Ruj","Lis","Stu","Pro"],"dayNames":["Ponedjeljak","Utorak","Srijeda","ฤŒetvrtak","Petak","Subota","Nedjelja"],"shortDayNames":["Pon","Uto","Sri","ฤŒet","Pet","Sub","Ned"],"zoomOutText":"Prikaลพi sve"}
amcharts/lang/hu.js
File was created 1 AmCharts.translations.hu = {"monthNames":["Januรกr","Februรกr","Mรกrcius","รprilis","Mรกjus","Jรบnius","Jรบlius","Augusztus","Szeptember","Oktรณber","November","December"],"shortMonthNames":["Jan","Febr","Mรกrc","รpr","Mรกj","Jรบn","Jรบl","Aug","Szept","Okt","Nov","Dec"],"dayNames":["Hรฉtfล‘","Kedd","Szerda","Csรผtรถrtรถk","Pรฉntek","Szombat","Vasรกrnap"],"shortDayNames":["H","K","Sze","Cs","P","Szo","V"],"zoomOutText":"ร–sszes"}
amcharts/lang/id.js
File was created 1 AmCharts.translations.id = {"monthNames":["Januari","Pebruari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],"shortMonthNames":["Jan","Peb","Mar","Apr","Mei","Jun","Jul","Agu","Sep","Okt","Nov","Des"],"dayNames":["Senin","Selasa","Rabu","Kamis","Jumat","Sabtu","Minggu"],"shortDayNames":["Sen","Sel","Rab","Kam","Jum","Sab","Min"],"zoomOutText":"Tampilkan semua"}
amcharts/lang/is.js
File was created 1 AmCharts.translations.is = {"monthNames":["Janรบar","Febrรบar","Mars","Aprรญl","Maรญ","Jรบnรญ","Jรบlรญ","รgรบst","September","Oktรณber","Nรณvember","Desember"],"shortMonthNames":["Jan","Feb","Mar","Apr","Maรญ","Jรบn","Jรบl","รgรบ","Sep","Okt","Nรณv","Des"],"dayNames":["Mรกnudagur","รžriรฐjudagur","Miรฐvikudagur","Fimmtudagur","Fรถstudagur","Laugardagur","Sunnudagur"],"shortDayNames":["Mรกn","รžri","Miรฐ","Fim","Fรถs","Lau","Sun"],"zoomOutText":"Sรฝna allt"}
amcharts/lang/it.js
File was created 1 AmCharts.translations.it = {"monthNames":["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],"shortMonthNames":["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],"dayNames":["Lunedรฌ","Martedรฌ","Mercoledรฌ","Giovedรฌ","Venerdรฌ","Sabato","Domenica"],"shortDayNames":["Lun","Mar","Mer","Gio","Ven","Sab","Dom"],"zoomOutText":"Mostra tutti"}
amcharts/lang/lt.js
File was created 1 AmCharts.translations.lt = {"monthNames":["Sausio","Vasario","Kovo","Balandลพio","Geguลพฤ—s","Birลพelio","Liepos","Rugpjลซฤio","Rugsฤ—jo","Spalio","Lapkriฤio","Gruodลพio"],"shortMonthNames":["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rgp","Rgs","Spa","Lap","Grd"],"dayNames":["Pirmadienis","Antradienis","Treฤiadienis","Ketvirtadienis","Penktadienis","ล eลกtadienis","Sekmadienis"],"shortDayNames":["Pr","An","Tr","Kt","Pn","ล t","Sk"],"zoomOutText":"Rodyti viskฤ…"}
amcharts/lang/lv.js
File was created 1 AmCharts.translations.lv = {"monthNames":["Janvฤris","Februฤris","Marts","Aprฤซlis","Maijs","Jลซnijs","Jลซlijs","Augusts","Septembris","Oktobris","Novembris","Decembris"],"shortMonthNames":["Jan","Feb","Mar","Apr","Mai","Jลซn","Jลซl","Aug","Sep","Okt","Nov","Dec"],"dayNames":["Pirmdiena","Otrdiena","Treลกdiena","Ceturtdiena","Piektdiena","Sestdiena","Svฤ“tdiena"],"shortDayNames":["Pย ","Oย ","Tย ","Cย ","Pk","Sย ","Sv"],"zoomOutText":"Parฤdฤซt visu"}
amcharts/lang/mk.js
File was created 1 AmCharts.translations.mk = {"monthNames":["ะˆะฐะฝัƒะฐั€ะธ","ะคะตะฒั€ัƒะฐั€ะธ","ะœะฐั€ั‚","ะะฟั€ะธะป","ะœะฐั˜","ะˆัƒะฝะธ","ะˆัƒะปะธ","ะะฒะณัƒัั‚","ะกะตะฟั‚ะตะผะฒั€ะธ","ะžะบั‚ะพะผะฒั€ะธ","ะะพะตะผะฒั€ะธ","ะ”ะตะบะตะผะฒั€ะธ"],"shortMonthNames":["ะˆะฐะฝ","ะคะตะฒ","ะœะฐั€","ะะฟั€","ะœะฐั˜","ะˆัƒะฝ","ะˆัƒะป","ะะฒะณ","ะกะตะฟ","ะžะบั‚","ะะพะต","ะ”ะตะบ"],"dayNames":["ะŸะพะฝะตะดะตะปะฝะธะบ","ะ’ั‚ะพั€ะฝะธะบ","ะกั€ะตะดะฐ","ะงะตั‚ะฒั€ั‚ะพะบ","ะŸะตั‚ะพะบ","ะกะฐะฑะพั‚ะฐ","ะะตะดะตะปะฐ"],"shortDayNames":["ะŸะพะฝ","ะ’ั‚ะพ","ะกั€ะต","ะงะตั‚","ะŸะตั‚","ะกะฐะฑ","ะะตะด"],"zoomOutText":"ะŸั€ะธะบะฐะถะธ ะณะธ ัะธั‚ะต"}
amcharts/lang/mn.js
File was created 1 AmCharts.translations.mn = {"monthNames":["ะฅัƒะปะณะฐะฝะฐ ัะฐั€ั‹ะฝ","าฎั…ัั€ ัะฐั€ั‹ะฝ","ะ‘ะฐั€ ัะฐั€ั‹ะฝ","ะขัƒัƒะปะฐะน ัะฐั€ั‹ะฝ","ะ›ัƒัƒ ัะฐั€ั‹ะฝ","ะœะพะณะพะน ัะฐั€ั‹ะฝ","ะœะพั€ัŒ ัะฐั€ั‹ะฝ","ะฅะพะฝัŒ ัะฐั€ั‹ะฝ","ะ‘ะธั‡ ัะฐั€ั‹ะฝ","ะขะฐั…ะธะฐ ัะฐั€ั‹ะฝ","ะะพั…ะพะน ัะฐั€ั‹ะฝ","ะ“ะฐั…ะฐะน ัะฐั€ั‹ะฝ"],"shortMonthNames":["ะฅัƒะป","าฎั…ั","ะ‘ะฐั€","ะขัƒัƒ","ะ›ัƒัƒ","ะœะพะณ","ะœะพั€","ะฅะพะฝ","ะ‘ะธั‡","ะขะฐั…","ะะพั…","ะ“ะฐั…"],"dayNames":["ะ”ะฐะฒะฐะฐ","ะœัะณะผะฐั€","ะ›ั…ะฐะณะฒะฐ","ะŸาฏั€ัะฒ","ะ‘ะฐะฐัะฐะฝ","ะ‘ัะผะฑะฐ","ะัะผ"],"shortDayNames":["ะ”ะฐ","ะœั","ะ›ั…","ะŸาฏ","ะ‘ะฐ","ะ‘ั","ะั"],"zoomOutText":"ะ‘าฏั… ั…ะฐั€ัƒัƒะปะฐั…"}
amcharts/lang/mt.js
File was created 1 AmCharts.translations.mt = {"monthNames":["Jannar","Frar","Marzu","April","Mejju","ฤ unju","Lulju","Awwissu","Settembru","Ottubru","Novembru","Diฤ‹embru "],"shortMonthNames":["Jan","Fra","Mar","Apr","Mej","ฤ un","Lul","Aww","Set","Ott","Nov","Diฤ‹"],"dayNames":["It-tnejn","It-tlieta","L-erbgฤงa","Il-ฤงamis","Il-ฤกimgฤงa","Is-sibt","Il-ฤงadd"],"shortDayNames":["Tne","Tli","Erb","ฤฆam","ฤ im","Sib","ฤฆad"],"zoomOutText":"Turi kollha"}
amcharts/lang/nl.js
File was created 1 AmCharts.translations.nl = {"monthNames":["Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December"],"shortMonthNames":["Jan","Feb","Mrt","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],"dayNames":["Maandag","Dinsdag","Woensdag","Donderdag","Vrijdag","Zaterdag","Zondag"],"shortDayNames":["Ma","Di","Wo","Do","Vr","Za","Zo"],"zoomOutText":"Alles weergeven"}
amcharts/lang/no.js
File was created 1 AmCharts.translations.no = {"monthNames":["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],"shortMonthNames":["Jan.","Feb.","Mars","April","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Des."],"dayNames":["Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lรธrdag","Sรธndag"],"shortDayNames":["Ma.","Ti.","On.","To.","Fr.","Lรธ.","Sรธ."],"zoomOutText":"Vis alle"}
amcharts/lang/pl.js
File was created 1 AmCharts.translations.pl = {"monthNames":["Styczeล„","Luty","Marzec","Kwiecieล„","Maj","Czerwiec","Lipiec","Sierpieล„","Wrzesieล„","Paลบdziernik","Listopad","Grudzieล„"],"shortMonthNames":["Sty","Lut","Mar","Kwi","Maj","Cze","Lip","Sie","Wrz","Paลบ","Lis","Gru"],"dayNames":["Poniedziaล‚ek","Wtorek","ลšroda","Czwartek","Piฤ…tek","Sobota","Niedziela"],"shortDayNames":["Pon","Wto","ลšro","Czw","Piฤ…","Sob","Nie"],"zoomOutText":"Pokaลผ wszystko"}
amcharts/lang/pt.js
File was created 1 AmCharts.translations.pt = {"monthNames":["Janeiro","Fevereiro","Marรงo","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],"shortMonthNames":["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],"dayNames":["Segunda","Terรงa","Quarta","Quinta","Sexta","Sรกbado","Domingo"],"shortDayNames":["Seg","Ter","Qua","Qui","Sex","Sรกb","Dom"],"zoomOutText":"Mostrar todos"}
amcharts/lang/ro.js
File was created 1 AmCharts.translations.ro = {"monthNames":["Ianuarie","Februarie","Martie","Aprilie","Mai","Iunie","Iulie","August","Septembrie","Octombrie","Noiembrie","Decembrie"],"shortMonthNames":["Ian","Feb","Mar","Apr","Mai","Iun","Iul","Aug","Sep","Oct","Nov","Dec"],"dayNames":["Luni","Marลฃi","Miercuri","Joi","Vineri","Sรขmbฤƒtฤƒ","Duminicฤƒ"],"shortDayNames":["Lu","Ma","Mi","Jo","Vi","Sb","Du"],"zoomOutText":"Aratฤƒ tot"}
amcharts/lang/ru.js
File was created 1 AmCharts.translations.ru = {"monthNames":["ะฏะฝะฒะฐั€ัŒ","ะคะตะฒั€ะฐะปัŒ","ะœะฐั€ั‚","ะะฟั€ะตะปัŒ","ะœะฐะน","ะ˜ัŽะฝัŒ","ะ˜ัŽะปัŒ","ะะฒะณัƒัั‚","ะกะตะฝั‚ัะฑั€ัŒ","ะžะบั‚ัะฑั€ัŒ","ะะพัะฑั€ัŒ","ะ”ะตะบะฐะฑั€ัŒ"],"shortMonthNames":["ะฏะฝะฒ","ะคะตะฒ","ะœะฐั€","ะะฟั€","ะœะฐะน","ะ˜ัŽะฝ","ะ˜ัŽะป","ะะฒะณ","ะกะตะฝ","ะžะบั‚","ะะพั","ะ”ะตะบ"],"dayNames":["ะŸะพะฝะตะดะตะปัŒะฝะธะบ","ะ’ั‚ะพั€ะฝะธะบ","ะกั€ะตะดะฐ","ะงะตั‚ะฒะตั€ะณ","ะŸัั‚ะฝะธั†ะฐ","ะกัƒะฑะฑะพั‚ะฐ","ะ’ะพัะบั€ะตัะตะฝัŒะต"],"shortDayNames":["ะŸะฝะด","ะ’ั‚ั€","ะกั€ะด","ะงั‚ะฒ","ะŸั‚ะฝ","ะกะฑั‚","ะ’ัะบ"],"zoomOutText":"ะŸะพะบะฐะทะฐั‚ัŒ ะฒัะต"}
amcharts/lang/rw.js
File was created 1 AmCharts.translations.rw = {"monthNames":["Mutarama","Gashyantare","Werurwe","Mata","Gicuransi","Kamena","Nyakanga","Kanama","Nzeli","Ukwakira","Ugushyingo","Ukuboza"],"shortMonthNames":["Mut","Gas","Wer","Mat","Gic","Kam","Nya","Kan","Nze","Ukw","Ugu","Uku"],"dayNames":["Kuwa mbere","Kuwa kabiri","Kuwa gatatu","Kuwa kane","Kuwa gatanu","Kuwa gatandatu","Ku cyumweru"],"shortDayNames":["Mbe","Kab","Gtu","Kan","Gnu","Gnd","Mwe"],"zoomOutText":"Show all"}
amcharts/lang/sk.js
File was created 1 AmCharts.translations.sk = {"monthNames":["Januรกr","Februรกr","Marec","Aprรญl","Mรกj","Jรบn","Jรบl","August","September","Oktรณber","November","December"],"shortMonthNames":["Jan","Feb","Mar","Apr","Mรกj","Jรบn","Jรบl","Aug","Sep","Okt","Nov","Dec"],"dayNames":["Pondelok","Utorok","Streda","ล tvrtok","Piatok","Sobota","Nedeฤพa"],"shortDayNames":["Po","Ut","St","ล t","Pi","So","Ne"],"zoomOutText":"Zobraziลฅ vลกetky"}
amcharts/lang/so.js
File was created 1 AmCharts.translations.so = {"monthNames":["Bisha koobaad","Bisha labaad","Bisha saddexaad","Bisha afraad","Bisha shanaad","Bisha lixaad","Bisha todobaad","Bisha sideedaad","Bisha sagaalaad","Bisha tobnaad","Bisha kow iyo tobnaad","Bisha laba iyo tobnaad"],"shortMonthNames":["Kob","Lab","Sad","Afr","Sha","Lix","Tod","Sid","Sag","Tob","Kit","Lit"],"dayNames":["Isniin","Salaaso","Arbaco","Khamiis","Jimco","Sabti","Axad"],"shortDayNames":["Isn","Sal","Arb","Kha","Jim","Sab","Axa"],"zoomOutText":"Tus dhammaan"}
amcharts/lang/th.js
File was created 1 AmCharts.translations.th = {"monthNames":["เธกเธเธฃเธฒเธ„เธก","เธเธธเธกเธ เธฒเธžเธฑเธ™เธ˜เนŒ","เธกเธตเธ™เธฒเธ„เธก","เน€เธกเธฉเธฒเธขเธ™","เธžเธคเธฉเธ เธฒเธ„เธก","เธกเธดเธ–เธธเธ™เธฒเธขเธ™","เธเธฃเธเธŽเธฒเธ„เธก","เธชเธดเธ‡เธซเธฒเธ„เธก","เธเธฑเธ™เธขเธฒเธขเธ™","เธ•เธธเธฅเธฒเธ„เธก","เธžเธคเธจเธˆเธดเธเธฒเธขเธ™","เธ˜เธฑเธ™เธงเธฒเธ„เธก"],"shortMonthNames":["เธก.เธ„.","เธ.เธž.","เธกเธต.เธ„.","เน€เธก.เธข.","เธž.เธ„.","เธกเธด.เธข.","เธ.เธ„.","เธช.เธ„.","เธ.เธข.","เธ•.เธ„.","เธž.เธข.","เธ˜.เธ„."],"dayNames":["เธˆเธฑเธ™เธ—เธฃเนŒ","เธญเธฑเธ‡เธ„เธฒเธฃ","เธžเธธเธ˜","เธžเธคเธซเธฑเธชเธšเธ”เธต","เธจเธธเธเธฃเนŒ","เน€เธชเธฒเธฃเนŒ","เธญเธฒเธ—เธดเธ•เธขเนŒ"],"shortDayNames":["เธˆ.","เธญ.","เธž.","เธžเธค.","เธจ.","เธช.","เธญเธฒ."],"zoomOutText":"เนเธชเธ”เธ‡เธ—เธฑเน‰เธ‡เธซเธกเธ”"}
amcharts/lang/tr.js
File was created 1 AmCharts.translations.tr = {"monthNames":["Ocak","ลžubat","Mart","Nisan","Mayฤฑs","Haziran","Temmuz","AฤŸustos","Eylรผl","Ekim","Kasฤฑm","Aralฤฑk"],"shortMonthNames":["Oca","ลžub","Mar","Nis","May","Haz","Tem","AฤŸu","Eyl","Eki","Kas","Ara"],"dayNames":["Pazartesi","Salฤฑ","ร‡arลŸamba","PerลŸembe","Cuma","Cumartesi","Pazar"],"shortDayNames":["Pzt","Sal","ร‡rลŸ","PrลŸ","Cum","Cts","Paz"],"zoomOutText":"Tรผmรผnรผ gรถster"}
amcharts/patterns/black/pattern1.png

158 Bytes

amcharts/patterns/black/pattern10.png

155 Bytes

amcharts/patterns/black/pattern11.png

161 Bytes

amcharts/patterns/black/pattern12.png

161 Bytes

amcharts/patterns/black/pattern13.png

153 Bytes

amcharts/patterns/black/pattern14.png

160 Bytes

amcharts/patterns/black/pattern15.png

157 Bytes

amcharts/patterns/black/pattern16.png

160 Bytes

amcharts/patterns/black/pattern17.png

162 Bytes

amcharts/patterns/black/pattern18.png

155 Bytes

amcharts/patterns/black/pattern19.png

160 Bytes

amcharts/patterns/black/pattern2.png

161 Bytes

amcharts/patterns/black/pattern20.png

161 Bytes

amcharts/patterns/black/pattern21.png

158 Bytes

amcharts/patterns/black/pattern3.png

156 Bytes

amcharts/patterns/black/pattern4.png

154 Bytes

amcharts/patterns/black/pattern5.png

158 Bytes

amcharts/patterns/black/pattern6.png

155 Bytes

amcharts/patterns/black/pattern7.png

153 Bytes

amcharts/patterns/black/pattern8.png

160 Bytes

amcharts/patterns/black/pattern9.png

153 Bytes

amcharts/patterns/chalk/pattern1.jpg

113 KB

amcharts/patterns/chalk/pattern1r.jpg

111 KB

amcharts/patterns/chalk/pattern2.jpg

114 KB

amcharts/patterns/chalk/pattern3.jpg

160 KB

amcharts/patterns/chalk/pattern4.jpg

160 KB

amcharts/patterns/chalk/pattern5.jpg

173 KB

amcharts/patterns/chalk/pattern6.jpg

143 KB

amcharts/patterns/white/pattern1.png

156 Bytes

amcharts/patterns/white/pattern10.png

155 Bytes

amcharts/patterns/white/pattern11.png

159 Bytes

amcharts/patterns/white/pattern12.png

160 Bytes

amcharts/patterns/white/pattern13.png

154 Bytes

amcharts/patterns/white/pattern14.png

161 Bytes

amcharts/patterns/white/pattern15.png

155 Bytes

amcharts/patterns/white/pattern16.png

158 Bytes

amcharts/patterns/white/pattern17.png

158 Bytes

amcharts/patterns/white/pattern18.png

155 Bytes

amcharts/patterns/white/pattern19.png

159 Bytes

amcharts/patterns/white/pattern2.png

157 Bytes

amcharts/patterns/white/pattern20.png

158 Bytes

amcharts/patterns/white/pattern21.png

158 Bytes

amcharts/patterns/white/pattern3.png

146 Bytes

amcharts/patterns/white/pattern4.png

154 Bytes

amcharts/patterns/white/pattern5.png

159 Bytes

amcharts/patterns/white/pattern6.png

161 Bytes

amcharts/patterns/white/pattern7.png

154 Bytes

amcharts/patterns/white/pattern8.png

160 Bytes

amcharts/patterns/white/pattern9.png

155 Bytes

File was created 1 AmCharts.AmPieChart=AmCharts.Class({inherits:AmCharts.AmSlicedChart,construct:function(e){this.type="pie";AmCharts.AmPieChart.base.construct.call(this,e);this.cname="AmPieChart";this.pieBrightnessStep=30;this.minRadius=10;this.depth3D=0;this.startAngle=90;this.angle=this.innerRadius=0;this.startRadius="500%";this.pullOutRadius="20%";this.labelRadius=20;this.labelText="[[title]]: [[percents]]%";this.balloonText="[[title]]: [[percents]]% ([[value]])\n[[description]]";this.previousScale=1;AmCharts.applyTheme(this,
2 e,this.cname)},drawChart:function(){AmCharts.AmPieChart.base.drawChart.call(this);var e=this.chartData;if(AmCharts.ifArray(e)){if(0<this.realWidth&&0<this.realHeight){AmCharts.VML&&(this.startAlpha=1);var f=this.startDuration,c=this.container,b=this.updateWidth();this.realWidth=b;var h=this.updateHeight();this.realHeight=h;var d=AmCharts.toCoordinate,k=d(this.marginLeft,b),a=d(this.marginRight,b),t=d(this.marginTop,h)+this.getTitleHeight(),m=d(this.marginBottom,h),w,x,g,v=AmCharts.toNumber(this.labelRadius),
3 q=this.measureMaxLabel();q>this.maxLabelWidth&&(q=this.maxLabelWidth);this.labelText&&this.labelsEnabled||(v=q=0);w=void 0===this.pieX?(b-k-a)/2+k:d(this.pieX,this.realWidth);x=void 0===this.pieY?(h-t-m)/2+t:d(this.pieY,h);g=d(this.radius,b,h);g||(b=0<=v?b-k-a-2*q:b-k-a,h=h-t-m,g=Math.min(b,h),h<b&&(g/=1-this.angle/90,g>b&&(g=b)),h=AmCharts.toCoordinate(this.pullOutRadius,g),g=(0<=v?g-1.8*(v+h):g-1.8*h)/2);g<this.minRadius&&(g=this.minRadius);h=d(this.pullOutRadius,g);t=AmCharts.toCoordinate(this.startRadius,
4 g);d=d(this.innerRadius,g);d>=g&&(d=g-1);m=AmCharts.fitToBounds(this.startAngle,0,360);0<this.depth3D&&(m=270<=m?270:90);m-=90;b=g-g*this.angle/90;for(k=0;k<e.length;k++)if(a=e[k],!0!==a.hidden&&0<a.percents){var n=360*a.percents/100,q=Math.sin((m+n/2)/180*Math.PI),y=-Math.cos((m+n/2)/180*Math.PI)*(b/g),p=this.outlineColor;p||(p=a.color);var z=this.alpha;isNaN(a.alpha)||(z=a.alpha);p={fill:a.color,stroke:p,"stroke-width":this.outlineThickness,"stroke-opacity":this.outlineAlpha,"fill-opacity":z};a.url&&
5 (p.cursor="pointer");p=AmCharts.wedge(c,w,x,m,n,g,b,d,this.depth3D,p,this.gradientRatio,a.pattern);this.addEventListeners(p,a);a.startAngle=m;e[k].wedge=p;0<f&&(this.chartCreated||p.setAttr("opacity",this.startAlpha));a.ix=q;a.iy=y;a.wedge=p;a.index=k;if(this.labelsEnabled&&this.labelText&&a.percents>=this.hideLabelsPercent){var l=m+n/2;360<l&&(l-=360);var r=v;isNaN(a.labelRadius)||(r=a.labelRadius);var n=w+q*(g+r),z=x+y*(g+r),A,u=0;if(0<=r){var B;90>=l&&0<=l?(B=0,A="start",u=8):90<=l&&180>l?(B=1,
6 A="start",u=8):180<=l&&270>l?(B=2,A="end",u=-8):270<=l&&360>l&&(B=3,A="end",u=-8);a.labelQuarter=B}else A="middle";var l=this.formatString(this.labelText,a),s=this.labelFunction;s&&(l=s(a,l));s=a.labelColor;s||(s=this.color);l=AmCharts.wrappedText(c,l,s,this.fontFamily,this.fontSize,A,!1,this.maxLabelWidth);l.translate(n+1.5*u,z);l.node.style.pointerEvents="none";a.tx=n+1.5*u;a.ty=z;0<=r?(r=l.getBBox(),s=AmCharts.rect(c,r.width+5,r.height+5,"#FFFFFF",.005),s.translate(n+1.5*u+r.x,z+r.y),a.hitRect=
7 s,p.push(l),p.push(s)):this.freeLabelsSet.push(l);a.label=l;a.tx=n;a.tx2=n+u;a.tx0=w+q*g;a.ty0=x+y*g}n=d+(g-d)/2;a.pulled&&(n+=this.pullOutRadiusReal);a.balloonX=q*n+w;a.balloonY=y*n+x;a.startX=Math.round(q*t);a.startY=Math.round(y*t);a.pullX=Math.round(q*h);a.pullY=Math.round(y*h);this.graphsSet.push(p);(0===a.alpha||0<f&&!this.chartCreated)&&p.hide();m+=360*a.percents/100}0<v&&!this.labelRadiusField&&this.arrangeLabels();this.pieXReal=w;this.pieYReal=x;this.radiusReal=g;this.innerRadiusReal=d;0<
8 v&&this.drawTicks();this.initialStart();this.setDepths()}(e=this.legend)&&e.invalidateSize()}else this.cleanChart();this.dispDUpd();this.chartCreated=!0},setDepths:function(){var e=this.chartData,f;for(f=0;f<e.length;f++){var c=e[f],b=c.wedge,c=c.startAngle;0<=c&&180>c?b.toFront():180<=c&&b.toBack()}},arrangeLabels:function(){var e=this.chartData,f=e.length,c,b;for(b=f-1;0<=b;b--)c=e[b],0!==c.labelQuarter||c.hidden||this.checkOverlapping(b,c,0,!0,0);for(b=0;b<f;b++)c=e[b],1!=c.labelQuarter||c.hidden||
9 this.checkOverlapping(b,c,1,!1,0);for(b=f-1;0<=b;b--)c=e[b],2!=c.labelQuarter||c.hidden||this.checkOverlapping(b,c,2,!0,0);for(b=0;b<f;b++)c=e[b],3!=c.labelQuarter||c.hidden||this.checkOverlapping(b,c,3,!1,0)},checkOverlapping:function(e,f,c,b,h){var d,k,a=this.chartData,t=a.length,m=f.label;if(m){if(!0===b)for(k=e+1;k<t;k++)a[k].labelQuarter==c&&(d=this.checkOverlappingReal(f,a[k],c))&&(k=t);else for(k=e-1;0<=k;k--)a[k].labelQuarter==c&&(d=this.checkOverlappingReal(f,a[k],c))&&(k=0);!0===d&&100>
10 h&&(d=f.ty+3*f.iy,f.ty=d,m.translate(f.tx2,d),f.hitRect&&(m=m.getBBox(),f.hitRect.translate(f.tx2+m.x,d+m.y)),this.checkOverlapping(e,f,c,b,h+1))}},checkOverlappingReal:function(e,f,c){var b=!1,h=e.label,d=f.label;e.labelQuarter!=c||e.hidden||f.hidden||!d||(h=h.getBBox(),c={},c.width=h.width,c.height=h.height,c.y=e.ty,c.x=e.tx,e=d.getBBox(),d={},d.width=e.width,d.height=e.height,d.y=f.ty,d.x=f.tx,AmCharts.hitTest(c,d)&&(b=!0));return b}});
amcharts/radar.js
File was created 1 AmCharts.AmRadarChart=AmCharts.Class({inherits:AmCharts.AmCoordinateChart,construct:function(a){this.type="radar";AmCharts.AmRadarChart.base.construct.call(this,a);this.cname="AmRadarChart";this.marginRight=this.marginBottom=this.marginTop=this.marginLeft=0;this.radius="35%";AmCharts.applyTheme(this,a,this.cname)},initChart:function(){AmCharts.AmRadarChart.base.initChart.call(this);this.dataChanged&&(this.updateData(),this.dataChanged=!1,this.dispatchDataUpdated=!0);this.drawChart()},updateData:function(){this.parseData();
2 var a=this.graphs,b;for(b=0;b<a.length;b++)a[b].data=this.chartData},updateGraphs:function(){var a=this.graphs,b;for(b=0;b<a.length;b++){var c=a[b];c.index=b;c.width=this.realRadius;c.height=this.realRadius;c.x=this.marginLeftReal;c.y=this.marginTopReal}},parseData:function(){AmCharts.AmRadarChart.base.parseData.call(this);this.parseSerialData()},updateValueAxes:function(){var a=this.valueAxes,b;for(b=0;b<a.length;b++){var c=a[b];c.axisRenderer=AmCharts.RadAxis;c.guideFillRenderer=AmCharts.RadarFill;
3 c.axisItemRenderer=AmCharts.RadItem;c.autoGridCount=!1;c.x=this.marginLeftReal;c.y=this.marginTopReal;c.width=this.realRadius;c.height=this.realRadius}},drawChart:function(){AmCharts.AmRadarChart.base.drawChart.call(this);var a=this.updateWidth(),b=this.updateHeight(),c=this.marginTop+this.getTitleHeight(),d=this.marginLeft,b=b-c-this.marginBottom;this.marginLeftReal=d+(a-d-this.marginRight)/2;this.marginTopReal=c+b/2;this.realRadius=AmCharts.toCoordinate(this.radius,a,b);this.updateValueAxes();this.updateGraphs();
4 a=this.chartData;if(AmCharts.ifArray(a)){if(0<this.realWidth&&0<this.realHeight){a=a.length-1;d=this.valueAxes;for(c=0;c<d.length;c++)d[c].zoom(0,a);d=this.graphs;for(c=0;c<d.length;c++)d[c].zoom(0,a);(a=this.legend)&&a.invalidateSize()}}else this.cleanChart();this.dispDUpd();this.chartCreated=!0},formatString:function(a,b,c){var d=b.graph;-1!=a.indexOf("[[category]]")&&(a=a.replace(/\[\[category\]\]/g,String(b.serialDataItem.category)));d=d.numberFormatter;d||(d=this.nf);a=AmCharts.formatValue(a,
5 b.values,["value"],d,"",this.usePrefixes,this.prefixesOfSmallNumbers,this.prefixesOfBigNumbers);-1!=a.indexOf("[[")&&(a=AmCharts.formatDataContextValue(a,b.dataContext));return a=AmCharts.AmRadarChart.base.formatString.call(this,a,b,c)},cleanChart:function(){AmCharts.callMethod("destroy",[this.valueAxes,this.graphs])}});AmCharts.RadAxis=AmCharts.Class({construct:function(a){var b=a.chart,c=a.axisThickness,d=a.axisColor,m=a.axisAlpha,p=a.x,e=a.y;this.set=b.container.set();b.axesSet.push(this.set);var f=a.axisTitleOffset,n=a.radarCategoriesEnabled,l=a.chart.fontFamily,g=a.fontSize;void 0===g&&(g=a.chart.fontSize);var r=a.color;void 0===r&&(r=a.chart.color);if(b){this.axisWidth=a.height;a=b.chartData;var w=a.length,t;for(t=0;t<w;t++){var k=180-360/w*t,h=p+this.axisWidth*Math.sin(k/180*Math.PI),q=e+this.axisWidth*Math.cos(k/
6 180*Math.PI);0<m&&(h=AmCharts.line(b.container,[p,h],[e,q],d,m,c),this.set.push(h));if(n){var u="start",h=p+(this.axisWidth+f)*Math.sin(k/180*Math.PI),q=e+(this.axisWidth+f)*Math.cos(k/180*Math.PI);if(180==k||0===k)u="middle",h-=5;0>k&&(u="end",h-=10);180==k&&(q-=5);0===k&&(q+=5);k=AmCharts.text(b.container,a[t].category,r,l,g,u);k.translate(h+5,q);this.set.push(k);k.getBBox()}}}}});AmCharts.RadItem=AmCharts.Class({construct:function(a,b,c,d,m,p,e,f){void 0===c&&(c="");var n=a.chart.fontFamily,l=a.fontSize;void 0===l&&(l=a.chart.fontSize);var g=a.color;void 0===g&&(g=a.chart.color);var r=a.chart.container;this.set=d=r.set();var w=a.axisColor,t=a.axisAlpha,k=a.tickLength,h=a.gridAlpha,q=a.gridThickness,u=a.gridColor,A=a.dashLength,B=a.fillColor,y=a.fillAlpha,C=a.labelsEnabled;m=a.counter;var D=a.inside,E=a.gridType,s,H=a.labelOffset;b-=a.height;var x;p=a.x;var F=a.y;e?(C=!0,isNaN(e.tickLength)||
7 (k=e.tickLength),void 0!=e.lineColor&&(u=e.lineColor),isNaN(e.lineAlpha)||(h=e.lineAlpha),isNaN(e.dashLength)||(A=e.dashLength),isNaN(e.lineThickness)||(q=e.lineThickness),!0===e.inside&&(D=!0),void 0!==e.boldLabel&&(f=e.boldLabel)):c||(h/=3,k/=2);var G="end",z=-1;D&&(G="start",z=1);var v;C&&(v=AmCharts.text(r,c,g,n,l,G,f),v.translate(p+(k+3+H)*z,b),d.push(v),this.label=v,x=AmCharts.line(r,[p,p+k*z],[b,b],w,t,q),d.push(x));b=Math.round(a.y-b);f=[];n=[];if(0<h){if("polygons"==E){s=a.data.length;for(l=
8 0;l<s;l++)g=180-360/s*l,f.push(b*Math.sin(g/180*Math.PI)),n.push(b*Math.cos(g/180*Math.PI));f.push(f[0]);n.push(n[0]);h=AmCharts.line(r,f,n,u,h,q,A)}else h=AmCharts.circle(r,b,"#FFFFFF",0,q,u,h);h.translate(p,F);d.push(h)}if(1==m&&0<y&&!e&&""!==c){e=a.previousCoord;if("polygons"==E){for(l=s;0<=l;l--)g=180-360/s*l,f.push(e*Math.sin(g/180*Math.PI)),n.push(e*Math.cos(g/180*Math.PI));s=AmCharts.polygon(r,f,n,B,y)}else s=AmCharts.wedge(r,0,0,0,360,b,b,e,0,{fill:B,"fill-opacity":y,stroke:"#000","stroke-opacity":0,
9 "stroke-width":1});d.push(s);s.translate(p,F)}!1===a.visible&&(x&&x.hide(),v&&v.hide());""!==c&&(a.counter=0===m?1:0,a.previousCoord=b)},graphics:function(){return this.set},getLabel:function(){return this.label}});AmCharts.RadarFill=AmCharts.Class({construct:function(a,b,c,d){b-=a.axisWidth;c-=a.axisWidth;var m=Math.max(b,c);b=c=Math.min(b,c);c=a.chart.container;var p=d.fillAlpha,e=d.fillColor,m=Math.abs(m-a.y);b=Math.abs(b-a.y);var f=Math.max(m,b);b=Math.min(m,b);m=f;f=d.angle+90;d=d.toAngle+90;isNaN(f)&&(f=0);isNaN(d)&&(d=360);this.set=c.set();void 0===e&&(e="#000000");isNaN(p)&&(p=0);if("polygons"==a.gridType){d=[];var n=[],l=a.data.length,g;for(g=0;g<l;g++)f=180-360/l*g,d.push(m*Math.sin(f/180*Math.PI)),
10 n.push(m*Math.cos(f/180*Math.PI));d.push(d[0]);n.push(n[0]);for(g=l;0<=g;g--)f=180-360/l*g,d.push(b*Math.sin(f/180*Math.PI)),n.push(b*Math.cos(f/180*Math.PI));this.fill=AmCharts.polygon(c,d,n,e,p)}else this.fill=AmCharts.wedge(c,0,0,f,d-f,m,m,b,0,{fill:e,"fill-opacity":p,stroke:"#000","stroke-opacity":0,"stroke-width":1});this.set.push(this.fill);this.fill.translate(a.x,a.y)},graphics:function(){return this.set},getLabel:function(){}});
amcharts/serial.js
File was created 1 AmCharts.AmSerialChart=AmCharts.Class({inherits:AmCharts.AmRectangularChart,construct:function(a){this.type="serial";AmCharts.AmSerialChart.base.construct.call(this,a);this.cname="AmSerialChart";this.theme=a;this.createEvents("changed");this.columnSpacing=5;this.columnSpacing3D=0;this.columnWidth=.8;this.updateScrollbar=!0;var b=new AmCharts.CategoryAxis(a);b.chart=this;this.categoryAxis=b;this.zoomOutOnDataUpdate=!0;this.mouseWheelZoomEnabled=this.mouseWheelScrollEnabled=this.rotate=this.skipZoom=
2 !1;this.minSelectedTime=0;AmCharts.applyTheme(this,a,this.cname)},initChart:function(){AmCharts.AmSerialChart.base.initChart.call(this);this.updateCategoryAxis(this.categoryAxis,this.rotate,"categoryAxis");this.dataChanged&&(this.updateData(),this.dataChanged=!1,this.dispatchDataUpdated=!0);var a=this.chartCursor;a&&(a.updateData(),a.fullWidth&&(a.fullRectSet=this.cursorLineSet));var a=this.countColumns(),b=this.graphs,c;for(c=0;c<b.length;c++)b[c].columnCount=a;this.updateScrollbar=!0;this.drawChart();
3 this.autoMargins&&!this.marginsUpdated&&(this.marginsUpdated=!0,this.measureMargins());(this.mouseWheelScrollEnabled||this.mouseWheelZoomEnabled)&&this.addMouseWheel()},handleWheelReal:function(a,b){if(!this.wheelBusy){var c=this.categoryAxis,d=c.parseDates,c=c.minDuration(),e=1;this.mouseWheelZoomEnabled?b||(e=-1):b&&(e=-1);0>a?d?(d=this.startTime+e*c,c=this.endTime+1*c,this.zoomToDates(new Date(d),new Date(c))):(d=this.start+e,c=this.end+1,this.zoomToIndexes(d,c)):d?(d=this.startTime-e*c,c=this.endTime-
4 1*c,this.zoomToDates(new Date(d),new Date(c))):(d=this.start-e,c=this.end-1,this.zoomToIndexes(d,c))}},validateData:function(a){this.marginsUpdated=!1;this.zoomOutOnDataUpdate&&!a&&(this.endTime=this.end=this.startTime=this.start=NaN);AmCharts.AmSerialChart.base.validateData.call(this)},drawChart:function(){AmCharts.AmSerialChart.base.drawChart.call(this);var a=this.chartData;if(AmCharts.ifArray(a)){var b=this.chartScrollbar;b&&b.draw();if(0<this.realWidth&&0<this.realHeight){var a=a.length-1,c,b=
5 this.categoryAxis;if(b.parseDates&&!b.equalSpacing){if(b=this.startTime,c=this.endTime,isNaN(b)||isNaN(c))b=this.firstTime,c=this.lastTime}else if(b=this.start,c=this.end,isNaN(b)||isNaN(c))b=0,c=a;this.endTime=this.startTime=this.end=this.start=void 0;this.zoom(b,c)}}else this.cleanChart();this.dispDUpd();this.chartCreated=!0},cleanChart:function(){AmCharts.callMethod("destroy",[this.valueAxes,this.graphs,this.categoryAxis,this.chartScrollbar,this.chartCursor])},updateCategoryAxis:function(a,b,c){a.chart=
6 this;a.id=c;a.rotate=b;a.axisRenderer=AmCharts.RecAxis;a.guideFillRenderer=AmCharts.RecFill;a.axisItemRenderer=AmCharts.RecItem;a.setOrientation(!this.rotate);a.x=this.marginLeftReal;a.y=this.marginTopReal;a.dx=this.dx;a.dy=this.dy;a.width=this.plotAreaWidth-1;a.height=this.plotAreaHeight-1;a.viW=this.plotAreaWidth-1;a.viH=this.plotAreaHeight-1;a.viX=this.marginLeftReal;a.viY=this.marginTopReal;a.marginsChanged=!0},updateValueAxes:function(){AmCharts.AmSerialChart.base.updateValueAxes.call(this);
7 var a=this.valueAxes,b;for(b=0;b<a.length;b++){var c=a[b],d=this.rotate;c.rotate=d;c.setOrientation(d);d=this.categoryAxis;if(!d.startOnAxis||d.parseDates)c.expandMinMax=!0}},updateData:function(){this.parseData();var a=this.graphs,b,c=this.chartData;for(b=0;b<a.length;b++)a[b].data=c;0<c.length&&(this.firstTime=this.getStartTime(c[0].time),this.lastTime=this.getEndTime(c[c.length-1].time))},getStartTime:function(a){var b=this.categoryAxis;return AmCharts.resetDateToMin(new Date(a),b.minPeriod,1,
8 b.firstDayOfWeek).getTime()},getEndTime:function(a){var b=AmCharts.extractPeriod(this.categoryAxis.minPeriod);return AmCharts.changeDate(new Date(a),b.period,b.count,!0).getTime()-1},updateMargins:function(){AmCharts.AmSerialChart.base.updateMargins.call(this);var a=this.chartScrollbar;a&&(this.getScrollbarPosition(a,this.rotate,this.categoryAxis.position),this.adjustMargins(a,this.rotate))},updateScrollbars:function(){AmCharts.AmSerialChart.base.updateScrollbars.call(this);this.updateChartScrollbar(this.chartScrollbar,
9 this.rotate)},zoom:function(a,b){var c=this.categoryAxis;c.parseDates&&!c.equalSpacing?this.timeZoom(a,b):this.indexZoom(a,b);this.updateLegendValues()},timeZoom:function(a,b){var c=this.maxSelectedTime;isNaN(c)||(b!=this.endTime&&b-a>c&&(a=b-c,this.updateScrollbar=!0),a!=this.startTime&&b-a>c&&(b=a+c,this.updateScrollbar=!0));var d=this.minSelectedTime;if(0<d&&b-a<d){var e=Math.round(a+(b-a)/2),d=Math.round(d/2);a=e-d;b=e+d}var f=this.chartData,e=this.categoryAxis;if(AmCharts.ifArray(f)&&(a!=this.startTime||
10 b!=this.endTime)){var l=e.minDuration(),d=this.firstTime,n=this.lastTime;a||(a=d,isNaN(c)||(a=n-c));b||(b=n);a>n&&(a=n);b<d&&(b=d);a<d&&(a=d);b>n&&(b=n);b<a&&(b=a+l);b-a<l/5&&(b<n?b=a+l/5:a=b-l/5);this.startTime=a;this.endTime=b;c=f.length-1;l=this.getClosestIndex(f,"time",a,!0,0,c);f=this.getClosestIndex(f,"time",b,!1,l,c);e.timeZoom(a,b);e.zoom(l,f);this.start=AmCharts.fitToBounds(l,0,c);this.end=AmCharts.fitToBounds(f,0,c);this.zoomAxesAndGraphs();this.zoomScrollbar();a!=d||b!=n?this.showZB(!0):
11 this.showZB(!1);this.updateColumnsDepth();this.dispatchTimeZoomEvent()}},indexZoom:function(a,b){var c=this.maxSelectedSeries;isNaN(c)||(b!=this.end&&b-a>c&&(a=b-c,this.updateScrollbar=!0),a!=this.start&&b-a>c&&(b=a+c,this.updateScrollbar=!0));if(a!=this.start||b!=this.end){var d=this.chartData.length-1;isNaN(a)&&(a=0,isNaN(c)||(a=d-c));isNaN(b)&&(b=d);b<a&&(b=a);b>d&&(b=d);a>d&&(a=d-1);0>a&&(a=0);this.start=a;this.end=b;this.categoryAxis.zoom(a,b);this.zoomAxesAndGraphs();this.zoomScrollbar();0!==
12 a||b!=this.chartData.length-1?this.showZB(!0):this.showZB(!1);this.updateColumnsDepth();this.dispatchIndexZoomEvent()}},updateGraphs:function(){AmCharts.AmSerialChart.base.updateGraphs.call(this);var a=this.graphs,b;for(b=0;b<a.length;b++){var c=a[b];c.columnWidthReal=this.columnWidth;c.categoryAxis=this.categoryAxis;AmCharts.isString(c.fillToGraph)&&(c.fillToGraph=this.getGraphById(c.fillToGraph))}},updateColumnsDepth:function(){var a,b=this.graphs,c;AmCharts.remove(this.columnsSet);this.columnsArray=
13 [];for(a=0;a<b.length;a++){c=b[a];var d=c.columnsArray;if(d){var e;for(e=0;e<d.length;e++)this.columnsArray.push(d[e])}}this.columnsArray.sort(this.compareDepth);if(0<this.columnsArray.length){b=this.container.set();this.columnSet.push(b);for(a=0;a<this.columnsArray.length;a++)b.push(this.columnsArray[a].column.set);c&&b.translate(c.x,c.y);this.columnsSet=b}},compareDepth:function(a,b){return a.depth>b.depth?1:-1},zoomScrollbar:function(){var a=this.chartScrollbar,b=this.categoryAxis;a&&this.updateScrollbar&&
14 (b.parseDates&&!b.equalSpacing?a.timeZoom(this.startTime,this.endTime):a.zoom(this.start,this.end),this.updateScrollbar=!0)},updateTrendLines:function(){var a=this.trendLines,b;for(b=0;b<a.length;b++){var c=a[b],c=AmCharts.processObject(c,AmCharts.TrendLine,this.theme);a[b]=c;c.chart=this;AmCharts.isString(c.valueAxis)&&(c.valueAxis=this.getValueAxisById(c.valueAxis));c.valueAxis||(c.valueAxis=this.valueAxes[0]);c.categoryAxis=this.categoryAxis}},zoomAxesAndGraphs:function(){if(!this.scrollbarOnly){var a=
15 this.valueAxes,b;for(b=0;b<a.length;b++)a[b].zoom(this.start,this.end);a=this.graphs;for(b=0;b<a.length;b++)a[b].zoom(this.start,this.end);this.zoomTrendLines();(b=this.chartCursor)&&b.zoom(this.start,this.end,this.startTime,this.endTime)}},countColumns:function(){var a=0,b=this.valueAxes.length,c=this.graphs.length,d,e,f=!1,l,n;for(n=0;n<b;n++){e=this.valueAxes[n];var k=e.stackType;if("100%"==k||"regular"==k)for(f=!1,l=0;l<c;l++)d=this.graphs[l],d.tcc=1,d.valueAxis==e&&"column"==d.type&&(!f&&d.stackable&&
16 (a++,f=!0),(!d.stackable&&d.clustered||d.newStack)&&a++,d.columnIndex=a-1,d.clustered||(d.columnIndex=0));if("none"==k||"3d"==k)for(l=0;l<c;l++)d=this.graphs[l],d.valueAxis==e&&"column"==d.type&&d.clustered&&(d.tcc=1,d.newStack&&(a=0),d.hidden||(d.columnIndex=a,a++));if("3d"==k){e=1;for(n=0;n<c;n++)d=this.graphs[n],d.newStack&&e++,d.depthCount=e,d.tcc=a;a=e}}return a},parseData:function(){AmCharts.AmSerialChart.base.parseData.call(this);this.parseSerialData()},getCategoryIndexByValue:function(a){var b=
17 this.chartData,c,d;for(d=0;d<b.length;d++)b[d].category==a&&(c=d);return c},handleCursorChange:function(a){this.updateLegendValues(a.index)},handleCursorZoom:function(a){this.updateScrollbar=!0;this.zoom(a.start,a.end)},handleScrollbarZoom:function(a){this.updateScrollbar=!1;this.zoom(a.start,a.end)},dispatchTimeZoomEvent:function(){if(this.prevStartTime!=this.startTime||this.prevEndTime!=this.endTime){var a={type:"zoomed"};a.startDate=new Date(this.startTime);a.endDate=new Date(this.endTime);a.startIndex=
18 this.start;a.endIndex=this.end;this.startIndex=this.start;this.endIndex=this.end;this.startDate=a.startDate;this.endDate=a.endDate;this.prevStartTime=this.startTime;this.prevEndTime=this.endTime;var b=this.categoryAxis,c=AmCharts.extractPeriod(b.minPeriod).period,b=b.dateFormatsObject[c];a.startValue=AmCharts.formatDate(a.startDate,b);a.endValue=AmCharts.formatDate(a.endDate,b);a.chart=this;a.target=this;this.fire(a.type,a)}},dispatchIndexZoomEvent:function(){if(this.prevStartIndex!=this.start||this.prevEndIndex!=
19 this.end){this.startIndex=this.start;this.endIndex=this.end;var a=this.chartData;if(AmCharts.ifArray(a)&&!isNaN(this.start)&&!isNaN(this.end)){var b={chart:this,target:this,type:"zoomed"};b.startIndex=this.start;b.endIndex=this.end;b.startValue=a[this.start].category;b.endValue=a[this.end].category;this.categoryAxis.parseDates&&(this.startTime=a[this.start].time,this.endTime=a[this.end].time,b.startDate=new Date(this.startTime),b.endDate=new Date(this.endTime));this.prevStartIndex=this.start;this.prevEndIndex=
20 this.end;this.fire(b.type,b)}}},updateLegendValues:function(a){var b=this.graphs,c;for(c=0;c<b.length;c++){var d=b[c];isNaN(a)?d.currentDataItem=void 0:d.currentDataItem=this.chartData[a].axes[d.valueAxis.id].graphs[d.id]}this.legend&&this.legend.updateValues()},getClosestIndex:function(a,b,c,d,e,f){0>e&&(e=0);f>a.length-1&&(f=a.length-1);var l=e+Math.round((f-e)/2),n=a[l][b];if(1>=f-e){if(d)return e;d=a[f][b];return Math.abs(a[e][b]-c)<Math.abs(d-c)?e:f}return c==n?l:c<n?this.getClosestIndex(a,b,
21 c,d,e,l):this.getClosestIndex(a,b,c,d,l,f)},zoomToIndexes:function(a,b){this.updateScrollbar=!0;var c=this.chartData;if(c){var d=c.length;0<d&&(0>a&&(a=0),b>d-1&&(b=d-1),d=this.categoryAxis,d.parseDates&&!d.equalSpacing?this.zoom(c[a].time,this.getEndTime(c[b].time)):this.zoom(a,b))}},zoomToDates:function(a,b){this.updateScrollbar=!0;var c=this.chartData;if(this.categoryAxis.equalSpacing){var d=this.getClosestIndex(c,"time",a.getTime(),!0,0,c.length);b=AmCharts.resetDateToMin(b,this.categoryAxis.minPeriod,
22 1);c=this.getClosestIndex(c,"time",b.getTime(),!1,0,c.length);this.zoom(d,c)}else this.zoom(a.getTime(),b.getTime())},zoomToCategoryValues:function(a,b){this.updateScrollbar=!0;this.zoom(this.getCategoryIndexByValue(a),this.getCategoryIndexByValue(b))},formatPeriodString:function(a,b){if(b){var c=["value","open","low","high","close"],d="value open low high close average sum count".split(" "),e=b.valueAxis,f=this.chartData,l=b.numberFormatter;l||(l=this.nf);for(var n=0;n<c.length;n++){for(var k=c[n],
23 g=0,h=0,m,u,r,s,p,v=0,q=0,x,t,y,w,C,B=this.start;B<=this.end;B++){var z=f[B];if(z&&(z=z.axes[e.id].graphs[b.id])){if(z.values){var A=z.values[k];if(!isNaN(A)){isNaN(m)&&(m=A);u=A;if(isNaN(r)||r>A)r=A;if(isNaN(s)||s<A)s=A;p=AmCharts.getDecimals(g);var D=AmCharts.getDecimals(A),g=g+A,g=AmCharts.roundTo(g,Math.max(p,D));h++;p=g/h}}if(z.percents&&(z=z.percents[k],!isNaN(z))){isNaN(x)&&(x=z);t=z;if(isNaN(y)||y>z)y=z;if(isNaN(w)||w<z)w=z;C=AmCharts.getDecimals(v);A=AmCharts.getDecimals(z);v+=z;v=AmCharts.roundTo(v,
24 Math.max(C,A));q++;C=v/q}}}v={open:x,close:t,high:w,low:y,average:C,sum:v,count:q};a=AmCharts.formatValue(a,{open:m,close:u,high:s,low:r,average:p,sum:g,count:h},d,l,k+"\\.",this.usePrefixes,this.prefixesOfSmallNumbers,this.prefixesOfBigNumbers);a=AmCharts.formatValue(a,v,d,this.pf,"percents\\."+k+"\\.")}}return a},formatString:function(a,b,c){var d=b.graph;if(-1!=a.indexOf("[[category]]")){var e=b.serialDataItem.category;if(this.categoryAxis.parseDates){var f=this.balloonDateFormat,l=this.chartCursor;
25 l&&(f=l.categoryBalloonDateFormat);-1!=a.indexOf("[[category]]")&&(f=AmCharts.formatDate(e,f),-1!=f.indexOf("fff")&&(f=AmCharts.formatMilliseconds(f,e)),e=f)}a=a.replace(/\[\[category\]\]/g,String(e))}d=d.numberFormatter;d||(d=this.nf);e=b.graph.valueAxis;(f=e.duration)&&!isNaN(b.values.value)&&(e=AmCharts.formatDuration(b.values.value,f,"",e.durationUnits,e.maxInterval,d),a=a.replace(RegExp("\\[\\[value\\]\\]","g"),e));e="value open low high close total".split(" ");f=this.pf;a=AmCharts.formatValue(a,
26 b.percents,e,f,"percents\\.");a=AmCharts.formatValue(a,b.values,e,d,"",this.usePrefixes,this.prefixesOfSmallNumbers,this.prefixesOfBigNumbers);a=AmCharts.formatValue(a,b.values,["percents"],f);-1!=a.indexOf("[[")&&(a=AmCharts.formatDataContextValue(a,b.dataContext));return a=AmCharts.AmSerialChart.base.formatString.call(this,a,b,c)},addChartScrollbar:function(a){AmCharts.callMethod("destroy",[this.chartScrollbar]);a&&(a.chart=this,this.listenTo(a,"zoomed",this.handleScrollbarZoom));this.rotate?void 0===
27 a.width&&(a.width=a.scrollbarHeight):void 0===a.height&&(a.height=a.scrollbarHeight);this.chartScrollbar=a},removeChartScrollbar:function(){AmCharts.callMethod("destroy",[this.chartScrollbar]);this.chartScrollbar=null},handleReleaseOutside:function(a){AmCharts.AmSerialChart.base.handleReleaseOutside.call(this,a);AmCharts.callMethod("handleReleaseOutside",[this.chartScrollbar])}});AmCharts.Cuboid=AmCharts.Class({construct:function(a,b,c,d,e,f,l,n,k,g,h,m,u,r,s){this.set=a.set();this.container=a;this.h=Math.round(c);this.w=Math.round(b);this.dx=d;this.dy=e;this.colors=f;this.alpha=l;this.bwidth=n;this.bcolor=k;this.balpha=g;this.colors=f;this.dashLength=r;this.pattern=s;u?0>b&&0===h&&(h=180):0>c&&270==h&&(h=90);this.gradientRotation=h;0===d&&0===e&&(this.cornerRadius=m);this.draw()},draw:function(){var a=this.set;a.clear();var b=this.container,c=this.w,d=this.h,e=this.dx,f=
28 this.dy,l=this.colors,n=this.alpha,k=this.bwidth,g=this.bcolor,h=this.balpha,m=this.gradientRotation,u=this.cornerRadius,r=this.dashLength,s=this.pattern,p=l,v=l;"object"==typeof l&&(p=l[0],v=l[l.length-1]);var q,x,t,y,w,C,B,z,A,D=n;s&&(n=0);if(0<e||0<f)B=v,v=AmCharts.adjustLuminosity(p,-.2),v=AmCharts.adjustLuminosity(p,-.2),q=AmCharts.polygon(b,[0,e,c+e,c,0],[0,f,f,0,0],v,n,1,g,0,m),0<h&&(A=AmCharts.line(b,[0,e,c+e],[0,f,f],g,h,k,r)),x=AmCharts.polygon(b,[0,0,c,c,0],[0,d,d,0,0],v,n,1,g,0,m),x.translate(e,
29 f),0<h&&(t=AmCharts.line(b,[e,e],[f,f+d],g,h,k,r)),y=AmCharts.polygon(b,[0,0,e,e,0],[0,d,d+f,f,0],v,n,1,g,0,m),w=AmCharts.polygon(b,[c,c,c+e,c+e,c],[0,d,d+f,f,0],v,n,1,g,0,m),0<h&&(C=AmCharts.line(b,[c,c+e,c+e,c],[0,f,d+f,d],g,h,k,r)),v=AmCharts.adjustLuminosity(B,.2),B=AmCharts.polygon(b,[0,e,c+e,c,0],[d,d+f,d+f,d,d],v,n,1,g,0,m),0<h&&(z=AmCharts.line(b,[0,e,c+e],[d,d+f,d+f],g,h,k,r));n=D;1>Math.abs(d)&&(d=0);1>Math.abs(c)&&(c=0);b=0===d?AmCharts.line(b,[0,c],[0,0],g,h,k,r):0===c?AmCharts.line(b,
30 [0,0],[0,d],g,h,k,r):0<u?AmCharts.rect(b,c,d,l,n,k,g,h,u,m,r):AmCharts.polygon(b,[0,0,c,c,0],[0,d,d,0,0],l,n,k,g,h,m,!1,r);d=0>d?[q,A,x,t,y,w,C,B,z,b]:[B,z,x,t,y,w,q,A,C,b];for(q=0;q<d.length;q++)(x=d[q])&&a.push(x);s&&b.pattern(s)},width:function(a){this.w=a;this.draw()},height:function(a){this.h=a;this.draw()},animateHeight:function(a,b){var c=this;c.easing=b;c.totalFrames=Math.round(1E3*a/AmCharts.updateRate);c.rh=c.h;c.frame=0;c.height(1);setTimeout(function(){c.updateHeight.call(c)},AmCharts.updateRate)},
31 updateHeight:function(){var a=this;a.frame++;var b=a.totalFrames;a.frame<=b&&(b=a.easing(0,a.frame,1,a.rh-1,b),a.height(b),setTimeout(function(){a.updateHeight.call(a)},AmCharts.updateRate))},animateWidth:function(a,b){var c=this;c.easing=b;c.totalFrames=Math.round(1E3*a/AmCharts.updateRate);c.rw=c.w;c.frame=0;c.width(1);setTimeout(function(){c.updateWidth.call(c)},AmCharts.updateRate)},updateWidth:function(){var a=this;a.frame++;var b=a.totalFrames;a.frame<=b&&(b=a.easing(0,a.frame,1,a.rw-1,b),a.width(b),
32 setTimeout(function(){a.updateWidth.call(a)},AmCharts.updateRate))}});AmCharts.CategoryAxis=AmCharts.Class({inherits:AmCharts.AxisBase,construct:function(a){this.cname="CategoryAxis";AmCharts.CategoryAxis.base.construct.call(this,a);this.minPeriod="DD";this.equalSpacing=this.parseDates=!1;this.position="bottom";this.startOnAxis=!1;this.firstDayOfWeek=1;this.gridPosition="middle";this.markPeriodChange=this.boldPeriodBeginning=!0;this.safeDistance=30;this.centerLabelOnFullPeriod=!0;this.periods=[{period:"ss",count:1},{period:"ss",count:5},{period:"ss",count:10},{period:"ss",
33 count:30},{period:"mm",count:1},{period:"mm",count:5},{period:"mm",count:10},{period:"mm",count:30},{period:"hh",count:1},{period:"hh",count:3},{period:"hh",count:6},{period:"hh",count:12},{period:"DD",count:1},{period:"DD",count:2},{period:"DD",count:3},{period:"DD",count:4},{period:"DD",count:5},{period:"WW",count:1},{period:"MM",count:1},{period:"MM",count:2},{period:"MM",count:3},{period:"MM",count:6},{period:"YYYY",count:1},{period:"YYYY",count:2},{period:"YYYY",count:5},{period:"YYYY",count:10},
34 {period:"YYYY",count:50},{period:"YYYY",count:100}];this.dateFormats=[{period:"fff",format:"JJ:NN:SS"},{period:"ss",format:"JJ:NN:SS"},{period:"mm",format:"JJ:NN"},{period:"hh",format:"JJ:NN"},{period:"DD",format:"MMM DD"},{period:"WW",format:"MMM DD"},{period:"MM",format:"MMM"},{period:"YYYY",format:"YYYY"}];this.nextPeriod={};this.nextPeriod.fff="ss";this.nextPeriod.ss="mm";this.nextPeriod.mm="hh";this.nextPeriod.hh="DD";this.nextPeriod.DD="MM";this.nextPeriod.MM="YYYY";AmCharts.applyTheme(this,
35 a,this.cname)},draw:function(){AmCharts.CategoryAxis.base.draw.call(this);this.generateDFObject();var a=this.chart.chartData;this.data=a;if(AmCharts.ifArray(a)){var b,c=this.chart,d=this.start,e=this.labelFrequency,f=0;b=this.end-d+1;var l=this.gridCountR,n=this.showFirstLabel,k=this.showLastLabel,g,h="",m=AmCharts.extractPeriod(this.minPeriod);g=AmCharts.getPeriodDuration(m.period,m.count);var u,r,s,p,v,q;u=this.rotate;var x=this.firstDayOfWeek,t=this.boldPeriodBeginning,a=AmCharts.resetDateToMin(new Date(a[a.length-
36 1].time+1.05*g),this.minPeriod,1,x).getTime(),y;this.endTime>a&&(this.endTime=a);q=this.minorGridEnabled;var w,a=this.gridAlpha,C;if(this.parseDates&&!this.equalSpacing){this.timeDifference=this.endTime-this.startTime;d=this.choosePeriod(0);e=d.period;u=d.count;r=AmCharts.getPeriodDuration(e,u);r<g&&(e=m.period,u=m.count,r=g);s=e;"WW"==s&&(s="DD");this.stepWidth=this.getStepWidth(this.timeDifference);var l=Math.ceil(this.timeDifference/r)+5,B=h=AmCharts.resetDateToMin(new Date(this.startTime-r),e,
37 u,x).getTime();s==e&&1==u&&this.centerLabelOnFullPeriod&&(v=r*this.stepWidth);this.cellWidth=g*this.stepWidth;b=Math.round(h/r);d=-1;b/2==Math.round(b/2)&&(d=-2,h-=r);var z=c.firstTime,A=0;q&&1<u&&(w=this.chooseMinorFrequency(u),C=AmCharts.getPeriodDuration(e,w));if(0<this.gridCountR)for(b=d;b<=l;b++){m=z+r*(b+Math.floor((B-z)/r))-A;"DD"==e&&(m+=36E5);m=AmCharts.resetDateToMin(new Date(m),e,u,x).getTime();"MM"==e&&(q=(m-h)/r,1.5<=(m-h)/r&&(m=m-(q-1)*r+AmCharts.getPeriodDuration("DD",3),m=AmCharts.resetDateToMin(new Date(m),
38 e,1).getTime(),A+=r));g=(m-this.startTime)*this.stepWidth;q=!1;this.nextPeriod[s]&&(q=this.checkPeriodChange(this.nextPeriod[s],1,m,h,s));y=!1;q&&this.markPeriodChange?(q=this.dateFormatsObject[this.nextPeriod[s]],this.twoLineMode&&(q=this.dateFormatsObject[s]+"\n"+q,q=AmCharts.fixBrakes(q)),y=!0):q=this.dateFormatsObject[s];t||(y=!1);h=AmCharts.formatDate(new Date(m),q);if(b==d&&!n||b==l&&!k)h=" ";this.labelFunction&&(h=this.labelFunction(h,new Date(m),this,e,u,p).toString());this.boldLabels&&(y=
39 !0);p=new this.axisItemRenderer(this,g,h,!1,v,0,!1,y);this.pushAxisItem(p);p=h=m;if(!isNaN(w))for(g=1;g<u;g+=w)this.gridAlpha=this.minorGridAlpha,q=m+C*g,q=AmCharts.resetDateToMin(new Date(q),e,w,x).getTime(),q=new this.axisItemRenderer(this,(q-this.startTime)*this.stepWidth),this.pushAxisItem(q);this.gridAlpha=a}}else if(!this.parseDates){if(this.cellWidth=this.getStepWidth(b),b<l&&(l=b),f+=this.start,this.stepWidth=this.getStepWidth(b),0<l)for(t=Math.floor(b/l),w=this.chooseMinorFrequency(t),g=
40 f,g/2==Math.round(g/2)&&g--,0>g&&(g=0),l=0,this.end-g+1>=this.autoRotateCount&&(this.labelRotation=this.autoRotateAngle),b=g;b<=this.end+2;b++){p=!1;0<=b&&b<this.data.length?(s=this.data[b],h=s.category,p=s.forceShow):h="";if(q&&!isNaN(w))if(b/w==Math.round(b/w)||p)b/t==Math.round(b/t)||p||(this.gridAlpha=this.minorGridAlpha,h=void 0);else continue;else if(b/t!=Math.round(b/t)&&!p)continue;g=this.getCoordinate(b-f);p=0;"start"==this.gridPosition&&(g-=this.cellWidth/2,p=this.cellWidth/2);x=!0;tickShift=
41 p;"start"==this.tickPosition&&(tickShift=0,x=!1,p=0);if(b==d&&!n||b==this.end&&!k)h=void 0;Math.round(l/e)!=l/e&&(h=void 0);l++;B=this.cellWidth;u&&(B=NaN);this.labelFunction&&s&&(h=this.labelFunction(h,s,this));h=AmCharts.fixBrakes(h);y=!1;this.boldLabels&&(y=!0);b>this.end&&"start"==this.tickPosition&&(h=" ");p=new this.axisItemRenderer(this,g,h,x,B,p,void 0,y,tickShift,!1,s.labelColor);p.serialDataItem=s;this.pushAxisItem(p);this.gridAlpha=a}}else if(this.parseDates&&this.equalSpacing){f=this.start;
42 this.startTime=this.data[this.start].time;this.endTime=this.data[this.end].time;this.timeDifference=this.endTime-this.startTime;d=this.choosePeriod(0);e=d.period;u=d.count;r=AmCharts.getPeriodDuration(e,u);r<g&&(e=m.period,u=m.count,r=g);s=e;"WW"==s&&(s="DD");this.stepWidth=this.getStepWidth(b);l=Math.ceil(this.timeDifference/r)+1;h=AmCharts.resetDateToMin(new Date(this.startTime-r),e,u,x).getTime();this.cellWidth=this.getStepWidth(b);b=Math.round(h/r);d=-1;b/2==Math.round(b/2)&&(d=-2,h-=r);g=this.start;
43 g/2==Math.round(g/2)&&g--;0>g&&(g=0);v=this.end+2;v>=this.data.length&&(v=this.data.length);C=!1;C=!n;this.previousPos=-1E3;20<this.labelRotation&&(this.safeDistance=5);r=g;if(this.data[g].time!=AmCharts.resetDateToMin(new Date(this.data[g].time),e,u,x).getTime())for(x=0,y=h,b=g;b<v;b++)m=this.data[b].time,this.checkPeriodChange(e,u,m,y)&&(x++,2<=x&&(r=b,b=v),y=m);q&&1<u&&(w=this.chooseMinorFrequency(u),AmCharts.getPeriodDuration(e,w));if(0<this.gridCountR)for(b=g;b<v;b++)if(m=this.data[b].time,this.checkPeriodChange(e,
44 u,m,h)&&b>=r){g=this.getCoordinate(b-this.start);q=!1;this.nextPeriod[s]&&(q=this.checkPeriodChange(this.nextPeriod[s],1,m,h,s));y=!1;q&&this.markPeriodChange?(q=this.dateFormatsObject[this.nextPeriod[s]],y=!0):q=this.dateFormatsObject[s];h=AmCharts.formatDate(new Date(m),q);if(b==d&&!n||b==l&&!k)h=" ";C?C=!1:(t||(y=!1),g-this.previousPos>this.safeDistance*Math.cos(this.labelRotation*Math.PI/180)&&(this.labelFunction&&(h=this.labelFunction(h,new Date(m),this,e,u,p)),this.boldLabels&&(y=!0),p=new this.axisItemRenderer(this,
45 g,h,void 0,void 0,void 0,void 0,y),x=p.graphics(),this.pushAxisItem(p),p=x.getBBox().width,AmCharts.isModern||(p-=g),this.previousPos=g+p));p=h=m}else isNaN(w)||(this.checkPeriodChange(e,w,m,B)&&(this.gridAlpha=this.minorGridAlpha,g=this.getCoordinate(b-this.start),q=new this.axisItemRenderer(this,g),this.pushAxisItem(q),B=m),this.gridAlpha=a)}for(b=0;b<this.data.length;b++)if(n=this.data[b])k=this.parseDates&&!this.equalSpacing?Math.round((n.time-this.startTime)*this.stepWidth+this.cellWidth/2):
46 this.getCoordinate(b-f),n.x[this.id]=k;n=this.guides.length;for(b=0;b<n;b++)k=this.guides[b],t=t=t=a=d=NaN,w=k.above,k.toCategory&&(t=c.getCategoryIndexByValue(k.toCategory),isNaN(t)||(d=this.getCoordinate(t-f),k.expand&&(d+=this.cellWidth/2),p=new this.axisItemRenderer(this,d,"",!0,NaN,NaN,k),this.pushAxisItem(p,w))),k.category&&(t=c.getCategoryIndexByValue(k.category),isNaN(t)||(a=this.getCoordinate(t-f),k.expand&&(a-=this.cellWidth/2),t=(d-a)/2,p=new this.axisItemRenderer(this,a,k.label,!0,NaN,
47 t,k),this.pushAxisItem(p,w))),k.toDate&&(k.toDate instanceof Date||(k.toDate=AmCharts.stringToDate(k.toDate,c.dataDateFormat)),this.equalSpacing?(t=c.getClosestIndex(this.data,"time",k.toDate.getTime(),!1,0,this.data.length-1),isNaN(t)||(d=this.getCoordinate(t-f))):d=(k.toDate.getTime()-this.startTime)*this.stepWidth,p=new this.axisItemRenderer(this,d,"",!0,NaN,NaN,k),this.pushAxisItem(p,w)),k.date&&(k.date instanceof Date||(k.date=AmCharts.stringToDate(k.date,c.dataDateFormat)),this.equalSpacing?
48 (t=c.getClosestIndex(this.data,"time",k.date.getTime(),!1,0,this.data.length-1),isNaN(t)||(a=this.getCoordinate(t-f))):a=(k.date.getTime()-this.startTime)*this.stepWidth,t=(d-a)/2,p="H"==this.orientation?new this.axisItemRenderer(this,a,k.label,!1,2*t,NaN,k):new this.axisItemRenderer(this,a,k.label,!1,NaN,t,k),this.pushAxisItem(p,w)),(0<d||0<a)&&(d<this.width||a<this.width)&&(d=new this.guideFillRenderer(this,a,d,k),a=d.graphics(),this.pushAxisItem(d,w),k.graphics=a,a.index=b,k.balloonText&&this.addEventListeners(a,
49 k))}this.axisCreated=!0;c=this.x;f=this.y;this.set.translate(c,f);this.labelsSet.translate(c,f);this.positionTitle();(c=this.axisLine.set)&&c.toFront();c=this.getBBox().height;2<c-this.previousHeight&&this.autoWrap&&!this.parseDates&&(this.axisCreated=this.chart.marginsUpdated=!1);this.previousHeight=c},chooseMinorFrequency:function(a){for(var b=10;0<b;b--)if(a/b==Math.round(a/b))return a/b},choosePeriod:function(a){var b=AmCharts.getPeriodDuration(this.periods[a].period,this.periods[a].count),c=
50 Math.ceil(this.timeDifference/b),d=this.periods;return this.timeDifference<b&&0<a?d[a-1]:c<=this.gridCountR?d[a]:a+1<d.length?this.choosePeriod(a+1):d[a]},getStepWidth:function(a){var b;this.startOnAxis?(b=this.axisWidth/(a-1),1==a&&(b=this.axisWidth)):b=this.axisWidth/a;return b},getCoordinate:function(a){a*=this.stepWidth;this.startOnAxis||(a+=this.stepWidth/2);return Math.round(a)},timeZoom:function(a,b){this.startTime=a;this.endTime=b},minDuration:function(){var a=AmCharts.extractPeriod(this.minPeriod);
51 return AmCharts.getPeriodDuration(a.period,a.count)},checkPeriodChange:function(a,b,c,d,e){c=new Date(c);var f=new Date(d),l=this.firstDayOfWeek;d=b;"DD"==a&&(b=1);c=AmCharts.resetDateToMin(c,a,b,l).getTime();b=AmCharts.resetDateToMin(f,a,b,l).getTime();return"DD"==a&&"hh"!=e&&c-b<=AmCharts.getPeriodDuration(a,d)?!1:c!=b?!0:!1},generateDFObject:function(){this.dateFormatsObject={};var a;for(a=0;a<this.dateFormats.length;a++){var b=this.dateFormats[a];this.dateFormatsObject[b.period]=b.format}},xToIndex:function(a){var b=
52 this.data,c=this.chart,d=c.rotate,e=this.stepWidth;this.parseDates&&!this.equalSpacing?(a=this.startTime+Math.round(a/e)-this.minDuration()/2,c=c.getClosestIndex(b,"time",a,!1,this.start,this.end+1)):(this.startOnAxis||(a-=e/2),c=this.start+Math.round(a/e));var c=AmCharts.fitToBounds(c,0,b.length-1),f;b[c]&&(f=b[c].x[this.id]);d?f>this.height+1&&c--:f>this.width+1&&c--;0>f&&c++;return c=AmCharts.fitToBounds(c,0,b.length-1)},dateToCoordinate:function(a){return this.parseDates&&!this.equalSpacing?(a.getTime()-
53 this.startTime)*this.stepWidth:this.parseDates&&this.equalSpacing?(a=this.chart.getClosestIndex(this.data,"time",a.getTime(),!1,0,this.data.length-1),this.getCoordinate(a-this.start)):NaN},categoryToCoordinate:function(a){return this.chart?(a=this.chart.getCategoryIndexByValue(a),this.getCoordinate(a-this.start)):NaN},coordinateToDate:function(a){return this.equalSpacing?(a=this.xToIndex(a),new Date(this.data[a].time)):new Date(this.startTime+a/this.stepWidth)}});
amcharts/themes/black.js
File was created 1 AmCharts.themes.black = {
2
3 themeName: "black",
4
5 AmChart: {
6 color: "#e7e7e7", backgroundColor: "#222222"
7 },
8
9 AmCoordinateChart: {
10 colors: ["#de4c4f", "#d8854f", "#eea638", "#a7a737", "#86a965", "#8aabb0", "#69c8ff", "#cfd27e", "#9d9888", "#916b8a", "#724887", "#7256bc"]
11 },
12
13 AmStockChart: {
14 colors: ["#de4c4f", "#d8854f", "#eea638", "#a7a737", "#86a965", "#8aabb0", "#69c8ff", "#cfd27e", "#9d9888", "#916b8a", "#724887", "#7256bc"]
15 },
16
17 AmSlicedChart: {
18 outlineAlpha: 1,
19 outlineThickness: 2,
20 labelTickColor: "#FFFFFF",
21 labelTickAlpha: 0.3,
22 colors: ["#de4c4f", "#d8854f", "#eea638", "#a7a737", "#86a965", "#8aabb0", "#69c8ff", "#cfd27e", "#9d9888", "#916b8a", "#724887", "#7256bc"]
23 },
24
25 AmRectangularChart: {
26 zoomOutButtonColor: '#FFFFFF',
27 zoomOutButtonRollOverAlpha: 0.15,
28 zoomOutButtonImage: "lensWhite.png"
29 },
30
31 AxisBase: {
32 axisColor: "#FFFFFF",
33 axisAlpha: 0.3,
34 gridAlpha: 0.1,
35 gridColor: "#FFFFFF",
36 dashLength: 3
37 },
38
39 ChartScrollbar: {
40 backgroundColor: "#000000",
41 backgroundAlpha: 0.2,
42 graphFillAlpha: 0.2,
43 graphLineAlpha: 0,
44 graphFillColor: "#FFFFFF",
45 selectedGraphFillColor: "#FFFFFF",
46 selectedGraphFillAlpha: 0.4,
47 selectedGraphLineColor: "#FFFFFF",
48 selectedBackgroundColor: "#FFFFFF",
49 selectedBackgroundAlpha: 0.09,
50 gridAlpha: 0.15
51 },
52
53 ChartCursor: {
54 cursorColor: "#FFFFFF",
55 color: "#000000",
56 cursorAlpha: 0.5
57 },
58
59 AmLegend: {
60 color: "#e7e7e7"
61 },
62
63 AmGraph: {
64 lineAlpha: 0.9
65 },
66
67
68 GaugeArrow: {
69 color: "#FFFFFF",
70 alpha: 0.8,
71 nailAlpha: 0,
72 innerRadius: "40%",
73 nailRadius: 15,
74 startWidth: 15,
75 borderAlpha: 0.8,
76 nailBorderAlpha: 0
77 },
78
79 GaugeAxis: {
80 tickColor: "#FFFFFF",
81 tickAlpha: 1,
82 tickLength: 15,
83 minorTickLength: 8,
84 axisThickness: 3,
85 axisColor: '#FFFFFF',
86 axisAlpha: 1,
87 bandAlpha: 0.8
88 },
89
90 TrendLine: {
91 lineColor: "#c03246",
92 lineAlpha: 0.8
93 },
94
95 // ammap
96 AreasSettings: {
97 alpha: 0.8,
98 color: "#FFFFFF",
99 colorSolid: "#000000",
100 unlistedAreasAlpha: 0.4,
101 unlistedAreasColor: "#FFFFFF",
102 outlineColor: "#000000",
103 outlineAlpha: 0.5,
104 outlineThickness: 0.5,
105 rollOverColor: "#3c5bdc",
106 rollOverOutlineColor: "#000000",
107 selectedOutlineColor: "#000000",
108 selectedColor: "#f15135",
109 unlistedAreasOutlineColor: "#000000",
110 unlistedAreasOutlineAlpha: 0.5
111 },
112
113 LinesSettings: {
114 color: "#FFFFFF",
115 alpha: 0.8
116 },
117
118 ImagesSettings: {
119 alpha: 0.8,
120 labelColor: "#FFFFFF",
121 color: "#FFFFFF",
122 labelRollOverColor: "#3c5bdc"
123 },
124
125 ZoomControl: {
126 buttonRollOverColor: "#3c5bdc",
127 buttonFillColor: "#738f58",
128 buttonBorderColor: "#738f58",
129 buttonFillAlpha: 0.8,
130 gridBackgroundColor: "#FFFFFF",
131 buttonBorderAlpha:0,
132 buttonCornerRadius:2,
133 gridAlpha:0.5,
134 gridBackgroundColor:"#FFFFFF",
135 homeIconFile:"homeIconWhite.gif",
136 buttonIconAlpha:0.6,
137 gridAlpha: 0.2,
138 buttonSize:20
139 },
140
141 SmallMap: {
142 mapColor: "#FFFFFF",
143 rectangleColor: "#FFFFFF",
144 backgroundColor: "#000000",
145 backgroundAlpha: 0.7,
146 borderThickness: 1,
147 borderAlpha: 0.8
148 },
149
150 // the defaults below are set using CSS syntax, you can use any existing css property
151 // if you don't use Stock chart, you can delete lines below
152 PeriodSelector: {
153 color: "#e7e7e7"
154 },
155
156 PeriodButton: {
157 color: "#e7e7e7",
158 background: "transparent",
159 opacity: 0.7,
160 border: "1px solid rgba(255, 255, 255, .15)",
161 MozBorderRadius: "5px",
162 borderRadius: "5px",
163 margin: "1px",
164 outline: "none",
165 boxSizing: "border-box"
166 },
167
168 PeriodButtonSelected: {
169 color: "#e7e7e7",
170 backgroundColor: "rgba(255, 255, 255, 0.1)",
171 border: "1px solid rgba(255, 255, 255, .3)",
172 MozBorderRadius: "5px",
173 borderRadius: "5px",
174 margin: "1px",
175 outline: "none",
176 opacity: 1,
177 boxSizing: "border-box"
178 },
179
180 PeriodInputField: {
181 color: "#e7e7e7",
182 background: "transparent",
183 border: "1px solid rgba(255, 255, 255, .15)",
184 outline: "none"
185 },
186
187 DataSetSelector: {
188 color: "#e7e7e7",
189 selectedBackgroundColor: "rgba(255, 255, 255, .25)",
190 rollOverBackgroundColor: "rgba(255, 255, 255, .15)"
191 },
192
193 DataSetCompareList: {
194 color: "#e7e7e7",
195 lineHeight: "100%",
196 boxSizing: "initial",
197 webkitBoxSizing: "initial",
198 border: "1px solid rgba(255, 255, 255, .15)"
199 },
200
201 DataSetSelect: {
202 border: "1px solid rgba(255, 255, 255, .15)",
203 outline: "none"
204 }
205
206 };
amcharts/themes/chalk.js
File was created 1 AmCharts.themes.chalk = {
2
3 themeName: "chalk",
4
5 AmChart: {
6 color: "#e7e7e7",
7 fontFamily: "Covered By Your Grace",
8 fontSize: 18,
9 handDrawn: true,
10 backgroundColor: "#282828"
11 },
12
13 AmCoordinateChart: {
14 colors: ["#FFFFFF", "#e384a6", "#f4d499", "#4d90d6", "#c7e38c", "#9986c8", "#edf28c", "#ffd1d4", "#5ee1dc", "#b0eead", "#fef85a", "#8badd2"]
15 },
16
17 AmSlicedChart: {
18 outlineAlpha: 1,
19 labelTickColor: "#FFFFFF",
20 labelTickAlpha: 0.3,
21 colors: ["#FFFFFF", "#e384a6", "#f4d499", "#4d90d6", "#c7e38c", "#9986c8", "#edf28c", "#ffd1d4", "#5ee1dc", "#b0eead", "#fef85a", "#8badd2"]
22 },
23
24 AmStockChart: {
25 colors: ["#FFFFFF", "#e384a6", "#f4d499", "#4d90d6", "#c7e38c", "#9986c8", "#edf28c", "#ffd1d4", "#5ee1dc", "#b0eead", "#fef85a", "#8badd2"]
26 },
27
28 AmRectangularChart: {
29
30 zoomOutButtonColor: '#FFFFFF',
31 zoomOutButtonRollOverAlpha: 0.15,
32 zoomOutButtonImage: "lensWhite.png"
33 },
34
35 AxisBase: {
36 axisColor: "#FFFFFF",
37 gridColor: "#FFFFFF"
38 },
39
40 ChartScrollbar: {
41 backgroundColor: "#FFFFFF",
42 backgroundAlpha: 0.2,
43 graphFillAlpha: 0.5,
44 graphLineAlpha: 0,
45 selectedBackgroundColor: "#000000",
46 selectedBackgroundAlpha: 0.25,
47 fontSize: 15,
48 gridAlpha: 0.15
49 },
50
51 ChartCursor: {
52 cursorColor: "#FFFFFF",
53 color: "#000000"
54 },
55
56 AmLegend: {
57 color: "#e7e7e7",
58 markerSize: 20
59 },
60
61 AmGraph: {
62 lineAlpha: 0.8
63 },
64
65
66 GaugeArrow: {
67 color: "#FFFFFF",
68 alpha: 0.1,
69 nailAlpha: 0,
70 innerRadius: "40%",
71 nailRadius: 15,
72 startWidth: 15,
73 borderAlpha: 0.8,
74 nailBorderAlpha: 0
75 },
76
77 GaugeAxis: {
78 tickColor: "#FFFFFF",
79 tickAlpha: 0.8,
80 tickLength: 15,
81 minorTickLength: 8,
82 axisThickness: 3,
83 axisColor: '#FFFFFF',
84 axisAlpha: 0.8,
85 bandAlpha: 0.4
86 },
87
88 TrendLine: {
89 lineColor: "#c03246",
90 lineAlpha: 0.8
91 },
92
93 // ammap
94 AmMap: {
95 handDrawn: false
96 },
97
98 AreasSettings: {
99 alpha: 0.8,
100 color: "#FFFFFF",
101 colorSolid: "#000000",
102 unlistedAreasAlpha: 0.4,
103 unlistedAreasColor: "#FFFFFF",
104 outlineColor: "#000000",
105 outlineAlpha: 0.5,
106 outlineThickness: 0.5,
107 rollOverColor: "#4d90d6",
108 rollOverOutlineColor: "#000000",
109 selectedOutlineColor: "#000000",
110 selectedColor: "#e384a6",
111 unlistedAreasOutlineColor: "#000000",
112 unlistedAreasOutlineAlpha: 0.5
113 },
114
115 LinesSettings: {
116 color: "#FFFFFF",
117 alpha: 0.8
118 },
119
120 ImagesSettings: {
121 alpha: 0.8,
122 labelFontSize: 16,
123 labelColor: "#FFFFFF",
124 color: "#FFFFFF",
125 labelRollOverColor: "#4d90d6"
126 },
127
128 ZoomControl: {
129 buttonRollOverColor: "#4d90d6",
130 buttonFillColor: "#e384a6",
131 buttonFillAlpha: 0.8,
132 buttonBorderColor: "#FFFFFF",
133 gridBackgroundColor: "#FFFFFF",
134 gridAlpha: 0.8
135 },
136
137 SmallMap: {
138 mapColor: "#FFFFFF",
139 rectangleColor: "#FFFFFF",
140 backgroundColor: "#000000",
141 backgroundAlpha: 0.7,
142 borderThickness: 1,
143 borderAlpha: 0.8
144 },
145
146
147 // the defaults below are set using CSS syntax, you can use any existing css property
148 // if you don't use Stock chart, you can delete lines below
149 PeriodSelector: {
150 fontFamily: "Covered By Your Grace",
151 fontSize:"16px",
152 color: "#e7e7e7"
153 },
154
155 PeriodButton: {
156 fontFamily: "Covered By Your Grace",
157 fontSize:"16px",
158 color: "#e7e7e7",
159 background: "transparent",
160 opacity: 0.7,
161 border: "1px solid rgba(255, 255, 255, .15)",
162 MozBorderRadius: "5px",
163 borderRadius: "5px",
164 margin: "1px",
165 outline: "none",
166 boxSizing: "border-box"
167 },
168
169 PeriodButtonSelected: {
170 fontFamily: "Covered By Your Grace",
171 fontSize:"16px",
172 color: "#e7e7e7",
173 backgroundColor: "rgba(255, 255, 255, 0.1)",
174 border: "1px solid rgba(255, 255, 255, .3)",
175 MozBorderRadius: "5px",
176 borderRadius: "5px",
177 margin: "1px",
178 outline: "none",
179 opacity: 1,
180 boxSizing: "border-box"
181 },
182
183 PeriodInputField: {
184 fontFamily: "Covered By Your Grace",
185 fontSize:"16px",
186 color: "#e7e7e7",
187 background: "transparent",
188 border: "1px solid rgba(255, 255, 255, .15)",
189 outline: "none"
190 },
191
192 DataSetSelector: {
193 fontFamily: "Covered By Your Grace",
194 fontSize:"16px",
195 color: "#e7e7e7",
196 selectedBackgroundColor: "rgba(255, 255, 255, .25)",
197 rollOverBackgroundColor: "rgba(255, 255, 255, .15)"
198 },
199
200 DataSetCompareList: {
201 fontFamily: "Covered By Your Grace",
202 fontSize:"16px",
203 color: "#e7e7e7",
204 lineHeight: "100%",
205 boxSizing: "initial",
206 webkitBoxSizing: "initial",
207 border: "1px solid rgba(255, 255, 255, .15)"
208 },
209
210 DataSetSelect: {
211 fontFamily: "Covered By Your Grace",
212 fontSize:"16px",
213 border: "1px solid rgba(255, 255, 255, .15)",
214 outline: "none"
215 }
216
217 };
amcharts/themes/dark.js
File was created 1 AmCharts.themes.dark = {
2
3 themeName: "dark",
4
5 AmChart: {
6 color: "#e7e7e7", backgroundColor: "#282828"
7 },
8
9 AmCoordinateChart: {
10 colors: ["#ae85c9", "#aab9f7", "#b6d2ff", "#c9e6f2", "#c9f0e1", "#e8d685", "#e0ad63", "#d48652", "#d27362", "#495fba", "#7a629b", "#8881cc"]
11 },
12
13 AmStockChart: {
14 colors: ["#639dbd", "#e8d685", "#ae85c9", "#c9f0e1", "#d48652", "#629b6d", "#719dc3", "#719dc3"]
15 },
16
17 AmSlicedChart: {
18 outlineAlpha: 1,
19 outlineThickness: 2,
20 labelTickColor: "#FFFFFF",
21 labelTickAlpha: 0.3,
22 colors: ["#495fba", "#e8d685", "#ae85c9", "#c9f0e1", "#d48652", "#629b6d", "#719dc3", "#719dc3"]
23 },
24
25 AmRectangularChart: {
26 zoomOutButtonColor: '#FFFFFF',
27 zoomOutButtonRollOverAlpha: 0.15,
28 zoomOutButtonImage: "lensWhite.png"
29 },
30
31 AxisBase: {
32 axisColor: "#FFFFFF",
33 axisAlpha: 0.3,
34 gridAlpha: 0.1,
35 gridColor: "#FFFFFF",
36 dashLength: 3
37 },
38
39 ChartScrollbar: {
40 backgroundColor: "#000000",
41 backgroundAlpha: 0.2,
42 graphFillAlpha: 0.2,
43 graphLineAlpha: 0,
44 graphFillColor: "#FFFFFF",
45 selectedGraphFillColor: "#FFFFFF",
46 selectedGraphFillAlpha: 0.4,
47 selectedGraphLineColor: "#FFFFFF",
48 selectedBackgroundColor: "#FFFFFF",
49 selectedBackgroundAlpha: 0.09,
50 gridAlpha: 0.15
51 },
52
53 ChartCursor: {
54 cursorColor: "#FFFFFF",
55 color: "#000000",
56 cursorAlpha: 0.5
57 },
58
59 AmLegend: {
60 color: "#e7e7e7"
61 },
62
63 AmGraph: {
64 lineAlpha: 0.9
65 },
66
67
68 GaugeArrow: {
69 color: "#FFFFFF",
70 alpha: 0.8,
71 nailAlpha: 0,
72 innerRadius: "40%",
73 nailRadius: 15,
74 startWidth: 15,
75 borderAlpha: 0.8,
76 nailBorderAlpha: 0
77 },
78
79 GaugeAxis: {
80 tickColor: "#FFFFFF",
81 tickAlpha: 1,
82 tickLength: 15,
83 minorTickLength: 8,
84 axisThickness: 3,
85 axisColor: '#FFFFFF',
86 axisAlpha: 1,
87 bandAlpha: 0.8
88 },
89
90 TrendLine: {
91 lineColor: "#c03246",
92 lineAlpha: 0.8
93 },
94
95 // ammap
96 AreasSettings: {
97 alpha: 0.8,
98 color: "#FFFFFF",
99 colorSolid: "#000000",
100 unlistedAreasAlpha: 0.4,
101 unlistedAreasColor: "#FFFFFF",
102 outlineColor: "#000000",
103 outlineAlpha: 0.5,
104 outlineThickness: 0.5,
105 rollOverColor: "#3c5bdc",
106 rollOverOutlineColor: "#000000",
107 selectedOutlineColor: "#000000",
108 selectedColor: "#f15135",
109 unlistedAreasOutlineColor: "#000000",
110 unlistedAreasOutlineAlpha: 0.5
111 },
112
113 LinesSettings: {
114 color: "#FFFFFF",
115 alpha: 0.8
116 },
117
118 ImagesSettings: {
119 alpha: 0.8,
120 labelColor: "#FFFFFF",
121 color: "#FFFFFF",
122 labelRollOverColor: "#3c5bdc"
123 },
124
125 ZoomControl: {
126 buttonRollOverColor: "#3c5bdc",
127 buttonFillColor: "#f15135",
128 buttonFillAlpha: 0.8,
129 gridBackgroundColor: "#FFFFFF",
130 buttonBorderAlpha:0,
131 buttonCornerRadius:2,
132 gridAlpha:0.5,
133 gridBackgroundColor:"#FFFFFF",
134 homeIconFile:"homeIconWhite.gif",
135 buttonIconAlpha:0.6,
136 gridAlpha: 0.2,
137 buttonSize:20
138 },
139
140 SmallMap: {
141 mapColor: "#FFFFFF",
142 rectangleColor: "#FFFFFF",
143 backgroundColor: "#000000",
144 backgroundAlpha: 0.7,
145 borderThickness: 1,
146 borderAlpha: 0.8
147 },
148
149 // the defaults below are set using CSS syntax, you can use any existing css property
150 // if you don't use Stock chart, you can delete lines below
151 PeriodSelector: {
152 color: "#e7e7e7"
153 },
154
155 PeriodButton: {
156 color: "#e7e7e7",
157 background: "transparent",
158 opacity: 0.7,
159 border: "1px solid rgba(255, 255, 255, .15)",
160 MozBorderRadius: "5px",
161 borderRadius: "5px",
162 margin: "1px",
163 outline: "none",
164 boxSizing: "border-box"
165 },
166
167 PeriodButtonSelected: {
168 color: "#e7e7e7",
169 backgroundColor: "rgba(255, 255, 255, 0.1)",
170 border: "1px solid rgba(255, 255, 255, .3)",
171 MozBorderRadius: "5px",
172 borderRadius: "5px",
173 margin: "1px",
174 outline: "none",
175 opacity: 1,
176 boxSizing: "border-box"
177 },
178
179 PeriodInputField: {
180 color: "#e7e7e7",
181 background: "transparent",
182 border: "1px solid rgba(255, 255, 255, .15)",
183 outline: "none"
184 },
185
186 DataSetSelector: {
187 color: "#e7e7e7",
188 selectedBackgroundColor: "rgba(255, 255, 255, .25)",
189 rollOverBackgroundColor: "rgba(255, 255, 255, .15)"
190 },
191
192 DataSetCompareList: {
193 color: "#e7e7e7",
194 lineHeight: "100%",
195 boxSizing: "initial",
196 webkitBoxSizing: "initial",
197 border: "1px solid rgba(255, 255, 255, .15)"
198 },
199
200 DataSetSelect: {
201 border: "1px solid rgba(255, 255, 255, .15)",
202 outline: "none"
203 }
204
205 };
amcharts/themes/light.js
File was created 1 AmCharts.themes.light = {
2
3 themeName:"light",
4
5 AmChart: {
6 color: "#000000", backgroundColor: "#FFFFFF"
7 },
8
9 AmCoordinateChart: {
10 colors: ["#67b7dc", "#fdd400", "#84b761", "#cc4748", "#cd82ad", "#2f4074", "#448e4d", "#b7b83f", "#b9783f", "#b93e3d", "#913167"]
11 },
12
13 AmStockChart: {
14 colors: ["#67b7dc", "#fdd400", "#84b761", "#cc4748", "#cd82ad", "#2f4074", "#448e4d", "#b7b83f", "#b9783f", "#b93e3d", "#913167"]
15 },
16
17 AmSlicedChart: {
18 colors: ["#67b7dc", "#fdd400", "#84b761", "#cc4748", "#cd82ad", "#2f4074", "#448e4d", "#b7b83f", "#b9783f", "#b93e3d", "#913167"],
19 outlineAlpha: 1,
20 outlineThickness: 2,
21 labelTickColor: "#000000",
22 labelTickAlpha: 0.3
23 },
24
25 AmRectangularChart: {
26 zoomOutButtonColor: '#000000',
27 zoomOutButtonRollOverAlpha: 0.15,
28 zoomOutButtonImage: "lens.png"
29 },
30
31 AxisBase: {
32 axisColor: "#000000",
33 axisAlpha: 0.3,
34 gridAlpha: 0.1,
35 gridColor: "#000000"
36 },
37
38 ChartScrollbar: {
39 backgroundColor: "#000000",
40 backgroundAlpha: 0.12,
41 graphFillAlpha: 0.5,
42 graphLineAlpha: 0,
43 selectedBackgroundColor: "#FFFFFF",
44 selectedBackgroundAlpha: 0.4,
45 gridAlpha: 0.15
46 },
47
48 ChartCursor: {
49 cursorColor: "#000000",
50 color: "#FFFFFF",
51 cursorAlpha: 0.5
52 },
53
54 AmLegend: {
55 color: "#000000"
56 },
57
58 AmGraph: {
59 lineAlpha: 0.9
60 },
61 GaugeArrow: {
62 color: "#000000",
63 alpha: 0.8,
64 nailAlpha: 0,
65 innerRadius: "40%",
66 nailRadius: 15,
67 startWidth: 15,
68 borderAlpha: 0.8,
69 nailBorderAlpha: 0
70 },
71
72 GaugeAxis: {
73 tickColor: "#000000",
74 tickAlpha: 1,
75 tickLength: 15,
76 minorTickLength: 8,
77 axisThickness: 3,
78 axisColor: '#000000',
79 axisAlpha: 1,
80 bandAlpha: 0.8
81 },
82
83 TrendLine: {
84 lineColor: "#c03246",
85 lineAlpha: 0.8
86 },
87
88 // ammap
89 AreasSettings: {
90 alpha: 0.8,
91 color: "#67b7dc",
92 colorSolid: "#003767",
93 unlistedAreasAlpha: 0.4,
94 unlistedAreasColor: "#000000",
95 outlineColor: "#FFFFFF",
96 outlineAlpha: 0.5,
97 outlineThickness: 0.5,
98 rollOverColor: "#3c5bdc",
99 rollOverOutlineColor: "#FFFFFF",
100 selectedOutlineColor: "#FFFFFF",
101 selectedColor: "#f15135",
102 unlistedAreasOutlineColor: "#FFFFFF",
103 unlistedAreasOutlineAlpha: 0.5
104 },
105
106 LinesSettings: {
107 color: "#000000",
108 alpha: 0.8
109 },
110
111 ImagesSettings: {
112 alpha: 0.8,
113 labelColor: "#000000",
114 color: "#000000",
115 labelRollOverColor: "#3c5bdc"
116 },
117
118 ZoomControl: {
119 buttonRollOverColor: "#3c5bdc",
120 buttonFillColor: "#3994e2",
121 buttonBorderColor: "#3994e2",
122 buttonFillAlpha: 0.8,
123 gridBackgroundColor: "#FFFFFF",
124 buttonBorderAlpha:0,
125 buttonCornerRadius:2,
126 gridColor:"#FFFFFF",
127 gridBackgroundColor:"#000000",
128 buttonIconAlpha:0.6,
129 gridAlpha: 0.6,
130 buttonSize:20
131 },
132
133 SmallMap: {
134 mapColor: "#000000",
135 rectangleColor: "#f15135",
136 backgroundColor: "#FFFFFF",
137 backgroundAlpha: 0.7,
138 borderThickness: 1,
139 borderAlpha: 0.8
140 },
141
142 // the defaults below are set using CSS syntax, you can use any existing css property
143 // if you don't use Stock chart, you can delete lines below
144 PeriodSelector: {
145 color: "#000000"
146 },
147
148 PeriodButton: {
149 color: "#000000",
150 background: "transparent",
151 opacity: 0.7,
152 border: "1px solid rgba(0, 0, 0, .3)",
153 MozBorderRadius: "5px",
154 borderRadius: "5px",
155 margin: "1px",
156 outline: "none",
157 boxSizing: "border-box"
158 },
159
160 PeriodButtonSelected: {
161 color: "#000000",
162 backgroundColor: "#b9cdf5",
163 border: "1px solid rgba(0, 0, 0, .3)",
164 MozBorderRadius: "5px",
165 borderRadius: "5px",
166 margin: "1px",
167 outline: "none",
168 opacity: 1,
169 boxSizing: "border-box"
170 },
171
172 PeriodInputField: {
173 color: "#000000",
174 background: "transparent",
175 border: "1px solid rgba(0, 0, 0, .3)",
176 outline: "none"
177 },
178
179 DataSetSelector: {
180
181 color: "#000000",
182 selectedBackgroundColor: "#b9cdf5",
183 rollOverBackgroundColor: "#a8b0e4"
184 },
185
186 DataSetCompareList: {
187 color: "#000000",
188 lineHeight: "100%",
189 boxSizing: "initial",
190 webkitBoxSizing: "initial",
191 border: "1px solid rgba(0, 0, 0, .3)"
192 },
193
194 DataSetSelect: {
195 border: "1px solid rgba(0, 0, 0, .3)",
196 outline: "none"
197 }
198
199 };
amcharts/themes/patterns.js
File was created 1 AmCharts.themes.patterns = {
2
3 themeName:"patterns",
4
5 AmChart: {
6 color: "#000000", backgroundColor: "#FFFFFF"
7 },
8
9 AmCoordinateChart: {
10 colors:["#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000"],
11 patterns:[
12 {"url":"../amcharts/patterns/black/pattern1.png", "width":4, "height":4},
13 {"url":"../amcharts/patterns/black/pattern2.png", "width":4, "height":4},
14 {"url":"../amcharts/patterns/black/pattern3.png", "width":4, "height":4},
15 {"url":"../amcharts/patterns/black/pattern4.png", "width":4, "height":4},
16 {"url":"../amcharts/patterns/black/pattern5.png", "width":4, "height":4},
17 {"url":"../amcharts/patterns/black/pattern6.png", "width":4, "height":4},
18 {"url":"../amcharts/patterns/black/pattern7.png", "width":4, "height":4},
19 {"url":"../amcharts/patterns/black/pattern8.png", "width":4, "height":4},
20 {"url":"../amcharts/patterns/black/pattern9.png", "width":4, "height":4},
21 {"url":"../amcharts/patterns/black/pattern10.png", "width":4, "height":4},
22 {"url":"../amcharts/patterns/black/pattern11.png", "width":4, "height":4},
23 {"url":"../amcharts/patterns/black/pattern12.png", "width":4, "height":4},
24 {"url":"../amcharts/patterns/black/pattern13.png", "width":4, "height":4},
25 {"url":"../amcharts/patterns/black/pattern14.png", "width":4, "height":4},
26 {"url":"../amcharts/patterns/black/pattern15.png", "width":4, "height":4},
27 {"url":"../amcharts/patterns/black/pattern16.png", "width":4, "height":4},
28 {"url":"../amcharts/patterns/black/pattern17.png", "width":4, "height":4},
29 {"url":"../amcharts/patterns/black/pattern18.png", "width":4, "height":4},
30 {"url":"../amcharts/patterns/black/pattern19.png", "width":4, "height":4},
31 {"url":"../amcharts/patterns/black/pattern20.png", "width":4, "height":4},
32 {"url":"../amcharts/patterns/black/pattern21.png", "width":4, "height":4}]
33 },
34
35
36 AmStockChart: {
37 colors:["#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000"]
38 },
39
40 AmPieChart: {
41 depth3D:0,
42 angle:0,
43 labelRadius:10
44 },
45
46 AmSlicedChart: {
47 outlineAlpha: 0.3,
48 colors:["#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000"],
49 outlineThickness: 1,
50 outlineColor:"#000000",
51 labelTickColor: "#000000",
52 labelTickAlpha: 0.3,
53 patterns:[
54 {"url":"../amcharts/patterns/black/pattern1.png", "width":4, "height":4},
55 {"url":"../amcharts/patterns/black/pattern2.png", "width":4, "height":4},
56 {"url":"../amcharts/patterns/black/pattern3.png", "width":4, "height":4},
57 {"url":"../amcharts/patterns/black/pattern4.png", "width":4, "height":4},
58 {"url":"../amcharts/patterns/black/pattern5.png", "width":4, "height":4},
59 {"url":"../amcharts/patterns/black/pattern6.png", "width":4, "height":4},
60 {"url":"../amcharts/patterns/black/pattern7.png", "width":4, "height":4},
61 {"url":"../amcharts/patterns/black/pattern8.png", "width":4, "height":4},
62 {"url":"../amcharts/patterns/black/pattern9.png", "width":4, "height":4},
63 {"url":"../amcharts/patterns/black/pattern10.png", "width":4, "height":4},
64 {"url":"../amcharts/patterns/black/pattern11.png", "width":4, "height":4},
65 {"url":"../amcharts/patterns/black/pattern12.png", "width":4, "height":4},
66 {"url":"../amcharts/patterns/black/pattern13.png", "width":4, "height":4},
67 {"url":"../amcharts/patterns/black/pattern14.png", "width":4, "height":4},
68 {"url":"../amcharts/patterns/black/pattern15.png", "width":4, "height":4},
69 {"url":"../amcharts/patterns/black/pattern16.png", "width":4, "height":4},
70 {"url":"../amcharts/patterns/black/pattern17.png", "width":4, "height":4},
71 {"url":"../amcharts/patterns/black/pattern18.png", "width":4, "height":4},
72 {"url":"../amcharts/patterns/black/pattern19.png", "width":4, "height":4},
73 {"url":"../amcharts/patterns/black/pattern20.png", "width":4, "height":4},
74 {"url":"../amcharts/patterns/black/pattern21.png", "width":4, "height":4}]
75 },
76
77 AmRectangularChart: {
78 zoomOutButtonColor: '#000000',
79 zoomOutButtonRollOverAlpha: 0.15,
80 zoomOutButtonImage: "lens.png"
81 },
82
83
84
85 AxisBase: {
86 axisColor: "#000000",
87 axisAlpha: 0.3,
88 gridAlpha: 0.05,
89 gridColor: "#000000"
90 },
91
92 ChartScrollbar: {
93 backgroundColor: "#000000",
94 backgroundAlpha: 0.13,
95 graphFillAlpha: 0.4,
96 selectedGraphFillAlpha: 0.7,
97 graphLineAlpha: 0,
98 selectedBackgroundColor: "#FFFFFF",
99 selectedBackgroundAlpha: 0.9,
100 gridAlpha: 0.15
101 },
102
103 ChartCursor: {
104 cursorColor: "#000000",
105 color: "#FFFFFF",
106 cursorAlpha: 0.5
107 },
108
109 AmLegend: {
110 color: "#000000",
111 markerBorderAlpha:0.1,
112 markerSize:20,
113 switchColor:"#000000"
114 },
115
116 AmGraph: {
117 lineAlpha: 0.4,
118 fillAlphas:0.5
119 },
120
121 AmAngularGauge:{
122 faceAlpha:0.5,
123 facePattern:{"url":"../amcharts/patterns/black/pattern1.png", "width":4, "height":4}
124 },
125
126
127 GaugeArrow: {
128 color: "#000000",
129 alpha: 1,
130 nailAlpha: 1,
131 innerRadius: "0%",
132 nailRadius: 15,
133 startWidth: 15,
134 borderAlpha: 1,
135 radius:"70%",
136 nailBorderAlpha: 1
137 },
138
139 GaugeAxis: {
140 tickColor: "#000000",
141 tickAlpha: 1,
142 tickLength: 15,
143 minorTickLength: 8,
144 axisThickness: 1,
145 axisColor: '#000000',
146 axisAlpha: 1,
147 bandAlpha: 1
148 },
149
150 TrendLine: {
151 lineColor: "#c03246",
152 lineAlpha: 0.8
153 },
154
155 // ammap
156 AreasSettings: {
157 alpha: 0.8,
158 color: "#000000",
159 colorSolid: "#000000",
160 unlistedAreasAlpha: 0.4,
161 unlistedAreasColor: "#000000",
162 outlineColor: "#FFFFFF",
163 outlineAlpha: 0.5,
164 outlineThickness: 0.5,
165 rollOverColor: "#3c5bdc",
166 rollOverOutlineColor: "#FFFFFF",
167 selectedOutlineColor: "#FFFFFF",
168 selectedColor: "#f15135",
169 unlistedAreasOutlineColor: "#FFFFFF",
170 unlistedAreasOutlineAlpha: 0.5
171 },
172
173 LinesSettings: {
174 color: "#000000",
175 alpha: 0.8
176 },
177
178 ImagesSettings: {
179 alpha: 0.8,
180 labelColor: "#000000",
181 color: "#000000",
182 labelRollOverColor: "#3c5bdc"
183 },
184
185 ZoomControl: {
186 buttonRollOverColor: "#3c5bdc",
187 buttonFillColor: "#f15135",
188 buttonFillAlpha: 0.8,
189 buttonBorderColor: "#000000",
190 gridBackgroundColor: "#000000",
191 gridAlpha: 0.8
192 },
193
194 SmallMap: {
195 mapColor: "#000000",
196 rectangleColor: "#FFFFFF",
197 backgroundColor: "#FFFFFF",
198 backgroundAlpha: 0.7,
199 borderThickness: 1,
200 borderAlpha: 0.8
201 },
202
203 // the defaults below are set using CSS syntax, you can use any existing css property
204 // if you don't use Stock chart, you can delete lines below
205 PeriodSelector: {
206 color: "#000000"
207 },
208
209 PeriodButton: {
210 color: "#000000",
211 background: "transparent",
212 opacity: 0.7,
213 border: "1px solid rgba(0, 0, 0, .3)",
214 MozBorderRadius: "5px",
215 borderRadius: "5px",
216 margin: "1px",
217 outline: "none",
218 boxSizing: "border-box"
219 },
220
221 PeriodButtonSelected: {
222 color: "#000000",
223 backgroundColor: "rgba(0, 0, 0, 0.1)",
224 border: "1px solid rgba(0, 0, 0, .3)",
225 MozBorderRadius: "5px",
226 borderRadius: "5px",
227 margin: "1px",
228 outline: "none",
229 opacity: 1,
230 boxSizing: "border-box"
231 },
232
233 PeriodInputField: {
234 color: "#000000",
235 background: "transparent",
236 border: "1px solid rgba(0, 0, 0, .3)",
237 outline: "none"
238 },
239
240 DataSetSelector: {
241 color: "#000000",
242 selectedBackgroundColor: "rgba(0, 0, 0, .25)",
243 rollOverBackgroundColor: "rgba(0, 0, 0, .15)"
244 },
245
246 DataSetCompareList: {
247 color: "#000000",
248 lineHeight: "100%",
249 boxSizing: "initial",
250 webkitBoxSizing: "initial",
251 border: "1px solid rgba(0, 0, 0, .3)"
252 },
253
254 DataSetSelect: {
255 border: "1px solid rgba(0, 0, 0, .3)",
256 outline: "none"
257 }
258
259 };
File was created 1 AmCharts.AmXYChart=AmCharts.Class({inherits:AmCharts.AmRectangularChart,construct:function(a){this.type="xy";AmCharts.AmXYChart.base.construct.call(this,a);this.cname="AmXYChart";this.theme=a;this.createEvents("zoomed");this.maxZoomFactor=20;AmCharts.applyTheme(this,a,this.cname)},initChart:function(){AmCharts.AmXYChart.base.initChart.call(this);this.dataChanged&&(this.updateData(),this.dataChanged=!1,this.dispatchDataUpdated=!0);this.updateScrollbar=!0;this.drawChart();this.autoMargins&&!this.marginsUpdated&&
2 (this.marginsUpdated=!0,this.measureMargins());var a=this.marginLeftReal,c=this.marginTopReal,b=this.plotAreaWidth,d=this.plotAreaHeight;this.graphsSet.clipRect(a,c,b,d);this.bulletSet.clipRect(a,c,b,d);this.trendLinesSet.clipRect(a,c,b,d)},prepareForExport:function(){var a=this.bulletSet;a.clipPath&&this.container.remove(a.clipPath)},createValueAxes:function(){var a=[],c=[];this.xAxes=a;this.yAxes=c;var b=this.valueAxes,d,e;for(e=0;e<b.length;e++){d=b[e];var f=d.position;if("top"==f||"bottom"==f)d.rotate=
3 !0;d.setOrientation(d.rotate);f=d.orientation;"V"==f&&c.push(d);"H"==f&&a.push(d)}0===c.length&&(d=new AmCharts.ValueAxis(this.theme),d.rotate=!1,d.setOrientation(!1),b.push(d),c.push(d));0===a.length&&(d=new AmCharts.ValueAxis(this.theme),d.rotate=!0,d.setOrientation(!0),b.push(d),a.push(d));for(e=0;e<b.length;e++)this.processValueAxis(b[e],e);a=this.graphs;for(e=0;e<a.length;e++)this.processGraph(a[e],e)},drawChart:function(){AmCharts.AmXYChart.base.drawChart.call(this);AmCharts.ifArray(this.chartData)?
4 (this.chartScrollbar&&this.updateScrollbars(),this.zoomChart()):this.cleanChart();if(this.hideXScrollbar){var a=this.scrollbarH;a&&(this.removeListener(a,"zoomed",this.handleHSBZoom),a.destroy());this.scrollbarH=null}if(this.hideYScrollbar){if(a=this.scrollbarV)this.removeListener(a,"zoomed",this.handleVSBZoom),a.destroy();this.scrollbarV=null}if(!this.autoMargins||this.marginsUpdated)this.dispDUpd(),this.chartCreated=!0,this.zoomScrollbars()},cleanChart:function(){AmCharts.callMethod("destroy",[this.valueAxes,
5 this.graphs,this.scrollbarV,this.scrollbarH,this.chartCursor])},zoomChart:function(){this.toggleZoomOutButton();this.zoomObjects(this.valueAxes);this.zoomObjects(this.graphs);this.zoomTrendLines();this.dispatchAxisZoom()},toggleZoomOutButton:function(){1==this.heightMultiplier&&1==this.widthMultiplier?this.showZB(!1):this.showZB(!0)},dispatchAxisZoom:function(){var a=this.valueAxes,c;for(c=0;c<a.length;c++){var b=a[c];if(!isNaN(b.min)&&!isNaN(b.max)){var d,e;"V"==b.orientation?(d=b.coordinateToValue(-this.verticalPosition),
6 e=b.coordinateToValue(-this.verticalPosition+this.plotAreaHeight)):(d=b.coordinateToValue(-this.horizontalPosition),e=b.coordinateToValue(-this.horizontalPosition+this.plotAreaWidth));if(!isNaN(d)&&!isNaN(e)){if(d>e){var f=e;e=d;d=f}b.dispatchZoomEvent(d,e)}}}},zoomObjects:function(a){var c=a.length,b;for(b=0;b<c;b++){var d=a[b];this.updateObjectSize(d);d.zoom(0,this.chartData.length-1)}},updateData:function(){this.parseData();var a=this.chartData,c=a.length-1,b=this.graphs,d=this.dataProvider,e=
7 -Infinity,f=Infinity,k,g;for(k=0;k<b.length;k++)if(g=b[k],g.data=a,g.zoom(0,c),g=g.valueField){var m;for(m=0;m<d.length;m++){var h=Number(d[m][g]);h>e&&(e=h);h<f&&(f=h)}}for(k=0;k<b.length;k++)g=b[k],g.maxValue=e,g.minValue=f;if(a=this.chartCursor)a.updateData(),a.type="crosshair",a.valueBalloonsEnabled=!1},zoomOut:function(){this.verticalPosition=this.horizontalPosition=0;this.heightMultiplier=this.widthMultiplier=1;this.zoomChart();this.zoomScrollbars()},processValueAxis:function(a){a.chart=this;
8 a.minMaxField="H"==a.orientation?"x":"y";a.minTemp=NaN;a.maxTemp=NaN;this.listenTo(a,"axisSelfZoomed",this.handleAxisSelfZoom)},processGraph:function(a){AmCharts.isString(a.xAxis)&&(a.xAxis=this.getValueAxisById(a.xAxis));AmCharts.isString(a.yAxis)&&(a.yAxis=this.getValueAxisById(a.yAxis));a.xAxis||(a.xAxis=this.xAxes[0]);a.yAxis||(a.yAxis=this.yAxes[0]);a.valueAxis=a.yAxis},parseData:function(){AmCharts.AmXYChart.base.parseData.call(this);this.chartData=[];var a=this.dataProvider,c=this.valueAxes,
9 b=this.graphs,d;if(a)for(d=0;d<a.length;d++){var e={axes:{},x:{},y:{}},f=a[d],k;for(k=0;k<c.length;k++){var g=c[k].id;e.axes[g]={};e.axes[g].graphs={};var m;for(m=0;m<b.length;m++){var h=b[m],q=h.id;if(h.xAxis.id==g||h.yAxis.id==g){var n={};n.serialDataItem=e;n.index=d;var p={},l=Number(f[h.valueField]);isNaN(l)||(p.value=l);l=Number(f[h.xField]);isNaN(l)||(p.x=l);l=Number(f[h.yField]);isNaN(l)||(p.y=l);l=Number(f[h.errorField]);isNaN(l)||(p.error=l);n.values=p;this.processFields(h,n,f);n.serialDataItem=
10 e;n.graph=h;e.axes[g].graphs[q]=n}}}this.chartData[d]=e}},formatString:function(a,c,b){var d=c.graph.numberFormatter;d||(d=this.nf);a=AmCharts.formatValue(a,c.values,["value","x","y"],d);-1!=a.indexOf("[[")&&(a=AmCharts.formatDataContextValue(a,c.dataContext));return a=AmCharts.AmXYChart.base.formatString.call(this,a,c,b)},addChartScrollbar:function(a){AmCharts.callMethod("destroy",[this.chartScrollbar,this.scrollbarH,this.scrollbarV]);if(a){this.chartScrollbar=a;this.scrollbarHeight=a.scrollbarHeight;
11 var c="backgroundColor backgroundAlpha selectedBackgroundColor selectedBackgroundAlpha scrollDuration resizeEnabled hideResizeGrips scrollbarHeight updateOnReleaseOnly".split(" ");if(!this.hideYScrollbar){var b=new AmCharts.SimpleChartScrollbar(this.theme);b.skipEvent=!0;b.chart=this;this.listenTo(b,"zoomed",this.handleVSBZoom);AmCharts.copyProperties(a,b,c);b.rotate=!0;this.scrollbarV=b}this.hideXScrollbar||(b=new AmCharts.SimpleChartScrollbar(this.theme),b.skipEvent=!0,b.chart=this,this.listenTo(b,
12 "zoomed",this.handleHSBZoom),AmCharts.copyProperties(a,b,c),b.rotate=!1,this.scrollbarH=b)}},updateTrendLines:function(){var a=this.trendLines,c;for(c=0;c<a.length;c++){var b=a[c],b=AmCharts.processObject(b,AmCharts.TrendLine,this.theme);a[c]=b;b.chart=this;var d=b.valueAxis;AmCharts.isString(d)&&(b.valueAxis=this.getValueAxisById(d));d=b.valueAxisX;AmCharts.isString(d)&&(b.valueAxisX=this.getValueAxisById(d));b.valueAxis||(b.valueAxis=this.yAxes[0]);b.valueAxisX||(b.valueAxisX=this.xAxes[0])}},updateMargins:function(){AmCharts.AmXYChart.base.updateMargins.call(this);
13 var a=this.scrollbarV;a&&(this.getScrollbarPosition(a,!0,this.yAxes[0].position),this.adjustMargins(a,!0));if(a=this.scrollbarH)this.getScrollbarPosition(a,!1,this.xAxes[0].position),this.adjustMargins(a,!1)},updateScrollbars:function(){AmCharts.AmXYChart.base.updateScrollbars.call(this);var a=this.scrollbarV;a&&(this.updateChartScrollbar(a,!0),a.draw());if(a=this.scrollbarH)this.updateChartScrollbar(a,!1),a.draw()},zoomScrollbars:function(){var a=this.scrollbarH;a&&a.relativeZoom(this.widthMultiplier,
14 -this.horizontalPosition/this.widthMultiplier);(a=this.scrollbarV)&&a.relativeZoom(this.heightMultiplier,-this.verticalPosition/this.heightMultiplier)},fitMultiplier:function(a){a>this.maxZoomFactor&&(a=this.maxZoomFactor);return a},handleHSBZoom:function(a){var c=this.fitMultiplier(a.multiplier);a=-a.position*c;var b=-(this.plotAreaWidth*c-this.plotAreaWidth);a<b&&(a=b);this.widthMultiplier=c;this.horizontalPosition=a;this.zoomChart()},handleVSBZoom:function(a){var c=this.fitMultiplier(a.multiplier);
15 a=-a.position*c;var b=-(this.plotAreaHeight*c-this.plotAreaHeight);a<b&&(a=b);this.heightMultiplier=c;this.verticalPosition=a;this.zoomChart()},handleAxisSelfZoom:function(a){if("H"==a.valueAxis.orientation){var c=this.fitMultiplier(a.multiplier);a=-a.position*c;var b=-(this.plotAreaWidth*c-this.plotAreaWidth);a<b&&(a=b);this.horizontalPosition=a;this.widthMultiplier=c}else c=this.fitMultiplier(a.multiplier),a=-a.position*c,b=-(this.plotAreaHeight*c-this.plotAreaHeight),a<b&&(a=b),this.verticalPosition=
16 a,this.heightMultiplier=c;this.zoomChart();c=this.graphs;for(a=0;a<c.length;a++)c[a].setAnimationPlayed();this.zoomScrollbars()},handleCursorZoom:function(a){var c=this.widthMultiplier*this.plotAreaWidth/a.selectionWidth,b=this.heightMultiplier*this.plotAreaHeight/a.selectionHeight,c=this.fitMultiplier(c),b=this.fitMultiplier(b);this.horizontalPosition=(this.horizontalPosition-a.selectionX)*c/this.widthMultiplier;this.verticalPosition=(this.verticalPosition-a.selectionY)*b/this.heightMultiplier;this.widthMultiplier=
17 c;this.heightMultiplier=b;this.zoomChart();this.zoomScrollbars()},removeChartScrollbar:function(){AmCharts.callMethod("destroy",[this.scrollbarH,this.scrollbarV]);this.scrollbarV=this.scrollbarH=null},handleReleaseOutside:function(a){AmCharts.AmXYChart.base.handleReleaseOutside.call(this,a);AmCharts.callMethod("handleReleaseOutside",[this.scrollbarH,this.scrollbarV])}});
File was created 1 <<<<<<< HEAD
2 ๏ปฟfdfshsj
3 htehtrjj
4 getjryrl
1 ๏ปฟfdfshsj 5 =======
2 htehtrjj 6 ๏ปฟfdfshsj
3 getjryrl 7 htehtrjj
4 fjfsykiy8 8 getjryrl
9 >>>>>>> 170b5319e9961afd5839d2ad8b2d880fad3f7e3f
10 fjfsykiy8
File was created 1 <html>
2 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
3 <script type="text/javascript">
4 $(function () {
5 $('#container').highcharts({
6 title: {
7 text: 'Monthly Average Temperature',
8 x: -20 //center
9 },
10 subtitle: {
11 text: 'Source: WorldClimate.com',
12 x: -20
13 },
14 xAxis: {
15 categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
16 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
17 },
18 yAxis: {
19 title: {
20 text: 'Temperature (ยฐC)'
21 },
22 plotLines: [{
23 value: 0,
24 width: 1,
25 color: '#808080'
26 }]
27 },
28 tooltip: {
29 valueSuffix: 'ยฐC'
30 },
31 legend: {
32 layout: 'vertical',
33 align: 'right',
34 verticalAlign: 'middle',
35 borderWidth: 0
36 },
37 series: [{
38 name: 'Tokyo',
39 data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
40 }, {
41 name: 'New York',
42 data: [-0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 8.6, 2.5]
43 }, {
44 name: 'Berlin',
45 data: [-0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6, 17.9, 14.3, 9.0, 3.9, 1.0]
46 }, {
47 name: 'London',
48 data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8]
49 }]
50 });
51 });
52 </script>
53 <script src="http://code.highcharts.com/highcharts.js"></script>
54 <script src="http://code.highcharts.com/modules/exporting.js"></script>
55
56 <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
57 </html>
File was created 1 /*
2 FusionCharts JavaScript Library
3 Copyright FusionCharts Technologies LLP
4 License Information at <http://www.fusioncharts.com/license>
5 FusionCharts JavaScript Library
6 Copyright FusionCharts Technologies LLP
7 License Information at <http://www.fusioncharts.com/license>
8
9 @version 3.4.0
10
11 @attributions (infers respective third-party copyrights)
12 Raphael 2.1.0 (modified as 'Red Raphael') <http://raphaeljs.com/license.html>
13 JSON v2 <http://www.JSON.org/js.html>
14 Firebug Lite 1.3.0 <http://getfirebug.com/firebuglite>
15 */
16 (function(){if(!window.FusionCharts||!window.FusionCharts.version){var d=window,k=d.document,B=d.navigator,v={window:d},l=v.modules={},c=v.interpreters={},K=Object.prototype.toString,b=/msie/i.test(B.userAgent)&&!d.opera,J=/loaded|complete/,a=!1,D=function(){var a=v.ready;v.ready=!0;v.raiseEvent&&(v.readyNotified=!0,v.raiseEvent("ready",{version:v.core.version,now:!a},v.core));v.readyNow=!a},F=function(a,c){var b,g;if(c instanceof Array)for(b=0;b<c.length;b+=1)"object"!==typeof c[b]?a[b]=c[b]:("object"!==
17 typeof a[b]&&(a[b]=c[b]instanceof Array?[]:{}),F(a[b],c[b]));else for(b in c)"object"===typeof c[b]?(g=K.call(c[b]),"[object Object]"===g?("object"!==typeof a[b]&&(a[b]={}),F(a[b],c[b])):"[object Array]"===g?(a[b]instanceof Array||(a[b]=[]),F(a[b],c[b])):a[b]=c[b]):a[b]=c[b];return a};v.extend=function(a,c,b,g){var n;b&&a.prototype&&(a=a.prototype);if(!0===g)F(a,c);else for(n in c)a[n]=c[n];return a};v.uniqueId=function(){return"chartobject-"+(v.uniqueId.lastId+=1)};v.uniqueId.lastId=0;v.policies=
18 {options:{chartTypeSourcePath:["typeSourcePath",""],product:["product","v3"],insertMode:["insertMode","replace"],safeMode:["safeMode",!0],overlayButton:["overlayButton",void 0],containerBackgroundColor:["containerBackgroundColor","#ffffff"],containerBackgroundOpacity:["containerBackgroundOpacity",1],chartType:["type",void 0]},attributes:{lang:["lang","EN"],"class":["className","FusionCharts"],id:["id",void 0]},width:["width","400"],height:["height","300"],src:["swfUrl",""]};c.stat="swfUrl id width height debugMode registerWithJS backgroundColor scaleMode lang detectFlashVersion autoInstallRedirect".split(" ");
19 v.parsePolicies=function(a,c,b){var g,n,s;for(n in c)if(v.policies[n]instanceof Array)s=b[c[n][0]],a[n]=void 0===s?c[n][1]:s;else for(g in"object"!==typeof a[n]&&(a[n]={}),c[n])s=b[c[n][g][0]],a[n][g]=void 0===s?c[n][g][1]:s};v.parseCommands=function(a,b,e){var g,n;"string"===typeof b&&(b=c[b]||[]);g=0;for(n=b.length;g<n;g++)a[b[g]]=e[g];return a};v.registrars={module:function(){return v.core.apply(v.core,arguments)}};v.core=function(a){if(!(this instanceof v.core)){if(1===arguments.length&&a instanceof
20 Array&&"private"===a[0]){if(l[a[1]])return;l[a[1]]={};a[3]instanceof Array&&(v.core.version[a[1]]=a[3]);return"function"===typeof a[2]?a[2].call(v,l[a[1]]):v}if(1===arguments.length&&"string"===typeof a)return v.core.items[a];v.raiseError&&v.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]:v.parseCommands(b,c.stat,arguments);1<arguments.length&&
21 "object"===typeof arguments[arguments.length-1]&&(delete b[c.stat[arguments.length-1]],v.extend(b,arguments[arguments.length-1]));this.id="undefined"===typeof b.id?this.id=v.uniqueId():b.id;this.args=b;v.core.items[this.id]instanceof v.core&&v.raiseWarning(this,"06091847","param","",Error('A FusionChart oject with the specified id "'+this.id+'" already exists. Renaming it to '+(this.id=v.uniqueId())));v.parsePolicies(this,v.policies,b);this.attributes.id=this.id;this.resizeTo&&this.resizeTo(b.width,
22 b.height,!0);this.chartType&&this.chartType(b.type||b.swfUrl,!0);v.raiseEvent("beforeInitialize",b,this);v.core.items[this.id]=this;v.core.defaultOptions=v.core.options;v.raiseEvent("initialized",b,this);return this};v.core.prototype={};v.core.prototype.constructor=v.core;v.extend(v.core,{id:"FusionCharts",version:["3","4","0"],items:{},options:{},getObjectReference:function(a){return v.core.items[a].ref},register:function(a){return v.registrars[a=a&&a.toString&&a.toString().toLowerCase()]&&v.registrars[a].apply(v.core,
23 Array.prototype.slice.call(arguments,1))}});d.FusionCharts=v.core;d.FusionMaps&&d.FusionMaps.legacy&&(v.core(["private","modules.core.geo",d.FusionMaps.legacy,d.FusionMaps.version]),a=!0);J.test(k.readyState)||k.loaded?(v.ready=!0,setTimeout(D,1)):function(){function c(){arguments.callee.done||(arguments.callee.done=!0,e&&clearTimeout(e),a||(d.FusionMaps&&d.FusionMaps.legacy&&v.core(["private","modules.core.geo",d.FusionMaps.legacy,d.FusionMaps.version]),d.FusionMaps=v.core),setTimeout(D,1))}function w(){J.test(k.readyState)?
24 c():e=setTimeout(w,10)}var e,g;k.addEventListener?k.addEventListener("DOMContentLoaded",c,!1):k.attachEvent&&d.attachEvent("onLoad",c);if(b)try{"https:"===d.location.protocol?k.write('<script id="__ie_onload_fusioncharts" defer="defer" src="//:">\x3c/script>'):k.write('<script id="__ie_onload_fusioncharts" defer="defer" src="javascript:void(0)">\x3c/script>'),g=k.getElementById("__ie_onload_fusioncharts"),g.onreadystatechange=function(){"complete"==this.readyState&&c()}}catch(n){}/WebKit/i.test(B.userAgent)&&
25 (e=setTimeout(w,10));d.onload=function(a){return function(){c();a&&a.call&&a.call(d)}}(d.onload)}();d.FusionMaps=v.core}})();
26 FusionCharts.register("module",["private","modules.mantle.errormanager",function(){var d=this,k=d.window,B={type:"TypeException",range:"ValueRangeException",impl:"NotImplementedException",param:"ParameterException",run:"RuntimeException",comp:"DesignTimeError",undefined:"UnspecifiedException"},v=function(c,l,b,J,a,D){var F="#"+l+" "+(c?c.id:"unknown-source")+J+" "+D+" >> ";a instanceof Error?(a.name=B[b],a.module="FusionCharts"+J,a.level=D,a.message=F+a.message,F=a.message,k.setTimeout(function(){throw a;
27 },0)):F+=a;l={id:l,nature:B[b],source:"FusionCharts"+J,message:F};d.raiseEvent(D,l,c);if("function"===typeof k["FC_"+D])k["FC_"+D](l)},l;d.raiseError=function(c,d,b,l,a){v(c,d,b,l,a,"Error")};d.raiseWarning=function(c,d,b,l,a){v(c,d,b,l,a,"Warning")};l={outputHelpers:{text:function(c,d){l.outputTo("#"+c.eventId+" ["+(c.sender.id||c.sender).toString()+'] fired "'+c.eventType+'" event. '+("error"===c.eventType||"warning"===c.eventType?d.message:""))},event:function(c,d){this.outputTo(c,d)},verbose:function(c,
28 d){l.outputTo(c.eventId,c.sender.id,c.eventType,d)}},outputHandler:function(c,k){"function"!==typeof l.outputTo?d.core["debugger"].outputFailed=!0:(d.core["debugger"].outputFailed=!1,l.currentOutputHelper(c,k))},currentOutputHelper:void 0,outputTo:void 0,enabled:!1};l.currentOutputHelper=l.outputHelpers.text;d.extend(d.core,{"debugger":{syncStateWithCharts:!0,outputFormat:function(c){return c&&"function"===typeof c.toLowerCase&&"function"===typeof l.outputHelpers[c=c.toLowerCase()]?(l.currentOutputHelper=
29 l.outputHelpers[c],!0):!1},outputTo:function(c){"function"===typeof c?l.outputTo=c:null===c&&(d.core["debugger"].enable(!1),delete l.outputTo)},enable:function(c,k,b){var J;"object"===typeof c&&1===arguments.length&&(J=c,c=J.state,k=J.outputTo,b=J.outputFormat);"function"===typeof c&&("string"!==typeof k||2!==arguments.length&&!J||(b=k),k=c,c=!0);if("boolean"===typeof c&&c!==l.enabled)d.core[(l.enabled=c)?"addEventListener":"removeEventListener"]("*",l.outputHandler);"function"===typeof k&&(l.outputTo=
30 k);d.core["debugger"].outputFormat(b);return l.enabled},enableFirebugLite:function(){var c;k.console&&k.console.firebug?d.core["debugger"].enable(k.console.log,"verbose"):((c=k.document.getElementsByTagName("html"))&&c[0].setAttribute("debug","true"),d.loadScript("https://getfirebug.com/firebug-lite.js#overrideConsole=false,startOpened=true",function(){d.core["debugger"].enable(k.console.log,"verbose")},"{ startOpened: true }",!0,!0))}},debugMode:{enabled:function(){k.setTimeout(function(){throw Error("Deprecated! Please use FusionCharts.debugger.enable instead.");
31 },0);return d.core["debugger"].enable.apply(d.core["debugger"],arguments)}}},!1)}]);
32 FusionCharts.register("module",["private","modules.mantle.eventmanager",function(){var d=this,k=d.window,B=d.core,v=k.Object.prototype.toString,l=v.call([]),c=function(a,c,b,e){try{a[0].call(c,b,e||{})}catch(g){setTimeout(function(){throw g;},0)}},K=function(a,b,w){if(a instanceof Array)for(var e=0,g;e<a.length;e+=1){if(a[e][1]===b.sender||void 0===a[e][1])g=a[e][1]===b.sender?b.sender:d.core,c(a[e],g,b,w),!0===b.detached&&(a.splice(e,1),e-=1,b.detached=!1);if(!0===b.cancelled)break}},b={unpropagator:function(){return!1===
33 (this.cancelled=!0)},detacher:function(){return!1===(this.detached=!0)},undefaulter:function(){return!1===(this.prevented=!0)},listeners:{},lastEventId:0,addListener:function(a,c,w){var e,g;if(v.call(a)===l){e=[];for(g=0;g<a.length;g+=1)e.push(b.addListener(a[g],c,w));return e}if("string"!==typeof a)d.raiseError(w||d.core,"03091549","param","::EventTarget.addListener",Error("Unspecified Event Type"));else if("function"!==typeof c)d.raiseError(w||d.core,"03091550","param","::EventTarget.addListener",
34 Error("Invalid Event Listener"));else return a=a.toLowerCase(),b.listeners[a]instanceof Array||(b.listeners[a]=[]),b.listeners[a].push([c,w]),c},removeListener:function(a,c,w){var e;if("function"!==typeof c)d.raiseError(w||d.core,"03091560","param","::EventTarget.removeListener",Error("Invalid Event Listener"));else if(a instanceof Array)for(e=0;e<a.length;e+=1)b.removeListener(a[e],c,w);else if("string"!==typeof a)d.raiseError(w||d.core,"03091559","param","::EventTarget.removeListener",Error("Unspecified Event Type"));
35 else if(a=a.toLowerCase(),a=b.listeners[a],a instanceof Array)for(e=0;e<a.length;e+=1)a[e][0]===c&&a[e][1]===w&&(a.splice(e,1),e-=1)},triggerEvent:function(a,c,w,e,g,n){if("string"!==typeof a)d.raiseError(c,"03091602","param","::EventTarget.dispatchEvent",Error("Invalid Event Type"));else{a=a.toLowerCase();var s={eventType:a,eventId:b.lastEventId+=1,sender:c||Error("Orphan Event"),cancelled:!1,stopPropagation:this.unpropagator,prevented:!1,preventDefault:this.undefaulter,detached:!1,detachHandler:this.detacher};
36 K(b.listeners[a],s,w);K(b.listeners["*"],s,w);switch(s.prevented){case !0:if("function"===typeof n)try{n.call(e||c||k,s,w||{})}catch(R){setTimeout(function(){throw R;},0)}break;default:if("function"===typeof g)try{g.call(e||c||k,s,w||{})}catch(m){setTimeout(function(){throw m;},0)}}return!0}}},J=d.raiseEvent=function(a,c,w,e,g,n){return b.triggerEvent(a,w,c,e,g,n)},a=d.legacyEventList={},D={};d.disposeEvents=function(a){var c,w;for(c in b.listeners)for(w=0;w<b.listeners[c].length;w+=1)b.listeners[c][w][1]===
37 a&&b.listeners[c].splice(w,1)};d.raiseEventWithLegacy=function(c,b,w,e,g,n,s){var d=a[c];J(c,b,w,g,n,s);d&&"function"===typeof k[d]&&setTimeout(function(){k[d].apply(g||k,e)},0)};d.raiseEventGroup=function(a,c,b,e,g,n,s){var d=e.id,m=a+d;D[m]?(clearTimeout(D[m]),delete D[m]):d&&m?D[m]=setTimeout(function(){J(c,b,e,g,n,s);delete D[m]},0):J(c,b,e,g,n,s)};d.addEventListener=function(a,c){return b.addListener(a,c)};d.removeEventListener=function(a,c){return b.removeListener(a,c)};d.extend(B,{addEventListener:function(a,
38 c){return b.addListener(a,c)},removeEventListener:function(a,c){return b.removeListener(a,c)},ready:function(a,c,b){d.ready?(B.ready=function(a,g){"function"===typeof a&&setTimeout(function(){a.call(g||B,c||B)},0)},B.ready(a,b)):"function"===typeof a&&B.addEventListener("ready",function(){B.ready(a,c,b)});return this}});B.on=B.addEventListener;d.extend(B.prototype,{addEventListener:function(a,c){return b.addListener(a,c,this)},removeEventListener:function(a,c){return b.removeListener(a,c,this)}});
39 B.prototype.on=B.prototype.addEventListener;d.policies.options.events=["events",{}];d.addEventListener("beforeInitialize",function(a){a=a.sender;var c=a.options.events,b;if(c)for(b in c)"function"===typeof c[b]&&a.addEventListener(b,c[b])});d.ready&&!d.readyNotified&&(d.readyNotified=!0,d.raiseEvent("ready",{version:d.core.version,now:d.readyNow},d.core))}]);
40 FusionCharts.register("module",["private","modules.mantle.ajax",function(){var d=this,k=d.window,B=parseFloat(k.navigator.appVersion.split("MSIE")[1]),v=5.5<=B&&7>=B?!0:!1,l="file:"===k.location.protocol,c=k.ActiveXObject,K=(!c||!l)&&k.XMLHttpRequest,b={objects:0,xhr:0,requests:0,success:0,failure:0,idle:0},J=function(){var a;if(K)return J=function(){b.xhr++;return new K},J();try{a=new c("Msxml2.XMLHTTP"),J=function(){b.xhr++;return new c("Msxml2.XMLHTTP")}}catch(d){try{a=new c("Microsoft.XMLHTTP"),
41 J=function(){b.xhr++;return new c("Microsoft.XMLHTTP")}}catch(l){a=!1}}return a};d.core.ajax={stats:function(a){return a?b[a]:d.extend({},b)},headers:{"If-Modified-Since":"Sat, 29 Oct 1994 19:43:31 GMT","X-Requested-With":"XMLHttpRequest","X-Requested-By":"FusionCharts",Accept:"text/plain, */*","Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}};B=d.ajax=function(a,c){this.onSuccess=a;this.onError=c;this.open=!1;b.objects++;b.idle++};d.extend(B.prototype,{headers:d.core.ajax.headers,
42 transact:function(a,c,F,C){var w=this,e=w.xmlhttp,g=w.headers,n=w.onError,s=w.onSuccess;a="POST"===a;var R,m;if(!e||v)e=J(),w.xmlhttp=e;e.onreadystatechange=function(){try{4===e.readyState&&(!e.status&&l||200<=e.status&&300>e.status||304===e.status||1223===e.status||0===e.status?(s&&s(e.responseText,w,C,c),b.success++):n&&(n(Error("XmlHttprequest Error"),w,C,c),b.failure++),b.idle--,w.open=!1)}catch(a){n&&n(a,w,C,c),k.FC_DEV_ENVIRONMENT&&setTimeout(function(){throw a;},0),b.failure++}};try{e.open(a?
43 "POST":"GET",c,!0);e.overrideMimeType&&e.overrideMimeType("text/plain");if(a)if("string"===typeof F)R=F;else{R=[];for(m in F)R.push(m+"="+(F[m]+"").replace(/\=/g,"%3D").replace(/\&/g,"%26"));R=R.join("&")}else R=null;for(m in g)e.setRequestHeader(m,g[m]);e.send(R);b.requests++;b.idle++;w.open=!0}catch(I){d.raiseError(d.core,"1110111515A","run","XmlHttprequest Error",I.message)}return e},get:function(a,c){return this.transact("GET",a,void 0,c)},post:function(a,c,b){return this.transact("POST",a,c,
44 b)},abort:function(){var a=this.xmlhttp;this.open=!1;return a&&"function"===typeof a.abort&&a.readyState&&0!==a.readyState&&a.abort()},dispose:function(){this.open&&this.abort();delete this.onError;delete this.onSuccess;delete this.xmlhttp;delete this.open;b.objects--;return null}})}]);
45 FusionCharts.register("module",["private","modules.mantle.runtime;1.1",function(){var d=this,k=d.window,B=/(^|[\/\\])(fusioncharts\.js)([\?#].*)?$/ig,v=/[\\\"<>;&]/,l=/^[^\S]*?(sf|f|ht)(tp|tps):\/\//i,c={},K={},b={},J={},a=d.purgeDOM=function(c){var b=c.attributes,e,g;if(b)for(e=b.length-1;0<=e;e-=1)g=b[e].name,"function"===typeof c[g]&&(c[g]=null);if(b=c.childNodes)for(b=b.length,e=0;e<b;e+=1)a(c.childNodes[e])},D=function(a,c,b){var g,n;for(g in a)if(a[g]instanceof Array)c[a[g][0]]=b[g];else for(n in a[g])c[a[g][n][0]]=
46 b[g][n]},F=/^(FusionCharts|FusionWidgets|FusionMaps)/;d.getScriptBaseUri=function(a){var c=k.document.getElementsByTagName("script"),b=c.length,g,n;for(n=0;n<b;n+=1)if(g=c[n].getAttribute("src"),void 0!==g&&null!==g&&null!==g.match(a))return g.replace(a,"$1")};d.core.options.scriptBaseUri=function(){var a=d.getScriptBaseUri(B);return void 0===a?(d.raiseError(FusionCharts,"1603111624","run",">GenericRuntime~scriptBaseUri","Unable to locate FusionCharts script source location (URL)."),""):a}();d.isXSSSafe=
47 function(a,c){return c&&null!==l.exec(a)?!1:null===v.exec(a)};d.xssEncode=function(a){return null===a||void 0===a||"function"!==typeof a.toString?"":a=a.toString().replace(/&/g,"&amp;").replace(/\'/g,"&#39;").replace(/\"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")};d.loadScript=function(a,w,e,g,n){if(!a)return!1;var s=w&&w.success||w,R=w&&w.failure,m,I={type:"script",success:!1},D=function(){J[m]=clearTimeout(J[m]);I.success?s&&s(a,m):R&&R(a,m);d.raiseEvent("externalresourceload",I,d.core)};
48 n=n?"":d.core.options.scriptBaseUri;m=n+a;d.isXSSSafe(m,!1)||(m="function"===typeof k.encodeURIComponent?k.encodeURIComponent(m):k.escape(m));I.path=n;I.src=m;I.file=a;if(!0===b[m]&&g)return I.success=!0,I.notReloaded=!0,"function"===typeof w&&(w(),d.raiseEvent("externalresourceload",I,d.core)),!0;if(c[m]&&g)return!1;c[m]=!0;K[m]&&K[m].parentNode&&K[m].parentNode.removeChild(K[m]);w=K[m]=k.document.createElement("script");w.type="text/javascript";w.src=m;e&&(w["\v"==="v"?"text":"innerHTML"]=e);"function"===
49 typeof s&&(b[m]=!1,J[m]=clearTimeout(J[m]),w.onload=function(){b[m]=!0;I.success=!0;D()},w.onerror=function(){b[m]=!1;c[m]=!1;D()},w.onreadystatechange=function(){if("complete"===this.readyState||"loaded"===this.readyState)b[m]=!0,I.success=!0,D()});k.document.getElementsByTagName("head")[0].appendChild(w);"function"===typeof R&&(J[m]=setTimeout(function(){b[m]||D()},d.core.options.html5ResourceLoadTimeout||15E3));return!0};d.capitalizeString=function(a,c){return a?a.replace(c?/(^|\s)([a-z])/g:/(^|\s)([a-z])/,
50 function(a,c,b){return c+b.toUpperCase()}):a};d.extend(d.core,{clone:function(a,c){var b=typeof a,g,n=d.extend({},this.args,!1,!1);D(d.policies,n,this);D(d.renderer.getRendererPolicy(this.options.renderer),n,this);delete n.id;delete n.animate;delete n.stallLoad;g=n.link;n=d.extend({},n,!1,!1);n.link=g;switch(b){case "object":d.extend(n,a);break;case "boolean":c=a}return c?n:new d.core(n)},isActive:function(){if(!this.ref||k.document.getElementById(this.id)!==this.ref)return!1;try{return F.test(this.ref.signature())}catch(a){return!1}},
51 chartType:function(a,c){var b=this.src,g=!0===c,n=this.options,s;"string"===typeof a&&(c="object"===typeof c?c:{},b=a.replace(/[\?\#][\s\S]*$/g,""),s=null!==b.match(/\.swf\s*?$/ig),b=b.replace(/\.swf\s*?$/ig,""),n.chartType=b.replace(/^[\s\S]*\//ig,"").replace(/^fcmap_/i,""),n.chartTypeSourcePath=-1===b.indexOf("/")?c.chartTypeSourcePath||this.options.chartTypeSourcePath||d.core.options.chartTypeSourcePath||"":b.replace(/[^\/]*?$/ig,""),this.src=((d.core.options.scriptBaseUri||"")+(n.chartTypeSourcePath||
52 d.core.options.chartTypeSourcePath||"")).replace(/\/\s*$/g,"")+"/"+n.chartType.replace(/\.swf\s*?$/ig,"")+".swf",s&&(d.raiseWarning(this,"08101320181","comp","FusionCharts#chartType",'Chart type has ".swf" in alias and as such has been deprecated. Please use chart type alias.'),n.chartTypeSourcePath=d.core.options.chartTypeSourcePath||""),void 0!==c.dataSource&&null!==c.dataSource?this.setChartData(c.dataSource,c.dataFormat,c.dataConfiguration):this.isActive()&&!g&&this.render());return(n.chartType||
53 "").toLowerCase()}},!0);k.getChartFromId=function(a){d.raiseWarning(this,"11133001041","comp","GenericRuntime~getObjectFromId()",'Use of deprecated getChartFromId() or getMapFromId(). Replace with "FusionCharts()" or FusionCharts.items[].');return d.core.items[a]instanceof d.core?d.core.items[a].ref:k.swfobject&&k.swfobject.getObjectById(a)};k.getMapFromId=k.getChartFromId}]);
54 FusionCharts.register("module",["private","api.printmanager",function(){var d=this;d.extend(d.core,{printManager:{configure:function(){d.raiseWarning(d.core,"28141714","impl",".printManager.configure","PrintManager is deprecated")},isReady:function(){d.raiseWarning(d.core,"28141714","impl",".printManager.isReady","PrintManager is deprecated");return!1},enabled:function(){d.raiseWarning(d.core,"28141714","impl",".printManager.enabled","PrintManager is deprecated");return!1},managedPrint:function(){d.raiseWarning(d.core,
55 "28141714","impl",".printManager.managedPrint","PrintManager is deprecated")}}},!1)}]);
56 FusionCharts.register("module",["private","modules.interface.renderer",function(){var d=this,k=d.window,B=k.document,v=function(){d.raiseError(this,"25081845","run","::RendererManager",Error("No active renderer"))},l=d.FusionChartsDOMInsertModes={REPLACE:"replace",APPEND:"append",PREPEND:"prepend"},c={undefined:{render:v,remove:v,update:v,resize:v,config:v,policies:{}}},K={},b=function(a){return function(){var c=this.ref;if(void 0===c||null===c||"function"!==typeof c[a])d.raiseError(this,"25081617",
57 "run","#"+a+"()","ExternalInterface call failed. Check whether chart has been rendered.");else return c[a].apply(c,arguments)}},J=function(a,c){return"function"===typeof a[c]?function(){return a[c].apply(a,arguments)}:a[c]},a=function(a,c){var b=B.getElementById(a),g=c.id||c.getAttribute("id"),n,s;if(null===b)return!1;if(a===g)return!0;g=c.getElementsByTagName("*");n=0;for(s=g.length;n<s;n++)if(g[n]===b)return!1;return!0},D=/[^\%\d]*$/ig,F;d.policies.options.containerElementId=["renderAt",void 0];
58 d.policies.options.renderer=["renderer",void 0];d.normalizeCSSDimension=function(a,c,b){a=void 0===a?b.offsetWidth||parseFloat(b.style.width):a;c=void 0===c?b.offsetHeight||parseFloat(b.style.height):c;var g={},n=b.style,s;n.width=a=a.toString?a.toString():"0";n.height=c=c.toString?c.toString():"0";if((g.widthIsRelative=a.match(/^\s*\d*\.?\d*\%\s*$/)&&!a.match(/^\s*0\%\s*$/))&&0===b.offsetWidth)for(s=b;s=s.offsetParent;)if(0<s.offsetWidth){a=(s.offsetWidth*parseFloat(a.match(/\d*/)[0])/100).toString();
59 break}if((g.heightIsRelative=c.match(/^\s*\d*\.?\d*\%\s*$/)&&!c.match(/^\s*0\%\s*$/))&&20>=b.offsetHeight)for(s=b;s=s.offsetParent;)if(0<s.offsetHeight){c=(s.offsetHeight*parseFloat(c.match(/\d*/)[0])/100).toString();break}g.width=a.replace?a.replace(/^\s*(\d*\.?\d*)\s*$/ig,"$1px"):a;g.height=c.replace?c.replace(/^\s*(\d*\.?\d*)\s*$/ig,"$1px"):c;n.width=g.width;n.height=g.height;g.pixelWidth=g.widthIsRelative?b.offsetWidth:parseInt(g.width,10)||0;g.pixelHeight=g.heightIsRelative?b.offsetHeight:parseInt(g.height,
60 10)||0;return g};F=d.renderer={register:function(a,b){if(!a||"function"!==typeof a.toString)throw Error("#03091436 ~renderer.register() Invalid value for renderer name.");a=a.toString().toLowerCase();if(void 0!==c[a])return d.raiseError(d.core,"03091438","param","::RendererManager>register",'Duplicate renderer name specified in "name"'),!1;c[a]=b;return!0},userSetDefault:!1,setDefault:function(a){if(!a||"function"!==typeof a.toString)return d.raiseError(d.core,"25081731","param","::RendererManager>setDefault",
61 'Invalid renderer name specified in "name"'),!1;if(void 0===c[a=a.toString().toLowerCase()])return d.raiseError(d.core,"25081733","range","::RendererManager>setDefault","The specified renderer does not exist."),!1;this.userSetDefault=!1;d.policies.options.renderer=["renderer",a];return!0},notifyRender:function(a){var c=d.core.items[a&&a.id];c&&(!1!==a.success||a.silent)||d.raiseError(d.core.items[a.id],"25081850","run","::RendererManager",Error("There was an error rendering the chart. Enable FusionCharts JS debugger for more information."));
62 if(c.ref=a.ref)a.ref.FusionCharts=d.core.items[a.id];d.raiseEvent("internal.DOMElementCreated",{},c)},protectedMethods:{options:!0,attributes:!0,src:!0,ref:!0,constructor:!0,signature:!0,link:!0,addEventListener:!0,removeEventListener:!0},getRenderer:function(a){return c[a]},getRendererPolicy:function(a){a=c[a].policies;return"object"===typeof a?a:{}},currentRendererName:function(){return d.policies.options.renderer[1]},update:function(a){K[a.id].update.apply(a,Array.prototype.slice.call(arguments,
63 1))},render:function(a){K[a.id].render.apply(a,Array.prototype.slice.call(arguments,1))},remove:function(a){K[a.id].remove.apply(a,Array.prototype.slice.call(arguments,1))},resize:function(a){K[a.id].resize.apply(a,Array.prototype.slice.call(arguments,1))},config:function(a){K[a.id].config.apply(a,Array.prototype.slice.call(arguments,1))},dispose:function(a){K[a.id].dispose.apply(a,Array.prototype.slice.call(arguments,1))}};d.addEventListener("beforeInitialize",function(a){a=a.sender;var b=a.options.renderer.toLowerCase(),
64 e;"string"===typeof a.options.renderer&&void 0===c[b]&&(a.options.renderer=d.policies.options.renderer[1]);a.options.renderer=b;K[a.id]=c[a.options.renderer];!0!==K[a.id].initialized&&"function"===typeof K[a.id].init&&(K[a.id].init(),K[a.id].initialized=!0);d.parsePolicies(a,K[a.id].policies||{},a.args);for(e in K[a.id].prototype)a[e]=K[a.id].prototype[e];for(e in K[a.id].events)a.addEventListener(e,K[a.id].events[e])});d.addEventListener(["rendered","dataloaderror","nodatatodisplay","rendercancelled"],
65 function(a,c){var b=a.sender;b instanceof d.core&&b.__state.rendering&&(d.raiseEvent("internal.rendered",c,b),delete b.__state.rendering)});d.addEventListener("loaded",function(a){var c=a.sender;a=a.sender.ref;var e,g;if(void 0!==a&&null!==a&&"function"===typeof a.getExternalInterfaceMethods){try{e=a.getExternalInterfaceMethods(),e="string"===typeof e?e.split(","):[]}catch(n){e=[],d.raiseError(c,"13111126041","run","RendererManager^Loaded",Error("Error while retrieving data from the chart-object."+
66 (n.message&&0<=n.message.indexOf("NPObject")?" Possible cross-domain security restriction.":"")))}for(a=0;a<e.length;a+=1)g=e[a],void 0===c[g]&&(c[g]=b(g));if(c.ref)for(g in e=F.protectedMethods,a=F.getRenderer(c.options.renderer).protectedMethods,c)if(a&&!e[g]&&!a[g]&&void 0===c.ref[g])try{c.ref[g]=J(c,g)}catch(s){}}});d.legacyEventList.resized="FC_Resized";d.extend(d.core.prototype,{render:function(c,b,e){var g=this,n,s,R;if((R=k[this.id])&&R.FusionCharts&&R.FusionCharts===this||(R=this.ref)&&R.FusionCharts&&
67 R.FusionCharts===this)d.renderer.dispose(this),R===k[this.id]&&(k[this.id]=void 0);void 0!==k[this.id]&&d.raiseError(this,"25081843","comp",".render",Error("#25081843:IECompatibility() Chart Id is same as a JavaScript variable name. Variable naming error. Please use unique name forchart JS variable, chart-id and container id."));e?"function"!==typeof e&&(e=void 0):"function"===typeof b?(e=b,b=void 0):b||"function"!==typeof c||(e=c,c=void 0);b=(b||this.options.insertMode).toLowerCase()||l.REPLACE;
68 void 0===c&&(c=this.options.containerElementId);"string"===typeof c&&(c=B.getElementById(c));if(void 0===c||null===c)return d.raiseError(this,"03091456","run",".render()",Error("Unable to find the container DOM element.")),this;if(a(this.id,c))return d.raiseError(this,"05102109","run",".render()",Error("A duplicate object already exists with the specific Id: "+this.id)),this;n=B.createElement(this.options.containerElementType||"span");n.setAttribute("id",this.id);if("append"!==b&&"prepend"!==b)for(;c.hasChildNodes();)c.removeChild(c.firstChild);
69 "prepend"===b&&c.firstChild?c.insertBefore(n,c.firstChild):c.appendChild(n);this.options.containerElement=c;this.options.containerElementId=c.id;if(b=n.style)b.position="relative",b.textAlign="left",b.lineHeight="100%",b.display="inline-block",b.zoom="1",b.fontWeight="normal",b.fontVariant="normal",b.fontStyle="normal",b.textDecoration="none",b["*DISPLAY"]="inline",b.padding="0",b.margin="0",b.border="none";b=d.normalizeCSSDimension(this.width,this.height,n);this.__state.renderedWidth=b.pixelWidth;
70 this.__state.renderedHeight=b.pixelHeight;this.__state.rendering=!0;d.raiseEvent("beforeRender",s={container:c,width:this.width,height:this.height,renderer:this.options.renderer},this,void 0,function(a,c){d.renderer.render(g,n,function(){d.renderer.notifyRender.apply(this,arguments);if(e)try{e.call(a.sender,c.container)}catch(b){setTimeout(function(){throw b;})}})},function(){d.raiseEvent("renderCancelled",s,g)});return this},remove:function(){d.renderer.remove(this);return this},resizeTo:function(a,
71 c,b){var g=this,n=g.width,s=g.height,R=g.__state;"object"===typeof a&&(b=c,c=a.h,a=a.w);a=null===a||void 0===a?n:a.toString().replace(D,"");c=null===c||void 0===c?s:c.toString().replace(D,"");!0!==b?d.raiseEvent("beforeresize",{currentWidth:n,currentHeight:s,newWidth:a,newHeight:c},g,void 0,function(){g.width=a;g.height=c;d.renderer.resize(g,{width:a,height:c});d.raiseEventWithLegacy("resized",{width:g.width,height:g.height,prevWidth:n,prevHeight:s,pixelWidth:g.ref&&g.ref.offsetWidth||0,pixelHeight:g.ref&&
72 g.ref.offsetHeight||0,originalWidth:R.renderedWidth,originalHeight:R.renderedHeight},g,[g.id,g.width,g.height])},function(){d.raiseEvent("resizecancelled",{currentWidth:n,currentHeight:s,cancelledTargetWidth:a,cancelledTargetHeight:c},g)}):(g.width=a,g.height=c);return this},dispose:function(){var a=this,c={};d.raiseEvent("beforeDispose",c,a,void 0,function(){d.renderer.dispose(a);d.raiseEvent("disposed",c,a);d.disposeEvents(a);delete d.core.items[a.id];for(var b in a)a.hasOwnProperty(b)&&delete a[b];
73 a.disposed=!0},function(){d.raiseEvent("disposeCancelled",c,a)})},configure:function(a,c){var b;a&&("string"===typeof a?(b={},b[a]=c):b=a,d.renderer.config(this,b))}});d.extend(d.core,{setCurrentRenderer:function(){var a=F.setDefault.apply(F,arguments);F.userSetDefault=!0;return a},getCurrentRenderer:function(){return F.currentRendererName.apply(F,arguments)},render:function(a,c){return a instanceof d.core?(a.render(c),a):(new d.core(a)).render(c)}},!1)}]);
74 FusionCharts.register("module",["private","modules.interface.transcoder",function(){var d=this,k=d.window,B=d.transcoders={},v={},l={},c=/url$/i,K=d._interactiveCharts={selectscatter:[!0,!1],dragcolumn2d:[!0,!0],dragarea:[!0,!0],dragline:[!0,!0],dragnode:[!0,!0]},b=function(c,b,s,e){var m=s.obj;s=s.args;s.dataSource=c;s.xmlHttpRequestObject=b;s.source="XmlHttpRequest";s.url=e;d.raiseEvent("dataLoadRequestCompleted",s,m,void 0,a,D)},J=function(a,c,b){var e=b.obj;b=b.args;b.error=a;b.httpStatus=c.xhr&&
75 c.xhr.status?c.xhr.status:-1;b.xmlHttpRequestObject=c;d.raiseEvent("dataLoadError",b,e);"function"===typeof k.FC_DataLoadError&&k.FC_DataLoadError(e.id,b)},a=function(a,c){a.sender.setChartData(c.dataSource,c.dataFormat,c.config,c.successcallback,c.silent)},D=function(a,c){d.raiseEvent("dataLoadCancelled",c,a.sender);c.xmlHttpRequestObject.abort()},F=function(a,c){var s=a.sender,e=s.__state,m=c.url;s.options.dataSource=c.url;e.dhmXhrObj||(e.dhmXhrObj=new d.ajax(b,J));e.dhmXhrObj.get("function"===
76 typeof k.decodeURIComponent?k.decodeURIComponent(m):k.unescape(m),{obj:s,args:c})},C=function(a,c){var b=a.sender,e=b.__state;d.raiseEvent("dataLoadRequestCancelled",c,b);e&&e.dhmXhrObj&&e.dhmXhrObj.abort()},w=function(a,c){var b=a.sender,e=b.__state,m=b.id;v[m]=c;l[m]&&delete l[m];l[m]={};e.dataReady=void 0;e.dataAvailable=!0;!0!==c.silent&&(!0!==b.options.safeMode||!0!==e.rendering||b.isActive()?(delete e.args,d.renderer.update(b,c)):(e.updatePending=c,d.raiseWarning(b,"23091255","run","::DataHandler~update",
77 "Renderer update was postponed due to async loading.")));d.raiseEvent("dataUpdated",c,b,void 0,c.successcallback)},e=function(a,c){d.raiseEvent("dataUpdateCancelled",c,a.sender,void 0,c.failurecallback)};d.dataFormats={};d.policies.options.dataSource=["dataSource",void 0];d.policies.options.dataFormat=["dataFormat",void 0];d.policies.options.dataConfiguration=["dataConfiguration",void 0];d.policies.options.showDataLoadingMessage=["showDataLoadingMessage",!1];d.addDataHandler=function(a,c){if("string"!==
78 typeof a||void 0!==B[a.toLowerCase()])d.raiseError(d.core,"03091606","param","::DataManager.addDataHandler",Error("Invalid Data Handler Name"));else{var b={},e=a.toLowerCase();B[e]=c;c.name=a;b["set"+a+"Data"]=function(c,b,n){return this.setChartData(c,a,b,n)};c.transportable&&(b["set"+a+"Url"]=function(c,b,n){return this.setChartDataUrl(c,a,b,n)},d.dataFormats[a+"URL"]=e+"Url");b["get"+a+"Data"]=function(){return this.getChartData(a)};d.dataFormats[a]=e;d.extend(d.core,b,!0)}};d.extend(d.core.prototype,
79 {setChartDataUrl:function(a,b,e,w,m){if(void 0===b||null===b||"function"!==typeof b.toString)b=this.options.dataFormat,d.raiseWarning(this,"03091609","param","FusionCharts#setChartDataUrl","Invalid Data Format. Reverting to current data format - "+b);b=b.toString().toLowerCase();b=c.test(b)?b.slice(0,-3):b;d.raiseEvent("dataLoadRequested",{source:"XmlHttpRequest",url:a,dataFormat:b,silent:!!m,config:e,successcallback:w},this,void 0,F,C)},setChartData:function(a,b,s,D,m){var I=this.options,l,J;if(void 0===
80 b||null===b||"function"!==typeof b.toString)b=I.dataFormat,d.raiseWarning(this,"03091610","param","FusionCharts#setChartData","Invalid Data Format. Reverting to current data format - "+b);b=b.toString().toLowerCase();c.test(b)?this.setChartDataUrl(a,b,s,D,m):(I.dataSource=a,l=b,I.dataFormat=b,J=B[l],"undefined"===typeof J?d.raiseError(d.core,"03091611","param","FusionCharts#setChartData",Error("Data Format not recognized")):(b=(b=d.renderer&&d.renderer.getRenderer(I.renderer||d.renderer.currentRendererName()))&&
81 b.dataFormat,s=b===l?J.passthrough?J.passthrough(a,s):{data:a}:J.encode(a,this,s||I.dataConfiguration)||{},s["native"]=b===l,s.format=s["native"]?b:"xml",s.dataFormat=l,s.dataSource=a,s.silent=!!m,"function"===typeof D&&(s.successcallback=D),d.raiseEvent("beforeDataUpdate",s,this,void 0,w,e)))},getChartData:function(a,c){var b=this.options,e=this.id,m;if(void 0===a||"function"!==typeof a.toString||void 0===(m=B[a=a.toString().toLowerCase()]))d.raiseError(this,"25081543","param","::transcoder~getChartData()",
82 Error('Unrecognized data-format specified in "format"'));else return l[e][a]?b=l[e][a]:v[e]?(a===v[e].format?l[e][a]=v[e]:(l[e].xml||(l[e].xml="xml"===v[e].format?v[e]:B[v[e].format].encode(v[e].data,this,b.dataConfiguration)),l[e][a]||(l[e][a]=m.decode(l[e].xml.data,this,b.dataConfiguration))),b=l[e][a]):b={error:Error("Data not defined")},!0===Boolean(c)?b:b.data},dataReady:function(a){return a?this.__state.dataAvailable:this.__state.dataReady}});d.extend(d.core,{transcodeData:function(a,c,b,e,
83 m){if(c&&"function"===typeof c.toString&&b&&"function"===typeof b.toString&&void 0!==B[b=b.toString().toLowerCase()]&&void 0!==B[c=c.toString().toLowerCase()])return a=B[c].encode(a,this,m),b=B[b].decode(a.data,this,m),b.error instanceof Error||(b.error=a.error),e?b:b.data;d.raiseError(this,"14090217","param",".transcodeData()",Error("Unrecognized data-format specified during transcoding."))}},!1);d.getRenderer&&!d.getRenderer("flash")||d.addEventListener("DataLoadRequested",function(a){var c=a.sender;
84 c.options&&"flash"===c.options.renderer&&c.options.useLegacyXMLTransport&&a.preventDefault()});d.addEventListener("beforeInitialize",function(a){a=a.sender;var b=a.options,e=b.dataSource,w=d.renderer&&d.renderer.getRenderer(b.renderer);delete v[a.id];l[a.id]={};if(void 0!==e&&null!==e){a.__state.dataSetDuringConstruction=!0;if("string"!==typeof b.dataFormat)switch(typeof e){case "function":e=b.dataSource=e.call(a,b.dataConfiguration);b.dataFormat="JSON";break;case "string":b.dataFormat=/^\s*?\{[\s\S]*\}\s*?$/g.test(a.options.dataFormat)?
85 "JSON":"XML";break;case "object":b.dataFormat="JSON"}b.dataFormat&&b.dataFormat.toString&&(a.__state.dataFetchDuringConstruction=c.test(b.dataFormat.toString()));a.setChartData(e,b.dataFormat,void 0,void 0,!0)}else w&&(a.__state.dataSetDuringConstruction=!1,d.raiseWarning(a,"1810131922A","param",":dataHandler~event:beforeInitialize","Data source was not defined during construction, hence set to blank renderer default - "+w.dataFormat),a.setChartData("",w.dataFormat,void 0,void 0,!0),a.__state.dataAvailable=
86 !1)});d.addEventListener("beforeDispose",function(a){var c=a.sender;delete v[a.sender.id];delete l[a.sender.id];c&&c.__state&&c.__state.dhmXhrObj&&c.__state.dhmXhrObj.abort()});d.addEventListener("disposed",function(a){delete l[a.sender.id]});d.addEventListener("loaded",function(a){a=a.sender;var c=a.__state.updatePending;a instanceof d.core&&void 0!==c&&(delete a.__state.updatePending,d.renderer.update(a,c))});d.addEventListener("dataUpdated",function(a,c){var b=a.sender,e=b.__state;e.rendering&&
87 (e.dataFetchDuringConstruction||e.updatePending)&&(delete e.dataFetchDuringConstruction,delete e.updatePending,d.renderer.update(b,c))});d.addEventListener(["dataLoadError","dataInvalid"],function(a){a.sender.__state.dataAvailable=!1});d.addEventListener("loaded",function(a){a=a.sender;var c=a.__state,b,e,m;m=function(a,c){return function(b){return!1===b?c.apply(this):this.ref.getUpdatedXMLData?d.core.transcodeData(this.ref.getUpdatedXMLData(),"xml",a):this.getData?this.getData(a):c.apply(this)}};
88 if(a.chartType&&K[a.chartType()]&&K[a.chartType()][0]){for(b in d.transcoders)e=d.transcoders[b].name,e="get"+e+"Data",a[e]=m(b,a.constructor.prototype[e]),a[e]._dynamicdatarouter=!0;c.dynamicDataRoutingEnabled=!0}else if(c.dynamicDataRoutingEnabled){for(b in d.transcoders)e=d.transcoders[b].name,e="get"+e+"Data",a.hasOwnProperty(e)&&a[e]._dynamicdatarouter&&delete a[e];c.dynamicDataRoutingEnabled=!1}})}]);"object"!==typeof JSON&&(JSON={});
89 (function(){function d(a){return 10>a?"0"+a:a}function k(a){l.lastIndex=0;return l.test(a)?'"'+a.replace(l,function(a){var c=b[a];return"string"===typeof c?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function B(a,b){var d,l,w,e,g=c,n,s=b[a];s&&"object"===typeof s&&"function"===typeof s.toJSON&&(s=s.toJSON(a));"function"===typeof J&&(s=J.call(b,a,s));switch(typeof s){case "string":return k(s);case "number":return isFinite(s)?String(s):"null";case "boolean":case "null":return String(s);
90 case "object":if(!s)return"null";c+=K;n=[];if("[object Array]"===Object.prototype.toString.apply(s)){e=s.length;for(d=0;d<e;d+=1)n[d]=B(d,s)||"null";w=0===n.length?"[]":c?"[\n"+c+n.join(",\n"+c)+"\n"+g+"]":"["+n.join(",")+"]";c=g;return w}if(J&&"object"===typeof J)for(e=J.length,d=0;d<e;d+=1)"string"===typeof J[d]&&(l=J[d],(w=B(l,s))&&n.push(k(l)+(c?": ":":")+w));else for(l in s)Object.prototype.hasOwnProperty.call(s,l)&&(w=B(l,s))&&n.push(k(l)+(c?": ":":")+w);w=0===n.length?"{}":c?"{\n"+c+n.join(",\n"+
91 c)+"\n"+g+"}":"{"+n.join(",")+"}";c=g;return w}}"function"!==typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+d(this.getUTCMonth()+1)+"-"+d(this.getUTCDate())+"T"+d(this.getUTCHours())+":"+d(this.getUTCMinutes())+":"+d(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var v=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
92 l=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,c,K,b={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},J;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var l;K=c="";if("number"===typeof d)for(l=0;l<d;l+=1)K+=" ";else"string"===typeof d&&(K=d);if((J=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return B("",{"":a})});
93 "function"!==typeof JSON.parse&&(JSON.parse=function(a,c){function b(a,e){var g,d,s=a[e];if(s&&"object"===typeof s)for(g in s)Object.prototype.hasOwnProperty.call(s,g)&&(d=b(s,g),void 0!==d?s[g]=d:delete s[g]);return c.call(a,e,s)}var d;a=String(a);v.lastIndex=0;v.test(a)&&(a=a.replace(v,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
94 "]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return d=eval("("+a+")"),"function"===typeof c?b({"":d},""):d;throw new SyntaxError("JSON.parse");})})();
95 FusionCharts.register("module",["private","modules.data.json",function(){var d=this,k=d.window,B=k.document,v=d.xssEncode,l,c;void 0===k.JSON&&d.raiseError(this,"1113062012","run","JSONDataHandler",Error("Could not find library support for JSON parsing."));d.policies.options.allowIESafeXMLParsing=["_allowIESafeXMLParsing",!0];l=function(){var c={set:!0,trendlines:!0,vtrendlines:!0,line:{trendlines:!0,vtrendlines:!0},data:!0,dataset:!0,lineset:!0,categories:!0,category:!0,linkeddata:!0,application:!0,
96 definition:!0,axis:!0,connectors:!0,connector:{connectors:!0},trendset:!0,row:{rows:!0},column:{columns:!0},label:{labels:!0},color:{colorrange:!0},dial:{dials:!0},pointer:{pointers:!0},point:{trendpoints:!0},process:{processes:!0},task:{tasks:!0},milestone:{milestones:!0},datacolumn:{datatable:!0},text:{datacolumn:!0},item:{legend:!0},alert:{alerts:!0},groups:{annotations:!0},items:{groups:!0,data:!0},shapes:!0,shape:{shapes:!0},entitydef:!0,entity:{entitydef:!0}},b={chart:"linkedchart",map:"linkedmap",
97 set:"data",vline:{chart:"data",graph:"data",dataset:"data",categories:"category",linkedchart:"data"},apply:{application:"application"},style:{definition:"definition"},marker:{application:"application",definition:"definition",data:"items"},entity:{entitydef:"entitydef",data:"data"},shape:{shapes:"shapes"},connector:{connectors:{chart:"connector",linkedchart:"connector",map:"connectors",linkedmap:"connectors"}},annotationgroup:{annotations:"groups"},annotation:{groups:"items"}},l={vline:{vline:"true"}},
98 a={chart:!0,map:!0,graph:!0},D={dataset:"data",categories:"category"},F={target:"target",value:"value"},C={styles:{definition:!0,application:!0},chart:{value:!0,target:!0},graph:{value:!0,target:!0},linkedchart:{value:!0,target:!0},markers:{definition:!0,application:!0,shapes:!0,connectors:!0,data:!0},map:{entitydef:!0,data:!0},linkedmap:{entitydef:!0,data:!0}},w,e;w={append:function(a,b,e,d){!c[e]||!0!==c[e]&&!0!==c[e][d]?b[e]=a:(b[e]instanceof Array||(b[e]=[]),b[e].push(a))},child:function(c,e,
99 s,k){var m,I,Q,v,B,p;for(m=0;m<e.length;m+=1)switch(Q=e[m],I=Q.nodeName.toLowerCase(),Q.nodeType){case 1:v=w.attr(Q.attributes);p=a[I];!0===p&&(B=v,v={},v[I]=B);p=l[I];"object"===typeof p&&d.extend(v,p);if(p=b[I])if("object"===typeof p&&"object"===typeof p[s])for(B in B=void 0,p[s]){if(k[B]){I=p[s][B];break}}else"object"===typeof p&&"string"===typeof p[s]?I=p[s]:"string"===typeof p&&(I=p);Q.childNodes.length&&((p=C[s])&&p[I]?w.child(c,Q.childNodes,I,k):w.child(v,Q.childNodes,I,k));(p=C[s])&&p[I]||
100 w.append(v,c,I,s);break;case 3:if(p=F[s])I=p,v=Q.data,w.append(v,c,I,s);p=D[s];"string"===typeof p&&k.chart&&parseInt(k.chart.compactdatamode,10)&&(I=p,v=Q.data,c[I]=c[I]?c[I]+v:v)}},attr:function(a){var c,b={};if(!a||!a.length)return b;for(c=0;c<a.length;c+=1)b[a[c].nodeName.toLowerCase()]=a[c].value||a[c].nodeValue;return b}};e=function(a){var c={},b,l,m,I,D,J,C,p,H;if("object"!==typeof a&&a&&"function"!==typeof a.toString)return e.errorObject=new TypeError("xml2json.parse()"),c;a=a.toString().replace(/<\!--[\s\S]*?--\x3e/g,
101 "").replace(/<\?xml[\s\S]*?\?>/ig,"").replace(/&(?!([^;\n\r]+?;))/g,"&amp;$1");a=a.replace(/^\s\s*/,"");for(var S=/\s/,F=a.length;S.test(a.charAt(F-=1)););a=a.slice(0,F+1);if(!a)return c;try{k.DOMParser?b=(new k.DOMParser).parseFromString(a,"text/xml"):B.body&&d.core.options.allowIESafeXMLParsing?(l=B.createElement("xml"),l.innerHTML=a,B.body.appendChild(l),b=l.XMLDocument,B.body.removeChild(l)):(b=new k.ActiveXObject("Microsoft.XMLDOM"),b.async="false",b.loadXML(a));if(!(b&&b.childNodes&&1===b.childNodes.length&&
102 (m=b.childNodes[0])&&m.nodeName&&(I=m.nodeName.toLowerCase()))||"chart"!==I&&"map"!==I&&"graph"!==I)return e.errorObject=new TypeError("xml2json.parse()"),c;if("graph"===I){D=b.createElement("chart");for(H=(C=m.attributes)&&C.length||0;H--;)D.setAttribute(C[H].name,C[H].value),C.removeNamedItem(C[H].name);if(H=(p=m.childNodes)&&p.length||0)H-=1,J=m.removeChild(p[H]),D.appendChild(J);for(;H--;)J=m.removeChild(p[H]),D.insertBefore(J,D.firstChild);b.replaceChild(D,m);m=D}}catch(v){e.errorObject=v}m?
103 (m.attributes&&(c[I]=w.attr(m.attributes)),m.childNodes&&w.child(c,m.childNodes,I,c),delete e.errorObject):e.errorObject=new TypeError("xml2json.parse()");return c};return function(a){delete e.errorObject;return{data:e(a),error:e.errorObject}}}();c=function(){var c,b;c={items:{explode:{data:"set",groups:{annotations:"annotationgroup"},items:{groups:"annotation"}},text:{chart:{target:"target",value:"value"},graph:{target:"target",value:"value"}},dsv:{dataset:{data:"dataset"},categories:{category:"categories"}},
104 attr:{chart:{chart:"chart"},graph:{graph:"graph"},map:{map:"map"},linkedmap:{map:"map"},linkedchart:{chart:"chart"}},group:{styles:{definition:"style",application:"apply"},map:{data:"entity",entitydef:"entity"},markers:{definition:"marker",application:"marker",shapes:"shape",connectors:"connector",items:"marker"}},tag:{markers:{items:"data"}}},qualify:function(c,a,b){return"object"===typeof this.items[c][b]?this.items[c][b][a]:this.items[c][b]}};b=function(d,a,l,k){var C="",w="",e="",g="",n,s,R;a&&
105 "function"===typeof a.toLowerCase&&(a=a.toLowerCase());if(void 0===l&&d[a])for(n in d[a])s=n.toLowerCase(),"compactdatamode"===s&&(k.applyDSV=1==d[a][n]);if(d instanceof Array)for(n=0;n<d.length;n+=1)e="string"===typeof d[n]?e+v(d[n]):e+b(d[n],a,l,k);else{for(n in d)s=n.toLowerCase(),d[n]instanceof Array&&(R=c.qualify("group",s,a))?(e=c.qualify("tag",s,a)||s,w+="<"+e+">"+b(d[n],R,a,k)+"</"+e+">"):"object"===typeof d[n]?(R=c.qualify("attr",s,a))?(g=b(d[n],R,a,k).replace(/\s*\/\>/ig,""),a=s):w+=b(d[n],
106 s,a,k):k.applyDSV&&(R=c.qualify("dsv",s,a))?w+=d[n]:(R=c.qualify("text",s,a))?(e=c.qualify("tag",s,a)||R,w+="<"+e+">"+d[n]+"</"+e+">"):"vline"===s&&Boolean(d[n])?a="vline":C+=" "+s+'="'+v(d[n]).toString().replace(/\"/ig,"&quot;")+'"';if(R=c.qualify("explode",l,a))a=R;e=a;e=(""!==g?g:"<"+e)+C+(""!==w?">"+w+"</"+e+">":" />")}return e};return function(c){delete b.errorObject;if(c&&"string"===typeof c)try{c=JSON.parse(c)}catch(a){b.errorObject=a}return{data:b(c,c&&c.graph?"graph":c&&c.map?"map":"chart",
107 void 0,{}),error:b.errorObject}}}();d.addDataHandler("JSON",{encode:c,decode:l,passthrough:function(c){var b={data:{}};if(!c)return b;if("string"!==typeof c)try{c=JSON.stringify(c)}catch(d){return b.error=d,b}try{b.data=JSON.parse(c.replace(/"([^"]+)":/g,function(a,c){return'"'+c.toLowerCase()+'":'}))}catch(a){b.error=a}return b},transportable:!0})}]);
108 FusionCharts.register("module",["private","modules.data.xml",function(){var d=function(d){return{data:d,error:void 0}};this.addDataHandler("XML",{encode:d,decode:d,transportable:!0})}]);
109 FusionCharts.register("module",["private","modules.data.csv",function(){var d=this,k=d.window,B=d.core,v=k.parseInt,l=k.parseFloat,c=function(c){return c},K;K=function(c){this.data=[];this.columnCount=this.rowCount=0;this.configure(c)};K.decodeLiterals=function(c,d){return void 0!==c&&null!==c&&c.toString?c.replace("{tab}","\t").replace("{quot}",'"').replace("{apos}","'"):d};K.prototype.set=function(c,d,a){var l;if(this.rowCount<=c){for(l=this.rowCount;l<=c;l+=1)this.data[l]=[];this.rowCount=c+1}this.columnCount<=
110 d&&(this.columnCount=d+1);this.data[c][d]=a};K.prototype.setRow=function(c,d){var a;if(this.rowCount<=c){for(a=this.rowCount;a<=c;a+=1)this.data[a]=[];this.rowCount=c+1}this.columnCount<d.length&&(this.columnCount=d.length);this.data[c]=d};K.prototype.get=function(c,d){var a=this.data;return a[c]&&a[c][d]};K.prototype.configure=function(c){var d=K.decodeLiterals;this.delimiter=d(c.delimiter,",");this.qualifier=d(c.qualifier,'"');this.eolCharacter=d(c.eolCharacter,"\r\n");this.numberFormatted=!!v(c.numberFormatted,
111 0)};K.prototype.clear=function(){this.data=[];this.columnCount=this.rowCount=0};K.prototype.toString=function(){var c,d,a="";for(c=0;c<this.rowCount;c+=1)d=this.qualifier+this.data[c].join(this.qualifier+this.delimiter+this.qualifier)+this.qualifier,a+='""'===d?this.eolCharacter:d+this.eolCharacter;0<this.rowCount&&(a=a.slice(0,a.length-2));return a};d.addDataHandler("CSV",{encode:function(c,l){d.raiseError(l,"0604111215","run","::CSVDataHandler.encode()","FusionCharts CSV data-handler only supports encoding of data.");
112 throw Error("FeatureNotSupportedException()");},decode:function(b){var d=B.transcodeData(b,"xml","json")||{},a,D,k,C,w,e,g,n=d.chart||d.map||d.graph||{},s=Boolean(n.exporterrorcolumns||0),R=d.categories&&d.categories[0]&&d.categories[0].category||[];C=d.map&&!d.chart;var m=!1,I=!1,Q=!1,v=!1;a=!1;var $=c,p={},H,S,fa,sa,ya,ca,Y,xa,t,M,h;w=0;b=new K({separator:n.exportdataseparator,qualifier:n.exportdataqualifier,numberFormatted:n.exportdataformattedval});B.formatNumber&&b.numberFormatted&&($=function(a){return B.formatNumber(a,
113 n)});if(C)p.geo=!0,b.setRow(0,["Id"," Short Name","Long Name","Value","Formatted Value"]);else if(void 0!==(H=d.dials&&d.dials.dial||d.pointers&&d.pointers.pointer||d.value))if(p.gauge=!0,"string"===typeof H)b.set(0,0,$(H)),p.singlevalue=!0,"string"===typeof d.target&&(b.set(0,1,$(d.target)),p.bullet=!0);else for(b.setRow(0,["Id","Value"]),p.multivalue=!0,C=0,e=1,w=H.length;C<w;C+=1,e+=1)b.setRow(e,[e,$(H[C].value)]);else if(H=d.dataset||!(d.data instanceof Array)&&[]){p.multiseries=!0;D=1;if(S=d.lineset)H=
114 H.concat(S),p.lineset=!0;if(fa=d.axis)H=H.concat(fa),p.multiaxis=!0;ca=H.length;ya=R.length;if(!(ca=H.length)){for(C=0;C<ya;C+=1)Y=R[C],b.set(C+1,0,Y.label||Y.name);p.multilevel=!0}for(C=0;C<ca;C+=1)for(xa=H,xa[C].dataset?(xa=xa[C].dataset,k=0,sa=xa.length):(xa=H,k=C,sa=k+1);k<sa&&!m&&!Q;k+=1,D+=1){t=xa[k];b.set(0,D,t.seriesname);"string"===typeof t.data&&(p.compactdata=!0,t.data=t.data.split(n.dataseparator||"|"));e=w=0;for(M=t.data&&t.data.length||0;w<M||w<ya;w+=1){Y=R[w];a=e+1;h=t.data&&t.data[e]||
115 {};if(void 0!==h.x&&void 0!==h.y){m=p.xy=!0;break}if(void 0!==h.open||void 0!==h.high||void 0!==h.close||void 0!==h.low){v=p.ohlc=!0;break}if(void 0!==h.rowid&&void 0!==h.columnid){Q=p.heatmap=!0;break}if(w<ya&&!Y.vline){b.set(a,0,Y.label||Y.name);Y=l(h?h.value:"");Y=isNaN(Y)?"":$(Y);b.set(a,D,Y);if(I||s||h.errorvalue)I||b.set(0,D+1,"Error"),g=1,b.set(a,D+1,$(h.errorvalue));e+=1}}g&&(D+=g,g=0)}S&&(H=H.slice(0,-S.length));fa&&(H=H.slice(0,-fa.length))}else if(H=d.data){b.set(0,1,n.yaxisname||"Value");
116 p.singleseries=!0;a="1"==n.showsumatend;C=0;for(ya=H.length;C<ya;C+=1)h=H[C],h.vline||(Y=l(h.value?h.value:""),b.setRow(C+1,[h.label||h.name,isNaN(Y)?"":(w+=Y,$(Y))]));a&&(p.summation=!0,b.setRow(C+1,[n.sumlabel||"Total",$(w)]))}if(v)for(b.clear(),b.setRow(0,["Open","Close","High","Low"]),C=0,a=1,H=d.dataset,sa=H.length;C<sa;C+=1)for(w=0,t=H[C]&&H[C].data||[],ca=t.length;w<ca;w+=1,a+=1)h=t[w]||{},b.setRow(w+1,[$(h.open),$(h.close),$(h.high),$(h.low)]);else if(m)for(b.clear(),I=!1,g=0,b.setRow(0,["Series",
117 "x","y"]),C=0,a=1,H=d.dataset,sa=H.length;C<sa;C+=1)for(w=0,t=H[C]&&H[C].data||[],ca=t.length;w<ca;w+=1,a+=1){h=t[w]||{};Y=[H[C].seriesname,$(h.x),$(h.y)];void 0!==h.z&&(Y.push($(h.z)),g||(b.set(0,3,"z"),g=1));if(I||s||void 0!==h.errorvalue||void 0!==h.horizontalerrorvalue||void 0!==h.verticalerrorvalue)d=$(h.errorvalue),Y.push(h.errorvalue,void 0===h.horizontalerrorvalue?d:$(h.horizontalerrorvalue),void 0===h.verticalerrorvalue?d:$(h.verticalerrorvalue)),I||(b.set(0,g+3,"Error"),b.set(0,g+4,"Horizontal Error"),
118 b.set(0,g+5,"Vertical Error")),I=p.error=!0;b.setRow(a,Y)}else if(Q){b.clear();s={};I={};C=0;w=1;R=d.rows&&d.rows.row||[];for(g=R.length;C<g;C+=1,w+=1)Y=R[C],Y.id&&(s[Y.id.toLowerCase()]=w,b.set(w,0,Y.label||Y.id));C=0;w=1;R=d.columns&&d.columns.column||[];for(g=R.length;C<g;C+=1,w+=1)Y=R[C],Y.id&&(I[Y.id.toLowerCase()]=w,b.set(0,w,Y.label||Y.id));t=d.dataset&&d.dataset[0]&&d.dataset[0].data||[];C=0;for(g=t.length;C<g;C+=1)h=t[C],a=h.rowid.toLowerCase(),D=h.columnid.toLowerCase(),s[a]||(s[a]=b.rowCount,
119 b.set(b.rowCount,0,h.rowid)),I[D]||(I[D]=b.columnCount,b.set(0,b.columnCount,h.columnid)),b.set(s[a],I[D],$(h.value))}H=R=S=fa=null;0<b.rowCount&&void 0===b.get(0,0)&&b.set(0,0,n.xaxisname||"Label");return{data:b.toString(),error:void 0,predictedFormat:p}},transportable:!1});B.addEventListener("Loaded",function(c){c=c.sender;"javascript"!==c.options.renderer||c.getDataAsCSV||(c.getDataAsCSV=c.ref.getDataAsCSV=c.getCSVData)})}]);
120 FusionCharts.register("module",["private","modules.renderer.js",function(){var d=this,k=d.window,B=k.document,v=d.core.options,l=/msie/i.test(k.navigator.userAgent)&&!k.opera,c=Boolean(k.SVGAngle||B.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")),K=function(){},b=d.hcLib={cmdQueue:[]},J=b.moduleCmdQueue={base:[],charts:[],powercharts:[],widgets:[],maps:[]},a=b.moduleDependencies={},D=b.moduleMeta={base:"fusioncharts.js",charts:"fusioncharts.charts.js",powercharts:"fusioncharts.powercharts.js",
121 widgets:"fusioncharts.widgets.js",maps:"fusioncharts.maps.js"},F={},C=b.getMetaSentence=function(){var a={};return function(c){c=c&&c.replace(/(^\s*)|(\s*$)/g,"")||"";return a[c]||(a[c]={key:c,subject:c.replace(/[^\/]*?$/ig,""),predicate:c.replace(/^.*\//ig,"")})}}(),w=b.getDependentModuleName=function(c){var b=[],d,e;c=C(c).predicate;for(d in a)void 0!==(e=a[d][c])&&(b[e]=d);return b},e=b.hasModule=function(a){var c,b;if(a instanceof Array){c=0;for(b=a.length;c<b;c+=1)if(!Boolean(d.modules["modules.renderer.js-"+
122 C(a[c]).predicate]))return!1;return!0}return Boolean(d.modules["modules.renderer.js-"+C(a).predicate])},g=b.loadModule=function(a,c,b,g){a instanceof Array||(a=[a]);var p=a.length,m=0,n;n=function(){if(m>=p)c&&c();else{var s=a[m],l=s&&s.match(/[^\/]*$/i)[0],w=D[s];m+=1;if(s){if(e(l)){n();return}if(F[l]){d.raiseError(g||d.core,"1112201445A","run","JavaScriptRenderer~loadModule() ","required resources are absent or blocked from loading.");b&&b(l);return}}else b&&b(l);s=d.core.options["html5"+d.capitalizeString(l)+
123 "Src"];d.loadScript(void 0===s?w:s,{success:function(){e(l)?n():b&&b(l)},failure:b&&function(){b(l)}},void 0,!0)}};n()},n=b.executeWaitingCommands=function(a){for(var c;c=a.shift();)"object"===typeof c&&K[c.cmd].apply(c.obj,c.args)},s=function(a){delete a.sender.jsVars._reflowData;a.sender.jsVars._reflowData={};delete a.sender.jsVars._reflowClean},R=function(){var a=function(){};a.prototype={LoadDataErrorText:"Error in loading data.",XMLLoadingText:"Retrieving data. Please wait",InvalidXMLText:"Invalid data.",
124 ChartNoDataText:"No data to display.",ReadingDataText:"Reading data. Please wait",ChartNotSupported:"Chart type not supported.",PBarLoadingText:"",LoadingText:"Loading chart. Please wait",RenderChartErrorText:"Unable to render chart."};return a.prototype.constructor=a}(),m=b.getContainerBackgroundColor=function(a){var d=a.options.containerBackgroundColor,e=a.options.containerBackgroundOpacity;isNaN(e)?e=a.jsVars.transparent?0:1:(e=parseFloat(e),0>e?e=0:1<e&&(e=1));d||(d="#ffffff");if(l&&!c)return e?
125 d:"transparent";d=d.replace(/^#?([a-f0-9]+)/ig,"$1");d=b.graphics.HEXtoRGB(d);d[3]=e.toString();return"rgba("+d.join(",")+")"};b.injectModuleDependency=function(c,d,e){var g=!1,p=C(c).subject;c=C(c).predicate;d=void 0===d?c:C(d).predicate;a[c]||(a[c]={},J[c]||(J[c]=[],b.moduleMeta[c]=p+v.html5ScriptNamePrefix+(d&&d.replace&&d.replace(/^[\s\S]*\//ig,"").replace(/\?/g,"%3F").replace(/\#/g,"%23").replace(/\:/g,"%3A")||"")+v.html5ScriptNameSuffix),g=!0);a[c][d]=e||0;return g};b.needsModule=function(a,
126 c){a=C(a).predicate;c=C(c).predicate;return void 0!==(b.moduleDependencies[a]&&b.moduleDependencies[a][c])};b.cleanupWaitingCommands=function(a){for(var c=a.chartType(),c=w(c),b,d=[],e;b=c.shift();){for(b=J[b]||[];e=b.shift();)"object"===typeof e&&e.obj!==a&&d.push(e);b.concat(d);d=[]}};d.extend(d.core.options,{html5ScriptNameSuffix:".js",html5ScriptNamePrefix:"fusioncharts."});d.extend(K,{dataFormat:"json",ready:!1,policies:{jsVars:{},options:{showChartLoadingMessage:["showChartLoadingMessage",!0]}},
127 init:function(){e("base")?K.ready=!0:g("base",function(){K.ready=!0;n(b.cmdQueue)},void 0,d.core)},render:function(a){var c=a,d=this.jsVars.msgStore;c&&this.options.showChartLoadingMessage&&(c.innerHTML='<small style="display: inline-block; *zoom:1; *display:inline; width: 100%; font-family: Verdana,sans; font-size: 10px; color: #666666; text-align: center; padding-top: '+(parseInt(c.style.height,10)/2-5)+'px">'+(d.PBarLoadingText||d.LoadingText)+"</small>",c.style.backgroundColor=m(this));b.cmdQueue.push({cmd:"render",
128 obj:this,args:arguments})},update:function(){b.cmdQueue.push({cmd:"update",obj:this,args:arguments})},resize:function(){b.cmdQueue.push({cmd:"resize",obj:this,args:arguments})},dispose:function(){var a=b.cmdQueue,c,d;c=0;for(d=a.length;c<d;c+=1)a[c].obj===this&&(a.splice(c,1),d-=1,c-=1)},load:function(){b.cmdQueue.push({cmd:"load",obj:this,args:arguments})},config:function(a,c){var b,d=this.jsVars,e=d.msgStore,d=d.cfgStore;"string"===typeof a&&1<arguments.length&&(b=a,a={},a[b]=c);for(b in a)void 0!==
129 e[b]?e[b]=a[b]:d[b.toLowerCase()]=a[b]},protectedMethods:{},events:{beforeInitialize:function(a){var c=a.sender;a=c.jsVars;var d;a.fcObj=c;a.msgStore=a.msgStore||new R;a.cfgStore=a.cfgStore||{};a.previousDrawCount=-1;a.drawCount=0;a._reflowData={};c.addEventListener("beforeRender",function(a){a.sender.jsVars.smartLabel=new b.SmartLabelManager(c.id,B.body||B.getElementsByTagName("body")[0]);a.detachHandler()});a.userModules instanceof Array||(d=a.userModules,a.userModules=[],"string"===typeof d&&(a.userModules=
130 a.userModules.concat(d.split(","))));b.chartAPI&&b.chartAPI[void 0]||(a.needsLoaderCall=!0)},initialized:function(a){a=a.sender;var c=a.jsVars;c.needsLoaderCall&&(delete c.needsLoaderCall,K.load.call(a))},beforeDataUpdate:s,beforeDispose:function(a){var c=a.sender.jsVars;c.smartLabel&&!c.smartLabel.disposed&&c.smartLabel.dispose();s.apply(this,arguments)},beforeRender:function(a){var c=a.sender.jsVars;delete c.drLoadAttempted;delete c.waitingModule;delete c.waitingModuleError;s.apply(this,arguments)},
131 dataLoadRequested:function(a){a=a.sender;var c=a.jsVars;delete c.loadError;a.ref&&a.options.showDataLoadingMessage?c.hcObj&&!c.hasNativeMessage&&c.hcObj.showLoading?c.hcObj.showMessage(c.msgStore.XMLLoadingText):a.ref.showChartMessage?a.ref.showChartMessage("XMLLoadingText"):c.stallLoad=!0:c.stallLoad=!0},dataLoadRequestCompleted:function(a){delete a.sender.jsVars.stallLoad},dataLoadError:function(a){var c=a.sender,b=c.jsVars;delete b.stallLoad;b.loadError=!0;c.ref&&"function"===typeof c.ref.showChartMessage&&
132 c.ref.showChartMessage("LoadDataErrorText");c.__state.dataFetchDuringConstruction&&delete c.__state.dataFetchDuringConstruction;s.apply(this,arguments)}},_call:function(a,c,b){a.apply(b||k,c||[])}});d.extend(K.prototype,{getSWFHTML:function(){d.raiseWarning(this,"11090611381","run","JavaScriptRenderer~getSWFHTML()","getSWFHTML() is not supported for JavaScript charts.")},addVariable:function(){d.raiseWarning(this,"11090611381","run","JavaScriptRenderer~addVariable()",'Use of deprecated "addVariable()". Replace with "configure()".');
133 d.core.prototype.configure.apply(this,arguments)},getXML:function(){d.raiseWarning(this,"11171116291","run","JavaScriptRenderer~getXML()",'Use of deprecated "getXML()". Replace with "getXMLData()".');return this.getXMLData.apply(this,arguments)},setDataXML:function(){d.raiseWarning(this,"11171116292","run","JavaScriptRenderer~setDataXML()",'Use of deprecated "setDataXML()". Replace with "setXMLData()".');return this.setXMLData.apply(this,arguments)},setDataURL:function(){d.raiseWarning(this,"11171116293",
134 "run","JavaScriptRenderer~setDataURL()",'Use of deprecated "SetDataURL()". Replace with "setXMLUrl()".');return this.setXMLUrl.apply(this,arguments)},hasRendered:function(){return!(!this.jsVars.hcObj||!this.jsVars.hcObj.hasRendered)},setTransparent:function(a){var c;if(c=this.jsVars)"boolean"!==typeof a&&null!==a&&(a=!0),c.transparent=null===a?!1:!0===a?!0:!1}});d.extend(d.core,{_fallbackJSChartWhenNoFlash:function(){k.swfobject.hasFlashPlayerVersion(d.core.options.requiredFlashPlayerVersion)||d.renderer.setDefault("javascript")},
135 _enableJSChartsForSelectedBrowsers:function(a){void 0!==a&&null!==a&&d.renderer.setDefault(RegExp(a).test(k.navigator.userAgent)?"javascript":"flash")},_doNotLoadExternalScript:function(a){var c,b;for(c in a)b=c.toLowerCase(),D[b]&&(F[b]=Boolean(a[c]))},_preloadJSChartModule:function(){throw"NotImplemented()";}});d.renderer.register("javascript",K);c||l?d.renderer.setDefault("javascript"):k.swfobject&&k.swfobject.hasFlashPlayerVersion&&!k.swfobject.hasFlashPlayerVersion(d.core.options.requiredFlashPlayerVersion)&&
136 (d.raiseWarning(d.core,"1204111846","run","JSRenderer","Switched to JavaScript as default rendering due to absence of required Flash Player."),d.renderer.setDefault("javascript"))}]);
137 FusionCharts.register("module",["private","modules.renderer.js-lib",function(){var d=this,k=d.window,B=k.document,v=Boolean(k.SVGAngle||B.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")),l=/msie/i.test(k.navigator.userAgent)&&!k.opera,c=k.parseFloat,K=/\s+/g,b=/^#?/,J=/^rgba/i,a=/[#\s]/ig,D=/\{br\}/ig,F=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i,C=Math.abs,w=Math.pow,e=Math.round,g=w(2,-24),n=Object.prototype.toString,s=void 0!==B.documentElement.ontouchstart,R="http://www.fusioncharts.com?BS=FCHSEvalMark&utm_source=FCS_trial&pver="+
138 k.escape(d.core.version),m=!/fusioncharts\.com$/i.test(k.location.hostname),I=Math,Q=I.max,X=I.min,$={pageX:0,pageY:0},p=d.hcLib||(d.hcLib={}),H=function(a){var c=a.data,b=c.chart,d=b.paper,r=a.state,e=h(M(a.originalEvent)),g=e.target||e.originalTarget||e.srcElement||e.relatedTarget||e.fromElement,p=b.elements.resizeBox,t=c.layerX=e.pageX-c.chartPosLeft,m=c.layerY=e.pageY-c.chartPosTop,N=t-c.ox,E=m-c.oy,n=c.bBox,s=c.ox,l=c.oy,w=c.zoomX,W=c.zoomY,n=c.canvasY,S=c.canvasX,D=c.canvasW,H=c.canvasH,k=c.canvasX2,
139 ca=c.canvasY2,ia=c.strokeWidth,N=c.attr;switch(r){case "start":a=fa(this);c.chartPosLeft=a.left;c.chartPosTop=a.top;t=e.pageX-c.chartPosLeft;m=e.pageY-c.chartPosTop;c.oy=m;c.ox=t;c.allowMove=!1;p||(p=b.elements.resizeBox=d.rect(b.layers.tracker).attr(N));t>S&&t<k&&m>n&&m<ca&&(c.allowMove=!0);g&&g.ishot&&(c.allowMove=!1);p.attr({x:0,y:0,width:0,height:0}).show();break;case "end":n=p.getBBox();b={chart:b,selectionLeft:n.x,selectionTop:n.y,selectionHeight:n.height,selectionWidth:n.width,originalEvent:a.originalEvent};
140 c.isDragged&&(c.selectionEnd&&c.selectionEnd(b),c.isDragged=0);p.hide();delete c.oy;delete c.ox;break;default:if(!c.allowMove)break;N=t-c.ox;E=m-c.oy;s=c.ox;l=c.oy;c.isDragged||(b={chart:b,selectionLeft:(w?X(s,s+N):S)+0.5*ia,selectionTop:(W?X(l,l+E):n)+0.5*ia,selectionHeight:0,selectionWidth:0,originalEvent:a.originalEvent},c.selectionStart&&c.selectionStart(b),c.isDragged=1);N=-(s-X(s-(s-Q(s+N,S)),k));E=-(l-X(l-(l-Q(l+E,n)),ca));p.attr({x:(w?X(s,s+N):S)+0.5*ia,y:(W?X(l,l+E):n)+0.5*ia,width:w?C(N):
141 D,height:W?C(E):H})}},S=function(a){var c=a.data;a=a.originalEvent;var b=a.target||a.originalTarget||a.srcElement||a.relatedTarget||a.fromElement,h=a.type,d=a.layerX,r=a.layerY;void 0===d&&(d=a.pageX-c.chartPosLeft,r=a.pageY-c.chartPosTop);"mousedown"===h&&(b.ishot=d>c.canvasX&&d<c.canvasX2&&r>c.canvasY&&r<c.canvasY2);"mouseup"===h&&setTimeout(function(){b.ishot=!1},1)},I=function(){var a="innerWidth",c="innerHeight",b=B.documentElement||B.body,h=b;"innerWidth"in k?h=k:(a="clientWidth",c="clientHeight");
142 return function(){return{width:h[a],height:h[c],scrollTop:b.scrollTop,scrollLeft:b.scrollLeft}}}(),fa=function(a,c){var b={left:a.offsetLeft||0,top:a.offsetTop||0};for(a=a.offsetParent;a;)b.left+=a.offsetLeft||0,b.top+=a.offsetTop||0,a===B.body||a===B.documentElement||c||(b.left-=a.scrollLeft,b.top-=a.scrollTop),a=a.offsetParent;return b},sa=function(a){return a&&a.replace(/\$/g,"$$$$")},ya=function(a,c){return a||!1===a||0===a?a:c},ca=function(){var a,c,b;c=0;for(b=arguments.length;c<b;c+=1)if((a=
143 arguments[c])||!1===a||0===a)return a;return""},Y=function(){var a,c,b;c=0;for(b=arguments.length;c<b;c+=1)if((a=arguments[c])||!1===a||0===a)return a},xa=function(a,c,b,h){return p.dem.listen(a,c,b,h)},t=function(a,c,b){return p.dem.unlisten(a,c,b)},M=function(a){a=a.sourceEvent||a.originalEvent||a;return s&&a&&a.touches&&a.touches[0]||a||$},h=function(){var a;return function(c){void 0===c.pageX&&(c.pageX=c.clientX+(a||(a=k.document.body||k.document.documentElement)).scrollLeft,c.pageY=c.clientY+
144 a.scrollTop);return c}}(),N=function(a,c){c=h(M(c));var b=c.pageX,d=c.pageY,r=fa(a);return{chartX:b-r.left,chartY:d-r.top,pageX:b,pageY:d}},W=function(a){return a&&a.replace(/^#?([a-f0-9]+)/ig,"#$1")||"none"},na=function(){var a,c,b;c=0;for(b=arguments.length;c<b;c+=1)if(((a=arguments[c])||!1===a||0===a)&&!isNaN(a=Number(a)))return a},ia=function(a,c){a=a||!1===a||0===a?Number(a):NaN;return isNaN(a)?null:c?C(a):a},Z=function(a){return"string"===typeof a?a.replace(D,"<br />"):""},Aa=function(a,c){for(var b=
145 c.length,h=-1;b--;)if(a===c[b]){h=b;break}return h},Ga=function(){if(Array.isArray)return Array.isArray;var a=Object.prototype.toString,c=a.call([]);return function(b){return a.call(b)===c}}(),oa=function(a,c,b,h,d){var r,e,g,p;d?(h.push(a),d.push(c)):(h=[a],d=[c]);if(c instanceof Array)for(r=0;r<c.length;r+=1){try{e=a[r],g=c[r]}catch(t){continue}if("object"!==typeof g)b&&void 0===g||(a[r]=g);else{if(null===e||"object"!==typeof e)e=a[r]=g instanceof Array?[]:{};p=Aa(g,d);-1!==p?e=a[r]=h[p]:oa(e,g,
146 b,h,d)}}else for(r in c){try{e=a[r],g=c[r]}catch(m){continue}if(null!==g&&"object"===typeof g)if(p=n.call(g),"[object Object]"===p){if(null===e||"object"!==typeof e)e=a[r]={};p=Aa(g,d);-1!==p?e=a[r]=h[p]:oa(e,g,b,h,d)}else"[object Array]"===p?(null!==e&&e instanceof Array||(e=a[r]=[]),p=Aa(g,d),-1!==p?e=a[r]=h[p]:oa(e,g,b,h,d)):a[r]=g;else a[r]=g}return a},ua=function(a,c,b){if("object"!==typeof a&&"object"!==typeof c)return null;if("object"!==typeof c||null===c)return a;"object"!==typeof a&&(a=c instanceof
147 Array?[]:{});oa(a,c,b);return a},ea=function(a,c){var b;if(c instanceof Array)for(b=c.length-1;0<=b;b-=1)"object"!==typeof c[b]?!0===c[b]&&a&&a.splice&&a.splice(b,1):n.call(c[b])===n.call(a[b])&&ea(a[b],c[b]);else for(b in c)"object"!==typeof c[b]?!0===c[b]&&a&&a.splice&&a.splice(b,1):n.call(c[b])===n.call(a[b])&&ea(a[b],c[b]);return a},da=function(){var a=/^@window_/g;return function(c,b){var h=c.replace(/\[[\'\"]/g,".").replace(/[\'\"]\]/g,"").replace(/\[/g,".@window_").replace(/\]/g,"").split("."),
148 d=k,r,e;e="";var g,p,t;p=h.length;for(t=0;t<p;t+=1){g=h[t];r=d;if(g.match(a))e=k[g.replace(a,"")],d=d[e];else{if(void 0===d||null===d)throw(e||g).replace(a,"")+" is not defined";d=d[g]}e=g}!d||"function"!==typeof d.call&&d!==k.alert?setTimeout(function(){throw g.replace(a,"")+"() is not a function";},0):d===k.alert?d(b):d.call(r,b)}}(),aa=function(){var a="FusionChartslinkEval"+parseInt(+new Date,10);return function(c){try{k[a]=new Function(c),eval('window["'+a+'"]();')}catch(b){setTimeout(function(){throw b;
149 },0)}v?delete k[a]:k[a]=null}}(),ba=function(a,c){a=Number(a);a=isNaN(a)?100:a;void 0!==c&&(a=a*c/100);return a%101},ga=function(a,c,b){a=a.split(",");var h;void 0!==b&&(b=na(b.split(",")[0]));a[0]=ba(a[0],b);for(h=1;h<c;h+=1)a[h]=a[0]*ba(a[h],b)/100;return a.join(",")},la=function(c,b,h){var d=0,r=0,e=0;h&&h.match(J)&&(h=h.split(","),d=h[0].slice(h[0].indexOf("(")+1),r=h[1],e=h[2],b||0===b||(b=parseInt(100*h[3].slice(0,h[3].indexOf(")")),10)));if(c)if(c.match(J))h=c.split(","),d=h[0].slice(h[0].indexOf("(")+
150 1),r=h[1],e=h[2];else{c=c.replace(a,"").split(",")[0];switch(c.length){case 3:c=c.charAt(0)+c.charAt(0)+c.charAt(1)+c.charAt(1)+c.charAt(2)+c.charAt(2);break;case 6:break;default:c=(c+"FFFFFF").slice(0,6)}d=parseInt(c.slice(0,2),16);r=parseInt(c.slice(2,4),16);e=parseInt(c.slice(4,6),16)}b||0===b||(b=100);"string"===typeof b&&(b=b.split(",")[0]);b=parseInt(b,10)/100;return"rgba("+d+","+r+","+e+","+b+")"},za=function(){var a={};return function(b){var h=(b=b||this)&&b.FCcolor||b,d=h.color,r=h.ratio,
151 e=h.angle,g=h.alpha,p=h.r,t=h.cx,m=h.cy,N=h.fx,M=h.fy,n=h.gradientUnits,E=h.x1,s=h.y1,l=h.x2,w=h.y2,W=1,S,D,H,k;if("string"===typeof b)return a[k="~"+b]||(a[k]=b.replace(/^#?([a-f0-9]{3,6})/ig,"#$1"));d=d||"";if(!d)return S;k=[d,g,r,e,p,t,m,n,N,M,E,l,s,w].join("_").replace(/[\(\)\s,\xb0#]/g,"_");if(a[k])return a[k];r=r&&(r+"").split(",")||[];g=(g||0===g)&&(g+"").split(",")||[];if(d=d.split(","))if(S="",1===d.length)H=d[0].replace(/^#?([a-f0-9]{3,6})/ig,"$1"),S=g.length?"rgba("+Pa(H).join(",")+","+
152 0.01*c(g[0])+")":H.replace(/^#?([a-f0-9]{3,6})/ig,"#$1");else{b=0;for(D=d.length;b<D;b++)H=d[b].replace(/^#?([a-f0-9]{3,6})/ig,"$1"),isNaN(r[b])||(r[b]=c(r[b]),H+=":"+r[b],isNaN(r[b+1])||(r[b+1]=c(r[b+1])+r[b])),isNaN(g[b])||""===g[b]||(W=0.01*g[b]),d[b]="rgba("+Pa(H).join(",")+","+W+")",isNaN(r[b])||(d[b]=d[b]+":"+r[b]);S+=d.join("-");if(void 0!==p||void 0!==N||void 0!==t||h.radialGradient)S="xr("+[N,M,p,t,m,n].join()+")"+S;else{S="-"+S;if(void 0!==E||void 0!==s||void 0!==l||void 0!==w)S="("+[E,
153 s,l,w,n].join()+")"+S;void 0===e&&(e=0);S=360-c(e)%360+S}}return a[k]=S}}(),hb=function(){return function(){return""}}(),Ha=function(c){return c.replace(a,"").replace(b,"#")},La=function(c,b){b=(0>b||100<b?100:b)/100;c=c.replace(a,"");var h=parseInt(c,16),d=Math.floor(h/65536),r=Math.floor((h-65536*d)/256);return("000000"+(d*b<<16|r*b<<8|(h-65536*d-256*r)*b).toString(16)).slice(-6)},Oa=function(c,b){b=(0>b||100<b?100:b)/100;c=c.replace(a,"");var h=parseInt(c,16),d=Math.floor(h/65536),r=Math.floor((h-
154 65536*d)/256);return("000000"+(256-(256-d)*b<<16|256-(256-r)*b<<8|256-(256-(h-65536*d-256*r))*b).toString(16)).slice(-6)},Pa=function(a){a=parseInt(a,16);var c=Math.floor(a/65536),b=Math.floor((a-65536*c)/256);return[c,b,Math.floor(a-65536*c-256*b)]},qb=function(a,c){if("object"!==typeof a)return"";a.lineHeight||a["line-height"]?!a.lineHeight&&a["line-height"]&&(a.lineHeight=a["line-height"],delete a["line-height"]):(!a.fontSize&&a["font-size"]&&(a.fontSize=a["font-size"],delete a["font-size"]),a.lineHeight=
155 (parseFloat(a.fontSize)||c||10)*p.lineHeightFactor+"px");return a.lineHeight},sb=function(){var a={top:{align:"center",verticalAlign:"top",textAlign:"center"},right:{align:"right",verticalAlign:"middle",textAlign:"left"},bottom:{align:"center",verticalAlign:"bottom",textAlign:"center"},left:{align:"left",verticalAlign:"middle",textAlign:"right"}},c=/([^\,^\s]+)\)$/g,b=function(a,c){var b;/^(bar|bar3d)$/.test(a)&&(this.isBar=!0,this.yPos="bottom",this.yOppPos="top",this.xPos="left",this.xOppPos="right");
156 b=parseInt(c.labelstep,10);this.labelStep=1<b?b:1;this.showLabel=na(c.showlabels,c.shownames,1);this.is3D=/3d$/.test(a)};b.prototype={isBar:!1,yPos:"left",yOppPos:"right",xPos:"bottom",xOppPos:"top",addAxisGridLine:function(b,h,d,r,e,g,p,t){var U=""===d?!1:!0,m=0<r||0<g.match(c)[1]?!0:!1,N;if(U||m)m||(g="rgba(0,0,0,0)",r=0.1),N={isGrid:!0,width:r,dashStyle:e,color:g,value:h,zIndex:void 0===p?2:p},U&&(h=b.opposite?t?this.xOppPos:this.yOppPos:t?this.xPos:this.yPos,h=a[h],N.label={text:d,style:b.labels.style,
157 textAlign:h.textAlign,align:h.align,verticalAlign:h.verticalAlign,rotation:0,x:0,y:0}),b.plotLines.push(N);return N},addAxisAltGrid:function(a,c){if(!this.is3D){var b=na(a._lastValue,a.min),z=Y(a._altGrid,!1);z&&a.plotBands.push({isGrid:!0,color:a.alternateGridColor,to:c,from:b,zIndex:1});a._lastValue=c;a._altGrid=!z}},addXaxisCat:function(c,b,h,d){var r=a[c.opposite?this.xOppPos:this.xPos];b={isGrid:!0,width:0.1,color:"rgba(0,0,0,0)",value:b,label:{text:d,style:c.labels.style,textAlign:r.textAlign,
158 align:r.align,verticalAlign:r.verticalAlign,rotation:0,x:0,y:0}};0!==h%this.labelStep&&(b.stepped=!0,b.label.style=c.steppedLabels.style);c.plotLines.push(b)},addVline:function(a,c,b,z){z=z._FCconf;var h=z.isBar,d=z.divlineStyle,r=Z(c.label),e=Boolean(na(c.showlabelborder,z.showVLineLabelBorder,1)),g=Boolean(na(c.showlabelbackground,1)),p=Y(c.labelhalign,h?"left":"center"),V=Y(c.labelvalign,h?"middle":"bottom").toLowerCase(),t=na(c.labelposition,0),U=na(c.lineposition,0.5),m=na(c.showvlines,z.showVLines,
159 1),N=na(c.alpha,z.vLineAlpha,80),M=Y(c.color,z.vLineColor).replace(/^#?/,"#"),n=g?Y(c.labelbgcolor,z.vLineLabelBgColor,"333333").replace(/^#?/,"#"):"",E=Y(c.labelcolor,z.vLineLabelColor,c.color,z.vLineColor).replace(/^#?/,"#"),s=na(c.thickness,z.vLineThickness,1),l=0.5*s,w=Boolean(Number(Y(c.dashed,0))),W=na(c.dashlen,5),S=na(c.dashgap,2),D=z.smartLabel,H=parseInt(d.fontSize,10)+2,q=0,u=na(c.rotatelabel,z.rotateVLineLabels)?270:0,U=0>U||1<U?0.5:U,t=0>t||1<t?0:t;D.setStyle(d);D=D.getOriSize(r);M=la(M,
160 m?N:"0");if(h){switch(V){case "top":H-=D.height+l+2;break;case "middle":H-=0.5*D.height+1;break;default:H+=l}c.labelhalign||(q-=D.width*t)}else{switch(V){case "top":H=0.5*-D.height+1;break;case "middle":H=0;break;default:H=0.5*D.height}switch(p){case "left":q+=s;break;case "right":q-=s+1}}a.plotLines.push({isVline:!0,color:M,width:s,value:b-1+U,zIndex:na(c.showontop,z.showVLinesOnTop)?5:3,dashStyle:w?jb(W,S,s):void 0,label:{text:r,align:h?"left":"center",offsetScale:t,rotation:u,y:H,x:q,textAlign:p,
161 backgroundColor:n,borderWidth:m&&e?"1px":"",borderType:m&&e?"solid":"",borderColor:m&&e?E:"",backgroundOpacity:m&&g?Y(c.labelbgalpha,z.vLineLabelBgAlpha)/100:0,style:{color:m?E:M,fontSize:d.fontSize,fontFamily:d.fontFamily,lineHeight:d.lineHeight,backgroundColor:n}}})}};return b.prototype.constructor=b}(),tb=function(){var a=function(a,b,z,h,d){a=Math.abs(b-a);b=a/(z+1);c(a,z,h)||(d&&Number(b)/Number(h)<(1<h?2:0.5)&&(h/=10),b=(Math.floor(b/h)+1)*h,a=b*(z+1));return a},c=function(a,c,z){return b(a/
162 (c+1))>b(z)?!1:!0},b=function(a){a=Math.abs(a);a=String(a);var c=0,b=a.indexOf(".");-1!=b&&(c=a.length-b-1);return c};return function(b,h,d,r,e,p,t,U){var m,N,M,n,E,s,l;b=!0===isNaN(b)||void 0===b?0.1:b;h=!0===isNaN(h)||void 0===h?0:h;b===h&&0===b&&(b=0.1);e=void 0===typeof e?!0:e;p=void 0===typeof p?!0:p;m=Math.floor(Math.log(Math.abs(b))/Math.LN10);N=Math.floor(Math.log(Math.abs(h))/Math.LN10);N=Math.max(N,m);m=Math.pow(10,N);2>Math.abs(b)/m&&2>Math.abs(h)/m&&(N--,m=Math.pow(10,N));N=Math.floor(Math.log(b-
163 h)/Math.LN10);N=Math.pow(10,N);0<b-h&&10<=m/N&&(m=N);N=(Math.floor(b/m)+1)*m;0>h?M=-1*(Math.floor(Math.abs(h/m))+1)*m:p?M=0:(M=Math.floor(Math.abs(h/m)-1)*m,M=0>M?0:M);e&&0>=b&&(N=0);e=d||0===d?!0:!1;p=r||0===r?!0:!1;b=!1===e||!0===e&&Number(d)<b&&b-Number(d)>g?N:Number(d);h=!1===p||!0===p&&Number(r)>h&&Number(r)-h>g?M:Number(r);r=Math.abs(b-h);if(!1===p&&!1===e&&U)if(0<b&&0>h)for(U=!1,d=10<m?m/10:m,n=a(h,b,t,d,!1),e=n-(t+1)*d;!1===U;){if(e+=(t+1)*d,c(e,t,d))if(n=e-r,p=e/(t+1),M=Math.min(Math.abs(h),
164 b),N=M==Math.abs(h)?-1:1,0===t)U=!0;else for(s=1;s<=Math.floor((t+1)/2);s++)E=p*s,!(E-M>n)&&E>M&&(l=e-E,l/p==Math.floor(l/p)&&E/p==Math.floor(E/p)&&(r=e,b=-1==N?l:E,h=-1==N?-E:-l,U=!0))}else U=a(h,b,t,m,!0),n=U-r,r=U,0<b?b+=n:h-=n;else if(U&&0<t){U=0;for(d=1;;){n=t+U*d;n=0===n?1:n;if(c(r,n,m))break;U=-1==d||U>t?++U:U;if(25<U){n=0;break}d=U<=t?-1*d:1}t=n}return{Max:b,Min:h,Range:r,interval:m,divGap:(b-h)/(t+1)}}}(),xb=function(){var a=function(a,c,b){b=b.jsVars&&b.jsVars.smartLabel;var z=a.offsetWidth;
165 a=a.offsetHeight;this.title.y=a/2;this.title.x=z/2;void 0!==c&&(b?(qb(this.title.style),b.setStyle(this.title.style),c=b.getSmartText(Z(c),z,a),this.title.text=c.text):this.title.text=Z(c),this.title.verticalAlign="middle")};a.prototype={chart:{events:{},margin:[0,0,0,0],backgroundColor:{FCcolor:{alpha:0}}},credits:{href:R,text:"FusionCharts XT Trial",enabled:m},legend:{enabled:!1},title:{text:"",style:{fontFamily:"Verdana,sans",fontSize:"10px",color:"#666666"}},plotOptions:{series:{}},series:[{}],
166 exporting:{enabled:!1},nativeMessage:!0};return a.prototype.constructor=a}(),kb={"true":{"true":{"true":"center","false":"center"},"false":{"true":"center","false":"center"}},"false":{"true":{"true":"right","false":"left"},"false":{"true":"left","false":"right"}}},eb=function(){return function(a,c,h,d,r,e,g){var p,t=h.trendStyle,m,N,M,n,s,l,w,W,S,D,H,k,ca,ia=e?"xAxis":"dataLabels";if(e?h.showVLines:h.showTrendlines)for(p=0,N=a.length;p<N;p+=1)if((ca=a[p])&&ca.line)for(m=0,M=ca.line.length;m<M;m+=
167 1)n=ca.line[m],D=h.numberFormatter.getCleanValue(Y(n.startvalue,n.value,0)),H=h.numberFormatter.getCleanValue(Y(n.endvalue,Y(n.startvalue,n.value,0))),e?W=c:d&&n.parentyaxis&&/^s$/i.test(n.parentyaxis)?(W=c[1],k=1):W=c[0],l=W.max,w=W.min,s=!1,l>=D&&l>=H&&w<=D&&w<=H&&(d&&n.parentyaxis&&/^s$/i.test(n.parentyaxis)?s="1"!==Y(n.valueonleft,h.trendlineValuesOnOpp):d||(s="1"===Y(n.valueonright,h.trendlineValuesOnOpp)),l=Boolean(na(n.istrendzone,e?1:0)),(w=(e?h.showVLineLabels:h.showTrendlineLabels)?Z(Y(n.displayvalue,
168 h.numberFormatter[ia](s?H:D,k))):"")?(S=D<H,s={text:w,textAlign:r?"center":s?"left":"right",align:r?kb[l][!g][S]:s?"right":"left",verticalAlign:r?"bottom":"middle",rotation:0,x:0,y:0,style:t},w=Y(n.color,h.trendlineColor),n.alwaysVisible=l,w&&(s.style=ua({},t),s.style.color=w.replace(b,"#"))):s=void 0,w=ya(Z(Y(n.tooltext,ca.tooltext,h.trendLineToolText))),w=E(w,[7,15,16,17,18,19],{startValue:D,startDataValue:h.numberFormatter[ia](D,k),endValue:H,endDataValue:h.numberFormatter[ia](H,k),axisName:W.title&&
169 W.title.text},n),S=na(n.thickness,h.trendlineThickness,1),l?W.plotBands.push({isTrend:!0,color:la(Y(n.color,h.trendlineColor),Y(n.alpha,h.trendlineAlpha,40)),from:D,to:H,label:s,zIndex:h.is3d||"1"!==Y(n.showontop,h.showTrendlinesOnTop)?3:5,tooltext:w,alwaysVisible:n.alwaysVisible}):W.plotLines.push({isTrend:!0,color:la(Y(n.color,h.trendlineColor,h.trendlineColor),Y(n.alpha,h.trendlineAlpha,99)),value:D,to:H,width:S,dashStyle:"1"==Y(n.dashed,h.trendlinesAreDashed)?jb(na(n.dashlen,h.trendlinesDashLen),
170 na(n.dashgap,h.trendlinesDashGap),S):void 0,label:s,zIndex:h.is3d||"1"!==Y(n.showontop,h.showTrendlinesOnTop)?3:5,tooltext:w}))}}(),jb=function(a,c,b,h){return h||void 0===h?[a,c]:""},lb=function(){},r=function(a,c,b){var h,d=r[a];d||(d=function(){},d.prototype=b instanceof lb?b:new lb,d.prototype.constructor=d,d=r[a]=new d);b&&(d.base=b);d.name=a;for(h in c)switch(typeof c[h]){case "object":if(c[h]instanceof lb){d[h]=c[h][h];break}default:d[h]=c[h];break;case "undefined":delete d[h]}return this instanceof
171 r?(a=function(){},a.prototype=d,a.prototype.constructor=a,new a):d},E=function(){var a=[{regex:/((^|[^\\])((\\)\\)*\$cleanvalue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$cleanvalue))/ig,argIndex:2,argKey:"cleanvalue"},{regex:/((^|[^\\])((\\)\\)*\$datavalue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$datavalue))/ig,argIndex:2,argKey:"formattedValue"},{regex:/((^|[^\\])((\\)\\)*\$value)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$value))/ig,argIndex:3,argKey:"value"},{regex:/((^|[^\\])((\\)\\)*\$label)/ig,
172 escapeRegex:/((^|[^\\])((\\)\\)*\\(\$label))/ig,argIndex:2,argKey:"label"},{regex:/((^|[^\\])((\\)\\)*\$seriesname)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$seriesname))/ig,argIndex:5,argKey:"seriesname"},{regex:/((^|[^\\])((\\)\\)*\$yaxisname)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$yaxisname))/ig,argIndex:2,argKey:"yaxisName"},{regex:/((^|[^\\])((\\)\\)*\$xaxisname)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$xaxisname))/ig,argIndex:2,argKey:"xaxisName"},{regex:/((^|[^\\])((\\)\\)*\$displayvalue)/ig,
173 escapeRegex:/((^|[^\\])((\\)\\)*\\(\$displayvalue))/ig,argIndex:3,argKey:"displayvalue"},{regex:/((^|[^\\])((\\)\\)*\$xdatavalue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$xdatavalue))/ig,argIndex:2,argKey:"xDataValue"},{regex:/((^|[^\\])((\\)\\)*\$ydatavalue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$ydatavalue))/ig,argIndex:2,argKey:"yDataValue"},{regex:/((^|[^\\])((\\)\\)*\$xvalue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$xvalue))/ig,argIndex:3,argKey:"x"},{regex:/((^|[^\\])((\\)\\)*\$yvalue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$yvalue))/ig,
174 argIndex:3,argKey:"y"},{regex:/((^|[^\\])((\\)\\)*\$zvalue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$zvalue))/ig,argIndex:3,argKey:"z"},{regex:/((^|[^\\])((\\)\\)*\$name)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$name))/ig,argIndex:3,argKey:"name"},{regex:/((^|[^\\])((\\)\\)*\$percentValue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$percentValue))/ig,argIndex:2,argKey:"percentValue"},{regex:/((^|[^\\])((\\)\\)*\$startValue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$startValue))/ig,argIndex:2,argKey:"startValue"},
175 {regex:/((^|[^\\])((\\)\\)*\$startDataValue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$startDataValue))/ig,argIndex:2,argKey:"startDataValue"},{regex:/((^|[^\\])((\\)\\)*\$endValue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$endValue))/ig,argIndex:2,argKey:"endValue"},{regex:/((^|[^\\])((\\)\\)*\$endDataValue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$endDataValue))/ig,argIndex:2,argKey:"endDataValue"},{regex:/((^|[^\\])((\\)\\)*\$axisName)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$axisName))/ig,argIndex:2,
176 argKey:"axisName"},{regex:/((^|[^\\])((\\)\\)*\$cumulativevalue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$cumulativevalue))/ig,argIndex:2,argKey:"cumulativeValue"},{regex:/((^|[^\\])((\\)\\)*\$cumulativedatavalue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$cumulativedatavalue))/ig,argIndex:2,argKey:"cumulativeDataValue"},{regex:/((^|[^\\])((\\)\\)*\$cumulativePercentValue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$cumulativePercentValue))/ig,argIndex:2,argKey:"cumulativePercentValue"},{regex:/((^|[^\\])((\\)\\)*\$cumulativepercentdatavalue)/ig,
177 escapeRegex:/((^|[^\\])((\\)\\)*\\(\$cumulativepercentdatavalue))/ig,argIndex:2,argKey:"cumulativePercentDataValue"},{regex:/((^|[^\\])((\\)\\)*\$sum)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$sum))/ig,argIndex:2,argKey:"sum"},{regex:/((^|[^\\])((\\)\\)*\$unformattedsum)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$unformattedsum))/ig,argIndex:2,argKey:"unformattedSum"},{regex:/((^|[^\\])((\\)\\)*\$targetvalue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$targetvalue))/ig,argIndex:2,argKey:"targetValue"},{regex:/((^|[^\\])((\\)\\)*\$targetdatavalue)/ig,
178 escapeRegex:/((^|[^\\])((\\)\\)*\\(\$targetdatavalue))/ig,argIndex:2,argKey:"targetDataValue"},{regex:/((^|[^\\])((\\)\\)*\$processname)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$processname))/ig,argIndex:2,argKey:"processName"},{regex:/((^|[^\\])((\\)\\)*\$start)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$start))/ig,argIndex:2,argKey:"start"},{regex:/((^|[^\\])((\\)\\)*\$end)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$end))/ig,argIndex:2,argKey:"end"},{regex:/((^|[^\\])((\\)\\)*\$percentcomplete)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$percentcomplete))/ig,
179 argIndex:2,argKey:"percentComplete"},{regex:/((^|[^\\])((\\)\\)*\$taskpercentcomplete)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$taskpercentcomplete))/ig,argIndex:2,argKey:"taskPercentComplete"},{regex:/((^|[^\\])((\\)\\)*\$taskstartdate)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$taskstartdate))/ig,argIndex:2,argKey:"taskStartDate"},{regex:/((^|[^\\])((\\)\\)*\$taskenddate)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$taskenddate))/ig,argIndex:2,argKey:"taskEndDate"},{regex:/((^|[^\\])((\\)\\)*\$tasklabel)/ig,
180 escapeRegex:/((^|[^\\])((\\)\\)*\\(\$tasklabel))/ig,argIndex:2,argKey:"taskLabel"},{regex:/((^|[^\\])((\\)\\)*\$date)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$date))/ig,argIndex:2,argKey:"date"},{regex:/((^|[^\\])((\\)\\)*\$percentofprevvalue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$percentofprevvalue))/ig,argIndex:2,argKey:"percentOfPrevValue"},{regex:/((^|[^\\])((\\)\\)*\$sname)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$sname))/ig,argIndex:2,argKey:"sName"},{regex:/((^|[^\\])((\\)\\)*\$lname)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$lname))/ig,
181 argIndex:2,argKey:"lName"},{regex:/((^|[^\\])((\\)\\)*\$fromid)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$fromid))/ig,argIndex:2,argKey:"fromId"},{regex:/((^|[^\\])((\\)\\)*\$fromlabel)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$fromlabel))/ig,argIndex:2,argKey:"fromLabel"},{regex:/((^|[^\\])((\\)\\)*\$toid)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$toid))/ig,argIndex:2,argKey:"toId"},{regex:/((^|[^\\])((\\)\\)*\$tolabel)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$tolabel))/ig,argIndex:2,argKey:"toLabel"},
182 {regex:/((^|[^\\])((\\)\\)*\$fromxvalue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$fromxvalue))/ig,argIndex:2,argKey:"fromXValue"},{regex:/((^|[^\\])((\\)\\)*\$fromyvalue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$fromyvalue))/ig,argIndex:2,argKey:"fromYValue"},{regex:/((^|[^\\])((\\)\\)*\$fromxdatavalue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$fromxdatavalue))/ig,argIndex:2,argKey:"fromXDataValue"},{regex:/((^|[^\\])((\\)\\)*\$fromydatavalue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$fromydatavalue))/ig,
183 argIndex:2,argKey:"fromYDataValue"},{regex:/((^|[^\\])((\\)\\)*\$fromlabel)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$fromlabel))/ig,argIndex:2,argKey:"fromLabel"},{regex:/((^|[^\\])((\\)\\)*\$toxvalue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$toxvalue))/ig,argIndex:2,argKey:"toXValue"},{regex:/((^|[^\\])((\\)\\)*\$toyvalue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$toyvalue))/ig,argIndex:2,argKey:"toYValue"},{regex:/((^|[^\\])((\\)\\)*\$toxdatavalue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$toxdatavalue))/ig,
184 argIndex:2,argKey:"toXDataValue"},{regex:/((^|[^\\])((\\)\\)*\$toydatavalue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$toydatavalue))/ig,argIndex:2,argKey:"toYDataValue"},{regex:/((^|[^\\])((\\)\\)*\$tolabel)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$tolabel))/ig,argIndex:2,argKey:"toLabel"},{regex:/((^|[^\\])((\\)\\)*\$openvalue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$openvalue))/ig,argIndex:2,argKey:"openValue"},{regex:/((^|[^\\])((\\)\\)*\$closevalue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$closevalue))/ig,
185 argIndex:2,argKey:"closeValue"},{regex:/((^|[^\\])((\\)\\)*\$highvalue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$highvalue))/ig,argIndex:2,argKey:"highValue"},{regex:/((^|[^\\])((\\)\\)*\$lowvalue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$lowvalue))/ig,argIndex:2,argKey:"lowValue"},{regex:/((^|[^\\])((\\)\\)*\$opendatavalue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$opendatavalue))/ig,argIndex:2,argKey:"openDataValue"},{regex:/((^|[^\\])((\\)\\)*\$closedatavalue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$closedatavalue))/ig,
186 argIndex:2,argKey:"closeDataValue"},{regex:/((^|[^\\])((\\)\\)*\$highdatavalue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$highdatavalue))/ig,argIndex:2,argKey:"highDataValue"},{regex:/((^|[^\\])((\\)\\)*\$lowdatavalue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$lowdatavalue))/ig,argIndex:2,argKey:"lowDataValue"},{regex:/((^|[^\\])((\\)\\)*\$maxvalue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$maxvalue))/ig,argIndex:2,argKey:"maxValue"},{regex:/((^|[^\\])((\\)\\)*\$maxdatavalue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$maxdatavalue))/ig,
187 argIndex:2,argKey:"maxDataValue"},{regex:/((^|[^\\])((\\)\\)*\$minvalue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$minvalue))/ig,argIndex:2,argKey:"minValue"},{regex:/((^|[^\\])((\\)\\)*\$mindatavalue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$mindatavalue))/ig,argIndex:2,argKey:"minDataValue"},{regex:/((^|[^\\])((\\)\\)*\$q1)/ig,argIndex:2,argKey:"Q1"},{regex:/((^|[^\\])((\\)\\)*\$unformattedQ1)/ig,argIndex:2,argKey:"unformattedQ1"},{regex:/((^|[^\\])((\\)\\)*\$q3)/ig,argIndex:2,argKey:"Q3"},{regex:/((^|[^\\])((\\)\\)*\$unformattedQ3)/ig,
188 argIndex:2,argKey:"unformattedQ3"},{regex:/((^|[^\\])((\\)\\)*\$median)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$median))/ig,argIndex:2,argKey:"median"},{regex:/((^|[^\\])((\\)\\)*\$unformattedMedian)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$unformattedMedian))/ig,argIndex:2,argKey:"unformattedMedian"},{regex:/((^|[^\\])((\\)\\)*\$SD)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$SD))/ig,argIndex:2,argKey:"SD"},{regex:/((^|[^\\])((\\)\\)*\$unformattedsd)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$unformattedsd))/ig,
189 argIndex:2,argKey:"unformattedsd"},{regex:/((^|[^\\])((\\)\\)*\$QD)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$QD))/ig,argIndex:2,argKey:"QD"},{regex:/((^|[^\\])((\\)\\)*\$unformattedQD)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$unformattedQD))/ig,argIndex:2,argKey:"unformattedQD"},{regex:/((^|[^\\])((\\)\\)*\$MD)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$MD))/ig,argIndex:2,argKey:"MD"},{regex:/((^|[^\\])((\\)\\)*\$unformattedMD)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$unformattedMD))/ig,argIndex:2,argKey:"unformattedMD"},
190 {regex:/((^|[^\\])((\\)\\)*\$mean)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$mean))/ig,argIndex:2,argKey:"mean"},{regex:/((^|[^\\])((\\)\\)*\$unformattedMean)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$unformattedMean))/ig,argIndex:2,argKey:"unformattedMean"},{regex:/((^|[^\\])((\\)\\)*\$unformattedMean)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$unformattedMean))/ig,argIndex:2,argKey:"unformattedMean"},{regex:/((^|[^\\])((\\)\\)*\$volumeValue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$volumeValue))/ig,argIndex:2,
191 argKey:"volumeValue"},{regex:/((^|[^\\])((\\)\\)*\$volumeDataValue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$volumeDataValue))/ig,argIndex:2,argKey:"volumeDataValue"},{regex:/((^|[^\\])((\\)\\)*\$fromXValue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$fromXValue))/ig,argIndex:2,argKey:"fromXValue"},{regex:/((^|[^\\])((\\)\\)*\$fromYValue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$fromYValue))/ig,argIndex:2,argKey:"fromYValue"},{regex:/((^|[^\\])((\\)\\)*\$fromXDataValue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$fromXDataValue))/ig,
192 argIndex:2,argKey:"fromXDataValue"},{regex:/((^|[^\\])((\\)\\)*\$fromYDataValue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$fromYDataValue))/ig,argIndex:2,argKey:"fromYDataValue"},{regex:/((^|[^\\])((\\)\\)*\$fromLabel)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$fromLabel))/ig,argIndex:2,argKey:"fromLabel"},{regex:/((^|[^\\])((\\)\\)*\$toXValue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$toXValue))/ig,argIndex:2,argKey:"toXValue"},{regex:/((^|[^\\])((\\)\\)*\$toYValue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$toYValue))/ig,
193 argIndex:2,argKey:"toYValue"},{regex:/((^|[^\\])((\\)\\)*\$toXDataValue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$toXDataValue))/ig,argIndex:2,argKey:"toXDataValue"},{regex:/((^|[^\\])((\\)\\)*\$toYDataValue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$toYDataValue))/ig,argIndex:2,argKey:"toYDataValue"},{regex:/((^|[^\\])((\\)\\)*\$tolabel)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$tolabel))/ig,argIndex:2,argKey:"toLabel"},{regex:/((^|[^\\])((\\)\\)*\$tlLabel)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$tlLabel))/ig,
194 argIndex:5,argKey:"tlLabel"},{regex:/((^|[^\\])((\\)\\)*\$trlabel)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$trlabel))/ig,argIndex:5,argKey:"trLabel"},{regex:/((^|[^\\])((\\)\\)*\$bllabel)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$bllabel))/ig,argIndex:5,argKey:"blLabel"},{regex:/((^|[^\\])((\\)\\)*\$brlabel)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$brlabel))/ig,argIndex:5,argKey:"brLabel"},{regex:/((^|[^\\])((\\)\\)*\$rowlabel)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$rowlabel))/ig,argIndex:5,argKey:"rowLabel"},
195 {regex:/((^|[^\\])((\\)\\)*\$columnlabel)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$columnlabel))/ig,argIndex:5,argKey:"columnLabel"},{regex:/((^|[^\\])((\\)\\)*\$errorvalue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$errorvalue))/ig,argIndex:2,argKey:"errorValue"},{regex:/((^|[^\\])((\\)\\)*\$errordatavalue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$errordatavalue))/ig,argIndex:2,argKey:"errorDataValue"},{regex:/((^|[^\\])((\\)\\)*\$errorpercentvalue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$errorpercentvalue))/ig,
196 argIndex:2,argKey:"errorPercentValue"},{regex:/((^|[^\\])((\\)\\)*\$errorpercentdatavalue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$errorpercentdatavalue))/ig,argIndex:2,argKey:"errorPercentDataValue"},{regex:/((^|[^\\])((\\)\\)*\$horizontalErrorValue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$horizontalErrorValue))/ig,argIndex:2,argKey:"horizontalErrorValue"},{regex:/((^|[^\\])((\\)\\)*\$horizontalErrorDataValue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$horizontalErrorDataValue))/ig,argIndex:2,argKey:"horizontalErrorDataValue"},
197 {regex:/((^|[^\\])((\\)\\)*\$verticalErrorValue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$verticalErrorValue))/ig,argIndex:2,argKey:"verticalErrorValue"},{regex:/((^|[^\\])((\\)\\)*\$verticalErrorDataValue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$verticalErrorDataValue))/ig,argIndex:2,argKey:"verticalErrorDataValue"},{regex:/((^|[^\\])((\\)\\)*\$horizontalErrorPercent)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$horizontalErrorPercentValue))/ig,argIndex:2,argKey:"horizontalErrorPercentValue"},{regex:/((^|[^\\])((\\)\\)*\$horizontalErrorPercentDataValue)/ig,
198 escapeRegex:/((^|[^\\])((\\)\\)*\\(\$horizontalErrorPercentDataValue))/ig,argIndex:2,argKey:"horizontalErrorPercentDataValue"},{regex:/((^|[^\\])((\\)\\)*\$verticalErrorPercent)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$verticalErrorPercentValue))/ig,argIndex:2,argKey:"verticalErrorPercentValue"},{regex:/((^|[^\\])((\\)\\)*\$verticalErrorPercentDataValue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$verticalErrorPercentDataValue))/ig,argIndex:2,argKey:"verticalErrorPercentDataValue"},{regex:/((^|[^\\])((\\)\\)*\$xaxispercentvalue)/ig,
199 escapeRegex:/((^|[^\\])((\\)\\)*\\(\$xaxispercentvalue))/ig,argIndex:2,argKey:"xAxisPercentValue"},{regex:/((^|[^\\])((\\)\\)*\$percentdatavalue)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$percentdatavalue))/ig,argIndex:2,argKey:"percentDataValue"},{regex:/((^|[^\\])((\\)\\)*\$trType)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$trType))/ig,argIndex:4,argKey:"trtype"},{regex:/((^|[^\\])((\\)\\)*\$tlType)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$tlType))/ig,argIndex:4,argKey:"tltype"},{regex:/((^|[^\\])((\\)\\)*\$brType)/ig,
200 escapeRegex:/((^|[^\\])((\\)\\)*\\(\$brType))/ig,argIndex:4,argKey:"brtype"},{regex:/((^|[^\\])((\\)\\)*\$blType)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$blType))/ig,argIndex:4,argKey:"bltype"},{regex:/((^|[^\\])((\\)\\)*\$colorRangeLabel)/ig,escapeRegex:/((^|[^\\])((\\)\\)*\\(\$colorRangeLabel))/ig,argIndex:5,argKey:"colorRangeLabel"}],c=[],b,h=a.length;for(b=0;b<h;b+=1)c.push(b);return function(){var b=arguments[0],h=arguments[1],d,r,e,g,p;!h instanceof Array&&(h=c);if(b)for(p=h.length,g=0;g<p;g+=
201 1)if(e=a[h[g]])d=sa(ya((r=arguments[e.argIndex])&&r[e.argKey],"")+""),b=b.replace(e.regex,"$2$4"+(e.parsingMethod?e.parsingMethod(d):d)),b=b.replace(e.escapeRegex,"$2$4$5");return b}}();d.core._setLineHeightFactor=function(a){!(a=c(a))||0>a||(p.lineHeightFactor=a)};d.extend(p,{BLANKSTRINGPLACEHOLDER:"#BLANK#",BLANKSTRING:"",COLOR_BLACK:"000000",COLOR_GLASS:"rgba(255, 255, 255, 0.3)",COLOR_WHITE:"FFFFFF",COLOR_TRANSPARENT:"rgba(0,0,0,0)",HASHSTRING:"#",BREAKSTRING:"<br />",STRINGSTRING:"string",OBJECTSTRING:"object",
202 COMMASTRING:",",ZEROSTRING:"0",SAMPLESTRING:"Ay0",TESTSTR:"Ag",ONESTRING:"1",DECIMALSTRING:".",STRINGUNDEFINED:"undefined",POSITION_TOP:"top",POSITION_RIGHT:"right",POSITION_BOTTOM:"bottom",POSITION_LEFT:"left",POSITION_CENTER:"center",POSITION_MIDDLE:"middle",POSITION_START:"start",POSITION_END:"end",FC_CONFIG_STRING:"_FCconf",SHAPE_RECT:"rect",HUNDREDSTRING:"100",PXSTRING:"px",COMMASPACE:", ",TEXTANCHOR:"text-anchor",TOUCH_THRESHOLD_PIXELS:15,CLICK_THRESHOLD_PIXELS:5,regex:{stripWhitespace:K,dropHash:b,
203 startsRGBA:J,cleanColorCode:a,breakPlaceholder:D,hexcode:/^#?[0-9a-f]{6}/i},fireEvent:function(a,c,b,h){p.dem.fire(a,c,b,h)},plotEventHandler:function(a,c,b){c=c||{};var h=c.type,r=N(a.container,c),r=ua(r,this.data("eventArgs")),e=a.logic.fireGroupEvent,g=this.data("groupId"),t=function(a,b){c.FusionChartsPreventEvent=!0;l&&b.toolText&&p.toolTip&&p.toolTip.preventTooltip()};"index"in r&&!("dataIndex"in r)&&(r.dataIndex=r.index);"value"in r&&!("dataValue"in r)&&(r.dataValue=r.value);b=Y(b,"dataplotclick").toLowerCase();
204 "dataplotrollover"===b?(c.FusionChartsPreventEvent=!1,e?d.raiseEventGroup(g,b,r,a.fusionCharts,void 0,void 0,t):d.raiseEvent(b,r,a.logic.chartInstance,void 0,void 0,t)):e&&"dataplotclick"!==b?d.raiseEventGroup(g,b,r,a.fusionCharts):d.raiseEvent(b,r,a.logic.chartInstance);("click"===h||"mouseup"===h&&"dataplotclick"===b)&&a.linkClickFN.call({link:r.link},a)},getEventCoordinate:h,getMouseCoordinate:N,addEvent:xa,removeEvent:t,getTouchEvent:M,extend2:ua,deltend:function(a,c){if("object"!==typeof a||
205 "object"!==typeof c)return null;ea(a,c);return a},imprint:function(a,c,b){var h;if("object"!==typeof a||null===a)return c;if("object"!==typeof c||null===c)return a;for(h in c)if(void 0===a[h]||!b&&null===a[h])a[h]=c[h];return a},pluck:Y,pluckNumber:na,getFirstDefinedValue:function(){var a,c,b;c=0;for(b=arguments.length;c<b;c+=1)if((a=arguments[c])||!1===a||0===a||""==a)return a},createElement:function(a,c,b){a=B.createElement(a);for(var h in c)a.setAttribute(h,c[h]);b&&b.appendChild&&b.appendChild(a);
206 return a},hashify:W,pluckFontSize:function(){var a,c,b;c=0;for(b=arguments.length;c<b;c+=1)if(((a=arguments[c])||!1===a||0===a)&&!isNaN(a=Number(a)))return 1>a?1:a;return 1},getValidValue:ya,getPosition:fa,getViewPortDimension:I,bindSelectionEvent:function(a,c){c=c||{};var b=a.options.chart,h=a.container,d=b.zoomType,r=ua({},c.attr||{}),e=r["stroke-width"]=na(r.strokeWidth,r["stroke-width"],1),g=fa(h),p=a.eventListeners||(a.eventListeners=[]);c=ua({chart:a,zoomX:/x/.test(d),zoomY:/y/.test(d),canvasY:a.canvasTop,
207 canvasX:a.canvasLeft,canvasW:a.canvasWidth,canvasH:a.canvasHeight,canvasX2:a.canvasLeft+a.canvasWidth,canvasY2:a.canvasTop+a.canvasHeight,strokeWidth:e,chartPosLeft:g.left,chartPosTop:g.top,attr:r},c);r.stroke=ca(r.stroke,"rgba(51,153,255,0.8)");r.fill=ca(r.fill,"rgba(185,213,241,0.3)");r.ishot=!0;h&&(t(h,"pointerdrag",H),p.push(xa(h,"pointerdrag",H,c)));b.link&&(t(a.container,"mouseup mousedown",S),p.push(xa(a.container,"mouseup mousedown",S,c)))},createContextMenu:function(a){var c=a.chart,b=c.smartLabel,
208 h=c.logic.hcJSON&&c.logic.hcJSON.chart.useRoundEdges,d=p.Raphael,r=function(a){var c=a.menufillcolor&&W(a.menufillcolor),b=a.menulabelcolor&&W(a.menulabelcolor),h=a.menufillhovercolor&&W(a.menufillhovercolor);a=a.menulabelhovercolor&&W(a.menulabelhovercolor);return{attrs:{backgroundColor:c,color:b},hover:{backgroundColor:h,color:a}}}(c.definition.chart),e=function(a,c,b){c=c||{};a=(a=(a=a&&d.tintshade(a.color,0.7))&&d.getRGB(a))&&"rgb("+[a.r,a.g,a.b].join()+")";return{backgroundColor:c.backgroundHoverColor||
209 b.backgroundColor||a||"rgb(64, 64, 64)",color:c.hoverColor||b.color||"#FFFFFF"}}(a.basicStyle,a.hover,r.hover),g=function(a,c,b){c=ua({},c||{});c=ua(c,a);return{fontFamily:c.fontFamily||"Verdana,sans",fontSize:c.fontSize||"10px",color:c.color||b.color||"#000000",backgroundColor:c.backgroundColor||b.backgroundColor||"rgb(255, 255, 255)"}}(a.basicStyle,a.attrs,r.attrs),t={textAlign:"left",align:"left",paddingLeft:"5px",paddingRight:"5px",paddingTop:"5px",cursor:"pointer",borderWidth:"0px"},m=a.items,
210 N=a.position,n=a.verticalPadding||3,M=a.horizontalPadding||6,E={},s,w,S,D,H,k,ca,ia,Z,C,na,R,Y;if(c)s=fa(c.container);else return!1;D=function(){var a=E.items,c=a.length,u=0,A=0,G=0,f,d;E.menuItems||(E.menuItems=[]);for(b.setStyle(g);c--;)f=a[c],f=b.getOriSize(f.text),G||(G=f.height+2*n),u+=G,A=Q(A,f.width+2*M);E.height=u;E.width=A;E.itemH=G;this.style.width=A+"px";E.menuRect||(u=E.menuRect=B.createElement("div"),u.style.border="1px solid rgb(100, 100, 100)",h&&(u.style.mozBorderRadius="4px",u.style.webkitBorderRadius=
211 "4px",u.style.borderRadius="4px",u.style.overflow="hidden"),l&&!v?u.style.filter="progid:DXImageTransform.Microsoft.Shadow(Color=#999999,direction=135,strength=3)":(u.style.mozBoxShadow="3px 3px 3px #999",u.style.webkitBoxShadow="3px 3px 3px #999",u.style.boxShadow="3px 3px 3px #999"),this.appendChild(u));A=a.length;for(c=0;c<A;c+=1)if(f=a[c],E.menuItems[c])E.menuItems[c].label.innerHTML=f.text;else{E.menuItems[c]={};u=E.menuItems[c].box=B.createElement("div");u.style.height=G+"px";u.style.lineHeight=
212 G+"px";for(d in t)u.style[d]=t[d];for(d in g)u.style[d]=g[d];E.menuRect.appendChild(u);u.innerHTML=f.text;p.dem.listen(u,"click",Y);p.dem.listen(u,"pointerhover",C);E.menuItems[c].box._itemIdx=c}for(;E.menuItems[c];)E.menuItems[c].box.parentNode.removeChild(E.menuItems[c].box),E.menuItems.splice(c,1)};H=function(){S||(S=B.createElement("div"),S.style.position="absolute",S.style.zIndex="50",S.style.display="none",c.container.appendChild&&c.container.appendChild(S));return S};k=function(){w=setTimeout(E.hide,
213 800)};ca=function(){w&&clearTimeout(w)};ia=function(a){var b=a.x;a=a.y;var u={x:b,y:a},h=E.width,G=E.height,f=c.chartHeight;b+h>c.chartWidth&&0<b-h&&(u.x-=h);a+G>f&&0<a-G&&(u.y-=G);return u};Z=function(){E.hide()};C=function(a){a.target&&a.target.parentNode&&("start"===a.state?na:R).call(a.target)};na=function(){var a=E.menuItems[this._itemIdx],c;ca();for(c in e)a.box.style[c]=e[c]};R=function(){var a=E.menuItems[this._itemIdx],c;for(c in g)a.box.style[c]=g[c];k()};Y=function(a){var c=E.items[this._itemIdx];
214 c.onclick&&c.onclick.call(c,a);a.originalEvent.stopPropagation?a.originalEvent.stopPropagation():a.originalEvent.cancelBubble=!0;E.hide()};E.showItem=function(a){a=this.menuItems[a];var c=this.height,b=this.itemH;a&&a._isHidden&&(a.box.style.display="",this.height=c+b,a._isHidden=!1,a=ia(N),this.left=a.x,this.top=a.y)};E.hideItem=function(a){a=this.menuItems[a];var c=this.height,b=this.itemH;a&&!a._isHidden&&(a.box.style.display="none",this.height=c-b,a._isHidden=!0,a=ia(N),this.left=a.x,this.top=
215 a.y)};E.redraw=function(){var a=this.menuContainer;this.items=m;a?D.call(this.menuContainer):N&&void 0!==N.x&&void 0!==N.y?(this.menuContainer=H(),D.call(this.menuContainer),a=ia(N),this.left=a.x,this.top=a.y,this.menuContainer.style.left=this.left+"px",this.menuContainer.style.top=this.top+"px"):(this.menuContainer=H(),D.call(this.menuContainer))};E.show=function(a){var c=this;a&&void 0!==a.x&&void 0!==a.y?(a=ia(a),c.menuContainer.style.left=a.x+"px",c.menuContainer.style.top=a.y+"px"):(c.menuContainer.style.left=
216 c.left+"px",c.menuContainer.style.top=c.top+"px");c.menuContainer.style.display="";setTimeout(function(){c.visible=!0;d.click(Z)},400)};E.hide=function(){this.visible&&(this.visible=!1,E.menuContainer.style.display="none",E.menuContainer.style.left=-E.width+"px",E.menuContainer.style.top=-E.height+"px",d.unclick(Z))};E.update=function(a){a&&a.length&&(this.items=a,this.redraw())};E.updatePosition=function(a){var b=s.left,u=s.top;s=fa(c.container);a?(N=a,a=ia(a),this.left=a.x,this.top=a.y):(this.left-=
217 b-s.left,this.top-=u-s.top)};E.add=function(a){var c=this.menuItems,u=c.length,h;b.setStyle(g);this.width=Q(this.width,b.getOriSize(a.text).width);c[u]={};c=c[u].box=B.createElement("div");c.style.height=this.itemH+"px";c.style.lineHeight=this.itemH+"px";for(h in t)c.style[h]=t[h];for(h in g)c.style[h]=g[h];E.menuRect.appendChild(c);c.innerHTML=a.text;p.dem.listen(c,"click",Y);p.dem.listen(c,"pointerhover",C);E.menuItems[u].box._itemIdx=u;this.height+=this.itemH};E.removeItems=function(){for(var a=
218 this.menuItems,c=a&&a.length,b;c--;)b=a[c],p.dem.unlisten(b.box,"click",Y),p.dem.unlisten(b.box,"pointerhover",C),b.box&&b.box.parentNode&&b.box.parentNode.removeChild(b.box);delete this.menuItems;delete this.items};E.setPosition=function(a){void 0!==a.x&&void 0!==a.y&&(this.menuContainer.style.x=a.x,this.menuContainer.style.y=a.y)};E.destroy=function(){this.removeItems();this.menuContainer.parentNode.removeChild(this.menuContainer)};m&&m.length&&(E.redraw(),E.hide());return E},getDefinedColor:function(a,
219 c){return a||0===a||""===a?a:c},getFirstValue:ca,getFirstColor:function(a){a=a.split(",")[0];a=a.replace(K,"");""==a&&(a="000000");return a.replace(b,"#")},getColorCodeString:function(a,c){var b="",h,d,r=0,e=c.split(",");for(d=e.length;r<d;r+=1)h=e[r].split("-"),b=2===h.length?"-1"!==h[0].indexOf("dark")?b+(Oa(a,100-parseInt(h[1],10))+","):b+(La(a,100-parseInt(h[1],10))+","):b+(e[r]+",");return b.substring(0,b.length-1)},pluckColor:function(a){if(ya(a))return a=a.split(",")[0],a=a.replace(K,""),""==
220 a&&(a="000000"),a.replace(b,"#")},toRaphaelColor:za,gradientify:hb,trimString:function(a){a=a.replace(/^\s\s*/,"");for(var c=/\s/,b=a.length;c.test(a.charAt(b-=1)););return a.slice(0,b+1)},getFirstAlpha:function(a){a=parseInt(a,10);if(isNaN(a)||100<a||0>a)a=100;return a},parsePointValue:ia,parseUnsafeString:Z,parseTooltext:E,toPrecision:function(a,c){var b=w(10,c);return e(a*b)/b},hasTouch:s,CREDIT_HREF:R,CREDIT_STRING:"FusionCharts XT Trial",getSentenceCase:function(a){a=a||"";return a.charAt(0).toUpperCase()+
221 a.substr(1)},getCrispValues:function(a,c,b){var h=b%2/2;b=e(a+h)-h;a=e(a+c+h)-h-b;return{position:b,distance:a}},regescape:function(a){return a&&a.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},regReplaceEscape:sa,isArray:Ga,stubFN:function(){},falseFN:function(){return!1},stableSort:function(a,c){var b=a.length,h;for(h=0;h<b;h++)a[h].ssI=h;a.sort(function(a,b){var h=c(a,b);return 0===h?a.ssI-b.ssI:h});for(h=0;h<b;h++)delete a[h].ssI},hasSVG:v,isIE:l,lineHeightFactor:1.2,getLinkAction:function(a,
222 c){var b=function(a){return a};return function(){var h=na((a.chart||a.map||{}).unescapelinks,1),r=ca(this.link,""),e=Y(r,this.options&&this.options.chart&&this.options.chart.link||"",this.series&&this.series.chart&&this.series.chart.options&&this.series.chart.options.chart&&this.series.chart.options.chart.link||""),g=e,p,t,m,N,E,n,M,s,l,w;void 0!==e&&(h&&(e=k.decodeURIComponent?k.decodeURIComponent(e):k.unescape(e)),e=e.replace(/^\s+/,"").replace(/\s+$/,""),-1!==e.search(/^[a-z]*\s*[\-\:]\s*/i)&&
223 (E=e.split(/\s*[\-\:]\s*/)[0].toLowerCase(),w=E.length),setTimeout(function(){switch(E){case "j":e=e.replace(/^j\s*\-/i,"j-");p=e.indexOf("-",2);-1===p?da(e.slice(2)):da(e.substr(2,p-2).replace(/\s/g,""),e.slice(p+1));break;case "javascript":aa(e.replace(/^javascript\s*\:/i,""));break;case "n":e.replace(/^n\s*\-/i,"n-");k.open(b(e.slice(2),h));break;case "f":e=e.replace(/^f\s*\-/i,"f-");p=e.indexOf("-",2);-1!==p?(t=e.substr(2,p-2))&&k.frames[t]?k.frames[t].location=b(e.slice(p+1),h):k.open(b(e.slice(p+
224 1),h),t):k.open(b(e.slice(2),h));break;case "p":e=e.replace(/p\s*\-/i,"p-");p=e.indexOf("-",2);m=e.indexOf(",",2);-1===p&&(p=1);N=b(e.slice(p+1),h);k.open(N,e.substr(2,m-2),e.substr(m+1,p-m-1)).focus();break;case "newchart":case "newmap":":"===e.charAt(w)&&(p=e.indexOf("-",w+1),l=e.substring(w+1,p),w=p);p=e.indexOf("-",w+1);n=e.substring(w+1,p).toLowerCase();switch(n){case "xmlurl":case "jsonurl":s=e.substring(p+1,e.length);break;case "xml":case "json":var r=M=e.substring(p+1,e.length),S={chart:{}},
225 W,r=r.toLowerCase();if(a.linkeddata)for(W=0;W<a.linkeddata.length;W+=1)a.linkeddata[W].id.toLowerCase()===r&&(S=a.linkeddata[W].linkedchart||a.linkeddata[W].linkedmap);s=S;n="json"}d.raiseEvent("linkedChartInvoked",{alias:l,linkType:n.toUpperCase(),data:s},c);break;default:k.location.href=e}d.raiseEvent("linkClicked",{linkProvided:g,linkInvoked:e,linkAction:E&&E.toLowerCase()},c)},0))}},graphics:{parseAlpha:ga,convertColor:la,getDarkColor:La,getLightColor:Oa,mapSymbolName:function(a,c){var b="circle";
226 a=ia(a);3<=a&&(b=(c?"spoke_":"poly_")+a);return b},getColumnColor:function(a,c,b,h,d,r,e,g,p){var t,m;t=a.split(",");m=c.split(",");r=r.split(",");e=e.split(",");a=a.replace(/\s/g,"").replace(/\,$/,"");p?g={FCcolor:{color:t[0],alpha:m[0]}}:d?(a=t[0],m=m[0],g={FCcolor:{color:La(a,75)+","+Oa(a,10)+","+La(a,90)+","+Oa(a,55)+","+La(a,80),alpha:m+","+m+","+m+","+m+","+m,ratio:"0,11,14,57,18",angle:g?"90":"0"}},r=[La(a,70)]):(c=ga(c,t.length),g={FCcolor:{color:a,alpha:c,ratio:b,angle:g?-h:h}});return[g,
227 {FCcolor:{color:r[0],alpha:e[0]}}]},getAngle:function(a,c,b){a=180*Math.atan(c/a)/Math.PI;2==b?a=180-a:3==b?a+=180:4==b&&(a=360-a);return a},parseColor:Ha,getValidColor:function(a){return F.test(Ha(a))&&a},HSBtoRGB:function(a){var c=a[0],b=0,h=0,d=0,r=[],r=a[1]/100;a=a[2]/100;var g=c/60-Math.floor(c/60),p=a*(1-r),t=a*(1-g*r),r=a*(1-(1-g)*r);switch(Math.floor(c/60)%6){case 0:b=a;h=r;d=p;break;case 1:b=t;h=a;d=p;break;case 2:b=p;h=a;d=r;break;case 3:b=p;h=t;d=a;break;case 4:b=r;h=p;d=a;break;case 5:b=
228 a,h=p,d=t}return r=[e(255*b),e(255*h),e(255*d)]},RGBtoHSB:function(a){var c=a[0],b=a[1];a=a[2];var h=Math.max(Math.max(c,b),a),d=Math.min(Math.min(c,b),a),r=0,g=0;h==d?r=0:h==c?r=(60*(b-a)/(h-d)+360)%360:h==b?r=60*(a-c)/(h-d)+120:h==a&&(r=60*(c-b)/(h-d)+240);g=0===h?0:(h-d)/h;return[e(r),e(100*g),e(h/255*100)]},RGBtoHex:function(a){return("000000"+(a[0]<<16|a[1]<<8|a[2]).toString(16)).slice(-6)},HEXtoRGB:Pa},setImageDisplayMode:function(a,c,b,h,d,r,e,g){var p=h/100*g.width;h=h/100*g.height;g={};var t,
229 m=r-2*d;t=e-2*d;var E=function(a,c,b,h,r,e){var g={};switch(a){case "top":g.y=d;break;case "bottom":g.y=e-h-d;break;case "middle":g.y=(e-h)/2}switch(c){case "left":g.x=d;break;case "right":g.x=r-b-d;break;case "middle":g.x=(r-b)/2}return g};switch(a){case "center":g.width=p;g.height=h;g.y=e/2-h/2;g.x=r/2-p/2;break;case "stretch":g.width=r-2*d;g.height=e-2*d;g.y=d;g.x=d;break;case "tile":g.width=p;g.height=h;g.tileInfo={};g.tileInfo.xCount=a=Math.ceil(m/p);g.tileInfo.yCount=t=Math.ceil(t/h);c=E(c,
230 b,p*a,h*t,r,e);g.y=c.y;g.x=c.x;break;case "fit":a=p/h>m/t?m/p:t/h;g.width=p*a;g.height=h*a;c=E(c,b,g.width,g.height,r,e);g.y=c.y;g.x=c.x;break;case "fill":a=p/h>m/t?t/h:m/p;g.width=p*a;g.height=h*a;c=E(c,b,g.width,g.height,r,e);g.y=c.y;g.x=c.x;break;default:c=E(c,b,p,h,r,e),g.width=p,g.height=h,g.y=c.y,g.x=c.x}return g},setLineHeight:qb,supportedStyle:{font:"font",fontFamily:"font-family","font-family":"font-family",fontWeight:"font-weight","font-weight":"font-weight",fontSize:"font-size","font-size":"font-size",
231 lineHeight:"line-height","line-height":"line-height",textDecoration:"text-decoration","text-decoration":"text-decoration",color:"color",whiteSpace:"white-space","white-space":"white-space",padding:"padding",margin:"margin",background:"background",backgroundColor:"background-color","background-color":"background-color",backgroundImage:"background-image","background-image":"background-image",backgroundPosition:"background-position","background-position":"background-position",backgroundPositionLeft:"background-position-left",
232 "background-position-left":"background-position-left",backgroundPositionTop:"background-position-top","background-position-top":"background-position-top",backgroundRepeat:"background-repeat","background-repeat":"background-repeat",border:"border",borderColor:"border-color","border-color":"border-color",borderStyle:"border-style","border-style":"border-style",borderThickness:"border-thickness","border-thickness":"border-thickness",borderTop:"border-top","border-top":"border-top",borderTopColor:"border-top-color",
233 "border-top-color":"border-top-color",borderTopStyle:"border-top-style","border-top-style":"border-top-style",borderTopThickness:"border-top-thickness","border-top-thickness":"border-top-thickness",borderRight:"border-right","border-right":"border-right",borderRightColor:"border-right-color","border-right-color":"border-right-color",borderRightStyle:"border-right-style","border-right-style":"border-right-style",borderRightThickness:"border-right-thickness","border-right-thickness":"border-right-thickness",
234 borderBottom:"border-bottom","border-bottom":"border-bottom",borderBottomColor:"border-bottom-color","border-bottom-color":"border-bottom-color",borderBottomStyle:"border-bottom-style","border-bottom-style":"border-bottom-style",borderBottomThickness:"border-bottom-thickness","border-bottom-thickness":"border-bottom-thickness",borderLeft:"border-left","border-left":"border-left",borderLeftColor:"border-left-color","border-left-color":"border-left-color",borderLeftStyle:"border-left-style","border-left-Style":"border-left-style",
235 borderLeftThickness:"border-left-thickness","border-left-thickness":"border-left-thickness"},getAxisLimits:tb,createTrendLine:eb,getDashStyle:jb,axisLabelAdder:sb,chartAPI:r,createDialog:xb})}]);
236 window.FusionCharts&&window.FusionCharts.register("module",["private","vendor.redraphael",function(){var d=this.hcLib,k=window.Raphael,B;(function(){(function(d){var l=/[\.\/]/,c=function(){},k=function(a,c){return a-c},b,J,a={n:{}},D=function(a,c){a=String(a);var d=J,e=Array.prototype.slice.call(arguments,2),g=D.listeners(a),n=0,s,l=[],m={},v=[],B=b;b=a;for(var X=J=0,$=g.length;X<$;X++)"zIndex"in g[X]&&(l.push(g[X].zIndex),0>g[X].zIndex&&(m[g[X].zIndex]=g[X]));for(l.sort(k);0>l[n];)if(s=m[l[n++]],
237 v.push(s.apply(c,e)),J)return J=d,v;for(X=0;X<$;X++)if(s=g[X],"zIndex"in s)if(s.zIndex==l[n]){v.push(s.apply(c,e));if(J)break;do if(n++,(s=m[l[n]])&&v.push(s.apply(c,e)),J)break;while(s)}else m[s.zIndex]=s;else if(v.push(s.apply(c,e)),J)break;J=d;b=B;return v.length?v:null};D._events=a;D.listeners=function(c){c=c.split(l);var b=a,d,e,g,n,s,D,m,k=[b],v=[];g=0;for(n=c.length;g<n;g++){m=[];s=0;for(D=k.length;s<D;s++)for(b=k[s].n,d=[b[c[g]],b["*"]],e=2;e--;)if(b=d[e])m.push(b),v=v.concat(b.f||[]);k=m}return v};
238 D.on=function(b,d){b=String(b);if("function"!=typeof d)return function(){};for(var w=b.split(l),e=a,g=0,n=w.length;g<n;g++)e=e.n,e=e.hasOwnProperty(w[g])&&e[w[g]]||(e[w[g]]={n:{}});e.f=e.f||[];g=0;for(n=e.f.length;g<n;g++)if(e.f[g]==d)return c;e.f.push(d);return function(a){+a==+a&&(d.zIndex=+a)}};D.f=function(a){var c=[].slice.call(arguments,1);return function(){D.apply(null,[a,null].concat(c).concat([].slice.call(arguments,0)))}};D.stop=function(){J=1};D.nt=function(a){return a?RegExp("(?:\\.|\\/|^)"+
239 a+"(?:\\.|\\/|$)").test(b):b};D.nts=function(){return b.split(l)};D.off=D.unbind=function(c,b){if(c){var d=c.split(l),e,g,n,s,k,m,v=[a];s=0;for(k=d.length;s<k;s++)for(m=0;m<v.length;m+=n.length-2){n=[m,1];e=v[m].n;if("*"!=d[s])e[d[s]]&&n.push(e[d[s]]);else for(g in e)e.hasOwnProperty(g)&&n.push(e[g]);v.splice.apply(v,n)}s=0;for(k=v.length;s<k;s++)for(e=v[s];e.n;){if(b){if(e.f){m=0;for(d=e.f.length;m<d;m++)if(e.f[m]==b){e.f.splice(m,1);break}!e.f.length&&delete e.f}for(g in e.n)if(e.n.hasOwnProperty(g)&&
240 e.n[g].f){n=e.n[g].f;m=0;for(d=n.length;m<d;m++)if(n[m]==b){n.splice(m,1);break}!n.length&&delete e.n[g].f}}else for(g in delete e.f,e.n)e.n.hasOwnProperty(g)&&e.n[g].f&&delete e.n[g].f;e=e.n}}else D._events=a={n:{}}};D.once=function(a,c){var b=function(){D.unbind(a,b);return c.apply(this,arguments)};return D.on(a,b)};D.version="0.4.2";D.toString=function(){return"You are running Eve 0.4.2"};"undefined"!=typeof module&&module.exports?module.exports=D:"undefined"!=typeof define?define("eve",[],function(){return D}):
241 d.eve=D})(this);(function(d,l){"function"===typeof define&&define.amd?define(["eve"],function(c){return l(d,c)}):l(d,d.eve)})(this,function(d,l){function c(a){var b,f;c._url="";if(c.is(a,"function"))return s?a():l.on("raphael.DOMload",a);if(c.is(a,$))return c._engine.create[I](c,a.splice(0,3+c.is(a[0],X))).add(a);b=Array.prototype.slice.call(arguments,0);return c.is(b[b.length-1],"function")?(f=b.pop(),s?f.call(c._engine.create[I](c,b)):l.on("raphael.DOMload",function(){f.call(c._engine.create[I](c,
242 b))})):c._engine.create[I](c,arguments)}function k(){return this.hex}function b(a,c){for(var b=[],f=0,q=a.length;q-2*!c>f;f+=2){var h=[{x:+a[f-2],y:+a[f-1]},{x:+a[f],y:+a[f+1]},{x:+a[f+2],y:+a[f+3]},{x:+a[f+4],y:+a[f+5]}];c?f?q-4==f?h[3]={x:+a[0],y:+a[1]}:q-2==f&&(h[2]={x:+a[0],y:+a[1]},h[3]={x:+a[2],y:+a[3]}):h[0]={x:+a[q-2],y:+a[q-1]}:q-4==f?h[3]=h[2]:f||(h[0]={x:+a[f],y:+a[f+1]});b.push(["C",(-h[0].x+6*h[1].x+h[2].x)/6,(-h[0].y+6*h[1].y+h[2].y)/6,(h[1].x+6*h[2].x-h[3].x)/6,(h[1].y+6*h[2].y-h[3].y)/
243 6,h[2].x,h[2].y])}return b}function J(a,c,b,f,q,h,u,A,d){null==d&&(d=1);d=(1<d?1:0>d?0:d)/2;for(var G=[-0.1252,0.1252,-0.3678,0.3678,-0.5873,0.5873,-0.7699,0.7699,-0.9041,0.9041,-0.9816,0.9816],r=[0.2491,0.2491,0.2335,0.2335,0.2032,0.2032,0.1601,0.1601,0.1069,0.1069,0.0472,0.0472],e=0,g=0;12>g;g++)var p=d*G[g]+d,t=p*(p*(-3*a+9*b-9*q+3*u)+6*a-12*b+6*q)-3*a+3*b,p=p*(p*(-3*c+9*f-9*h+3*A)+6*c-12*f+6*h)-3*c+3*f,e=e+r[g]*ga(t*t+p*p);return d*e}function a(a,c,b,f,q,h,u,A,d){if(!(0>d||J(a,c,b,f,q,h,u,A)<
244 d)){var G=0.5,r=1-G,e;for(e=J(a,c,b,f,q,h,u,A,r);0.01<ea(e-d);)G/=2,r+=(e<d?1:-1)*G,e=J(a,c,b,f,q,h,u,A,r);return r}}function D(a,b,f){a=c._path2curve(a);b=c._path2curve(b);for(var q,h,u,A,d,G,r,e,g,p,t=f?0:[],L=0,z=a.length;L<z;L++)if(g=a[L],"M"==g[0])q=d=g[1],h=G=g[2];else{"C"==g[0]?(g=[q,h].concat(g.slice(1)),q=g[6],h=g[7]):(g=[q,h,q,h,d,G,d,G],q=d,h=G);for(var va=0,m=b.length;va<m;va++)if(p=b[va],"M"==p[0])u=r=p[1],A=e=p[2];else{"C"==p[0]?(p=[u,A].concat(p.slice(1)),u=p[6],A=p[7]):(p=[u,A,u,A,
245 r,e,r,e],u=r,A=e);var E;var N=g,n=p;E=f;var O=c.bezierBBox(N),M=c.bezierBBox(n);if(c.isBBoxIntersect(O,M)){for(var O=J.apply(0,N),M=J.apply(0,n),O=oa(~~(O/5),1),M=oa(~~(M/5),1),s=[],V=[],l={},Ib=E?0:[],qa=0;qa<O+1;qa++){var W=c.findDotsAtSegment.apply(c,N.concat(qa/O));s.push({x:W.x,y:W.y,t:qa/O})}for(qa=0;qa<M+1;qa++)W=c.findDotsAtSegment.apply(c,n.concat(qa/M)),V.push({x:W.x,y:W.y,t:qa/M});for(qa=0;qa<O;qa++)for(N=0;N<M;N++){var Fa=s[qa],U=s[qa+1],n=V[N],W=V[N+1],S=0.001>ea(U.x-Fa.x)?"y":"x",w=
246 0.001>ea(W.x-n.x)?"y":"x",D;D=Fa.x;var tc=Fa.y,kc=U.x,H=U.y,k=n.x,nc=n.y,Va=W.x,ca=W.y;if(oa(D,kc)<ua(k,Va)||ua(D,kc)>oa(k,Va)||oa(tc,H)<ua(nc,ca)||ua(tc,H)>oa(nc,ca))D=void 0;else{var P=(D*H-tc*kc)*(k-Va)-(D-kc)*(k*ca-nc*Va),ia=(D*H-tc*kc)*(nc-ca)-(tc-H)*(k*ca-nc*Va),Z=(D-kc)*(nc-ca)-(tc-H)*(k-Va);if(Z){var P=P/Z,ia=ia/Z,Z=+P.toFixed(2),na=+ia.toFixed(2);D=Z<+ua(D,kc).toFixed(2)||Z>+oa(D,kc).toFixed(2)||Z<+ua(k,Va).toFixed(2)||Z>+oa(k,Va).toFixed(2)||na<+ua(tc,H).toFixed(2)||na>+oa(tc,H).toFixed(2)||
247 na<+ua(nc,ca).toFixed(2)||na>+oa(nc,ca).toFixed(2)?void 0:{x:P,y:ia}}else D=void 0}D&&l[D.x.toFixed(4)]!=D.y.toFixed(4)&&(l[D.x.toFixed(4)]=D.y.toFixed(4),Fa=Fa.t+ea((D[S]-Fa[S])/(U[S]-Fa[S]))*(U.t-Fa.t),n=n.t+ea((D[w]-n[w])/(W[w]-n[w]))*(W.t-n.t),0<=Fa&&1.001>=Fa&&0<=n&&1.001>=n&&(E?Ib++:Ib.push({x:D.x,y:D.y,t1:ua(Fa,1),t2:ua(n,1)})))}E=Ib}else E=E?0:[];if(f)t+=E;else{O=0;for(M=E.length;O<M;O++)E[O].segment1=L,E[O].segment2=va,E[O].bez1=g,E[O].bez2=p;t=t.concat(E)}}}return t}function F(a,c,b,f,q,
248 h){null!=a?(this.a=+a,this.b=+c,this.c=+b,this.d=+f,this.e=+q,this.f=+h):(this.a=1,this.c=this.b=0,this.d=1,this.f=this.e=0)}function C(){return this.x+R+this.y+R+this.width+" ร— "+this.height}function w(a,c,b,f,q,h){function u(a,c){var b,Mb,f,q;f=a;for(Mb=0;8>Mb;Mb++){q=((G*f+d)*f+A)*f-a;if(ea(q)<c)return f;b=(3*G*f+2*d)*f+A;if(1E-6>ea(b))break;f-=q/b}b=0;Mb=1;f=a;if(f<b)return b;if(f>Mb)return Mb;for(;b<Mb;){q=((G*f+d)*f+A)*f;if(ea(q-a)<c)break;a>q?b=f:Mb=f;f=(Mb-b)/2+b}return f}var A=3*c,d=3*(f-
249 c)-A,G=1-A-d,r=3*b,e=3*(q-b)-r,g=1-r-e;return function(a,c){var b=u(a,c);return((g*b+e)*b+r)*b}(a,1/(200*h))}function e(a,c){var b=[],f={};this.ms=c;this.times=1;if(a){for(var q in a)a[m](q)&&(f[Z(q)]=a[q],b.push(Z(q)));b.sort(ha)}this.anim=f;this.top=b[b.length-1];this.percents=b}function g(a,b,f,q,h,u){f=Z(f);var A,d,G,r,e,g,t=a.ms,L={},z={},E={};if(q)for(g=0,n=Ra.length;g<n;g++){var N=Ra[g];if(N.el.id==b.id&&N.anim==a){N.percent!=f?(Ra.splice(g,1),G=1):d=N;b.attr(N.totalOrigin);break}}else q=+z;
250 g=0;for(var n=a.percents.length;g<n;g++)if(a.percents[g]==f||a.percents[g]>q*a.top){f=a.percents[g];e=a.percents[g-1]||0;t=t/a.top*(f-e);r=a.percents[g+1];A=a.anim[f];break}else q&&b.attr(a.anim[a.percents[g]]);if(A){if(d)d.initstatus=q,d.start=new Date-d.ms*q;else{for(var O in A)if(A[m](O)&&(U[m](O)||b.ca[O]))switch(L[O]=b.attr(O),null==L[O]&&(L[O]=V[O]),z[O]=A[O],U[O]){case X:E[O]=(z[O]-L[O])/t;break;case "colour":L[O]=c.getRGB(L[O]);g=c.getRGB(z[O]);E[O]={r:(g.r-L[O].r)/t,g:(g.g-L[O].g)/t,b:(g.b-
251 L[O].b)/t};break;case "path":g=va(L[O],z[O]);N=g[1];L[O]=g[0];E[O]=[];g=0;for(n=L[O].length;g<n;g++){E[O][g]=[0];for(var M=1,s=L[O][g].length;M<s;M++)E[O][g][M]=(N[g][M]-L[O][g][M])/t}break;case "transform":g=b._;if(n=gd(g[O],z[O]))for(L[O]=n.from,z[O]=n.to,E[O]=[],E[O].real=!0,g=0,n=L[O].length;g<n;g++)for(E[O][g]=[L[O][g][0]],M=1,s=L[O][g].length;M<s;M++)E[O][g][M]=(z[O][g][M]-L[O][g][M])/t;else n=b.matrix||new F,g={_:{transform:g.transform},getBBox:function(){return b.getBBox(1)}},L[O]=[n.a,n.b,
252 n.c,n.d,n.e,n.f],nc(g,z[O]),z[O]=g._.transform,E[O]=[(g.matrix.a-n.a)/t,(g.matrix.b-n.b)/t,(g.matrix.c-n.c)/t,(g.matrix.d-n.d)/t,(g.matrix.e-n.e)/t,(g.matrix.f-n.f)/t];break;case "csv":n=ia(A[O])[p](qb);N=ia(L[O])[p](qb);if("clip-rect"==O)for(L[O]=N,E[O]=[],g=N.length;g--;)E[O][g]=(n[g]-L[O][g])/t;z[O]=n;break;default:for(n=[][Q](A[O]),N=[][Q](L[O]),E[O]=[],g=b.ca[O].length;g--;)E[O][g]=((n[g]||0)-(N[g]||0))/t}g=A.easing;O=c.easing_formulas[g];if(!O)if((O=ia(g).match(xb))&&5==O.length){var qa=O;O=
253 function(a){return w(a,+qa[1],+qa[2],+qa[3],+qa[4],t)}}else O=pa;g=A.start||a.start||+new Date;N={anim:a,percent:f,timestamp:g,start:g+(a.del||0),status:0,initstatus:q||0,stop:!1,ms:t,easing:O,from:L,diff:E,to:z,el:b,callback:A.callback,prev:e,next:r,repeat:u||a.times,origin:b.attr(),totalOrigin:h};Ra.push(N);if(q&&!d&&!G&&(N.stop=!0,N.start=new Date-t*q,1==Ra.length))return Jc();G&&(N.start=new Date-N.ms*q);1==Ra.length&&bd(Jc)}l("raphael.anim.start."+b.id,b,a)}}function n(a){for(var c=0;c<Ra.length;c++)Ra[c].el.paper==
254 a&&Ra.splice(c--,1)}c.upgrade="1.0.0";c.version="2.1.0";c.eve=l;B=c;var s,R=" ",m="hasOwnProperty",I="apply",Q="concat",X="number",$="array",p="split",H=Array.prototype.slice,S=Array.prototype.splice,fa={doc:document,win:d},sa=Object.prototype[m].call(fa.win,"Raphael"),ya=fa.win.Raphael,ca=fa.doc,Y=fa.win,xa=c.supportsTouch="createTouch"in ca,t=function(){};c.ca=c.customAttributes=t.prototype;var M=function(){this.ca=this.customAttributes=new t;this._CustomAttributes=function(){};this._CustomAttributes.prototype=
255 this.ca;this._elementsById={};this.id=c._oid++;l("raphael.new",this)},h=c.fn=M.prototype=c.prototype,N={circle:1,rect:1,path:1,ellipse:1,text:1,image:1,group:1},W="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[p](R),na=c._touchMap={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},ia=Y.String,Z=Y.parseFloat,Aa=Y.parseInt,Ga=Y.Math,oa=Ga.max,ua=Ga.min,ea=Ga.abs,da=Ga.pow,aa=Ga.cos,ba=Ga.sin,ga=Ga.sqrt,la=Ga.round,za=Ga.PI,hb=
256 za/180,Ha=180/za,La=ia.prototype.toLowerCase,Oa=ia.prototype.toUpperCase,Pa=Y.Object.prototype.toString,qb=/[, ]+/,sb=/\{(\d+)\}/g;c._ISURL=/^url\(['"]?([^\)]+?)['"]?\)$/i;var tb=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i,xb=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,
257 kb=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,eb=/,?([achlmqrstvxz]),?/gi,jb=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/ig,
258 lb=/([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/ig,r=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/ig;
259 c._radial_gradient=/^x?r(?:\(([^\)]*?)\))?/;var E={NaN:1,Infinity:1,"-Infinity":1},z={hs:1,rg:1},V=c._availableAttrs={"arrow-end":"none","arrow-start":"none",blur:0,"clip-rect":"0 0 1e9 1e9","clip-path":"",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"about:blank","letter-spacing":0,"line-height":12,"vertical-align":"middle",opacity:1,path:"M0,0",r:0,rx:0,ry:0,src:"",
260 stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",visibility:"",title:"",transform:"",rotation:0,width:0,x:0,y:0},U=c._availableAnimAttrs={blur:X,"clip-rect":"csv","clip-path":"path",cx:X,cy:X,fill:"colour","fill-opacity":X,"font-size":X,height:X,opacity:X,path:"path",r:X,rx:X,ry:X,stroke:"colour","stroke-opacity":X,"stroke-width":X,transform:"transform",width:X,x:X,
261 y:X},P={},ha=function(a,c){return Z(a)-Z(c)},ra=function(){},pa=function(a){return a},ja=c._rectPath=function(a,c,b,f,q){return q?[["M",a+q,c],["l",b-2*q,0],["a",q,q,0,0,1,q,q],["l",0,f-2*q],["a",q,q,0,0,1,-q,q],["l",2*q-b,0],["a",q,q,0,0,1,-q,-q],["l",0,2*q-f],["a",q,q,0,0,1,q,-q],["z"]]:[["M",a,c],["l",b,0],["l",0,f],["l",-b,0],["z"]]},Ia=function(a,c,b,f){null==f&&(f=b);return[["M",a,c],["m",0,-f],["a",b,f,0,1,1,0,2*f],["a",b,f,0,1,1,0,-2*f],["z"]]},ka=c._getPath={group:function(){return!1},path:function(a){return a.attr("path")},
262 circle:function(a){a=a.attrs;return Ia(a.cx,a.cy,a.r)},ellipse:function(a){a=a.attrs;return Ia(a.cx,a.cy,a.rx,a.ry)},rect:function(a){a=a.attrs;return ja(a.x,a.y,a.width,a.height,a.r)},image:function(a){a=a.attrs;return ja(a.x,a.y,a.width,a.height)},text:function(a){a=a._getBBox();return ja(a.x,a.y,a.width,a.height)}},Ca=c.mapPath=function(a,c){if(!c)return a;var b,f,q,h,u,A,d;a=va(a);q=0;for(u=a.length;q<u;q++)for(d=a[q],h=1,A=d.length;h<A;h+=2)b=c.x(d[h],d[h+1]),f=c.y(d[h],d[h+1]),d[h]=b,d[h+1]=
263 f;return a};c.pick=function(){for(var a,c=0,b=arguments.length;c<b;c+=1)if((a=arguments[c])||!1===a||0===a)return a};var Ka=c._lastArgIfGroup=function(a,b){var f=a.length-1,q=a[f];if(q&&q.constructor===c.el.constructor&&"group"===q.type)return b&&(a[f]=void 0,delete a[f],S.call(a,f,1)),q},T=c._serializeArgs=function(a){var b=a[0],f,q;if(c.is(b,"object")&&!c.is(b,"array")&&"group"!==b.type)for(f=b,b.path&&(b=b.path)&&!c.is(b,"string")&&c.is(b[0],$),b=1,q=arguments.length;b<q;b+=2)f[arguments[b]]||
264 (f[arguments[b]]=arguments[b+1]);else for(f={},b=1,q=arguments.length;b<q;b+=2)f[arguments[b]]=a[(b-1)/2]||arguments[b+1];return f},ob=c.merge=function(a,c,b,f,q){var h,u,A,d;q?(f.push(a),q.push(c)):(f=[a],q=[c]);if(c instanceof Array)for(h=0;h<c.length;h+=1){try{u=a[h],A=c[h]}catch(G){continue}if("object"!==typeof A)b&&void 0===A||(a[h]=A);else{if(null===u||"object"!==typeof u)u=a[h]=A instanceof Array?[]:{};d=checkCyclicRef(A,q);-1!==d?u=a[h]=f[d]:ob(u,A,b,f,q)}}else for(h in c){try{u=a[h],A=c[h]}catch(r){continue}if(null!==
265 A&&"object"===typeof A)if(d=Pa.call(A),"[object Object]"===d){if(null===u||"object"!==typeof u)u=a[h]={};d=checkCyclicRef(A,q);-1!==d?u=a[h]=f[d]:ob(u,A,b,f,q)}else"[object Array]"===d?(null!==u&&u instanceof Array||(u=a[h]=[]),d=checkCyclicRef(A,q),-1!==d?u=a[h]=f[d]:ob(u,A,b,f,q)):a[h]=A;else a[h]=A}return a};c.extend=function(a,c,b){if("object"!==typeof a&&"object"!==typeof c)return null;if("object"!==typeof c||null===c)return a;"object"!==typeof a&&(a=c instanceof Array?[]:{});ob(a,c,b);return a};
266 var Ta=c.is=function(a,c){c=La.call(c);return"finite"==c?!E[m](+a):c==$?a instanceof Array:"object"!==c||void 0!==a&&null!==a?"null"==c&&null===a||c==typeof a&&null!==a||"object"==c&&a===Object(a)||"array"==c&&Array.isArray&&Array.isArray(a)||Pa.call(a).slice(8,-1).toLowerCase()==c:!1},ab=c.clone=function(a){if(Object(a)!==a)return a;var c=new a.constructor,b;for(b in a)a[m](b)&&(c[b]=ab(a[b]));return c};c.createUUID=function(a,c){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(a,
267 c).toUpperCase()}}(/[xy]/g,function(a){var c=16*Ga.random()|0;return("x"==a?c:c&3|8).toString(16)});c._g=fa;c.type=Y.ENABLE_RED_CANVAS&&(Y.CanvasRenderingContext2D||ca.createElement("canvas").getContext)?"CANVAS":Y.SVGAngle||ca.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML";if("VML"==c.type){var mb=ca.createElement("div"),Fb;mb.innerHTML='<v:shape adj="1"/>';Fb=mb.firstChild;Fb.style.behavior="url(#default#VML)";if(!Fb||"object"!=typeof Fb.adj)return c.type=
268 "";mb=null}c.svg=!((c.vml="VML"==c.type)||(c.canvas="CANVAS"==c.type));c._Paper=M;c._id=0;c._oid=0;c.angle=function(a,b,f,q,h,u){return null==h?(a-=f,b-=q,a||b?(Ga.atan2(-b,-a)*Ha+540)%360:0):c.angle(a,b,h,u)-c.angle(f,q,h,u)};c.rad=function(a){return a%360*hb};c.deg=function(a){return a*Ha%360};c.snapTo=function(a,c,b){var f;Ta(b,"finite")||(b=10);if(Ta(a,$))for(f=a.length;f--;){if(ea(a[f]-c)<=b)return a[f]}else{a=+a;f=c%a;if(f<b)return c-f;if(f>a-b)return c-f+a}return c};c.setWindow=function(a){l("raphael.setWindow",
269 c,fa.win,a);Y=fa.win=a;ca=fa.doc=fa.win.document;c._engine.initWin&&c._engine.initWin(fa.win)};var Ja=function(a){if(c.vml){var b=/^\s+|\s+$/g,f;try{var q=new ActiveXObject("htmlfile");q.write("<body>");q.close();f=q.body}catch(h){f=createPopup().document.body}var u=f.createTextRange();Ja=Bb(function(a){try{f.style.color=ia(a).replace(b,"");var c=u.queryCommandValue("ForeColor");return"#"+("000000"+((c&255)<<16|c&65280|(c&16711680)>>>16).toString(16)).slice(-6)}catch(q){return"none"}})}else{var A=
270 fa.doc.createElement("i");A.title="Raphaรซl Colour Picker";A.style.display="none";fa.doc.body.appendChild(A);Ja=Bb(function(a){A.style.color=a;return fa.doc.defaultView.getComputedStyle(A,"").getPropertyValue("color")})}return Ja(a)},Xb=function(){return"hsb("+[this.h,this.s,this.b]+")"},ma=function(){return"hsl("+[this.h,this.s,this.l]+")"},bb=function(){return this.hex},ic=function(a,b,f){null==b&&Ta(a,"object")&&"r"in a&&"g"in a&&"b"in a&&(f=a.b,b=a.g,a=a.r);null==b&&Ta(a,"string")&&(f=c.getRGB(a),
271 a=f.r,b=f.g,f=f.b);if(1<a||1<b||1<f)a/=255,b/=255,f/=255;return[a,b,f]},Eb=function(a,b,f,q){var h={r:a*=255,g:b*=255,b:f*=255,hex:c.rgb(a,b,f),toString:bb};Ta(q,"finite")&&(h.opacity=q);return h};c.color=function(a){var b;c.is(a,"object")&&"h"in a&&"s"in a&&"b"in a?(b=c.hsb2rgb(a),a.r=b.r,a.g=b.g,a.b=b.b,a.hex=b.hex):c.is(a,"object")&&"h"in a&&"s"in a&&"l"in a?(b=c.hsl2rgb(a),a.r=b.r,a.g=b.g,a.b=b.b,a.hex=b.hex):(c.is(a,"string")&&(a=c.getRGB(a)),c.is(a,"object")&&"r"in a&&"g"in a&&"b"in a?(b=c.rgb2hsl(a),
272 a.h=b.h,a.s=b.s,a.l=b.l,b=c.rgb2hsb(a),a.v=b.b):(a={hex:"none"},a.r=a.g=a.b=a.h=a.s=a.v=a.l=-1));a.toString=bb;return a};c.hsb2rgb=function(a,c,b,f){this.is(a,"object")&&"h"in a&&"s"in a&&"b"in a&&(b=a.b,c=a.s,a=a.h,f=a.o);var q,h,u;a=360*a%360/60;u=b*c;c=u*(1-ea(a%2-1));b=q=h=b-u;a=~~a;b+=[u,c,0,0,c,u][a];q+=[c,u,u,c,0,0][a];h+=[0,0,c,u,u,c][a];return Eb(b,q,h,f)};c.hsl2rgb=function(a,c,b,f){this.is(a,"object")&&"h"in a&&"s"in a&&"l"in a&&(b=a.l,c=a.s,a=a.h);if(1<a||1<c||1<b)a/=360,c/=100,b/=100;
273 var q,h,u;a=360*a%360/60;u=2*c*(0.5>b?b:1-b);c=u*(1-ea(a%2-1));b=q=h=b-u/2;a=~~a;b+=[u,c,0,0,c,u][a];q+=[c,u,u,c,0,0][a];h+=[0,0,c,u,u,c][a];return Eb(b,q,h,f)};c.rgb2hsb=function(a,c,b){b=ic(a,c,b);a=b[0];c=b[1];b=b[2];var f,q;f=oa(a,c,b);q=f-ua(a,c,b);a=((0==q?0:f==a?(c-b)/q:f==c?(b-a)/q+2:(a-c)/q+4)+360)%6*60/360;return{h:a,s:0==q?0:q/f,b:f,toString:Xb}};c.rgb2hsl=function(a,c,b){b=ic(a,c,b);a=b[0];c=b[1];b=b[2];var f,q,h;f=oa(a,c,b);q=ua(a,c,b);h=f-q;a=((0==h?0:f==a?(c-b)/h:f==c?(b-a)/h+2:(a-
274 c)/h+4)+360)%6*60/360;f=(f+q)/2;return{h:a,s:0==h?0:0.5>f?h/(2*f):h/(2-2*f),l:f,toString:ma}};c._path2string=function(){return this.join(",").replace(eb,"$1")};var Bb=c._cacher=function(a,c,b){function f(){var q=H.call(arguments,0),h=q.join("โ€"),u=f.cache=f.cache||{},A=f.count=f.count||[];if(u[m](h)){a:for(var q=A,A=h,d=0,G=q.length;d<G;d++)if(q[d]===A){q.push(q.splice(d,1)[0]);break a}return b?b(u[h]):u[h]}1E3<=A.length&&delete u[A.shift()];A.push(h);u[h]=a[I](c,q);return b?b(u[h]):u[h]}return f};
275 c._preload=function(a,c){var b=ca.createElement("img");b.style.cssText="position:absolute;left:-9999em;top:-9999em";b.onload=function(){c.call(this);this.onload=null;ca.body.removeChild(this)};b.onerror=function(){ca.body.removeChild(this)};ca.body.appendChild(b);b.src=a};c.getRGB=Bb(function(a){var b,f,q,h,u;a&&Ta(a,"object")&&"opacity"in a&&(b=a.opacity);if(!a||(a=ia(a)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:k};if("none"==a)return{r:-1,g:-1,b:-1,hex:"none",toString:k};
276 !z[m](a.toLowerCase().substring(0,2))&&"#"!==a.charAt()&&(a=Ja(a));if(a=a.match(tb)){a[2]&&(h=Aa(a[2].substring(5),16),q=Aa(a[2].substring(3,5),16),f=Aa(a[2].substring(1,3),16));a[3]&&(h=Aa((u=a[3].charAt(3))+u,16),q=Aa((u=a[3].charAt(2))+u,16),f=Aa((u=a[3].charAt(1))+u,16));a[4]&&(u=a[4][p](kb),f=Z(u[0]),"%"==u[0].slice(-1)&&(f*=2.55),q=Z(u[1]),"%"==u[1].slice(-1)&&(q*=2.55),h=Z(u[2]),"%"==u[2].slice(-1)&&(h*=2.55),"rgba"==a[1].toLowerCase().slice(0,4)&&(b=Z(u[3])),u[3]&&"%"==u[3].slice(-1)&&(b/=
277 100));if(a[5])return u=a[5][p](kb),f=Z(u[0]),"%"==u[0].slice(-1)&&(f*=2.55),q=Z(u[1]),"%"==u[1].slice(-1)&&(q*=2.55),h=Z(u[2]),"%"==u[2].slice(-1)&&(h*=2.55),"deg"!=u[0].slice(-3)&&"ยฐ"!=u[0].slice(-1)||(f/=360),"hsba"==a[1].toLowerCase().slice(0,4)&&(b=Z(u[3])),u[3]&&"%"==u[3].slice(-1)&&(b/=100),c.hsb2rgb(f,q,h,b);if(a[6])return u=a[6][p](kb),f=Z(u[0]),"%"==u[0].slice(-1)&&(f*=2.55),q=Z(u[1]),"%"==u[1].slice(-1)&&(q*=2.55),h=Z(u[2]),"%"==u[2].slice(-1)&&(h*=2.55),"deg"!=u[0].slice(-3)&&"ยฐ"!=u[0].slice(-1)||
278 (f/=360),"hsla"==a[1].toLowerCase().slice(0,4)&&(b=Z(u[3])),u[3]&&"%"==u[3].slice(-1)&&(b/=100),c.hsl2rgb(f,q,h,b);a={r:f,g:q,b:h,toString:k};a.hex="#"+(16777216|h|q<<8|f<<16).toString(16).slice(1);c.is(b,"finite")&&(a.opacity=b);return a}return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:k}},c);c.tintshade=Bb(function(a,b){var f=c.getRGB(a),q;q=255;0>b&&(b*=-1,q=0);1<b&&(b=1);q=0===b?f:{r:q-(q-f.r)*b,g:q-(q-f.g)*b,b:q-(q-f.b)*b,toString:k};q.hex=c.rgb(q.r,q.g,q.b);f.error&&(q.error=f.error);"opacity"in
279 f?(q.rgba="rgba("+[q.r,q.g,q.b,f.opacity].join()+")",q.opacity=f.opacity):q.rgba="rgb("+[q.r,q.g,q.b].join()+")";return q},c);c.hsb=Bb(function(a,b,f){return c.hsb2rgb(a,b,f).hex});c.hsl=Bb(function(a,b,f){return c.hsl2rgb(a,b,f).hex});c.rgb=Bb(function(a,c,b){return"#"+(16777216|b|c<<8|a<<16).toString(16).slice(1)});c.getColor=function(a){a=this.getColor.start=this.getColor.start||{h:0,s:1,b:a||0.75};var c=this.hsb2rgb(a.h,a.s,a.b);a.h+=0.075;1<a.h&&(a.h=0,a.s-=0.2,0>=a.s&&(this.getColor.start={h:0,
280 s:1,b:a.b}));return c.hex};c.getColor.reset=function(){delete this.start};c.parsePathString=function(a){if(!a)return null;var b=vb(a);if(b.arr)return ib(b.arr);var f={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},q=[];c.is(a,$)&&c.is(a[0],$)&&(q=ib(a));q.length||ia(a).replace(jb,function(a,c,b){var h=[];a=c.toLowerCase();b.replace(r,function(a,c){c&&h.push(+c)});"m"==a&&2<h.length&&(q.push([c][Q](h.splice(0,2))),a="l",c="m"==c?"l":"L");if("r"==a)q.push([c][Q](h));else for(;h.length>=f[a]&&(q.push([c][Q](h.splice(0,
281 f[a]))),f[a]););});q.toString=c._path2string;b.arr=ib(q);return q};c.parseTransformString=Bb(function(a){if(!a)return null;var b=[];c.is(a,$)&&c.is(a[0],$)&&(b=ib(a));b.length||ia(a).replace(lb,function(a,c,f){var q=[];La.call(c);f.replace(r,function(a,c){c&&q.push(+c)});b.push([c][Q](q))});b.toString=c._path2string;return b});var vb=function(a){var c=vb.ps=vb.ps||{};c[a]?c[a].sleep=100:c[a]={sleep:100};setTimeout(function(){for(var b in c)c[m](b)&&b!=a&&(c[b].sleep--,!c[b].sleep&&delete c[b])});
282 return c[a]};c.findDotsAtSegment=function(a,c,b,f,q,h,u,A,d){var G=1-d,r=da(G,3),g=da(G,2),e=d*d,p=e*d,t=r*a+3*g*d*b+3*G*d*d*q+p*u,r=r*c+3*g*d*f+3*G*d*d*h+p*A,g=a+2*d*(b-a)+e*(q-2*b+a),p=c+2*d*(f-c)+e*(h-2*f+c),L=b+2*d*(q-b)+e*(u-2*q+b),e=f+2*d*(h-f)+e*(A-2*h+f);a=G*a+d*b;c=G*c+d*f;q=G*q+d*u;h=G*h+d*A;A=90-180*Ga.atan2(g-L,p-e)/za;(g>L||p<e)&&(A+=180);return{x:t,y:r,m:{x:g,y:p},n:{x:L,y:e},start:{x:a,y:c},end:{x:q,y:h},alpha:A}};c.bezierBBox=function(a,b,f,q,h,u,A,d){c.is(a,"array")||(a=[a,b,f,q,
283 h,u,A,d]);a=L.apply(null,a);return{x:a.min.x,y:a.min.y,x2:a.max.x,y2:a.max.y,width:a.max.x-a.min.x,height:a.max.y-a.min.y}};c.isPointInsideBBox=function(a,c,b){return c>=a.x&&c<=a.x2&&b>=a.y&&b<=a.y2};c.isBBoxIntersect=function(a,b){var f=c.isPointInsideBBox;return f(b,a.x,a.y)||f(b,a.x2,a.y)||f(b,a.x,a.y2)||f(b,a.x2,a.y2)||f(a,b.x,b.y)||f(a,b.x2,b.y)||f(a,b.x,b.y2)||f(a,b.x2,b.y2)||(a.x<b.x2&&a.x>b.x||b.x<a.x2&&b.x>a.x)&&(a.y<b.y2&&a.y>b.y||b.y<a.y2&&b.y>a.y)};c.pathIntersection=function(a,c){return D(a,
284 c)};c.pathIntersectionNumber=function(a,c){return D(a,c,1)};c.isPointInsidePath=function(a,b,f){var q=c.pathBBox(a);return c.isPointInsideBBox(q,b,f)&&(1==D(a,[["M",b,f],["H",q.x2+10]],1)%2||1==D(a,[["M",b,f],["V",q.y2+10]],1)%2)};c._removedFactory=function(a){return function(){l("raphael.log",null,"Raphaรซl: you are calling to method โ€œ"+a+"โ€ of removed object",a)}};var Gb=c.pathBBox=function(a){var c=vb(a);if(c.bbox)return c.bbox;if(!a)return{x:0,y:0,width:0,height:0,x2:0,y2:0};a=va(a);for(var b=
285 0,f=0,q=[],h=[],u,A=0,d=a.length;A<d;A++)u=a[A],"M"==u[0]?(b=u[1],f=u[2],q.push(b),h.push(f)):(b=L(b,f,u[1],u[2],u[3],u[4],u[5],u[6]),q=q[Q](b.min.x,b.max.x),h=h[Q](b.min.y,b.max.y),b=u[5],f=u[6]);a=ua[I](0,q);u=ua[I](0,h);q=oa[I](0,q);h=oa[I](0,h);h={x:a,y:u,x2:q,y2:h,width:q-a,height:h-u};c.bbox=ab(h);return h},ib=function(a){a=ab(a);a.toString=c._path2string;return a},q=c._pathToRelative=function(a){var b=vb(a);if(b.rel)return ib(b.rel);c.is(a,$)&&c.is(a&&a[0],$)||(a=c.parsePathString(a));var f=
286 [],q=0,h=0,u=0,A=0,d=0;"M"==a[0][0]&&(q=a[0][1],h=a[0][2],u=q,A=h,d++,f.push(["M",q,h]));for(var G=a.length;d<G;d++){var r=f[d]=[],e=a[d];if(e[0]!=La.call(e[0]))switch(r[0]=La.call(e[0]),r[0]){case "a":r[1]=e[1];r[2]=e[2];r[3]=e[3];r[4]=e[4];r[5]=e[5];r[6]=+(e[6]-q).toFixed(3);r[7]=+(e[7]-h).toFixed(3);break;case "v":r[1]=+(e[1]-h).toFixed(3);break;case "m":u=e[1],A=e[2];default:for(var g=1,p=e.length;g<p;g++)r[g]=+(e[g]-(g%2?q:h)).toFixed(3)}else for(f[d]=[],"m"==e[0]&&(u=e[1]+q,A=e[2]+h),r=0,g=
287 e.length;r<g;r++)f[d][r]=e[r];e=f[d].length;switch(f[d][0]){case "z":q=u;h=A;break;case "h":q+=+f[d][e-1];break;case "v":h+=+f[d][e-1];break;default:q+=+f[d][e-2],h+=+f[d][e-1]}}f.toString=c._path2string;b.rel=ib(f);return f},u=c._pathToAbsolute=function(a){var f=vb(a),q;if(f.abs)return ib(f.abs);c.is(a,$)&&c.is(a&&a[0],$)||(a=c.parsePathString(a));if(!a||!a.length)return q=["M",0,0],q.toString=c._path2string,q;var h=0,u=0,d=0,A=0,G=0;q=[];"M"==a[0][0]&&(h=+a[0][1],u=+a[0][2],d=h,A=u,G++,q[0]=["M",
288 h,u]);for(var r=3==a.length&&"M"==a[0][0]&&"R"==a[1][0].toUpperCase()&&"Z"==a[2][0].toUpperCase(),e,g=G,p=a.length;g<p;g++){q.push(G=[]);e=a[g];if(e[0]!=Oa.call(e[0]))switch(G[0]=Oa.call(e[0]),G[0]){case "A":G[1]=e[1];G[2]=e[2];G[3]=e[3];G[4]=e[4];G[5]=e[5];G[6]=+(e[6]+h);G[7]=+(e[7]+u);break;case "V":G[1]=+e[1]+u;break;case "H":G[1]=+e[1]+h;break;case "R":for(var t=[h,u][Q](e.slice(1)),L=2,z=t.length;L<z;L++)t[L]=+t[L]+h,t[++L]=+t[L]+u;q.pop();q=q[Q](b(t,r));break;case "M":d=+e[1]+h,A=+e[2]+u;default:for(L=
289 1,z=e.length;L<z;L++)G[L]=+e[L]+(L%2?h:u)}else if("R"==e[0])t=[h,u][Q](e.slice(1)),q.pop(),q=q[Q](b(t,r)),G=["R"][Q](e.slice(-2));else for(t=0,L=e.length;t<L;t++)G[t]=e[t];switch(G[0]){case "Z":h=d;u=A;break;case "H":h=G[1];break;case "V":u=G[1];break;case "M":d=G[G.length-2],A=G[G.length-1];default:h=G[G.length-2],u=G[G.length-1]}}q.toString=c._path2string;f.abs=ib(q);return q},A=function(a,c,b,f){return[a,c,b,f,b,f]},G=function(a,c,b,f,q,h){var u=1/3,d=2/3;return[u*a+d*b,u*c+d*f,u*q+d*b,u*h+d*f,
290 q,h]},f=function(a,c,b,q,h,u,d,A,G,r){var e=120*za/180,g=hb*(+h||0),L=[],t,z=Bb(function(a,c,b){var f=a*aa(b)-c*ba(b);a=a*ba(b)+c*aa(b);return{x:f,y:a}});if(r)E=r[0],t=r[1],u=r[2],O=r[3];else{t=z(a,c,-g);a=t.x;c=t.y;t=z(A,G,-g);A=t.x;G=t.y;aa(hb*h);ba(hb*h);t=(a-A)/2;E=(c-G)/2;O=t*t/(b*b)+E*E/(q*q);1<O&&(O=ga(O),b*=O,q*=O);var O=b*b,va=q*q,O=(u==d?-1:1)*ga(ea((O*va-O*E*E-va*t*t)/(O*E*E+va*t*t)));u=O*b*E/q+(a+A)/2;var O=O*-q*t/b+(c+G)/2,E=Ga.asin(((c-O)/q).toFixed(9));t=Ga.asin(((G-O)/q).toFixed(9));
291 E=a<u?za-E:E;t=A<u?za-t:t;0>E&&(E=2*za+E);0>t&&(t=2*za+t);d&&E>t&&(E-=2*za);!d&&t>E&&(t-=2*za)}if(ea(t-E)>e){var L=t,va=A,n=G;t=E+e*(d&&t>E?1:-1);A=u+b*aa(t);G=O+q*ba(t);L=f(A,G,b,q,h,0,d,va,n,[t,L,u,O])}u=t-E;h=aa(E);e=ba(E);d=aa(t);t=ba(t);u=Ga.tan(u/4);b=4/3*b*u;u*=4/3*q;q=[a,c];a=[a+b*e,c-u*h];c=[A+b*t,G-u*d];A=[A,G];a[0]=2*q[0]-a[0];a[1]=2*q[1]-a[1];if(r)return[a,c,A][Q](L);L=[a,c,A][Q](L).join()[p](",");r=[];A=0;for(G=L.length;A<G;A++)r[A]=A%2?z(L[A-1],L[A],g).y:z(L[A],L[A+1],g).x;return r},
292 O=function(a,c,b,f,q,h,u,A,d){var G=1-d;return{x:da(G,3)*a+3*da(G,2)*d*b+3*G*d*d*q+da(d,3)*u,y:da(G,3)*c+3*da(G,2)*d*f+3*G*d*d*h+da(d,3)*A}},L=Bb(function(a,c,b,f,q,h,u,A){var d=q-2*b+a-(u-2*q+b),G=2*(b-a)-2*(q-b),r=a-b,e=(-G+ga(G*G-4*d*r))/2/d,d=(-G-ga(G*G-4*d*r))/2/d,g=[c,A],t=[a,u];"1e12"<ea(e)&&(e=0.5);"1e12"<ea(d)&&(d=0.5);0<e&&1>e&&(e=O(a,c,b,f,q,h,u,A,e),t.push(e.x),g.push(e.y));0<d&&1>d&&(e=O(a,c,b,f,q,h,u,A,d),t.push(e.x),g.push(e.y));d=h-2*f+c-(A-2*h+f);G=2*(f-c)-2*(h-f);r=c-f;e=(-G+ga(G*
293 G-4*d*r))/2/d;d=(-G-ga(G*G-4*d*r))/2/d;"1e12"<ea(e)&&(e=0.5);"1e12"<ea(d)&&(d=0.5);0<e&&1>e&&(e=O(a,c,b,f,q,h,u,A,e),t.push(e.x),g.push(e.y));0<d&&1>d&&(e=O(a,c,b,f,q,h,u,A,d),t.push(e.x),g.push(e.y));return{min:{x:ua[I](0,t),y:ua[I](0,g)},max:{x:oa[I](0,t),y:oa[I](0,g)}}}),va=c._path2curve=Bb(function(a,c){var b=!c&&vb(a);if(!c&&b.curve)return ib(b.curve);var q=u(a),h=c&&u(c),d={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},r={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},e=function(a,c){var b,q;if(!a)return["C",
294 c.x,c.y,c.x,c.y,c.x,c.y];a[0]in{T:1,Q:1}||(c.qx=c.qy=null);switch(a[0]){case "M":c.X=a[1];c.Y=a[2];break;case "A":a=["C"][Q](f[I](0,[c.x,c.y][Q](a.slice(1))));break;case "S":b=c.x+(c.x-(c.bx||c.x));q=c.y+(c.y-(c.by||c.y));a=["C",b,q][Q](a.slice(1));break;case "T":c.qx=c.x+(c.x-(c.qx||c.x));c.qy=c.y+(c.y-(c.qy||c.y));a=["C"][Q](G(c.x,c.y,c.qx,c.qy,a[1],a[2]));break;case "Q":c.qx=a[1];c.qy=a[2];a=["C"][Q](G(c.x,c.y,a[1],a[2],a[3],a[4]));break;case "L":a=["C"][Q](A(c.x,c.y,a[1],a[2]));break;case "H":a=
295 ["C"][Q](A(c.x,c.y,a[1],c.y));break;case "V":a=["C"][Q](A(c.x,c.y,c.x,a[1]));break;case "Z":a=["C"][Q](A(c.x,c.y,c.X,c.Y))}return a},g=function(a,c){if(7<a[c].length){a[c].shift();for(var b=a[c];b.length;)a.splice(c++,0,["C"][Q](b.splice(0,6)));a.splice(c,1);L=oa(q.length,h&&h.length||0)}},t=function(a,c,b,f,u){a&&c&&"M"==a[u][0]&&"M"!=c[u][0]&&(c.splice(u,0,["M",f.x,f.y]),b.bx=0,b.by=0,b.x=a[u][1],b.y=a[u][2],L=oa(q.length,h&&h.length||0))},p=0,L=oa(q.length,h&&h.length||0);for(;p<L;p++){q[p]=e(q[p],
296 d);g(q,p);h&&(h[p]=e(h[p],r));h&&g(h,p);t(q,h,d,r,p);t(h,q,r,d,p);var O=q[p],z=h&&h[p],E=O.length,va=h&&z.length;d.x=O[E-2];d.y=O[E-1];d.bx=Z(O[E-4])||d.x;d.by=Z(O[E-3])||d.y;r.bx=h&&(Z(z[va-4])||r.x);r.by=h&&(Z(z[va-3])||r.y);r.x=h&&z[va-2];r.y=h&&z[va-1]}h||(b.curve=ib(q));return h?[q,h]:q},null,ib);c._parseDots=Bb(function(a){for(var b=[],f=0,q=a.length;f<q;f++){var h={},u=a[f].match(/^([^:]*):?([\d\.]*)/);h.color=c.getRGB(u[1]);if(h.color.error)return null;h.opacity=h.color.opacity;h.color=h.color.hex;
297 u[2]&&(h.offset=u[2]+"%");b.push(h)}f=1;for(q=b.length-1;f<q;f++)if(!b[f].offset){a=Z(b[f-1].offset||0);u=0;for(h=f+1;h<q;h++)if(b[h].offset){u=b[h].offset;break}u||(u=100,h=q);u=Z(u);for(u=(u-a)/(h-f+1);f<h;f++)a+=u,b[f].offset=a+"%"}return b});var kc=c._tear=function(a,c){a==c.top&&(c.top=a.prev);a==c.bottom&&(c.bottom=a.next);a.next&&(a.next.prev=a.prev);a.prev&&(a.prev.next=a.next)};c._tofront=function(a,c){if(c.top===a)return!1;kc(a,c);a.next=null;a.prev=c.top;c.top.next=a;c.top=a;return!0};
298 c._toback=function(a,c){if(c.bottom===a)return!1;kc(a,c);a.next=c.bottom;a.prev=null;c.bottom.prev=a;c.bottom=a;return!0};c._insertafter=function(a,c,b,f){kc(a,b);a.parent=f;c===f.top&&(f.top=a);c.next&&(c.next.prev=a);a.next=c.next;a.prev=c;c.next=a};c._insertbefore=function(a,c,b,f){kc(a,b);a.parent=f;c===f.bottom&&(f.bottom=a);c.prev&&(c.prev.next=a);a.prev=c.prev;c.prev=a;a.next=c};var Ib=c.toMatrix=function(a,c){var b=Gb(a),f={_:{transform:""},getBBox:function(){return b}};nc(f,c);return f.matrix};
299 c.transformPath=function(a,c){return Ca(a,Ib(a,c))};var nc=c._extractTransform=function(a,b){if(null==b)return a._.transform;b=ia(b).replace(/\.{3}|\u2026/g,a._.transform||"");var f=c.parseTransformString(b),q=0,h=0,u=0,d=1,A=1,G=a._,u=new F;G.transform=f||[];if(f)for(var h=0,r=f.length;h<r;h++){var e=f[h],g=e.length,t=ia(e[0]).toLowerCase(),p=e[0]!=t,L=p?u.invert():0,O;"t"==t&&3==g?p?(g=L.x(0,0),t=L.y(0,0),p=L.x(e[1],e[2]),L=L.y(e[1],e[2]),u.translate(p-g,L-t)):u.translate(e[1],e[2]):"r"==t?2==g?
300 (O=O||a.getBBox(1),u.rotate(e[1],O.x+O.width/2,O.y+O.height/2),q+=e[1]):4==g&&(p?(p=L.x(e[2],e[3]),L=L.y(e[2],e[3]),u.rotate(e[1],p,L)):u.rotate(e[1],e[2],e[3]),q+=e[1]):"s"==t?2==g||3==g?(O=O||a.getBBox(1),u.scale(e[1],e[g-1],O.x+O.width/2,O.y+O.height/2),d*=e[1],A*=e[g-1]):5==g&&(p?(p=L.x(e[3],e[4]),L=L.y(e[3],e[4]),u.scale(e[1],e[2],p,L)):u.scale(e[1],e[2],e[3],e[4]),d*=e[1],A*=e[2]):"m"==t&&7==g&&u.add(e[1],e[2],e[3],e[4],e[5],e[6]);G.dirtyT=1;a.matrix=u}a.matrix=u;G.sx=d;G.sy=A;G.deg=q;G.dx=
301 h=u.e;G.dy=u=u.f;1==d&&1==A&&!q&&G.bbox?(G.bbox.x+=+h,G.bbox.y+=+u):G.dirtyT=1},Va=function(a){var c=a[0];switch(c.toLowerCase()){case "t":return[c,0,0];case "m":return[c,1,0,0,1,0,0];case "r":return 4==a.length?[c,0,a[2],a[3]]:[c,0];case "s":return 5==a.length?[c,1,1,a[3],a[4]]:3==a.length?[c,1,1]:[c,1]}},gd=c._equaliseTransform=function(a,b){b=ia(b).replace(/\.{3}|\u2026/g,a);a=c.parseTransformString(a)||[];b=c.parseTransformString(b)||[];for(var f=oa(a.length,b.length),q=[],h=[],u=0,d,A,G,e;u<
302 f;u++){G=a[u]||Va(b[u]);e=b[u]||Va(G);if(G[0]!=e[0]||"r"==G[0].toLowerCase()&&(G[2]!=e[2]||G[3]!=e[3])||"s"==G[0].toLowerCase()&&(G[3]!=e[3]||G[4]!=e[4]))return;q[u]=[];h[u]=[];d=0;for(A=oa(G.length,e.length);d<A;d++)d in G&&(q[u][d]=G[d]),d in e&&(h[u][d]=e[d])}return{from:q,to:h}};c._getContainer=function(a,b,f,q){var h;h=null!=q||c.is(a,"object")?a:fa.doc.getElementById(a);if(null!=h)return h.tagName?null==b?{container:h,width:h.style.pixelWidth||h.offsetWidth,height:h.style.pixelHeight||h.offsetHeight}:
303 {container:h,width:b,height:f}:{container:1,x:a,y:b,width:f,height:q}};c.pathToRelative=q;c._engine={};c.path2curve=va;c.matrix=function(a,c,b,f,q,h){return new F(a,c,b,f,q,h)};(function(a){function b(a){return a[0]*a[0]+a[1]*a[1]}function f(a){var c=ga(b(a));a[0]&&(a[0]/=c);a[1]&&(a[1]/=c)}a.add=function(a,c,b,f,q,h){var u=[[],[],[]],d=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]];c=[[a,b,q],[c,f,h],[0,0,1]];a&&a instanceof F&&(c=[[a.a,a.c,a.e],[a.b,a.d,a.f],[0,0,1]]);for(a=0;3>a;a++)for(b=
304 0;3>b;b++){for(f=q=0;3>f;f++)q+=d[a][f]*c[f][b];u[a][b]=q}this.a=u[0][0];this.b=u[1][0];this.c=u[0][1];this.d=u[1][1];this.e=u[0][2];this.f=u[1][2]};a.invert=function(){var a=this.a*this.d-this.b*this.c;return new F(this.d/a,-this.b/a,-this.c/a,this.a/a,(this.c*this.f-this.d*this.e)/a,(this.b*this.e-this.a*this.f)/a)};a.clone=function(){return new F(this.a,this.b,this.c,this.d,this.e,this.f)};a.translate=function(a,c){this.add(1,0,0,1,a,c)};a.scale=function(a,c,b,f){null==c&&(c=a);(b||f)&&this.add(1,
305 0,0,1,b,f);this.add(a,0,0,c,0,0);(b||f)&&this.add(1,0,0,1,-b,-f)};a.rotate=function(a,b,f){a=c.rad(a);b=b||0;f=f||0;var q=+aa(a).toFixed(9);a=+ba(a).toFixed(9);this.add(q,a,-a,q,b,f);this.add(1,0,0,1,-b,-f)};a.x=function(a,c){return a*this.a+c*this.c+this.e};a.y=function(a,c){return a*this.b+c*this.d+this.f};a.get=function(a){return+this[ia.fromCharCode(97+a)].toFixed(4)};a.toString=function(){return c.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+
306 ")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()};a.toMatrixString=function(){return"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")"};a.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"};a.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]};a.split=function(){var a=
307 {};a.dx=this.e;a.dy=this.f;var q=[[this.a,this.c],[this.b,this.d]];a.scalex=ga(b(q[0]));f(q[0]);a.shear=q[0][0]*q[1][0]+q[0][1]*q[1][1];q[1]=[q[1][0]-q[0][0]*a.shear,q[1][1]-q[0][1]*a.shear];a.scaley=ga(b(q[1]));f(q[1]);a.shear/=a.scaley;var h=-q[0][1],q=q[1][1];0>q?(a.rotate=c.deg(Ga.acos(q)),0>h&&(a.rotate=360-a.rotate)):a.rotate=c.deg(Ga.asin(h));a.isSimple=!+a.shear.toFixed(9)&&(a.scalex.toFixed(9)==a.scaley.toFixed(9)||!a.rotate);a.isSuperSimple=!+a.shear.toFixed(9)&&a.scalex.toFixed(9)==a.scaley.toFixed(9)&&
308 !a.rotate;a.noRotation=!+a.shear.toFixed(9)&&!a.rotate;return a};a.toTransformString=function(a){a=a||this[p]();return a.isSimple?(a.scalex=+a.scalex.toFixed(4),a.scaley=+a.scaley.toFixed(4),a.rotate=+a.rotate.toFixed(4),(a.dx||a.dy?"t"+[a.dx,a.dy]:"")+(1!=a.scalex||1!=a.scaley?"s"+[a.scalex,a.scaley,0,0]:"")+(a.rotate?"r"+[a.rotate,0,0]:"")):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}})(F.prototype);var qa=navigator.userAgent.match(/Version\/(.*?)\s/)||navigator.userAgent.match(/Chrome\/(\d+)/);
309 "Apple Computer, Inc."==navigator.vendor&&(qa&&4>qa[1]||"iP"==navigator.platform.slice(0,2))||"Google Inc."==navigator.vendor&&qa&&8>qa[1]?h.safari=function(){var a=this.rect(-99,-99,this.width+99,this.height+99).attr({stroke:"none"});setTimeout(function(){a.remove()});return!0}:h.safari=ra;for(var tc=function(){this.returnValue=!1},hd=function(){return this.originalEvent.preventDefault()},id=function(){this.cancelBubble=!0},jd=function(){return this.originalEvent.stopPropagation()},Ba=c.addEvent=
310 function(){if(fa.doc.addEventListener)return function(a,c,b,f){var q=xa&&na[c]?na[c]:c,h=function(q){var h=fa.doc.documentElement.scrollTop||fa.doc.body.scrollTop,u=fa.doc.documentElement.scrollLeft||fa.doc.body.scrollLeft;if(xa&&na[m](c))for(var d=0,A=q.targetTouches&&q.targetTouches.length;d<A;d++)if(q.targetTouches[d].target==a){A=q;q=q.targetTouches[d];q.originalEvent=A;q.preventDefault=hd;q.stopPropagation=jd;break}return b.call(f,q,q.clientX+u,q.clientY+h)};a.addEventListener(q,h,!1);return function(){a.removeEventListener(q,
311 h,!1);return!0}};if(fa.doc.attachEvent)return function(a,c,b,f){var q=function(a){a=a||fa.win.event;var c=a.clientX+(fa.doc.documentElement.scrollLeft||fa.doc.body.scrollLeft),q=a.clientY+(fa.doc.documentElement.scrollTop||fa.doc.body.scrollTop);a.preventDefault=a.preventDefault||tc;a.stopPropagation=a.stopPropagation||id;return b.call(f,a,c,q)};a.attachEvent("on"+c,q);return function(){a.detachEvent("on"+c,q);return!0}}}(),Cc=[],Da=function(a){for(var b=a.clientX,f=a.clientY,q=fa.doc.documentElement.scrollTop||
312 fa.doc.body.scrollTop,h=fa.doc.documentElement.scrollLeft||fa.doc.body.scrollLeft,u,d=Cc.length;d--;){u=Cc[d];if(xa)for(var A=a.touches.length,G;A--;){if(G=a.touches[A],G.identifier==u.el._drag.id){b=G.clientX;f=G.clientY;(a.originalEvent?a.originalEvent:a).preventDefault();break}}else a.preventDefault();if(!u.el.removed){var A=c._engine.getNode(u.el),e=A.nextSibling,r=A.parentNode,g=A.style.display;fa.win.opera&&r.removeChild(A);A.style.display="none";G=u.el.paper.getElementByPoint(b,f);A.style.display=
313 g;fa.win.opera&&(e?r.insertBefore(A,e):r.appendChild(A));G&&l("raphael.drag.over."+u.el.id,u.el,G);b+=h;f+=q;l("raphael.drag.move."+u.el.id,u.move_scope||u.el,b-u.el._drag.x,f-u.el._drag.y,b,f,a)}}},Vc=function(a){c.unmousemove(Da).unmouseup(Vc);for(var b=Cc.length,f;b--;)f=Cc[b],f.el._drag={},l("raphael.drag.end."+f.el.id,f.end_scope||f.start_scope||f.move_scope||f.el,a);Cc=[]},Sa=c.el={},cd=W.length;cd--;)(function(a){c[a]=Sa[a]=function(b,f){c.is(b,"function")&&(this.events=this.events||[],this.events.push({name:a,
314 f:b,unbind:Ba(this.shape||this.node||fa.doc,a,b,f||this)}));return this};c["un"+a]=Sa["un"+a]=function(c){for(var b=this.events||[],f=b.length;f--;)if(b[f].name==a&&b[f].f==c){b[f].unbind();b.splice(f,1);!b.length&&delete this.events;break}return this}})(W[cd]);Sa.data=function(a,b){var f=P[this.id]=P[this.id]||{};if(1==arguments.length){if(c.is(a,"object")){for(var q in a)a[m](q)&&this.data(q,a[q]);return this}l("raphael.data.get."+this.id,this,f[a],a);return f[a]}f[a]=b;l("raphael.data.set."+this.id,
315 this,b,a);return this};Sa.removeData=function(a){null==a?delete P[this.id]:P[this.id]&&delete P[this.id][a];return this};Sa.getData=function(){return ab(P[this.id]||{})};var Kc=[],yc=function(){this.untrack=Ba(fa.doc,"mouseup",Sc,this)},Sc=function(){this.untrack();this.untrack=null;return this.fn&&this.fn.apply(this.scope||this.el,arguments)};Sa.mouseup=function(a,b,f){if(!f)return c.mouseup.apply(this,arguments);Kc.push(f={el:this,fn:a,scope:b});f.unbind=Ba(this.shape||this.node||fa.doc,"mousedown",
316 yc,f);return this};Sa.unmouseup=function(a){for(var b=Kc.length,f;b--;)Kc[b].el===this&&Kc[b].fn===a&&(f=Kc[b],f.unbind(),f.untrack&&f.untrack(),Kc.splice(b,1));return f?this:c.unmouseup.apply(this,arguments)};Sa.hover=function(a,c,b,f){return this.mouseover(a,b).mouseout(c,f||b)};Sa.unhover=function(a,c){return this.unmouseover(a).unmouseout(c)};var $a=[];Sa.drag=function(a,b,f,q,h,u){function d(A){(A.originalEvent||A).preventDefault();var G=fa.doc.documentElement.scrollTop||fa.doc.body.scrollTop,
317 e=fa.doc.documentElement.scrollLeft||fa.doc.body.scrollLeft;this._drag.x=A.clientX+e;this._drag.y=A.clientY+G;this._drag.id=A.identifier;!Cc.length&&c.mousemove(Da).mouseup(Vc);Cc.push({el:this,move_scope:q,start_scope:h,end_scope:u});b&&l.on("raphael.drag.start."+this.id,b);a&&l.on("raphael.drag.move."+this.id,a);f&&l.on("raphael.drag.end."+this.id,f);l("raphael.drag.start."+this.id,h||q||this,A.clientX+e,A.clientY+G,A)}this._drag={};$a.push({el:this,start:d});this.mousedown(d);return this};Sa.onDragOver=
318 function(a){a?l.on("raphael.drag.over."+this.id,a):l.unbind("raphael.drag.over."+this.id)};Sa.undrag=function(){for(var a=$a.length;a--;)$a[a].el==this&&(this.unmousedown($a[a].start),$a.splice(a,1),l.unbind("raphael.drag.*."+this.id));!$a.length&&c.unmousemove(Da).unmouseup(Vc);delete this._drag};Sa.follow=function(a,b,f){if(a.removed||a.constructor!==c.el.constructor)return this;a.followers.push({el:this,stalk:f={before:"insertBefore",after:"insertAfter"}[f],cb:b});f&&this[f](a);return this};Sa.unfollow=
319 function(a){if(a.removed||a.constructor!==c.el.constructor)return this;for(var b=0,f=a.followers.length;b<f;b++)if(a.followers[b].el===this){a.followers.splice(b,1);break}return this};h.hide=function(){this.canvas.style.visibility="hidden";return this};h.show=function(){this.canvas.style.visibility="";return this};h.group=function(){var a=arguments,b=Ka(a,!0),a=c._engine.group(this,a[0],b);return this.__set__&&this.__set__.push(a),this._elementsById[a.id]=a};h.circle=function(){var a=arguments,b=
320 Ka(a,!0),a=T(a,"cx",0,"cy",0,"r",0,"fill","none","stroke","#000"),b=c._engine.circle(this,a,b);return this.__set__&&this.__set__.push(b),this._elementsById[b.id]=b};h.rect=function(){var a=arguments,b=Ka(a,!0),a=T(a,"x",0,"y",0,"width",0,"height",0,"r",0,"fill","none","stroke","#000"),b=c._engine.rect(this,a,b);return this.__set__&&this.__set__.push(b),this._elementsById[b.id]=b};h.ellipse=function(){var a=arguments,b=Ka(a,!0),a=T(a,"x",0,"y",0,"rx",0,"ry",0,"fill","none","stroke","#000"),b=c._engine.ellipse(this,
321 a,b);return this.__set__&&this.__set__.push(b),this._elementsById[b.id]=b};h.path=function(){var a=arguments,b=Ka(a,!0),a=T(a,"path","","fill","none","stroke","#000"),b=c._engine.path(this,a,b);return this.__set__&&this.__set__.push(b),this._elementsById[b.id]=b};h.image=function(){var a=arguments,b=Ka(a,!0),a=T(a,"src","about:blank","x",0,"y",0,"width",0,"height",0);out=c._engine.image(this,a,b);return this.__set__&&this.__set__.push(out),this._elementsById[out.id]=out};h.text=function(){var a=arguments,
322 b=Ka(a,!0),a=T(a,"x",0,"y",0,"text","","stroke","none","fill","#000","text-anchor","middle","vertical-align","middle"),b=c._engine.text(this,a,b);return this.__set__&&this.__set__.push(b),this._elementsById[b.id]=b};h.set=function(a){!c.is(a,"array")&&(a=S.call(arguments,0,arguments.length));var b=new Ua(a);this.__set__&&this.__set__.push(b);return b};h.setStart=function(a){this.__set__=a||this.set()};h.setFinish=function(a){a=this.__set__;delete this.__set__;return a};h.setSize=function(a,b){return c._engine.setSize.call(this,
323 a,b)};h.setViewBox=function(a,b,f,q,h){return c._engine.setViewBox.call(this,a,b,f,q,h)};h.top=h.bottom=null;h.raphael=c;h.getElementByPoint=function(a,c){var b,f,q=this.canvas,h=fa.doc.elementFromPoint(a,c);if(fa.win.opera&&"svg"==h.tagName){f=q.getBoundingClientRect();b=q.ownerDocument;var u=b.body,d=b.documentElement;b=f.top+(fa.win.pageYOffset||d.scrollTop||u.scrollTop)-(d.clientTop||u.clientTop||0);f=f.left+(fa.win.pageXOffset||d.scrollLeft||u.scrollLeft)-(d.clientLeft||u.clientLeft||0);u=q.createSVGRect();
324 u.x=a-f;u.y=c-b;u.width=u.height=1;b=q.getIntersectionList(u,null);b.length&&(h=b[b.length-1])}if(!h)return null;for(;h.parentNode&&h!=q.parentNode&&!h.raphael;)h=h.parentNode;h==this.canvas.parentNode&&(h=q);return h=h&&h.raphael?this.getById(h.raphaelid):null};h.getElementsByBBox=function(a){var b=this.set();this.forEach(function(f){c.isBBoxIntersect(f.getBBox(),a)&&b.push(f)});return b};h.getById=function(a){return this._elementsById[a]||null};h.forEach=function(a,c){for(var b=this.bottom;b&&!1!==
325 a.call(c,b);)b=b.next;return this};h.getElementsByPoint=function(a,c){var b=this.set();this.forEach(function(f){f.isPointInside(a,c)&&b.push(f)});return b};Sa.isPointInside=function(a,b){var f=this.realPath=this.realPath||ka[this.type](this),q;return c.isPointInsidePath((q=this.attr("transform"))&&q.length&&c.transformPath(f,q)||f,a,b)};Sa.getBBox=function(a){if(this.removed)return{};var c=this._;if(a){if(c.dirty||!c.bboxwt)this.realPath=ka[this.type](this),c.bboxwt=Gb(this.realPath),c.bboxwt.toString=
326 C,c.dirty=0;return c.bboxwt}if(c.dirty||c.dirtyT||!c.bbox){if(c.dirty||!this.realPath)c.bboxwt=0,this.realPath=ka[this.type](this);c.bbox=Gb(Ca(this.realPath,this.matrix));c.bbox.toString=C;c.dirty=c.dirtyT=0}return c.bbox};Sa.clone=function(){if(this.removed)return null;var a=this.paper[this.type]().attr(this.attr());this.__set__&&this.__set__.push(a);return a};Sa.glow=function(a){if("text"==this.type)return null;a=a||{};var c=(a.width||10)+(+this.attr("stroke-width")||1),b=a.fill||!1,f=a.opacity||
327 0.5,q=a.offsetx||0,h=a.offsety||0;a=a.color||"#000";for(var u=c/2,d=this.paper,A=d.set(),G=this.realPath||ka[this.type](this),G=this.matrix?Ca(G,this.matrix):G,e=1;e<u+1;e++)A.push(d.path(G).attr({stroke:a,fill:b?a:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(c/u*e).toFixed(3),opacity:+(f/u).toFixed(3)}));return A.insertBefore(this).translate(q,h)};var Za=function(b,f,q,h,u,d,A,G,e){return null==e?J(b,f,q,h,u,d,A,G):c.findDotsAtSegment(b,f,q,h,u,d,A,G,a(b,f,q,h,u,d,A,
328 G,e))},Wc=function(a,b){return function(f,q,h){f=va(f);for(var u,d,A,G,e="",r={},g=0,t=0,p=f.length;t<p;t++){A=f[t];if("M"==A[0])u=+A[1],d=+A[2];else{G=Za(u,d,A[1],A[2],A[3],A[4],A[5],A[6]);if(g+G>q){if(b&&!r.start){u=Za(u,d,A[1],A[2],A[3],A[4],A[5],A[6],q-g);e+=["C"+u.start.x,u.start.y,u.m.x,u.m.y,u.x,u.y];if(h)return e;r.start=e;e=["M"+u.x,u.y+"C"+u.n.x,u.n.y,u.end.x,u.end.y,A[5],A[6]].join();g+=G;u=+A[5];d=+A[6];continue}if(!a&&!b)return u=Za(u,d,A[1],A[2],A[3],A[4],A[5],A[6],q-g),{x:u.x,y:u.y,
329 alpha:u.alpha}}g+=G;u=+A[5];d=+A[6]}e+=A.shift()+A}r.end=e;u=a?g:b?r:c.findDotsAtSegment(u,d,A[0],A[1],A[2],A[3],A[4],A[5],1);u.alpha&&(u={x:u.x,y:u.y,alpha:u.alpha});return u}},dd=Wc(1),ed=Wc(),Xc=Wc(0,1);c.getTotalLength=dd;c.getPointAtLength=ed;c.getSubpath=function(a,c,b){if(1E-6>this.getTotalLength(a)-b)return Xc(a,c).end;a=Xc(a,b,1);return c?Xc(a,c).end:a};Sa.getTotalLength=function(){if("path"==this.type)return this.node.getTotalLength?this.node.getTotalLength():dd(this.attrs.path)};Sa.getPointAtLength=
330 function(a){if("path"==this.type)return ed(this.attrs.path,a)};Sa.getSubpath=function(a,b){if("path"==this.type)return c.getSubpath(this.attrs.path,a,b)};var Ma=c.easing_formulas={linear:function(a){return a},"<":function(a){return da(a,1.7)},">":function(a){return da(a,0.48)},"<>":function(a){var c=0.48-a/1.04,b=ga(0.1734+c*c);a=b-c;a=da(ea(a),1/3)*(0>a?-1:1);c=-b-c;c=da(ea(c),1/3)*(0>c?-1:1);a=a+c+0.5;return 3*(1-a)*a*a+a*a*a},backIn:function(a){return a*a*(2.70158*a-1.70158)},backOut:function(a){a-=
331 1;return a*a*(2.70158*a+1.70158)+1},elastic:function(a){return a==!!a?a:da(2,-10*a)*ba(2*(a-0.075)*za/0.3)+1},bounce:function(a){a<1/2.75?a*=7.5625*a:a<2/2.75?(a-=1.5/2.75,a=7.5625*a*a+0.75):a<2.5/2.75?(a-=2.25/2.75,a=7.5625*a*a+0.9375):(a-=2.625/2.75,a=7.5625*a*a+0.984375);return a}};Ma.easeIn=Ma["ease-in"]=Ma["<"];Ma.easeOut=Ma["ease-out"]=Ma[">"];Ma.easeInOut=Ma["ease-in-out"]=Ma["<>"];Ma["back-in"]=Ma.backIn;Ma["back-out"]=Ma.backOut;var Ra=[],bd=d.requestAnimationFrame||d.webkitRequestAnimationFrame||
332 d.mozRequestAnimationFrame||d.oRequestAnimationFrame||d.msRequestAnimationFrame||function(a){setTimeout(a,16)},Jc=function(){for(var a=+new Date,b=0;b<Ra.length;b++){var f=Ra[b];if(!f.el.removed&&!f.paused){var q=a-f.start,h=f.ms,u=f.easing,A=f.from,d=f.diff,G=f.to,e=f.el,r={},t,p={},L;f.initstatus?(q=(f.initstatus*f.anim.top-f.prev)/(f.percent-f.prev)*h,f.status=f.initstatus,delete f.initstatus,f.stop&&Ra.splice(b--,1)):f.status=(f.prev+q/h*(f.percent-f.prev))/f.anim.top;if(!(0>q))if(q<h){var O=
333 u(q/h),z;for(z in A)if(A[m](z)){switch(U[z]){case X:t=+A[z]+O*h*d[z];break;case "colour":t="rgb("+[oc(la(A[z].r+O*h*d[z].r)),oc(la(A[z].g+O*h*d[z].g)),oc(la(A[z].b+O*h*d[z].b))].join()+")";break;case "path":t=[];q=0;for(u=A[z].length;q<u;q++){t[q]=[A[z][q][0]];G=1;for(p=A[z][q].length;G<p;G++)t[q][G]=(+A[z][q][G]+O*h*d[z][q][G]).toFixed(4);t[q]=t[q].join(R)}t=t.join(R);break;case "transform":if(d[z].real)for(t=[],q=0,u=A[z].length;q<u;q++)for(t[q]=[A[z][q][0]],G=1,p=A[z][q].length;G<p;G++)t[q][G]=
334 A[z][q][G]+O*h*d[z][q][G];else t=function(a){return+A[z][a]+O*h*d[z][a]},t=[["m",t(0),t(1),t(2),t(3),t(4),t(5)]];break;case "csv":if("clip-rect"==z)for(t=[],q=4;q--;)t[q]=+A[z][q]+O*h*d[z][q];break;default:for(u=[][Q](A[z]),t=[],q=e.ca[z].length;q--;)t[q]=+u[q]+O*h*d[z][q]}r[z]=t}e.attr(r);(function(a,c,b){setTimeout(function(){l("raphael.anim.frame."+a,c,b)})})(e.id,e,f.anim)}else{(function(a,b,f){setTimeout(function(){l("raphael.anim.frame."+b.id,b,f);l("raphael.anim.finish."+b.id,b,f);c.is(a,"function")&&
335 a.call(b)})})(f.callback,e,f.anim);e.attr(G);Ra.splice(b--,1);if(1<f.repeat&&!f.next){for(L in G)G[m](L)&&(p[L]=f.totalOrigin[L]);f.el.attr(p);g(f.anim,f.el,f.anim.percents[0],null,f.totalOrigin,f.repeat-1)}f.next&&!f.stop&&g(f.anim,f.el,f.next,null,f.totalOrigin,f.repeat)}}}c.svg&&e&&e.paper&&e.paper.safari();Ra.length&&bd(Jc)},oc=function(a){return 255<a?255:0>a?0:a};Sa.animateWith=function(a,b,f,q,h,u){if(this.removed)return u&&u.call(this),this;f=f instanceof e?f:c.animation(f,q,h,u);g(f,this,
336 f.percents[0],null,this.attr());f=0;for(q=Ra.length;f<q;f++)if(Ra[f].anim==b&&Ra[f].el==a){Ra[q-1].start=Ra[f].start;break}return this};Sa.onAnimation=function(a){a?l.on("raphael.anim.frame."+this.id,a):l.unbind("raphael.anim.frame."+this.id);return this};e.prototype.delay=function(a){var c=new e(this.anim,this.ms);c.times=this.times;c.del=+a||0;return c};e.prototype.repeat=function(a){var c=new e(this.anim,this.ms);c.del=this.del;c.times=Ga.floor(oa(a,0))||1;return c};c.animation=function(a,b,f,
337 q){if(a instanceof e)return a;if(c.is(f,"function")||!f)q=q||f||null,f=null;a=Object(a);b=+b||0;var h={},u,A;for(A in a)a[m](A)&&Z(A)!=A&&Z(A)+"%"!=A&&(u=!0,h[A]=a[A]);return u?(f&&(h.easing=f),q&&(h.callback=q),new e({100:h},b)):new e(a,b)};Sa.animate=function(a,b,f,q){if(this.removed)return q&&q.call(this),this;a=a instanceof e?a:c.animation(a,b,f,q);g(a,this,a.percents[0],null,this.attr());return this};Sa.setTime=function(a,c){a&&null!=c&&this.status(a,ua(c,a.ms)/a.ms);return this};Sa.status=function(a,
338 c){var b=[],f=0,q,h;if(null!=c)return g(a,this,-1,ua(c,1)),this;for(q=Ra.length;f<q;f++)if(h=Ra[f],h.el.id==this.id&&(!a||h.anim==a)){if(a)return h.status;b.push({anim:h.anim,status:h.status})}return a?0:b};Sa.pause=function(a){for(var c=0;c<Ra.length;c++)Ra[c].el.id!=this.id||a&&Ra[c].anim!=a||!1===l("raphael.anim.pause."+this.id,this,Ra[c].anim)||(Ra[c].paused=!0);return this};Sa.resume=function(a){for(var c=0;c<Ra.length;c++)if(Ra[c].el.id==this.id&&(!a||Ra[c].anim==a)){var b=Ra[c];!1!==l("raphael.anim.resume."+
339 this.id,this,b.anim)&&(delete b.paused,this.status(b.anim,b.status))}return this};Sa.stop=function(a){for(var c=0;c<Ra.length;c++)Ra[c].el.id!=this.id||a&&Ra[c].anim!=a||!1!==l("raphael.anim.stop."+this.id,this,Ra[c].anim)&&Ra.splice(c--,1);return this};l.on("raphael.remove",n);l.on("raphael.clear",n);Sa.toString=function(){return"Raphaรซlโ€™s object"};Sa.toFront=function(){if(this.removed)return this;var a=c._engine.getNode(this),b=this.parent,f=this.followers,q;c._tofront(this,b)&&b.canvas.appendChild(a);
340 a=0;for(b=f.length;a<b;a++)(q=f[a]).stalk&&q.el[q.stalk](this);return this};Sa.toBack=function(){if(this.removed)return this;var a=c._engine.getNode(this),b=this.parent,f=this.followers,q;c._toback(this,b)&&b.canvas.insertBefore(a,b.canvas.firstChild);a=0;for(b=f.length;a<b;a++)(q=f[a]).stalk&&q.el[q.stalk](this);return this};Sa.insertAfter=function(a){if(this.removed)return this;var b=c._engine.getNode(this),f=c._engine.getLastNode(a),q=a.parent.canvas,h=this.followers,u;f.nextSibling?q.insertBefore(b,
341 f.nextSibling):q.appendChild(b);c._insertafter(this,a,this.parent,a.parent);b=0;for(f=h.length;b<f;b++)(u=h[b]).stalk&&u.el[u.stalk](a);return this};Sa.insertBefore=function(a){if(this.removed)return this;var b=c._engine.getNode(this),f=c._engine.getNode(a),q=this.followers,h;a.parent.canvas.insertBefore(b,f);c._insertbefore(this,a,this.parent,a.parent);this.parent=a.parent;b=0;for(f=q.length;b<f;b++)(h=q[b]).stalk&&h.el[h.stalk](a);return this};Sa.appendChild=function(a){if(this.removed||"group"!==
342 this.type)return this;var b=this.followers,f,q,h;if(a.parent===this)return a.toFront(),this;q=c._engine.getNode(a);c._tear(a,a.parent);this.canvas.appendChild(q);a.parent=this;!this.bottom&&(this.bottom=a);a.prev=this.top;a.next=null;this.top&&(this.top.next=a);this.top=a;q=0;for(h=b.length;q<h;q++)(f=b[q]).stalk&&f.el[f.stalk](a);return this};Sa.removeChild=function(a){if(this.removed||"group"!==this.type||a.parent!==this)return this;var b=c._engine.getNode(a),f=this.paper;c._tear(a,this);f.canvas.appendChild(b);
343 this.parent=f;!f.bottom&&(f.bottom=this);(this.prev=f.top)&&(f.top.next=this);f.top=this;this.next=null;return this};var Ua=function(a){this.items=[];this.length=0;this.type="set";if(a)for(var c=0,b=a.length;c<b;c++)!a[c]||a[c].constructor!=Sa.constructor&&a[c].constructor!=Ua||(this[this.items.length]=this.items[this.items.length]=a[c],this.length++)},gb=Ua.prototype;gb.push=function(){for(var a,c,b=0,f=arguments.length;b<f;b++)!(a=arguments[b])||a.constructor!=Sa.constructor&&a.constructor!=Ua||
344 (c=this.items.length,this[c]=this.items[c]=a,this.length++);return this};gb.pop=function(){this.length&&delete this[this.length--];return this.items.pop()};gb.forEach=function(a,c){for(var b=0,f=this.items.length;b<f&&!1!==a.call(c,this.items[b],b);b++);return this};for(var zc in Sa)Sa[m](zc)&&(gb[zc]=function(a){return function(){var c=arguments;return this.forEach(function(b){b[a][I](b,c)})}}(zc));gb.attr=function(a,b){if(a&&c.is(a,$)&&c.is(a[0],"object"))for(var f=0,q=a.length;f<q;f++)this.items[f].attr(a[f]);
345 else for(f=0,q=this.items.length;f<q;f++)this.items[f].attr(a,b);return this};gb.clear=function(){for(;this.length;)this.pop()};gb.splice=function(a,c,b){a=0>a?oa(this.length+a,0):a;c=oa(0,ua(this.length-a,isNaN(c)&&this.length||c));var f=[],q=[],h=[],u;for(u=2;u<arguments.length;u++)h.push(arguments[u]);for(u=0;u<c;u++)q.push(this[a+u]);for(;u<this.length-a;u++)f.push(this[a+u]);var A=h.length;for(u=0;u<A+f.length;u++)this.items[a+u]=this[a+u]=u<A?h[u]:f[u-A];for(u=this.items.length=this.length-=
346 c-A;this[u];)delete this[u++];return new Ua(q)};gb.exclude=function(a){for(var c=0,b=this.length;c<b;c++)if(this[c]==a)return this.splice(c,1),!0};gb.animate=function(a,b,f,q){!c.is(f,"function")&&f||(q=f||null);var h=this.items.length,u=h,A=this,d;if(!h)return this;q&&(d=function(){!--h&&q.call(A)});f=c.is(f,"string")?f:d;b=c.animation(a,b,f,d);for(a=this.items[--u].animate(b);u--;)this.items[u]&&!this.items[u].removed&&this.items[u].animateWith(a,b,b);return this};gb.insertAfter=function(a){for(var c=
347 this.items.length;c--;)this.items[c].insertAfter(a);return this};gb.getBBox=function(){for(var a=[],c=[],b=[],f=[],q=this.items.length;q--;)if(!this.items[q].removed){var u=this.items[q].getBBox();a.push(u.x);c.push(u.y);b.push(u.x+u.width);f.push(u.y+u.height)}a=ua[I](0,a);c=ua[I](0,c);b=oa[I](0,b);f=oa[I](0,f);return{x:a,y:c,x2:b,y2:f,width:b-a,height:f-c}};gb.clone=function(a){a=new Ua;for(var c=0,b=this.items.length;c<b;c++)a.push(this.items[c].clone());return a};gb.toString=function(){return"Raphaรซlโ€˜s set"};
348 gb.glow=function(a){var c=this.paper.set();this.forEach(function(b,f){var q=b.glow(a);null!=q&&q.forEach(function(a,b){c.push(a)})});return c};c.registerFont=function(a){if(!a.face)return a;this.fonts=this.fonts||{};var c={w:a.w,face:{},glyphs:{}},b=a.face["font-family"],f;for(f in a.face)a.face[m](f)&&(c.face[f]=a.face[f]);this.fonts[b]?this.fonts[b].push(c):this.fonts[b]=[c];if(!a.svg){c.face["units-per-em"]=Aa(a.face["units-per-em"],10);for(var q in a.glyphs)if(a.glyphs[m](q)&&(b=a.glyphs[q],c.glyphs[q]=
349 {w:b.w,k:{},d:b.d&&"M"+b.d.replace(/[mlcxtrv]/g,function(a){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[a]||"M"})+"z"},b.k))for(var u in b.k)b[m](u)&&(c.glyphs[q].k[u]=b.k[u])}return a};h.getFont=function(a,b,f,q){q=q||"normal";f=f||"normal";b=+b||{normal:400,bold:700,lighter:300,bolder:800}[b]||400;if(c.fonts){var u=c.fonts[a];if(!u){a=RegExp("(^|\\s)"+a.replace(/[^\w\d\s+!~.:_-]/g,"")+"(\\s|$)","i");for(var h in c.fonts)if(c.fonts[m](h)&&a.test(h)){u=c.fonts[h];break}}var A;if(u)for(h=0,a=u.length;h<
350 a&&(A=u[h],A.face["font-weight"]!=b||A.face["font-style"]!=f&&A.face["font-style"]||A.face["font-stretch"]!=q);h++);return A}};h.print=function(a,b,f,q,u,h,A){h=h||"middle";A=oa(ua(A||0,1),-1);var d=ia(f)[p](""),G=0,e=0,r="";c.is(q,f)&&(q=this.getFont(q));if(q){f=(u||16)/q.face["units-per-em"];var g=q.face.bbox[p](qb);u=+g[0];var t=g[3]-g[1],L=0;h=+g[1]+("baseline"==h?t+ +q.face.descent:t/2);for(var g=0,z=d.length;g<z;g++){if("\n"==d[g])e=E=G=0,L+=t;else var O=e&&q.glyphs[d[g-1]]||{},E=q.glyphs[d[g]],
351 G=G+(e?(O.w||q.w)+(O.k&&O.k[d[g]]||0)+q.w*A:0),e=1;E&&E.d&&(r+=c.transformPath(E.d,["t",G*f,L*f,"s",f,f,u,h,"t",(a-u)/f,(b-h)/f]))}}return this.path(r).attr({fill:"#000",stroke:"none"})};h.add=function(a){if(c.is(a,"array"))for(var b=this.set(),f=0,q=a.length,u;f<q;f++)u=a[f]||{},N[m](u.type)&&b.push(this[u.type]().attr(u));return b};c.format=function(a,b){var f=c.is(b,$)?[0][Q](b):arguments;a&&c.is(a,"string")&&f.length-1&&(a=a.replace(sb,function(a,c){return null==f[++c]?"":f[c]}));return a||""};
352 c.fullfill=function(){var a=/\{([^\}]+)\}/g,c=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,b=function(a,b,f){var q=f;b.replace(c,function(a,c,b,f,u){c=c||f;q&&(c in q&&(q=q[c]),"function"==typeof q&&u&&(q=q()))});return q=(null==q||q==f?a:q)+""};return function(c,f){return String(c).replace(a,function(a,c){return b(a,c,f)})}}();c.ninja=function(){sa?fa.win.Raphael=ya:delete Raphael;return c};var kd=c.vml&&0.5||0;c.crispBound=Bb(function(a,c,b,f,q){var u={},h;a=a||0;c=c||0;b=b||0;f=f||
353 0;q=q||0;h=q%2/2+kd;u.x=la(a+h)-h;u.y=la(c+h)-h;u.width=la(a+b+h)-h-u.x;u.height=la(c+f+h)-h-u.y;u["stroke-width"]=q;0===u.width&&0!==b&&(u.width=1);0===u.height&&0!==f&&(u.height=1);return u},c);Sa.crisp=function(){var a=this.attrs,b,f=this.attr(["x","y","width","height","stroke-width"]),f=c.crispBound(f.x,f.y,f.width,f.height,f["stroke-width"]);for(b in f)a[b]===f[b]&&delete f[b];return this.attr(f)};c.st=gb;c.define=function(a,b,f,q,u,h){var A;if(c.is(a,$))for(h=0,A=a.length;h<A;h++)c.define(a[h]);
354 else if(c.is(a,"object"))c.define(a.name,a[a.name],a.ca,a.fn,a.e,a.data);else if(a&&!c.fn[a])return c.fn[a]=function(){var h=arguments,A=b.apply(this,h),d;if(q&&c.is(q,"object"))for(d in q)A[d]=q[d];if(u&&c.is(u,"object"))for(d in u)A[d]&&A[d](u[d]);if(f){if(c.is(f,"function"))A.ca[a]=f;else for(d in f)A.ca[d]=f[d];A.ca[a]&&(c._lastArgIfGroup(h,!0),A.attr(a,H.call(h)))}return A},f&&(c.fn[a].ca=f),q&&(c.fn[a].fn=q),u&&(c.fn[a].e=u),h&&(c.fn[a].data=h),c.fn[a]};(function(a,b,f){function q(){/in/.test(a.readyState)?
355 setTimeout(q,9):c.eve("raphael.DOMload")}null==a.readyState&&a.addEventListener&&(a.addEventListener(b,f=function(){a.removeEventListener(b,f,!1);a.readyState="complete"},!1),a.readyState="loading");q()})(document,"DOMContentLoaded");l.on("raphael.DOMload",function(){s=!0});(function(){if(c.svg){var a=String,b=parseFloat,f=parseInt,q=Math,u=q.max,h=q.abs,A=q.pow,d=q.sqrt,G=/[, ]+/,e=!(!/AppleWebKit/.test(c._g.win.navigator.userAgent)||/Chrome/.test(c._g.win.navigator.userAgent)&&!(29>c._g.win.navigator.appVersion.match(/Chrome\/(\d+)\./)[1])),
356 r=c.eve,g={block:"M5,0 0,2.5 5,5z",classic:"M5,0 0,2.5 5,5 3.5,3 3.5,2z",diamond:"M2.5,0 5,2.5 2.5,5 0,2.5z",open:"M6,1 1,3.5 6,6",oval:"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},t={};c.toString=function(){return"Your browser supports SVG.\nYou are running Raphaรซl "+this.version};c._url="";var p=function(a,c){var b=a.gradient;if(b){if(b===c)return;b.refCount--;b.refCount||b.parentNode.removeChild(b);delete a.gradient}c&&(a.gradient=c,c.refCount++)},L=c._createNode=function(b,f){if(f){"string"==
357 typeof b&&(b=L(b));for(var q in f)f.hasOwnProperty(q)&&("xlink:"==q.substring(0,6)?b.setAttributeNS("http://www.w3.org/1999/xlink",q.substring(6),a(f[q])):b.setAttribute(q,a(f[q])))}else b=c._g.doc.createElementNS("http://www.w3.org/2000/svg",b);return b},z={userSpaceOnUse:"userSpaceOnUse",objectBoundingBox:"objectBoundingBox"},O={pad:"pad",redlect:"reflect",repeat:"repeat"},E=function(f,G){if(!f.paper||!f.paper.defs)return 0;var e="linear",r=f.paper,g=(r.id+"-"+G).replace(/[\(\)\s%:,\xb0#]/g,"_"),
358 t=0.5,E=0.5,va,n,m,N,M,s=f.node,qa=s.style,l=c._g.doc.getElementById(g);if(!l){G=a(G).replace(c._radial_gradient,function(a,c){e="radial";c=c&&c.split(",")||[];N=c[5];M=c[6];var f=c[0],q=c[1],u=c[2],h=c[3],G=c[4],r=f&&q,g;u&&(va=/\%/.test(u)?u:b(u));if(N===z.userSpaceOnUse)return r&&(t=f,E=q),h&&G&&(n=h,m=G,r||(t=n,E=m)),"";r&&(t=b(f),E=b(q),f=2*(0.5<E)-1,0.25<(g=A(t-0.5,2))+A(E-0.5,2)&&0.25>g&&(E=d(0.25-g)*f+0.5)&&0.5!==E&&(E=E.toFixed(5)-1E-5*f));h&&G&&(n=b(h),m=b(G),f=2*(0.5<m)-1,0.25<(g=A(n-0.5,
359 2))+A(m-0.5,2)&&0.25>g&&(m=d(0.25-g)*f+0.5)&&0.5!==m&&(m=m.toFixed(5)-1E-5*f),r||(t=n,E=m));return""});G=G.split(/\s*\-\s*/);if("linear"==e){var l=G.shift(),V=l.match(/\((.*)\)/),W,V=V&&V[1]&&V[1].split(/\s*\,\s*/),l=-b(l);if(isNaN(l))return null;V&&V.length?(V[0]in z?(N=V.shift(),V[0]in O&&(M=V.shift())):(V[4]&&(N=V[4]),V[5]&&(M=V[5])),W=[V[0]||"0%",V[1]||"0%",V[2]||"100%",V[3]||"0%"]):(W=[0,0,q.cos(c.rad(l)),q.sin(c.rad(l))],l=1/(u(h(W[2]),h(W[3]))||1),W[2]*=l,W[3]*=l,0>W[2]&&(W[0]=-W[2],W[2]=0),
360 0>W[3]&&(W[1]=-W[3],W[3]=0))}V=c._parseDots(G);if(!V)return null;l=L(e+"Gradient",{id:g});l.refCount=0;N in z&&l.setAttribute("gradientUnits",a(N));M in O&&l.setAttribute("spreadMethod",a(M));"radial"===e?(void 0!==va&&l.setAttribute("r",a(va)),void 0!==n&&void 0!==m&&(l.setAttribute("cx",a(n)),l.setAttribute("cy",a(m))),l.setAttribute("fx",a(t)),l.setAttribute("fy",a(E))):L(l,{x1:W[0],y1:W[1],x2:W[2],y2:W[3]});W=0;for(var Ib=V.length;W<Ib;W++)l.appendChild(L("stop",{offset:V[W].offset?V[W].offset:
361 W?"100%":"0%","stop-color":V[W].color||"#fff","stop-opacity":void 0===V[W].opacity?1:V[W].opacity}));r.defs.appendChild(l)}p(f,l);L(s,{fill:"url('"+c._url+"#"+g+"')",opacity:1,"fill-opacity":1});qa.fill="";qa.opacity=1;return qa.fillOpacity=1},va=function(a){var c=a.getBBox(1);L(a.pattern,{patternTransform:a.matrix.invert()+" translate("+c.x+","+c.y+")"})},n=function(b,f,q){if("path"==b.type){for(var u=a(f).toLowerCase().split("-"),h=b.paper,A=q?"end":"start",d=b.node,G=b.attrs,e=G["stroke-width"],
362 r=u.length,p="classic",z,O,E=3,va=3,n=5;r--;)switch(u[r]){case "block":case "classic":case "oval":case "diamond":case "open":case "none":p=u[r];break;case "wide":va=5;break;case "narrow":va=2;break;case "long":E=5;break;case "short":E=2}"open"==p?(E+=2,va+=2,n+=2,z=1,O=q?4:1,u={fill:"none",stroke:G.stroke}):(O=z=E/2,u={fill:G.stroke,stroke:"none"});b._.arrows?q?(b._.arrows.endPath&&t[b._.arrows.endPath]--,b._.arrows.endMarker&&t[b._.arrows.endMarker]--):(b._.arrows.startPath&&t[b._.arrows.startPath]--,
363 b._.arrows.startMarker&&t[b._.arrows.startMarker]--):b._.arrows={};if("none"!=p){var r="raphael-marker-"+p,m="raphael-marker-"+A+p+E+va+"-obj"+b.id;c._g.doc.getElementById(r)?t[r]++:(h.defs.appendChild(L(L("path"),{"stroke-linecap":"round",d:g[p],id:r})),t[r]=1);var N=c._g.doc.getElementById(m);N?(t[m]++,E=N.getElementsByTagName("use")[0]):(N=L(L("marker"),{id:m,markerHeight:va,markerWidth:E,orient:"auto",refX:O,refY:va/2}),E=L(L("use"),{"xlink:href":"#"+r,transform:(q?"rotate(180 "+E/2+" "+va/2+
364 ") ":"")+"scale("+E/n+","+va/n+")","stroke-width":(1/((E/n+va/n)/2)).toFixed(4)}),N.appendChild(E),h.defs.appendChild(N),t[m]=1);L(E,u);h=z*("diamond"!=p&&"oval"!=p);q?(q=b._.arrows.startdx*e||0,e=c.getTotalLength(G.path)-h*e):(q=h*e,e=c.getTotalLength(G.path)-(b._.arrows.enddx*e||0));u={};u["marker-"+A]="url('"+c._url+"#"+m+"')";if(e||q)u.d=Raphael.getSubpath(G.path,q,e);L(d,u);b._.arrows[A+"Path"]=r;b._.arrows[A+"Marker"]=m;b._.arrows[A+"dx"]=h;b._.arrows[A+"Type"]=p;b._.arrows[A+"String"]=f}else q?
365 (q=b._.arrows.startdx*e||0,e=c.getTotalLength(G.path)-q):(q=0,e=c.getTotalLength(G.path)-(b._.arrows.enddx*e||0)),b._.arrows[A+"Path"]&&L(d,{d:Raphael.getSubpath(G.path,q,e)}),delete b._.arrows[A+"Path"],delete b._.arrows[A+"Marker"],delete b._.arrows[A+"dx"],delete b._.arrows[A+"Type"],delete b._.arrows[A+"String"];for(u in t)t.hasOwnProperty(u)&&!t[u]&&(b=c._g.doc.getElementById(u))&&b.parentNode.removeChild(b)}},N={"":[0],none:[0],"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,
366 3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},m=function(b,f,q){var u=N[a(f).toLowerCase()];if(f=u||void 0!==f&&[].concat(f)){var h=b.attrs["stroke-width"]||"1";q={round:h,square:h,butt:0}[b.attrs["stroke-linecap"]||q["stroke-linecap"]]||0;var A,d=A=f.length;if(u)for(;A--;)f[A]=f[A]*h+(A%2?1:-1)*q;else for(A=0;A<d;A+=2)f[A]-=q,f[A+1]&&(f[A+1]+=q),0>=f[A]&&(f[A]=0.1);c.is(f,"array")&&L(b.node,{"stroke-dasharray":f.join(",")})}},M=function(a,c){for(var b in c)r("raphael.attr."+
367 b+"."+a.id,a,c[b],b),a.ca[b]&&a.attr(b,c[b])},s=c._setFillAndStroke=function(b,q){if(b.paper.canvas){var A=b.node,d=b.attrs,r=b.paper,g=A.style,t=g.visibility;g.visibility="hidden";for(var z in q)if(q.hasOwnProperty(z)&&c._availableAttrs.hasOwnProperty(z)){var O=q[z];d[z]=O;switch(z){case "blur":b.blur(O);break;case "href":case "title":case "target":var N=A.parentNode;if("a"!=N.tagName.toLowerCase()){if(""==O)break;var M=L("a");M.raphael=!0;M.raphaelid=A.raphaelid;N.insertBefore(M,A);M.appendChild(A);
368 N=M}"target"==z?N.setAttributeNS("http://www.w3.org/1999/xlink","show","blank"==O?"new":O):N.setAttributeNS("http://www.w3.org/1999/xlink",z,O);A.titleNode=N;break;case "cursor":g.cursor=O;break;case "transform":b.transform(O);break;case "rotation":c.is(O,"array")?b.rotate.apply(b,O):b.rotate(O);break;case "arrow-start":n(b,O);break;case "arrow-end":n(b,O,1);break;case "clip-path":var s=!0;case "clip-rect":N=!s&&a(O).split(G);b._.clipispath=!!s;if(s||4==N.length){b.clip&&b.clip.parentNode.parentNode.removeChild(b.clip.parentNode);
369 var M=L("clipPath"),l=L(s?"path":"rect");M.id=c.createUUID();L(l,s?{d:O?d["clip-path"]=c._pathToAbsolute(O):c._availableAttrs.path,fill:"none"}:{x:N[0],y:N[1],width:N[2],height:N[3],transform:b.matrix.invert()});M.appendChild(l);r.defs.appendChild(M);L(A,{"clip-path":"url('"+c._url+"#"+M.id+"')"});b.clip=l}!O&&(O=A.getAttribute("clip-path"))&&((O=c._g.doc.getElementById(O.replace(/(^url\(#|\)$)/g,"")))&&O.parentNode.removeChild(O),L(A,{"clip-path":""}),delete b.clip);break;case "path":"path"==b.type&&
370 (L(A,{d:O?d.path=c._pathToAbsolute(O):c._availableAttrs.path}),b._.dirty=1,b._.arrows&&("startString"in b._.arrows&&n(b,b._.arrows.startString),"endString"in b._.arrows&&n(b,b._.arrows.endString,1)));break;case "width":if(A.setAttribute(z,O),b._.dirty=1,d.fx)z="x",O=d.x;else break;case "x":d.fx&&(O=-d.x-(d.width||0));case "rx":if("rx"==z&&"rect"==b.type)break;case "cx":A.setAttribute(z,O);b.pattern&&va(b);b._.dirty=1;break;case "height":if(A.setAttribute(z,O),b._.dirty=1,d.fy)z="y",O=d.y;else break;
371 case "y":d.fy&&(O=-d.y-(d.height||0));case "ry":if("ry"==z&&"rect"==b.type)break;case "cy":A.setAttribute(z,O);b.pattern&&va(b);b._.dirty=1;break;case "r":"rect"==b.type?L(A,{rx:O,ry:O}):A.setAttribute(z,O);b._.dirty=1;break;case "src":"image"==b.type&&A.setAttributeNS("http://www.w3.org/1999/xlink","href",O);break;case "stroke-width":if(1!=b._.sx||1!=b._.sy)O/=u(h(b._.sx),h(b._.sy))||1;r._vbSize&&(O*=r._vbSize);e&&0===O&&(O=1E-6);A.setAttribute(z,O);d["stroke-dasharray"]&&m(b,d["stroke-dasharray"],
372 q);b._.arrows&&("startString"in b._.arrows&&n(b,b._.arrows.startString),"endString"in b._.arrows&&n(b,b._.arrows.endString,1));break;case "stroke-dasharray":m(b,O,q);break;case "fill":var W=a(O).match(c._ISURL);if(W){var M=L("pattern"),qa=L("image");M.id=c.createUUID();L(M,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1});L(qa,{x:0,y:0,"xlink:href":W[1]});M.appendChild(qa);(function(a){c._preload(W[1],function(){var c=this.offsetWidth,b=this.offsetHeight;L(a,{width:c,height:b});L(qa,{width:c,
373 height:b});r.safari()})})(M);r.defs.appendChild(M);g.fill="url('"+c._url+"#"+M.id+"')";L(A,{fill:g.fill});b.pattern=M;b.pattern&&va(b);break}N=c.getRGB(O);if(!N.error)delete q.gradient,delete d.gradient,!c.is(d.opacity,"undefined")&&c.is(q.opacity,"undefined")&&L(A,{opacity:d.opacity}),!c.is(d["fill-opacity"],"undefined")&&c.is(q["fill-opacity"],"undefined")&&L(A,{"fill-opacity":d["fill-opacity"]}),b.gradient&&p(b);else if(("circle"==b.type||"ellipse"==b.type||"r"!=a(O).charAt())&&E(b,O)){if("opacity"in
374 d||"fill-opacity"in d)if(N=c._g.doc.getElementById(A.getAttribute("fill").replace(/^url\(#|\)$/g,"")))N=N.getElementsByTagName("stop"),L(N[N.length-1],{"stop-opacity":("opacity"in d?d.opacity:1)*("fill-opacity"in d?d["fill-opacity"]:1)});d.gradient=O;d.fill="none";g.fill="";break}N.hasOwnProperty("opacity")?(L(A,{"fill-opacity":g.fillOpacity=1<N.opacity?N.opacity/100:N.opacity}),b._.fillOpacityDirty=!0):b._.fillOpacityDirty&&c.is(d["fill-opacity"],"undefined")&&c.is(q["fill-opacity"],"undefined")&&
375 (A.removeAttribute("fill-opacity"),g.fillOpacity="",delete b._.fillOpacityDirty);case "stroke":N=c.getRGB(O);A.setAttribute(z,N.hex);g[z]=N.hex;"stroke"==z&&(N.hasOwnProperty("opacity")?(L(A,{"stroke-opacity":g.strokeOpacity=1<N.opacity?N.opacity/100:N.opacity}),b._.strokeOpacityDirty=!0):b._.strokeOpacityDirty&&c.is(d["stroke-opacity"],"undefined")&&c.is(q["stroke-opacity"],"undefined")&&(A.removeAttribute("stroke-opacity"),g.strokeOpacity="",delete b._.strokeOpacityDirty),b._.arrows&&("startString"in
376 b._.arrows&&n(b,b._.arrows.startString),"endString"in b._.arrows&&n(b,b._.arrows.endString,1)));break;case "gradient":"circle"!=b.type&&"ellipse"!=b.type&&"r"==a(O).charAt()||E(b,O);break;case "line-height":case "vertical-align":break;case "visibility":"hidden"===O?b.hide():b.show();break;case "opacity":d.gradient&&!d.hasOwnProperty("stroke-opacity")&&L(A,{"stroke-opacity":1<O?O/100:O});case "fill-opacity":if(d.gradient){if(N=c._g.doc.getElementById(A.getAttribute("fill").replace(/^url\(#|\)$/g,"")))N=
377 N.getElementsByTagName("stop"),L(N[N.length-1],{"stop-opacity":O});break}default:"font-size"==z&&(O=f(O,10)+"px"),N=z.replace(/(\-.)/g,function(a){return a.substring(1).toUpperCase()}),g[N]=O,b._.dirty=1,A.setAttribute(z,O)}}"text"===b.type&&V(b,q);g.visibility=t}},V=function(f,q){if("text"==f.type&&(q.hasOwnProperty("text")||q.hasOwnProperty("font")||q.hasOwnProperty("font-size")||q.hasOwnProperty("x")||q.hasOwnProperty("y")||q.hasOwnProperty("line-height")||q.hasOwnProperty("vertical-align"))){var u=
378 f.attrs,h=f.node,A=h.firstChild&&c._g.doc.defaultView.getComputedStyle(h.firstChild,"")?b(c._g.doc.defaultView.getComputedStyle(h.firstChild,"").getPropertyValue("font-size")):10,d=b(q["line-height"]||u["line-height"])||1.2*A,G=u.hasOwnProperty("vertical-align")?u["vertical-align"]:"middle";isNaN(d)&&(d=1.2*A);c.is(q.text,"array")&&(q.text=q.text.join("<br>"));G="top"===G?-0.5:"bottom"===G?0.5:0;if(q.hasOwnProperty("text")&&(q.text!==u.text||f._textdirty)){for(u.text=q.text;h.firstChild;)h.removeChild(h.firstChild);
379 for(var e=a(q.text).split(/\n|<br\s*?\/?>/ig),A=[],r,g=0,t=e.length;g<t;g++)r=L("tspan"),g?L(r,{dy:d,x:u.x}):L(r,{dy:d*e.length*G,x:u.x}),e[g]||(r.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e[g]=" "),r.appendChild(c._g.doc.createTextNode(e[g])),h.appendChild(r),A[g]=r;f._textdirty=!1}else for(A=h.getElementsByTagName("tspan"),g=0,t=A.length;g<t;g++)g?L(A[g],{dy:d,x:u.x}):L(A[0],{dy:d*A.length*G,x:u.x});L(h,{x:u.x,y:u.y});f._.dirty=1;h=f._getBBox();d=u.y-(h.y+h.height/
380 2);if(h.isCalculated)switch(u["vertical-align"]){case "top":d=0.75*h.height;break;case "bottom":d=-(0.25*h.height);break;default:d=u.y-(h.y+0.25*h.height)}d&&c.is(d,"finite")&&A[0]&&L(A[0],{dy:d})}},l=function(a,b,f){f=f||b;f.canvas&&f.canvas.appendChild(a);this.node=this[0]=a;a.raphael=!0;a.raphaelid=this.id=c._oid++;this.matrix=c.matrix();this.realPath=null;this.attrs=this.attrs||{};this.followers=this.followers||[];this.paper=b;this.ca=this.customAttributes=this.customAttributes||new b._CustomAttributes;
381 this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1};this.parent=f;!f.bottom&&(f.bottom=this);(this.prev=f.top)&&(f.top.next=this);f.top=this;this.next=null},qa=c.el;l.prototype=qa;qa.constructor=l;c._engine.getNode=function(a){a=a.node||a[0].node;return a.titleNode||a};c._engine.getLastNode=function(a){a=a.node||a[a.length-1].node;return a.titleNode||a};qa.rotate=function(c,f,q){if(this.removed)return this;c=a(c).split(G);c.length-1&&(f=b(c[1]),q=b(c[2]));c=b(c[0]);null==q&&(f=q);if(null==f||
382 null==q)q=this.getBBox(1),f=q.x+q.width/2,q=q.y+q.height/2;this.transform(this._.transform.concat([["r",c,f,q]]));return this};qa.scale=function(c,f,q,u){var h;if(this.removed)return this;c=a(c).split(G);c.length-1&&(f=b(c[1]),q=b(c[2]),u=b(c[3]));c=b(c[0]);null==f&&(f=c);null==u&&(q=u);if(null==q||null==u)h=this.getBBox(1);q=null==q?h.x+h.width/2:q;u=null==u?h.y+h.height/2:u;this.transform(this._.transform.concat([["s",c,f,q,u]]));return this};qa.translate=function(c,f){if(this.removed)return this;
383 c=a(c).split(G);c.length-1&&(f=b(c[1]));c=b(c[0])||0;this.transform(this._.transform.concat([["t",c,+f||0]]));return this};qa.transform=function(a){var b=this._;if(null==a)return b.transform;c._extractTransform(this,a);this.clip&&!b.clipispath&&L(this.clip,{transform:this.matrix.invert()});this.pattern&&va(this);this.node&&L(this.node,{transform:this.matrix});if(1!=b.sx||1!=b.sy)a=this.attrs.hasOwnProperty("stroke-width")?this.attrs["stroke-width"]:1,this.attr({"stroke-width":a});return this};qa.hide=
384 function(){!this.removed&&this.paper.safari(this.node.style.display="none");return this};qa.show=function(){!this.removed&&this.paper.safari(this.node.style.display="");return this};qa.remove=function(){if(!this.removed&&this.parent.canvas){var a=c._engine.getNode(this),b=this.paper,f=b.defs;b.__set__&&b.__set__.exclude(this);r.unbind("raphael.*.*."+this.id);for(this.gradient&&f&&p(this);f=this.followers.pop();)f.el.remove();for(;f=this.bottom;)f.remove();this._drag&&this.undrag();if(this.events)for(;f=
385 this.events.pop();)f.unbind();this.parent.canvas.removeChild(a);this.removeData();delete b._elementsById[this.id];c._tear(this,this.parent);for(f in this)this[f]="function"===typeof this[f]?c._removedFactory(f):null;this.removed=!0}};qa._getBBox=function(){var a=this.node,c={},b=this.attrs,f,q;"none"===a.style.display&&(this.show(),q=!0);try{c=a.getBBox(),"text"==this.type&&(void 0===c.x&&(c.isCalculated=!0,f=b["text-anchor"],c.x=(b.x||0)-c.width*("start"===f?0:"middle"===f?0.5:1)),void 0===c.y&&
386 (c.isCalculated=!0,f=b["vertical-align"],c.y=(b.y||0)-c.height*("bottom"===f?1:"middle"===f?0.5:0)))}catch(u){}finally{c=c||{}}q&&this.hide();return c};qa.attr=function(a,b){if(this.removed)return this;if(null==a){var f={},q;for(q in this.attrs)this.attrs.hasOwnProperty(q)&&(f[q]=this.attrs[q]);f.gradient&&"none"==f.fill&&(f.fill=f.gradient)&&delete f.gradient;f.transform=this._.transform;f.visibility="none"===this.node.style.display?"hidden":"visible";return f}if(null==b&&c.is(a,"string")){if("fill"==
387 a&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;if("transform"==a)return this._.transform;if("visibility"==a)return"none"===this.node.style.display?"hidden":"visible";var f=a.split(G),u={},h=0;for(q=f.length;h<q;h++)a=f[h],a in this.attrs?u[a]=this.attrs[a]:c.is(this.ca[a],"function")?u[a]=this.ca[a].def:u[a]=c._availableAttrs[a];return q-1?u:u[f[0]]}if(null==b&&c.is(a,"array")){u={};h=0;for(q=a.length;h<q;h++)u[a[h]]=this.attr(a[h]);return u}null!=b?(f={},f[a]=b):null!=
388 a&&c.is(a,"object")&&(f=a);for(h in f)r("raphael.attr."+h+"."+this.id,this,f[h],h);var A={};for(h in this.ca)if(this.ca[h]&&f.hasOwnProperty(h)&&c.is(this.ca[h],"function")&&!this.ca["_invoked"+h]){this.ca["_invoked"+h]=!0;q=this.ca[h].apply(this,[].concat(f[h]));delete this.ca["_invoked"+h];for(u in q)q.hasOwnProperty(u)&&(f[u]=q[u]);this.attrs[h]=f[h];!1===q&&(A[h]=f[h],delete f[h])}s(this,f);var d,h=0;for(q=this.followers.length;h<q;h++)d=this.followers[h],d.cb&&!d.cb.call(d.el,f,this)||d.el.attr(f);
389 for(u in A)f[u]=A[u];return this};qa.blur=function(a){if(0!==+a){var b=L("filter"),f=L("feGaussianBlur");this.attrs.blur=a;b.id=c.createUUID();L(f,{stdDeviation:+a||1.5});b.appendChild(f);this.paper.defs.appendChild(b);this._blur=b;L(this.node,{filter:"url('"+c._url+"#"+b.id+"')"})}else this._blur&&(this._blur.parentNode.removeChild(this._blur),delete this._blur,delete this.attrs.blur),this.node.removeAttribute("filter")};qa.on=function(a,b){if(this.removed)return this;var f=b;c.supportsTouch&&(a=
390 c._touchMap[a]||"click"===a&&"touchstart"||a,f=function(a){a.preventDefault();b()});this.node["on"+a]=f;return this};c._engine.path=function(a,c,b){var f=L("path");a=new l(f,a,b);a.type="path";s(a,c);M(a,c);return a};c._engine.group=function(a,c,b){var f=L("g");a=new l(f,a,b);a.type="group";a.canvas=a.node;a.top=a.bottom=null;a._id=c||"";c&&f.setAttribute("class","raphael-group-"+a.id+"-"+c);return a};c._engine.circle=function(a,c,b){var f=L("circle");a=new l(f,a,b);a.type="circle";s(a,c);M(a,c);
391 return a};c._engine.rect=function(a,c,b){var f=L("rect");a=new l(f,a,b);a.type="rect";c.rx=c.ry=c.r;s(a,c);M(a,c);return a};c._engine.ellipse=function(a,c,b){var f=L("ellipse");a=new l(f,a,b);a.type="ellipse";s(a,c);M(a,c);return a};c._engine.image=function(a,c,b){var f=L("image");a=new l(f,a,b);a.type="image";f.setAttribute("preserveAspectRatio","none");s(a,c);M(a,c);return a};c._engine.text=function(a,c,b){var f=L("text");a=new l(f,a,b);a.type="text";a._textdirty=!0;s(a,c);M(a,c);return a};c._engine.setSize=
392 function(a,c){this.width=a||this.width;this.height=c||this.height;this.canvas.setAttribute("width",this.width);this.canvas.setAttribute("height",this.height);this._viewBox&&this.setViewBox.apply(this,this._viewBox);return this};c._engine.create=function(){var a=c._getContainer.apply(0,arguments),b=a&&a.container,f=a.x,q=a.y,u=a.width,a=a.height;if(!b)throw Error("SVG container not found.");var h=L("svg"),A,f=f||0,q=q||0,u=u||512,a=a||342;L(h,{height:a,version:1.1,width:u,xmlns:"http://www.w3.org/2000/svg"});
393 1==b?(h.style.cssText="overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-user-select:none;-moz-user-select:-moz-none;-khtml-user-select:none;-ms-user-select:none;user-select:none;-o-user-select:none;cursor:default;position:absolute;left:"+f+"px;top:"+q+"px",c._g.doc.body.appendChild(h),A=1):(h.style.cssText="overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-user-select:none;-moz-user-select:-moz-none;-khtml-user-select:none;-ms-user-select:none;user-select:none;-o-user-select:none;cursor:default;position:relative",
394 b.firstChild?b.insertBefore(h,b.firstChild):b.appendChild(h));b=new c._Paper;b.width=u;b.height=a;b.canvas=h;L(h,{id:"raphael-paper-"+b.id});b.clear();b._left=b._top=0;A&&(b.renderfix=function(){});b.renderfix();return b};c._engine.setViewBox=function(a,c,b,f,q){r("raphael.setViewBox",this,this._viewBox,[a,c,b,f,q]);var h=u(b/this.width,f/this.height),A=this.top,d=q?"meet":"xMinYMin",G;null==a?(this._vbSize&&(h=1),delete this._vbSize,G="0 0 "+this.width+" "+this.height):(this._vbSize=h,G=a+" "+c+
395 " "+b+" "+f);for(L(this.canvas,{viewBox:G,preserveAspectRatio:d});h&&A;)d="stroke-width"in A.attrs?A.attrs["stroke-width"]:1,A.attr({"stroke-width":d}),A._.dirty=1,A._.dirtyT=1,A=A.prev;this._viewBox=[a,c,b,f,!!q];return this};c.prototype.renderfix=function(){var a=this.canvas,c=a.style,b;try{b=a.getScreenCTM()||a.createSVGMatrix()}catch(f){b=a.createSVGMatrix()}a=-b.e%1;b=-b.f%1;if(a||b)a&&(this._left=(this._left+a)%1,c.left=this._left+"px"),b&&(this._top=(this._top+b)%1,c.top=this._top+"px")};c.prototype._desc=
396 function(a){var b=this.desc;if(b)for(;b.firstChild;)b.removeChild(b.firstChild);else this.desc=b=L("desc"),this.canvas.appendChild(b);b.appendChild(c._g.doc.createTextNode(c.is(a,"string")?a:"Created with Red Raphaรซl "+c.version))};c.prototype.clear=function(){var a;for(r("raphael.clear",this);a=this.bottom;)a.remove();for(a=this.canvas;a.firstChild;)a.removeChild(a.firstChild);this.bottom=this.top=null;a.appendChild(this.desc=L("desc"));a.appendChild(this.defs=L("defs"))};c.prototype.remove=function(){var a;
397 for(r("raphael.remove",this);a=this.bottom;)a.remove();this.defs&&this.defs.parentNode.removeChild(this.defs);this.desc&&this.desc.parentNode.removeChild(this.desc);this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(a in this)this[a]="function"==typeof this[a]?c._removedFactory(a):null;this.removed=!0};var Ib=c.st,W;for(W in qa)qa.hasOwnProperty(W)&&!Ib.hasOwnProperty(W)&&(Ib[W]=function(a){return function(){var c=arguments;return this.forEach(function(b){b[a].apply(b,c)})}}(W))}})();
398 (function(){if(c.vml){var a=String,b=parseFloat,f=Math,q=f.round,h=f.max,u=f.min,A=f.sqrt,d=f.abs,G=/[, ]+/,e=c.eve,r={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},g=/([clmz]),?([^clmz]*)/gi,t=/ progid:\S+Blur\([^\)]+\)/g,L=/-?[^,\s-]+/g,p={path:1,rect:1,image:1},O={circle:1,ellipse:1},z=function(b){var f=/[ahqstv]/ig,h=c._pathToAbsolute;a(b).match(f)&&(h=c._path2curve);f=/[clmz]/g;if(h==c._pathToAbsolute&&!a(b).match(f))return(b=a(b).replace(g,function(a,c,b){var f=[],h="m"==c.toLowerCase(),
399 u=r[c];b.replace(L,function(a){h&&2==f.length&&(u+=f+r["m"==c?"l":"L"],f=[]);f.push(q(21600*a))});return u+f}))||"m0,0";var f=h(b),u;b=[];for(var A=0,d=f.length;A<d;A++){h=f[A];u=f[A][0].toLowerCase();"z"==u&&(u="x");for(var G=1,e=h.length;G<e;G++)u+=q(21600*h[G])+(G!=e-1?",":"");b.push(u)}return b.length?b.join(" "):"m0,0"},E=function(a,b,f){var q=c.matrix();q.rotate(-a,0.5,0.5);return{dx:q.x(b,f),dy:q.y(b,f)}},N=function(a,c,b,f,q,h){var u=a._,A=a.matrix,G=u.fillpos;a=a.node;var e=a.style,r=1,g=
400 "",t=21600/c,L=21600/b;e.visibility="hidden";if(c&&b){a.coordsize=d(t)+" "+d(L);e.rotation=h*(0>c*b?-1:1);h&&(q=E(h,f,q),f=q.dx,q=q.dy);0>c&&(g+="x");0>b&&(g+=" y")&&(r=-1);e.flip=g;a.coordorigin=f*-t+" "+q*-L;if(G||u.fillsize)if(f=(f=a.getElementsByTagName("fill"))&&f[0])a.removeChild(f),G&&(q=E(h,A.x(G[0],G[1]),A.y(G[0],G[1])),f.position=q.dx*r+" "+q.dy*r),u.fillsize&&(f.size=u.fillsize[0]*d(c)+" "+u.fillsize[1]*d(b)),a.appendChild(f);e.visibility="visible"}};c._url="";c.toString=function(){return"Your browser doesnโ€™t support SVG. Falling down to VML.\nYou are running Raphaรซl "+
401 this.version};var va=function(c,b,f){b=a(b).toLowerCase().split("-");f=f?"end":"start";for(var q=b.length,h="classic",u="medium",A="medium";q--;)switch(b[q]){case "block":case "classic":case "oval":case "diamond":case "open":case "none":h=b[q];break;case "wide":case "narrow":A=b[q];break;case "long":case "short":u=b[q]}c=c.node.getElementsByTagName("stroke")[0];c[f+"arrow"]=h;c[f+"arrowlength"]=u;c[f+"arrowwidth"]=A},n=function(a,c){for(var b in c)e("raphael.attr."+b+"."+a.id,a,c[b],b),a.ca[b]&&a.attr(b,
402 c[b])},m=c._setFillAndStroke=function(f,A){if(f.paper.canvas){f.attrs=f.attrs||{};var d=f.node,e=f.attrs,r=d.style,g=p[f.type]&&(A.x!=e.x||A.y!=e.y||A.width!=e.width||A.height!=e.height||A.cx!=e.cx||A.cy!=e.cy||A.rx!=e.rx||A.ry!=e.ry||A.r!=e.r),t=O[f.type]&&(e.cx!=A.cx||e.cy!=A.cy||e.r!=A.r||e.rx!=A.rx||e.ry!=A.ry),L="group"===f.type,E;for(E in A)A.hasOwnProperty(E)&&(e[E]=A[E]);g&&(e.path=c._getPath[f.type](f),f._.dirty=1);A.href&&(d.href=A.href);A.title&&(d.title=A.title);A.target&&(d.target=A.target);
403 A.cursor&&(r.cursor=A.cursor);"blur"in A&&f.blur(A.blur);if(A.path&&"path"==f.type||g)d.path=z(~a(e.path).toLowerCase().indexOf("r")?c._pathToAbsolute(e.path):e.path),"image"==f.type&&(f._.fillpos=[e.x,e.y],f._.fillsize=[e.width,e.height],N(f,1,1,0,0,0));"transform"in A&&f.transform(A.transform);"rotation"in A&&(r=A.rotation,c.is(r,"array")?f.rotate.apply(f,r):f.rotate(r));"visibility"in A&&("hidden"===A.visibility?f.hide():f.show());t&&(r=+e.cx,t=+e.cy,g=+e.rx||+e.r||0,E=+e.ry||+e.r||0,d.path=c.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",
404 q(21600*(r-g)),q(21600*(t-E)),q(21600*(r+g)),q(21600*(t+E)),q(21600*r)));"clip-rect"in A&&(r=a(A["clip-rect"]).split(G),4==r.length&&(r[0]=+r[0],r[1]=+r[1],r[2]=+r[2]+r[0],r[3]=+r[3]+r[1],g=L?d:d.clipRect||c._g.doc.createElement("div"),t=g.style,L?(f.clip=r.slice(),g=f.matrix.offset(),g=[b(g[0]),b(g[1])],r[0]-=g[0],r[1]-=g[1],r[2]-=g[0],r[3]-=g[1],t.width="10800px",t.height="10800px"):d.clipRect||(t.top="0",t.left="0",t.width=f.paper.width+"px",t.height=f.paper.height+"px",d.parentNode.insertBefore(g,
405 d),g.appendChild(d),g.raphael=!0,g.raphaelid=d.raphaelid,d.clipRect=g),t.position="absolute",t.clip=c.format("rect({1}px {2}px {3}px {0}px)",r)),A["clip-rect"]||(L&&f.clip?(d.style.clip="rect(auto auto auto auto)",delete f.clip):d.clipRect&&(d.clipRect.style.clip="rect(auto auto auto auto)")));f.textpath&&(L=f.textpath.style,A.font&&(L.font=A.font),A["font-family"]&&(L.fontFamily='"'+A["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,"")+'"'),A["font-size"]&&(L.fontSize=A["font-size"]),A["font-weight"]&&
406 (L.fontWeight=A["font-weight"]),A["font-style"]&&(L.fontStyle=A["font-style"]));"arrow-start"in A&&va(f,A["arrow-start"]);"arrow-end"in A&&va(f,A["arrow-end"],1);if(null!=A.opacity||null!=A["stroke-width"]||null!=A.fill||null!=A.src||null!=A.stroke||null!=A["stroke-width"]||null!=A["stroke-opacity"]||null!=A["fill-opacity"]||null!=A["stroke-dasharray"]||null!=A["stroke-miterlimit"]||null!=A["stroke-linejoin"]||null!=A["stroke-linecap"]){L=d.getElementsByTagName("fill");r=-1;L=L&&L[0];!L&&(L=l("fill"));
407 "image"==f.type&&A.src&&(L.src=A.src);A.fill&&(L.on=!0);if(null==L.on||"none"==A.fill||null===A.fill)L.on=!1;L.on&&A.fill&&((t=a(A.fill).match(c._ISURL))?(L.parentNode==d&&d.removeChild(L),L.rotate=!0,L.src=t[1],L.type="tile",g=f.getBBox(1),L.position=g.x+" "+g.y,f._.fillpos=[g.x,g.y],c._preload(t[1],function(){f._.fillsize=[this.offsetWidth,this.offsetHeight]})):(t=c.getRGB(A.fill),L.color=t.hex,L.src="",L.type="solid",t.error&&(f.type in{circle:1,ellipse:1}||"r"!=a(A.fill).charAt())&&M(f,A.fill,
408 L)?(e.fill="none",e.gradient=A.fill,L.rotate=!1):"opacity"in t&&!("fill-opacity"in A)&&(r=t.opacity)));if(-1!==r||"fill-opacity"in A||"opacity"in A)t=((+e["fill-opacity"]+1||2)-1)*((+e.opacity+1||2)-1)*((+r+1||2)-1),t=u(h(t,0),1),L.opacity=t,L.src&&(L.color="none");d.appendChild(L);L=d.getElementsByTagName("stroke")&&d.getElementsByTagName("stroke")[0];r=!1;!L&&(r=L=l("stroke"));if(A.stroke&&"none"!=A.stroke||A["stroke-width"]||null!=A["stroke-opacity"]||A["stroke-dasharray"]||A["stroke-miterlimit"]||
409 A["stroke-linejoin"]||A["stroke-linecap"])L.on=!0;"none"!=A.stroke&&null!==A.stroke&&null!=L.on&&0!=A.stroke&&0!=A["stroke-width"]||(L.on=!1);t=c.getRGB("stroke"in A?A.stroke:e.stroke);L.on&&A.stroke&&(L.color=t.hex);t=((+e["stroke-opacity"]+1||2)-1)*((+e.opacity+1||2)-1)*((+t.opacity+1||2)-1);g=0.75*(b(A["stroke-width"])||1);t=u(h(t,0),1);null==A["stroke-width"]&&(g=e["stroke-width"]);A["stroke-width"]&&(L.weight=g);g&&1>g&&(t*=g)&&(L.weight=1);L.opacity=t;A["stroke-linejoin"]&&(L.joinstyle=A["stroke-linejoin"])||
410 r&&(r.joinstyle="miter");L.miterlimit=A["stroke-miterlimit"]||8;A["stroke-linecap"]&&(L.endcap="butt"==A["stroke-linecap"]?"flat":"square"==A["stroke-linecap"]?"square":"round");A["stroke-dasharray"]&&(t={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"},L.dashstyle=t.hasOwnProperty(A["stroke-dasharray"])?t[A["stroke-dasharray"]]:A["stroke-dasharray"].join&&A["stroke-dasharray"].join(" ")||
411 "");r&&d.appendChild(L)}if("text"==f.type){f.paper.canvas.style.display="";d=f.paper.span;L=e.font&&e.font.match(/\d+(?:\.\d*)?(?=px)/);t=e["line-height"]&&(e["line-height"]+"").match(/\d+(?:\.\d*)?(?=px)/);r=d.style;e.font&&(r.font=e.font);e["font-family"]&&(r.fontFamily=e["font-family"]);e["font-weight"]&&(r.fontWeight=e["font-weight"]);e["font-style"]&&(r.fontStyle=e["font-style"]);L=b(e["font-size"]||L&&L[0])||10;r.fontSize=100*L+"px";t=b(e["line-height"]||t&&t[0])||12;e["line-height"]&&(r.lineHeight=
412 100*t+"px");c.is(A.text,"array")&&(A.text=f.textpath.string=A.text.join("\n").replace(/<br\s*?\/?>/ig,"\n"));f.textpath.string&&(d.innerHTML=a(f.textpath.string).replace(/</g,"&#60;").replace(/&/g,"&#38;").replace(/\n/g,"<br>"));d=d.getBoundingClientRect();f.W=e.w=(d.right-d.left)/100;f.H=e.h=(d.bottom-d.top)/100;f.X=e.x;f.Y=e.y;switch(e["vertical-align"]){case "top":f.bby=f.H/2;break;case "bottom":f.bby=-f.H/2;break;default:f.bby=0}("x"in A||"y"in A||void 0!==f.bby)&&(f.path.v=c.format("m{0},{1}l{2},{1}",
413 q(21600*e.x),q(21600*(e.y+(f.bby||0))),q(21600*e.x)+1));d="x y text font font-family font-weight font-style font-size line-height".split(" ");L=0;for(r=d.length;L<r;L++)if(d[L]in A){f._.dirty=1;break}switch(e["text-anchor"]){case "start":f.textpath.style["v-text-align"]="left";f.bbx=f.W/2;break;case "end":f.textpath.style["v-text-align"]="right";f.bbx=-f.W/2;break;default:f.textpath.style["v-text-align"]="center",f.bbx=0}f.textpath.style["v-text-kern"]=!0}}},M=function(f,q,h){f.attrs=f.attrs||{};
414 var u=Math.pow,d="linear",G=".5 .5";f.attrs.gradient=q;q=a(q).replace(c._radial_gradient,function(a,c){d="radial";c=c&&c.split(",")||[];var f=c[3],q=c[4];f&&q&&(f=b(f),q=b(q),0.25<u(f-0.5,2)+u(q-0.5,2)&&(q=A(0.25-u(f-0.5,2))*(2*(0.5<q)-1)+0.5),G=f+" "+q);return""});q=q.split(/\s*\-\s*/);if("linear"==d){var e=q.shift(),e=-b(e);if(isNaN(e))return null}q=c._parseDots(q);if(!q)return null;f=f.shape||f.node;if(q.length){h.parentNode==f&&f.removeChild(h);h.on=!0;h.method="none";h.color=q[0].color;h.color2=
415 q[q.length-1].color;for(var r=[],g=1,L=void 0===q[0].opacity?1:q[0].opacity,t=0,p=q.length;t<p;t++)q[t].offset&&r.push(q[t].offset+" "+q[t].color),void 0!==q[t].opacity&&(g=q[t].opacity);h.colors=r.length?r.join():"0% "+h.color;h.opacity=g;h["o:opacity2"]=L;"radial"==d?(h.type="gradientTitle",h.focus="100%",h.focussize="0 0",h.focusposition=G,h.angle=0):(h.type="gradient",h.angle=(270-e)%360);f.appendChild(h)}return 1},s=function(a,b,f){f=f||b;var q;f.canvas&&f.canvas.appendChild(a);q=l("skew");q.on=
416 !0;a.appendChild(q);this.skew=q;this.node=this[0]=a;a.raphael=!0;a.raphaelid=this.id=c._oid++;this.Y=this.X=0;this.attrs=this.attrs||{};this.followers=this.followers||[];this.paper=b;this.ca=this.customAttributes=this.customAttributes||new b._CustomAttributes;this.matrix=c.matrix();this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1};this.parent=f;!f.bottom&&(f.bottom=this);(this.prev=f.top)&&(f.top.next=this);f.top=this;this.next=null},f=c.el;s.prototype=f;f.constructor=s;f.transform=
417 function(b){if(null==b)return this._.transform;var f=this.paper._viewBoxShift,q=f?"s"+[f.scale,f.scale]+"-1-1t"+[f.dx,f.dy]:"",h;f&&(h=b=a(b).replace(/\.{3}|\u2026/g,this._.transform||""));c._extractTransform(this,q+b);var f=this.matrix.clone(),u=this.skew;b=this.node;var q=~a(this.attrs.fill).indexOf("-"),A=!a(this.attrs.fill).indexOf("url(");f.translate(-0.5,-0.5);A||q||"image"==this.type?(u.matrix="1 0 0 1",u.offset="0 0",u=f.split(),q&&u.noRotation||!u.isSimple?(b.style.filter=f.toFilter(),f=
418 this.getBBox(),q=this.getBBox(1),A=f.x2&&q.x2&&"x2"||"x",u=f.y2&&q.y2&&"y2"||"y",A=f[A]-q[A],f=f[u]-q[u],b.coordorigin=-21600*A+" "+-21600*f,N(this,1,1,A,f,0)):(b.style.filter="",N(this,u.scalex,u.scaley,u.dx,u.dy,u.rotate))):(b.style.filter="",u.matrix=a(f),u.offset=f.offset());h&&(this._.transform=h);return this};f.rotate=function(c,f,q){if(this.removed)return this;if(null!=c){c=a(c).split(G);c.length-1&&(f=b(c[1]),q=b(c[2]));c=b(c[0]);null==q&&(f=q);if(null==f||null==q)q=this.getBBox(1),f=q.x+
419 q.width/2,q=q.y+q.height/2;this._.dirtyT=1;this.transform(this._.transform.concat([["r",c,f,q]]));return this}};f.translate=function(c,f){if(this.removed)return this;c=a(c).split(G);c.length-1&&(f=b(c[1]));c=b(c[0])||0;f=+f||0;this._.bbox&&(this._.bbox.x+=c,this._.bbox.y+=f);this.transform(this._.transform.concat([["t",c,f]]));return this};f.scale=function(c,f,q,h){if(this.removed)return this;c=a(c).split(G);c.length-1&&(f=b(c[1]),q=b(c[2]),h=b(c[3]),isNaN(q)&&(q=null),isNaN(h)&&(h=null));c=b(c[0]);
420 null==f&&(f=c);null==h&&(q=h);if(null==q||null==h)var u=this.getBBox(1);q=null==q?u.x+u.width/2:q;h=null==h?u.y+u.height/2:h;this.transform(this._.transform.concat([["s",c,f,q,h]]));this._.dirtyT=1;return this};f.hide=function(a){!this.removed&&(this.node.style.display="none");return this};f.show=function(a){!this.removed&&(this.node.style.display="");return this};f._getBBox=function(){return this.removed?{}:{x:this.X+(this.bbx||0)-this.W/2,y:this.Y+(this.bby||0)-this.H/2,width:this.W,height:this.H}};
421 f.remove=function(){if(!this.removed&&this.parent.canvas){var a=c._engine.getNode(this),b=this.paper,f=this.shape;b.__set__&&b.__set__.exclude(this);e.unbind("raphael.*.*."+this.id);f&&f.parentNode.removeChild(f);for(a.parentNode&&a.parentNode.removeChild(a);a=this.followers.pop();)a.el.remove();for(;a=this.bottom;)a.remove();this._drag&&this.undrag();if(this.events)for(;a=this.events.pop();)a.unbind();this.removeData();delete b._elementsById[this.id];c._tear(this,this.parent);for(a in this)this[a]=
422 "function"===typeof this[a]?c._removedFactory(a):null;this.removed=!0}};f.attr=function(a,b){if(this.removed)return this;if(null==a){var f={},q;for(q in this.attrs)this.attrs.hasOwnProperty(q)&&(f[q]=this.attrs[q]);f.gradient&&"none"==f.fill&&(f.fill=f.gradient)&&delete f.gradient;f.transform=this._.transform;f.visibility="none"===this.node.style.display?"hidden":"visible";return f}if(null==b&&c.is(a,"string")){if("fill"==a&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;
423 if("visibility"==a)return"none"===this.node.style.display?"hidden":"visible";var f=a.split(G),h={},u=0;for(q=f.length;u<q;u++)a=f[u],a in this.attrs?h[a]=this.attrs[a]:c.is(this.ca[a],"function")?h[a]=this.ca[a].def:h[a]=c._availableAttrs[a];return q-1?h:h[f[0]]}if(this.attrs&&null==b&&c.is(a,"array")){h={};u=0;for(q=a.length;u<q;u++)h[a[u]]=this.attr(a[u]);return h}null!=b&&(f={},f[a]=b);null==b&&c.is(a,"object")&&(f=a);for(u in f)e("raphael.attr."+u+"."+this.id,this,f[u],u);if(f){var A={};for(u in this.ca)if(this.ca[u]&&
424 f.hasOwnProperty(u)&&c.is(this.ca[u],"function")&&!this.ca["_invoked"+u]){this.ca["_invoked"+u]=!0;q=this.ca[u].apply(this,[].concat(f[u]));delete this.ca["_invoked"+u];for(h in q)q.hasOwnProperty(h)&&(f[h]=q[h]);this.attrs[u]=f[u];!1===q&&(A[u]=f[u],delete f[u])}"text"in f&&"text"==this.type&&(c.is(f.text,"array")&&(f.text=f.text.join("\n")),this.textpath.string=f.text.replace(/<br\s*?\/?>/ig,"\n"));m(this,f);var d,u=0;for(q=this.followers.length;u<q;u++)d=this.followers[u],d.cb&&!d.cb.call(d.el,
425 f,this)||d.el.attr(f);for(h in A)f[h]=A[h]}return this};f.blur=function(a){var b=this.node.runtimeStyle,f=b.filter,f=f.replace(t,"");0!==+a?(this.attrs.blur=a,b.filter=f+" progid:DXImageTransform.Microsoft.Blur(pixelradius="+(+a||1.5)+")",b.margin=c.format("-{0}px 0 0 -{0}px",q(+a||1.5))):(b.filter=f,b.margin=0,delete this.attrs.blur);return this};f.on=function(a,b){if(this.removed)return this;this.node["on"+a]=function(){var a=c._g.win.event;a.target=a.srcElement;b(a)};return this};c._engine.getNode=
426 function(a){a=a.node||a[0].node;return a.clipRect||a};c._engine.getLastNode=function(a){a=a.node||a[a.length-1].node;return a.clipRect||a};c._engine.group=function(a,b,f){var q=c._g.doc.createElement("div"),u=new s(q,a,f);q.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px";u._id=b||"";b&&(q.className="raphael-group-"+u.id+"-"+b);(f||a).canvas.appendChild(q);u.type="group";u.canvas=u.node;u.transform=c._engine.group.transform;u.top=null;u.bottom=null;return u};c._engine.group.transform=
427 function(f){if(null==f)return this._.transform;var q=this.node.style,u=this.clip,h=this.paper._viewBoxShift,A=h?"s"+[h.scale,h.scale]+"-1-1t"+[h.dx,h.dy]:"";h&&(f=a(f).replace(/\.{3}|\u2026/g,this._.transform||""));c._extractTransform(this,A+f);f=this.matrix;A=f.offset();h=b(A[0])||0;A=b(A[1])||0;q.left=h+"px";q.top=A+"px";q.zoom=(this._.tzoom=f.get(0))+"";u&&(q.clip=c.format("rect({1}px {2}px {3}px {0}px)",[u[0]-h,u[1]-A,u[2]-h,u[3]-A]));return this};c._engine.path=function(a,c,b){var f=l("shape");
428 f.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px";f.coordsize="21600 21600";f.coordorigin=a.coordorigin;a=new s(f,a,b);a.type=c.type||"path";a.path=[];a.Path="";c.type&&delete c.type;m(a,c);n(a,c);return a};c._engine.rect=function(a,b,f){var q=c._rectPath(b.x,b.y,b.w,b.h,b.r);b.path=q;b.type="rect";a=a.path(b,f);b=a.attrs;a.X=b.x;a.Y=b.y;a.W=b.width;a.H=b.height;b.path=q;return a};c._engine.ellipse=function(a,b,c){b.type="ellipse";a=a.path(b,c);b=a.attrs;a.X=b.x-b.rx;a.Y=b.y-b.ry;
429 a.W=2*b.rx;a.H=2*b.ry;return a};c._engine.circle=function(a,b,c){b.type="circle";a=a.path(b,c);b=a.attrs;a.X=b.x-b.r;a.Y=b.y-b.r;a.W=a.H=2*b.r;return a};c._engine.image=function(a,b,f){var q=c._rectPath(b.x,b.y,b.w,b.h);b.path=q;b.type="image";b.stroke="none";a=a.path(b,f);f=a.attrs;var q=a.node,u=q.getElementsByTagName("fill")[0];f.src=b.src;a.X=f.x=b.x;a.Y=f.y=b.y;a.W=f.width=b.w;a.H=f.height=b.h;u.parentNode==q&&q.removeChild(u);u.rotate=!0;u.src=f.src;u.type="tile";a._.fillpos=[f.x,f.y];a._.fillsize=
430 [f.w,f.h];q.appendChild(u);N(a,1,1,0,0,0);return a};c._engine.text=function(b,f,u){var h=l("shape"),A=l("path"),d=l("textpath");x=f.x||0;y=f.y||0;text=f.text;A.v=c.format("m{0},{1}l{2},{1}",q(21600*f.x),q(21600*f.y),q(21600*f.x)+1);A.textpathok=!0;d.string=a(f.text).replace(/<br\s*?\/?>/ig,"\n");d.on=!0;h.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px";h.coordsize="21600 21600";h.coordorigin="0 0";b=new s(h,b,u);b.shape=h;b.path=A;b.textpath=d;b.type="text";b.attrs.text=a(f.text||
431 "");b.attrs.x=f.x;b.attrs.y=f.y;b.attrs.w=1;b.attrs.h=1;m(b,f);n(b,f);h.appendChild(d);h.appendChild(A);return b};c._engine.setSize=function(a,b){var f=this.canvas.style;this.width=a;this.height=b;a==+a&&(a+="px");b==+b&&(b+="px");f.width=a;f.height=b;f.clip="rect(0 "+a+" "+b+" 0)";this._viewBox&&c._engine.setViewBox.apply(this,this._viewBox);return this};c._engine.setViewBox=function(a,b,c,f,q){e("raphael.setViewBox",this,this._viewBox,[a,b,c,f,q]);var u=this.width,A=this.height,d=1/h(c/u,f/A),G,
432 r;q&&(G=A/f,r=u/c,c*G<u&&(a-=(u-c*G)/2/G),f*r<A&&(b-=(A-f*r)/2/r));this._viewBox=[a,b,c,f,!!q];this._viewBoxShift={dx:-a,dy:-b,scale:d};this.forEach(function(a){a.transform("...")});return this};var l;c._engine.initWin=function(b){var f=b.document;f.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!f.namespaces.rvml&&f.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),l=c._createNode=function(b,c){var q=f.createElement("<rvml:"+b+' class="rvml">'),u;for(u in c)q[u]=a(c[u]);
433 return q}}catch(q){l=c._createNode=function(b,c){var q=f.createElement("<"+b+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">'),u;for(u in c)q[u]=a(c[u]);return q}}};c._engine.initWin(c._g.win);c._engine.create=function(){var a=c._getContainer.apply(0,arguments),b=a.container,f=a.height,q=a.width,u=a.x,a=a.y;if(!b)throw Error("VML container not found.");var h=new c._Paper,A=h.canvas=c._g.doc.createElement("div"),d=A.style,u=u||0,a=a||0,q=q||512,f=f||342;h.width=q;h.height=f;q==+q&&(q+="px");
434 f==+f&&(f+="px");h.coordsize="21600000 21600000";h.coordorigin="0 0";A.id="raphael-paper-"+h.id;h.span=c._g.doc.createElement("span");h.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;";A.appendChild(h.span);d.cssText=c.format("top:0;left:0;width:{0};height:{1};display:inline-block;cursor:default;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",q,f);1==b?(c._g.doc.body.appendChild(A),d.left=u+"px",d.top=a+"px",d.position="absolute"):b.firstChild?
435 b.insertBefore(A,b.firstChild):b.appendChild(A);h.renderfix=function(){};return h};c.prototype.clear=function(){var a;for(e("raphael.clear",this);a=this.bottom;)a.remove();this.canvas.innerHTML="";this.span=c._g.doc.createElement("span");this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;";this.canvas.appendChild(this.span);this.bottom=this.top=null};c.prototype.remove=function(){var a;for(e("raphael.remove",this);a=this.bottom;)a.remove();
436 this.canvas.parentNode.removeChild(this.canvas);for(a in this)this[a]="function"==typeof this[a]?c._removedFactory(a):null;return!0};var V=c.st,W;for(W in f)f.hasOwnProperty(W)&&!V.hasOwnProperty(W)&&(V[W]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a].apply(c,b)})}}(W))}})();sa?fa.win.Raphael=c:Raphael=c;return c})})();d.Raphael=B;d.Raphael.desc="";k&&k!==B?window.Raphael=k:window.Raphael===B&&(window.Raphael=void 0)}]);
437 FusionCharts.register("module",["private","fusioncharts.redraphael.helper",function(){var d={};this.hcLib.Raphael.fn._elementFromEvent=function(k){if(!k||this.removed)return null;var B=k.srcElement||k.target||(k=k.originalEvent)&&(k.srcElement||k.target)||d;"tspan"===B.nodeName&&(B=B.parentNode);return this.getById(B.raphaelid)}}]);
438 FusionCharts.register("module",["private","fusioncharts.redraphael.css",function(){var d=this.hcLib.Raphael,k=d.eve,B=d._g,v=d.fn,l=d.el,c=/[, ]+/,K=/\B([A-Z]{1})/g,b,J;b=function(a){this.rules={};this.ns=a||""};J=b.prototype;J.getSheet=function(){var a=this.node;a||(a=this.node=B.doc.createElement("style"),this.node.setAttribute("id",d.format("raphael-stylesheet-{0}",d._oid++)),this.node.setAttribute("type","text/css"),(B.doc.head||B.doc.getElementsByTagName("head")[0]).appendChild(this.node));return a};
439 J.setCssText=function(a){var b=this.node;if(!b)if(a)b=this.getSheet();else return;b.styleSheet?b.styleSheet.cssText=a||"":(b.innerHTML="",a&&b.appendChild(B.doc.createTextNode(a)))};J.destroy=function(){this.node&&this.node.parentNode&&this.node.parentNode.removeChild(this.node);delete this.rules};J.clear=function(){this.setCssText("");this.rules={}};J.add=function(a,b){var c=this.rules[a]||(this.rules[a]={}),d;for(d in b)c[d]=b[d]};J.render=function(){this.setCssText(this.toString())};J.toString=
440 function(a){var b=a?"":"\n",c=a?"":"\t";a=a?":":": ";var d=b,l,e;for(l in this.rules){d+=l.replace(/(^|\,)/g,"$1"+this.ns+" ")+" {"+b;l=this.rules[l];for(e in l)l[e]&&(d+=c+e.replace(K,"-$1").toLowerCase()+a+l[e]+";"+b);d+="}"+b}return d};k.on("raphael.new",function(){this._stylesheet=this._stylesheet||new b;this.cssNamespace("")});k.on("raphael.remove",function(){this._stylesheet&&this._stylesheet.destroy();delete this._stylesheet});v.cssNamespace=function(a){arguments.length&&(this._stylesheet.ns=
441 d.format("{0}#raphael-paper-{1}",a&&a+" "||"",this.id));return this._stylesheet.ns};v.cssAddRule=function(a,b){if(1===arguments.length&&"object"===typeof a){for(var c in a)this.cssAddRule(c,a[c]);return this}return this._stylesheet.add(a,b),this};v.cssRender=function(){return d.svg&&this._stylesheet.render(),this};v.cssClear=function(){return this._stylesheet.clear(),this};d._availableAttrs["class"]="";d.svg&&k.on("raphael.attr.class",function(a){var b=this.node;a=a||"";b.setAttribute("class","group"===
442 this.type&&this._id?"raphael-group-"+this.id+"-"+this._id+" "+a:a)});d.vml&&k.on("raphael.attr.class",function(a){var b=this.paper,c="."+a,b=b._stylesheet&&b._stylesheet.rules,d=this.parent,l=this.attrs,e={},g;this.node.className="group"===this.type?a&&this._id+" "+a||this._id:"rvml "+a;if(c&&b){a=b[c];for(g in a)"color"===g&&"text"===this.type&&(g="fill"),!l[g]&&(e[g]=a[g]);for(;d&&d.attr;){if(a=d.attr("class"))for(g in c="."+a+" "+c,a=b[c],a)"color"===g&&"text"===this.type&&(g="fill"),l[g]||e[g]||
443 (e[g]=a[g]);d=d.parent}this.css(e)}});l.css=function(a,b){var l,v,w,e;if(this.removed)return this;this.styles||(this.styles={});if(null==b&&d.is(a,"string")){l=a.split(c);v={};e=0;for(w=l.length;e<w;e++)a=l[e],a in this.styles&&(v[a]=this.styles[a]);return w-1?v:v[l[0]]}if(null==b&&d.is(a,"array")){v={};e=0;for(w=a.length;e<w;e++)v[a[e]]=this.styles(a[e]);return v}null!=b?(l={},l[a]=b):null!=a&&d.is(a,"object")&&(l=a);v={};for(e in l)w=e.replace(/\B([A-Z]{1})/g,"-$1").toLowerCase(),d._availableAttrs.hasOwnProperty(w)||
444 "color"===w?("color"===w&&"text"===this.type&&(w="fill"),v[w]=l[e],v.dirty=!0):(k("raphael.css."+w+"."+this.id,this,l[e],w),this.node.style[w]=l[e],this.styles[w]=l[e]);e=0;for(w=this.followers.length;e<w;e++)this.followers[e].el.attr(l);v.hasOwnProperty("dirty")&&(delete v.dirty,this.attr(v));return this}}]);
445 FusionCharts.register("module",["private","modules.renderer.js-raphaelexport",function(){var d=this.hcLib,k=d.Raphael,B=d.pluckNumber,v=d.pluck,l=k._availableAttrs,c=/^matrix\(|\)$/g,K=/\,/g,b=/\n|<br\s*?\/?>/ig,J=/[^\d\.]/ig,a=/[\(\)\s,\xb0#]/g,D=/group/ig,F=/&/g,C=/"/g,w=/'/g,e=/</g,g=/>/g,n=0;(function(d){var k=Math,m=parseFloat,I=k.max,Q=k.abs,X=k.pow,$=String,p=/[, ]+/,H=[{reg:/xmlns\=\"http\:\/\/www.w3.org\/2000\/svg\"/ig,repStr:""},{reg:/^.*<svg /,repStr:'<svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" '},
446 {reg:/\/svg>.*$/,repStr:"/svg>"},{reg:/<desc\>[^<]*<\/desc\>/,repStr:""},{reg:/zIndex="[^"]+"/g,repStr:""},{reg:/url\((\\?[\'\"])[^#]+#/g,repStr:"url($1#"},{reg:/ href=/g,repStr:" xlink:href="},{reg:/(id|class|width|height)=([^" >]+)/g,repStr:'$1="$2"'},{reg:/:(path|rect)/g,repStr:"$1"},{reg:/<ima?ge? ([^\>]+?)[^\/]\>/gi,repStr:"<image $1 />"},{reg:/<\/ima?ge?\>/g,repStr:""},{reg:/style="([^"]+)"/g,repStr:function(a){return a.toLowerCase()}}],S={blur:function(){},transform:function(){},src:function(a,
447 b){b.attrSTR+=' xlink:href="'+b.attrs.src+'"'},path:function(a,b){var c=b.attrs.path,c=d._pathToAbsolute(c||"");b.attrSTR+=' d="'+(c.toString&&c.toString()||"").replace(K," ")+'"'},gradient:function(b,c,e){var g=b.attrs.gradient,p="linear",t,n,h,N=0.5,l=0.5,S=n="",w="";t=g.replace(a,"_");if(!e[t]){g=$(g).replace(d._radial_gradient,function(a,b){var c,h;b=b&&b.split(",")||[];p="radial";c=b[3];h=b[4];c&&h&&(N=m(c),l=m(h),c=2*(0.5<l)-1,0.25<X(N-0.5,2)+X(l-0.5,2)&&(l=k.sqrt(0.25-X(N-0.5,2))*c+0.5)&&0.5!=
448 l&&(l=l.toFixed(5)-1E-5*c));return""});g=g.split(/\s*\-\s*/);if("linear"===p){n=g.shift();n=-m(n);if(isNaN(n))return null;h=[0,0,k.cos(d.rad(n)),k.sin(d.rad(n))];n=1/(I(Q(h[2]),Q(h[3]))||1);h[2]*=n;h[3]*=n;0>h[2]&&(h[0]=-h[2],h[2]=0);0>h[3]&&(h[1]=-h[3],h[3]=0)}g=d._parseDots(g);if(!g)return null;"radial"===p?(n='<radialGradient fx = "'+N+'" fy = "'+l+'" id = "'+t+'">',S="</radialGradient>"):(n='<linearGradient x1 = "'+h[0]+'" y1 = "'+h[1]+'" x2 = "'+h[2]+'" y2 = "'+h[3]+'" gradientTransform ="matrix('+
449 b.matrix.invert()+')" id = "'+t+'">',S="</linearGradient>");b=0;for(h=g.length;b<h;b++)w+='<stop offset="'+(g[b].offset?g[b].offset:b?"100%":"0%")+'" stop-color="'+(g[b].color||"#fff")+'" stop-opacity="'+(void 0===g[b].opacity?1:g[b].opacity)+'" />';e[t]=!0;e.str+=n+w+S}c.attrSTR+=" fill=\"url('#"+t+"')\""},fill:function(a,b){var c=b.attrs,e=c.fill,g;a.attrs.gradient||(e=d.color(e),g=e.opacity,"text"===a.type?b.styleSTR+="fill:"+e+"; stroke-opacity:0; ":(b.attrSTR+=' fill="'+e+'"',c["fill-opacity"]||
450 !g&&0!==g||(b.attrSTR+=' fill-opacity="'+g+'"')))},stroke:function(a,b){var c=b.attrs,e,g;e=d.color(c.stroke);g=e.opacity;"text"!==a.type&&(b.attrSTR+=' stroke="'+e+'"',c["stroke-opacity"]||!g&&0!==g||(b.attrSTR+=' stroke-opacity="'+g+'"'))},"clip-rect":function(b,d,e){var g=$(d.attrs["clip-rect"]),m=g.split(p),g=g.replace(a,"_")+"__"+n++;4===m.length&&(e[g]||(e[g]=!0,e.str+='<clipPath id="'+g+'"><rect x="'+m[0]+'" y="'+m[1]+'" width="'+m[2]+'" height="'+m[3]+'" transform="matrix('+b.matrix.invert().toMatrixString().replace(c,
451 "")+')"/></clipPath>'),d.attrSTR+=' clip-path="url(#'+g+')"')},cursor:function(a,b){var c=b.attrs.cursor;c&&(b.styleSTR+="cursor:"+c+"; ")},font:function(a,b){b.styleSTR+="font:"+b.attrs.font.replace(/\"/ig," ")+"; "},"font-size":function(a,b){var c=v(b.attrs["font-size"],"10");c&&c.replace&&(c=c.replace(J,""));b.styleSTR+="font-size:"+c+"px; "},"font-weight":function(a,b){b.styleSTR+="font-weight:"+b.attrs["font-weight"]+"; "},"font-family":function(a,b){b.styleSTR+="font-family:"+b.attrs["font-family"]+
452 "; "},"line-height":function(){},"clip-path":function(){},visibility:function(){},"vertical-align":function(){},"text-anchor":function(a,b){var c=b.attrs["text-anchor"]||"middle";"text"===a.type&&(b.attrSTR+=' text-anchor="'+c+'"')},title:function(){},text:function(a,c){var d=c.attrs,p=d.text,n=v(d["font-size"],d.font,"10"),t=v(d["line-height"]),m,h,N;n&&n.replace&&(n=n.replace(J,""));n=B(n);t&&t.replace&&(t=t.replace(J,""));t=B(t,n&&1.2*n);m=n?0.85*n:0.75*t;n=d.x;h=v(d["vertical-align"],"middle").toLowerCase();
453 p=$(p).split(b);N=p.length;d=0;for(m="top"===h?m:"bottom"===h?m-t*N:m-t*N*0.5;d<N;d++)c.textSTR+="<tspan ",h=(p[d]||"").replace(F,"&amp;").replace(C,"&quot;").replace(w,"&#39;").replace(e,"&lt;").replace(g,"&gt;"),c.textSTR=d?c.textSTR+('dy="'+t+'" x="'+n+'" '):c.textSTR+('dy="'+m+'"'),c.textSTR+=">"+h+"</tspan>"}},fa=function(a,b){var d="",e={attrSTR:"",styleSTR:"",textSTR:"",attrs:a.attr()},g=a.isShadow,t="",p="",h,n,m=e.attrs;if("none"===a.node.style.display||g)a.next&&(d+=fa(a.next,b));else{for(h in m)if("gradient"!==
454 h&&(void 0!==l[h]||S[h])&&void 0!==m[h])if(S[h])S[h](a,e,b);else e.attrSTR+=" "+h+'="'+m[h]+'"';a.attrs.gradient&&S.gradient(a,e,b);"rect"===a.type&&m.r&&(e.attrSTR+=' rx="'+m.r+'" ry="'+m.r+'"');for(n in a.styles)e.styleSTR+=n+":"+a.styles[n]+"; ";"image"===a.type&&(e.attrSTR+=' preserveAspectRatio="none"');if("text"===a.type&&!m["text-anchor"])S["text-anchor"](a,e);a.bottom&&(t=fa(a.bottom,b));a.next&&(p=fa(a.next,b));g=a.type;g.match(D)&&(g="g");d+="<"+g+' transform="matrix('+a.matrix.toMatrixString().replace(c,
455 "")+')" style="'+e.styleSTR+'"'+e.attrSTR+">"+e.textSTR+t+"</"+g+">"+p}return d};d.fn.toSVG=function(a){var b="",c={str:""},e=0,g=H.length,t="";if(d.svg){if(this.canvas&&this.canvas.parentNode){for(b=this.canvas.parentNode.innerHTML;e<g;e+=1)c=H[e],b=b.replace(c.reg,c.repStr);this._stylesheet&&(b=b.replace(/^(<svg\s[\s\S]*?>)/ig,'$1<style type="text/css">'+this._stylesheet.toString(!0)+"</style>"))}}else b='<svg style="overflow: hidden; position: relative;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+
456 this.width+'" version="1.1" height="'+this.height+'">',this.bottom&&(t=fa(this.bottom,c)),b+="<defs>"+c.str+"</defs>"+t+"</svg>";a||(b=b.replace(/<image [^\>]*\>/gi,""));return b}})(k)}]);
457 FusionCharts.register("module",["private","modules.renderer.js-raphaelshadow",function(){var d=this.window,k=d.Math.sqrt,B=d.parseFloat,v=d.parseInt,d=d.SVGFilterElement||d.SVGFEColorMatrixElement&&2===d.SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_SATURATE,l=this.hcLib.Raphael,c={"drop-shadow":"drop-shadow",stroke:"stroke",fill:"fill","stroke-width":"stroke-width","stroke-opacity":"stroke-opacity","stroke-linecap":"stroke-linecap","stroke-linejoin":"stroke-linejoin","shape-rendering":"shape-rendering",
458 transform:"transform"},K=l._createNode,b;l.svg?(d&&(l.el.dropshadow=function(b,a,c,d){var v=this.node,w=this._.shadowFilter,e=this.paper.cacheShadows||(this.paper.cacheShadows={}),g="drop-shadow"+[b,a,c,d].join(" "),n;if("none"===b){if(w){w.use-=1;this.node.removeAttribute("filter");if(!w.use){g=w.hash;for(n in w)b=w[n],b.parentNode&&b.parentNode.removeChild(b),delete w[n];delete e[g]}delete this._.shadowFilter}}else w&&e[g]===w||(w=this.paper.defs.appendChild(K("filter",{id:l.createUUID(),width:"200%",
459 height:"200%"})),d=l.color(d),d.error&&(d=l.color("rgba(0,0,0,1)")),n=l.pick(d.opacity,1),this._.shadowFilter=e[g]={use:1,filter:w,hash:g,offset:w.appendChild(K("feOffset",{result:"offOut","in":"SourceGraphic",dx:B(b),dy:B(a)})),matrix:w.appendChild(K("feColorMatrix",{result:"matrixOut","in":"offOut",type:"matrix",values:"0 0 0 0 "+d.r/255+" 0 0 0 0 "+d.g/255+" 0 0 0 0 "+d.b/255+" 0 0 0 "+n+" 0"})),blur:w.appendChild(K("feGaussianBlur",{result:"blurOut","in":"matrixOut",stdDeviation:k(B(c))})),blend:w.appendChild(K("feComposite",
460 {"in":"SourceGraphic",in2:"blurOut",operator:"over"}))},v.setAttribute("filter",'url("'+l._url+"#"+w.id+'")'));return this}),b=function(b,a){var d=this.__shadowscale,l={},k,w;for(w in b)switch(c[w]&&(l[w]=b[w],delete b[w]),w){case "transform":k=a.matrix.clone();k.translate(this.__shadowx,this.__shadowy);this.transform(k.toTransformString());break;case "stroke-width":b[w]=((l[w]||1)+6-2*this.__shadowlevel)*d}this.attr(b);for(w in l)b[w]=l[w]},l.ca["drop-shadow"]=function(c,a,d,k,C,w){d=this._.shadows||
461 (this._.shadows=[]);var e,g,n,s,R;if(!this.__shadowblocked)if("none"===c)for(;g=d.pop();)g.remove();else for(k=l.color(k),k.error&&(k=l.color("rgba(0,0,0,1)")),C instanceof Array?(e=C[0],C=C[1]):e=C,e=1/l.pick(e,1),C=1/l.pick(C,1),c=l.pick(c,1)*e,a=l.pick(a,1)*e,e=0.05*l.pick(k.opacity,1),n=v(this.attr("stroke-width")||1,10)+6,s=this.matrix.clone(),s.translate(c,a),R=1;3>=R;R++)g=(d[R-1]||this.clone().follow(this,b,!w&&"before")).attr({stroke:k.hex,"stroke-opacity":e*R,"stroke-width":(n-2*R)*C,transform:s.toTransformString(),
462 "stroke-linecap":"round","stroke-linejoin":"round",fill:"none"}),g.__shadowlevel=R,g.__shadowscale=C,g.__shadowx=c,g.__shadowy=a,w&&w.appendChild(g),d.push(g);return!1},l.el.shadow=function(b,a,c,d){var k;c&&c.constructor===l.el.constructor&&(d=c,c=void 0);"object"===typeof b&&(a&&a.constructor===l.el.constructor&&(d=a),a=b.opacity,c=b.scalefactor,k=!!b.useFilter,b=void 0===b.apply?!!a:b.apply);void 0===a&&(a=1);if(this.dropshadow){if(k)return b&&this.dropshadow(1,1,3,"rgb(64,64,64)")||this.dropshadow("none"),
463 this;this._.shadowFilter&&this.dropshadow("none")}return this.attr("drop-shadow",b?[1,1,3,"rgba(64,64,64,"+a+")",c,d]:"none")}):l.vml?(l.ca["drop-shadow"]=function(b,a,c,d,k,w){var e=this._.shadow,g,n;if(this.isShadow)return!1;"none"===b?e&&(this._.shadow=e.remove()):(e||(e=this._.shadow=this.clone(),w&&w.appendChild(e.follow(this))||e.follow(this,void 0,"before"),e.attr({fill:"none","fill-opacity":0.5,"stroke-opacity":1}).isShadow=!0,0>=e.attr("stroke-width")&&e.attr("stroke-width",1)),w=e.node.runtimeStyle,
464 g=w.filter.replace(/ progid:\S+Blur\([^\)]+\)/g,""),d=l.color(d),d.error&&(d=l.color("rgba(0,0,0,1)")),n=l.pick(d.opacity,1)/5,k=1/l.pick(k,1),b=l.pick(b,1)*k,a=l.pick(a,1)*k,e.translate(b,a),w.filter=g+" progid:DXImageTransform.Microsoft.Blur(pixelRadius="+B(0.4*c)+" makeShadow=True Color="+d.hex+' shadowOpacity="'+n+'");');return!1},l.el.shadow=function(b,a,c,d){c&&c.constructor===l.el.constructor&&(d=c,c=void 0);"object"===typeof b&&(a&&"group"===a.type&&(d=a),a=b.opacity,c=b.scalefactor,b=void 0===
465 b.apply?!!a:b.apply);void 0===a&&(a=1);return this.attr("drop-shadow",b||!a?[1,1,5,"rgba(64,64,64,"+a+")",c,d]:"none")}):l.canvas&&(l.el.shadow=function(){return this})}]);
466 FusionCharts.register("module",["private","modules.renderer.js-raphaelshapes",function(){var d=this.window,k="createTouch"in d.document,B=/msie/i.test(d.navigator.userAgent)&&!d.opera,v=d.Math,l=v.cos,c=v.sin,K=v.abs,b=v.pow,J=v.atan2,a=v.min,D=v.round,F=v.PI,C=2*F,w=d.parseInt,e=d.parseFloat,g=String,n=Array.prototype.slice,s=b(2,-24),R="rgba(192,192,192,"+(B?0.002:1E-6)+")",m=this.hcLib.Raphael,I=m.eve,Q=m._createNode,X=m._setFillAndStroke,$=m.el.constructor,p={speed:"optimizeSpeed",crisp:"crispEdges",
467 precision:"geometricPrecision"},H={enabled:!1,"false":!1,0:!1,disabled:!0,"true":!0,1:!0},S={Q:"L",Z:"X",q:"l",z:"x",",":" "},fa=/,?([achlmqrstvxz]),?/gi,sa=/\s*\,\s*/g,ya,ca=function(){return this.join(",").replace(fa,ya)},Y,xa;if(m.svg)I.on("raphael.attr.shape-rendering",function(a,b){var c=this.node;this.attrs[b]=a=p[a]||a||"auto";c.setAttribute(b,a);c.style.shapeRendering=a});else if(m.vml)I.on("raphael.attr.shape-rendering",function(a){this.node.style.antialias="crisp"!==a});m.define&&m.define([{name:"polypath",
468 polypath:function(){return this.path(void 0,m._lastArgIfGroup(arguments))},ca:{polypath:function(a,b,h,d,g,p){var n,s,S;n=[];a=w(a,10)||0;b=e(b)||0;h=e(h)||0;d=e(d)||0;g=null===g||isNaN(g)?0.5*F:m.rad(g);p=null===p||isNaN(p)?0:e(p);s=g;if(2<a)switch(g=2*F/a,p){case 0:for(p=0;p<a;p++)n.push("L",b+d*l(-s),h+d*c(-s)),s+=g;n[0]="M";n.push("Z");break;case 1:for(p=0;p<a;p++)n.push("M",b,h,"L",b+d*l(-s),h+d*c(-s)),s+=g;break;default:g*=0.5;S=d*l(g)*(1-p);for(p=0;p<a;p++)n.push("L",b+d*l(-s),h+d*c(-s)),s+=
469 g,n.push("L",b+S*l(-s),h+S*c(-s)),s+=g;n[0]="M";n.push("Z")}else 0===d?n.push("M",b,h,"L",b,h,"Z"):n.push("M",b-d,h,"A",d,d,0,0,0,b+d,h,"A",d,d,0,0,0,b-d,h,"Z");return{path:n}},r:function(a){var b=this.attrs.polypath;b[3]=a;this.attr("polypath",b);return!1}}},{name:"ringpath",ringpath:function(){return this.path(void 0,m._lastArgIfGroup(arguments))},ca:function(a,b,h,d,e,g){var p=g%C-e%C,n=g-e,m;this._.ringangle=0.5*(e+g);K(n)<s?(n=l(e),e=c(e),h=["M",a+h*n,b+h*e,"L",a+d*n,b+d*e,"Z"]):(K(n)>s&&K(n)%
470 C<s?(h=["M",a-h,b,"A",h,h,0,0,0,a+h,b,"A",h,h,0,0,0,a-h,b],0!==d&&(h=h.concat(["M",a-d,b,"A",d,d,0,0,1,a+d,b,"A",d,d,0,0,1,a-d,b]))):(n=l(e),e=c(e),m=l(g),g=c(g),p%=C,0>p&&(p+=C),p=p<F?0:1,h=["M",a+h*n,b+h*e,"A",h,h,0,p,1,a+h*m,b+h*g,"L",a+d*m,b+d*g],0!==d&&h.push("A",d,d,0,p,0,a+d*n,b+d*e)),h.push("Z"));return{path:h}}},{name:"cubepath",cubepath:function(){var a={"stroke-linejoin":"round","shape-rendering":"precision",stroke:"none"},b=arguments,c=b.length-1,d=b[c],e,g;d&&d.constructor===m.el.constructor?
471 b[c]=void 0:d=void 0;c=this.path(a,d);e=this.path(a,d);a=this.path(a,d);a._.cubetop=c.follow(a,void 0,"before");a._.cubeside=e.follow(a,void 0,"before");for(g in m.fn.cubepath.ca)a.ca[g]=m.fn.cubepath.ca[g];return a.attr("cubepath",[b[0],b[1],b[2],b[3],b[4],b[5]])},fn:{_getBBox2:function(){var a=this._.cubeside.getBBox(),b=this._.cubetop.getBBox(),c=this.getBBox();return{x:c.x+b.height,y:c.y-a.width,width:c.width,height:c.height}}},ca:{cubepath:function(a,b,c,d,e,g){var p=this._.cubetop,n=this._.cubeside;
472 a=a||0;b=b||0;c=c||0;d=d||0;e=e||0;g=g||0;this.attr("path",["M",a+c,b,"l",0,d,-c,0,0,-d,"z"]);p.attr("path",["M",a,b,"l",1,1,c-1,0,0,-1,e,-g,-c,0,"z"]);n.attr("path",["M",a+c-1,b+1,"l",0,d-1,1,0,e,-g,0,-d,-e,g]);return!1},"stroke-linejoin":function(){return{"stroke-linejoin":"round"}},"drop-shadow":function(a,b,c,d){var e=this._.cubetop,g=this._.cubeside;this.dropshadow&&(e.dropshadow(a,-b,c,d),g.dropshadow(a,-b,c,d));return!1},fill:function(a,b){var c=this._.cubetop,d=this._.cubeside,e=this.attr("cubepath")||
473 [0,0,0,0,0,0],g=e[2],p=e[4],e=e[5],n;a=m.color(a);b?(this.attr("fill",a),c.attr("fill",m.tintshade(a,-0.78).rgba),d.attr("fill",m.tintshade(a,-0.65).rgba)):(n="opacity"in a?"rgba("+[a.r,a.g,a.b,a.opacity]+")":"rgb("+[a.r,a.g,a.b]+")",this.attr("fill",[270,m.tintshade(n,0.55).rgba,m.tintshade(n,-0.65).rgba].join("-")),d.attr("fill",[270,m.tintshade(n,-0.75).rgba,m.tintshade(n,-0.35).rgba].join("-")),c.attr("fill",[45+m.deg(J(e,p+g)),m.tintshade(n,-0.78).rgba,m.tintshade(n,0.22).rgba].join("-")));return!1}}},
474 {name:"scroller",scroller:function(a,b,c,d,g,p,n){var l=this.group("scroller",n),s=l.attrs,S=l._.scroller={};g=g&&"horizontal"||"vertical";var w,k={},H,D,v;S.track=this.rect(l).mousedown(function(a){var b=s["scroll-position"];a="horizontal"===s["scroll-orientation"]?a.layerX||a.x:a.layerY||a.y;a=(a-S.anchorOffset)/S.trackLength;w=m.animation({"scroll-position":a},2E3*K(b-a),"easeIn");l.animate(w);I("raphael.scroll.start."+l.id,l,b)}).mouseup(S._mouseupTrack=function(){this.stop(w);I("raphael.scroll.end."+
475 this.id,this,s["scroll-position"])},l,!0);S.anchor=this.rect(l).drag(function(){k["scroll-position"]=H+arguments[D]/S.trackLength;l.animate(k,0)},function(a,b,c){D="horizontal"===s["scroll-orientation"]?0:1;I("raphael.scroll.start."+l.id,l,H=s["scroll-position"]);c.stopPropagation()},function(){I("raphael.scroll.end."+l.id,l,H=s["scroll-position"])});for(v in m.fn.scroller.fn)l[v]=m.fn.scroller.fn[v];for(v in m.fn.scroller.ca)l.ca[v]=m.fn.scroller.ca[v];s["scroll-orientation"]=g;s["stroke-width"]=
476 1;l.ca["scroll-repaint"]=l.ca["scroll-repaint-"+g];!m.is(p,"object")&&(p={});return l.attr({ishot:!0,"scroll-display-buttons":p.showButtons&&"arrow"||"none","scroll-display-style":p.displayStyleFlat&&"flat"||"3d","scroll-ratio":e(p.scrollRatio)||1,"scroll-position":e(p.scrollPosition)||0,"scroll-repaint":[a,b,c,d]})},fn:{scroll:function(a,b){var c=this._.scroller;b=b||this;c.callback=function(){return a.apply(b,arguments)};return this},remove:function(){var a=this._.scroller,b;this.attr("scroll-display-buttons",
477 "none");a.track.unmouseup(a._mouseupTrack);for(b in a)a[b]&&a[b].remove&&a[b].remove(),a[b]=null;delete this._.scroller;m.el.remove.apply(this,arguments)}},ca:{"stroke-width":function(){return!1},"drop-shadow":function(a,b,c,d,e,g){this._.scroller.track.attr("drop-shadow",[a,b,c,d,e,g]);return!1},"scroll-display-style":function(a){var b=this.attrs,c=b["scroll-display-style"],d=b.fill;a={flat:"flat","3d":"3d",transparent:"transparent"}[a]||c;d&&a!==c&&(b["scroll-display-style"]=a,this.attr("fill",
478 d));return{"scroll-display-style":a}},"scroll-display-buttons":function(a){var b=this,c=b.paper,d=b._.scroller,e=b.attrs,g=e["scroll-display-buttons"],p=e["scroll-repaint"],n,l;void 0===g&&(g="none");a={none:"none",arrow:"arrow"}[a]||g;a!==g&&(e["scroll-display-buttons"]=a,"none"===a&&d.start?(d.arrowstart.remove(),delete d.arrowstart,d.arrowend.remove(),delete d.arrowend,d.start.unmouseup(d._mouseupStart),d.start.remove(),delete d.start,d.end.unmouseup(d._mouseupEnd),d.end.remove(),delete d.end):
479 (d.arrowstart=c.polypath(b),d.arrowend=c.polypath(b),d.start=c.rect(b).mousedown(function(){var a;0!==(a=e["scroll-position"])&&(b.animate({"scroll-position":a-0.1},100).animate(n=m.animation({"scroll-position":0},4500*a,"easeIn")),I("raphael.scroll.start."+b.id,b,a))}).mouseup(d._mouseupStart=function(){b.stop(n);I("raphael.scroll.end."+b.id,b,e["scroll-position"])},b,!0),d.end=c.rect(b).mousedown(function(){var a;1!==(a=e["scroll-position"])&&(b.animate({"scroll-position":a+0.1},100).animate(l=
480 m.animation({"scroll-position":1},4500*(1-a),"easeIn")),I("raphael.scroll.start."+b.id,b,a))}).mouseup(d._mouseupEnd=function(){b.stop(l);I("raphael.scroll.end."+b.id,b,e["scroll-position"])},b,!0),e.fill&&b.attr("fill",e.fill)),p&&b.attr("scroll-repaint",p));return{"scroll-display-buttons":a}},"scroll-orientation":function(a){var b=this.attrs,c=b["scroll-repaint"],d=b["scroll-orientation"];a={horizontal:"horizontal",vertical:"vertical"}[a]||d;d!==a&&(this.ca["scroll-repaint"]=this.ca["scroll-repaint-"+
481 a],c&&(c[2]+=c[3],c[3]=c[2]-c[3],c[2]-=c[3],this.attr("scroll-repaint",c)),b.fill&&this.attr("fill",b.fill));return{"scroll-orientation":a}},"scroll-ratio":function(a){var b=this.attrs,c=b["scroll-ratio"],d=b["scroll-repaint"];a=1<a?1:0.01>a?0.01:e(a);d&&a!==c&&(b["scroll-ratio"]=a,this.attr("scroll-repaint",d));return{"scroll-ratio":a}},"scroll-position":function(a,b){var c=this.attrs,d="horizontal"===c["scroll-orientation"],g=c["scroll-repaint"],p=c["scroll-position"],n=this._.scroller,m=n.anchor;
482 a=1<a?1:0>a?0:e(a);isNaN(a)&&(a=p);g&&(p!==a||b)&&(p=n.start&&n.start.attr(d&&"width"||"height")||0,d&&m.attr("x",g[0]+p+(g[2]-2*p-m.attr("width"))*a+0.5)||m.attr("y",g[1]+p+(g[3]-2*p-m.attr("height"))*a+0.5),!b&&1>c["scroll-ratio"]&&(I("raphael.scroll.change."+this.id,this,a),n.callback&&n.callback(a)));return{"scroll-position":a}},r:function(a){var b=this._.scroller;b.track.attr("r",a);b.anchor.attr("r","none"===this.attrs["scroll-display-buttons"]&&a||0);return!1},"scroll-repaint-horizontal":function(b,
483 c,h,d){var e=this.attrs,g=this._.scroller,p=e["scroll-ratio"],n=e["scroll-position"],m=0,l=h*p,e="none"===e["scroll-display-buttons"];h&&(h-=1);b&&(b+=0.5);d&&(d-=1);c&&(c+=0.5);g.track.attr({width:h,height:d,y:c,x:b}).crisp();e||(m=a(d,0.5*h),l-=2*m*p,g.start.attr({width:m,height:d,x:b,y:c}),g.arrowstart.attr("polypath",[3,b+0.5*m,c+0.5*d,0.25*m,180]),g.end.attr({width:m,height:d,x:b+h-m,y:c}),g.arrowend.attr("polypath",[3,b+h-0.5*m,c+0.5*m,0.25*m,0]));g.trackLength=h-2*m-l;g.trackOffset=b+m+0.5;
484 g.anchorOffset=g.trackOffset+0.5*(l-1);g.anchor.attr({height:d,width:l-1,y:c,x:g.trackOffset+g.trackLength*n}).crisp()},"scroll-repaint-vertical":function(b,c,h,d){var e=this.attrs,g=this._.scroller,p=e["scroll-ratio"],n=e["scroll-position"],m=0,l=d*p,e="none"===e["scroll-display-buttons"];h&&(h-=1);b&&(b+=0.5);d&&(d-=1);c&&(c+=0.5);g.track.attr({width:h,height:d,y:c,x:b}).crisp();e||(m=a(h,0.5*d),l-=2*m*p,g.start.attr({width:h,height:m,x:b,y:c}),g.arrowstart.attr("polypath",[3,b+0.5*h,c+0.5*m,0.25*
485 m,90]),g.end.attr({width:h,height:m,x:b,y:c+d-m}),g.arrowend.attr("polypath",[3,b+0.5*h,c+d-0.5*m,0.25*m,-90]));g.trackLength=d-2*m-l;g.trackOffset=c+m+0.5;g.anchorOffset=g.trackOffset+0.5*(l-1);g.anchor.attr({height:l-1,width:h,y:g.trackOffset+g.trackLength*n,x:b}).crisp()},fill:function(a){var b=this.attrs,c=this._.scroller,d=b["scroll-repaint"],e="flat"===b["scroll-display-style"],g="horizontal"===b["scroll-orientation"],p={stroke:"none"},n;k&&d&&3<(n=16-d[g&&3||2])&&(p.stroke=R,p["stroke-width"]=
486 n);a=m.color(a);a.error&&(a="#000000");a="opacity"in a?"rgba("+[a.r,a.g,a.b,a.opacity]+")":"rgb("+[a.r,a.g,a.b]+")";p.fill=e&&a||[90*g,m.tintshade(a,0.15).rgba,a].join("-");p.stroke=m.tintshade(a,-0.75).rgba;c.track.attr(p);p.fill=e&&m.tintshade(a,-0.6).rgba||[270*g,m.tintshade(a,0.3).rgba+":40",m.tintshade(a,-0.7).rgba].join("-");p.stroke=m.tintshade(a,-0.6).rgba;c.anchor.attr(p);p.stroke="none";"none"!==b["scroll-display-buttons"]&&(p.fill=R,c.start.attr(p),c.end.attr(p),p.fill=m.tintshade(a,-0.4).rgba,
487 c.arrowstart.attr(p),c.arrowend.attr(p));return!1}}},{name:"button",button:function(a,b,c,d,e,g){g=this.group("button",g);var p;g._.button={bound:this.rect(g),tracker:this.rect(g).attr({fill:R,stroke:R,cursor:"pointer"}).data("compositeButton",g)};!m.is(e,"object")&&(e={});for(p in m.fn.button.fn)g[p]=m.fn.button.fn[p];for(p in m.fn.button.ca)g.ca[p]=m.fn.button.ca[p];return g.attr({ishot:!0,"button-padding":[e.horizontalPadding,e.verticalPadding],"button-label":c,"button-symbol":d,"button-disabled":e.disabled||
488 "false","button-symbol-position":e.symbolPosition,"button-symbol-padding":e.symbolPadding}).attr("button-repaint",[a,b,e.width,e.height,e.r])},data:{hoverin:function(){var a=this._.button.hoverbackIn;a&&!1===a()||(this.attr("fill","hover").hovered=!0)},hoverout:function(){var a=this._.button.hoverbackOut;a&&!1===a()||(this.attr("fill",(this.pressed||this.active)&&"active"||"normal").hovered=!1)},mousedown:function(){this.attr("fill","active").pressed=!0},mouseup:function(){var a=this._.button.callback;
489 this.attr("fill",this.hovered&&"hover"||this.active&&"active"||"normal").pressed=!1;a()}},fn:{tooltip:function(){m.el.tooltip&&m.el.tooltip.apply(this._.button.tracker,arguments);return this},buttonclick:function(a,b){var c=this._.button;b=b||this;c.callback=function(){return a.apply(b,arguments)};return this},labelcss:function(){var a=this._.button,b=a.label;a.cssArg=arguments;b&&b.css.apply(b,arguments);return this.attr("button-repaint",this.attrs["button-repaint"])},buttonhover:function(a,b,c,
490 d){var e=this._.button;c=c||this;d=d||this;e.hoverbackIn=function(){return a.apply(c,arguments)};e.hoverbackOut=function(){return b.apply(d,arguments)};return this},remove:function(){var a=this._.button,b;this.attr("button-disabled","true");for(b in a)a[b]&&a[b].remove&&a[b].remove(),a[b]=null;delete this._.button;m.el.remove.apply(this,arguments)}},ca:{"button-active":function(a){this.attr("fill",(this.active=!!a)?"active":this.hovered&&"hover"||"normal")},"button-disabled":function(a){var b=this._.button.tracker,
491 c=this.attrs["button-disabled"],d=this.paper.button.data;a=H[a];c=H[c];if(void 0!==a&&a!==c)switch(a){case !0:b.attr("fill","rgba(204,204,205,.5)").unmousedown(d.mousedown).unmouseup(d.mouseup).unhover(d.hoverin,d.hoverout);break;case !1:b.attr("fill",R).mousedown(d.mousedown,this).mouseup(d.mouseup,this,!0).hover(d.hoverin,d.hoverout,this,this)}},"button-label":function(a){var b=this._.button,c=this.attrs,d=b.label,e=b.cssArg,p=this.attrs["button-repaint"];a=g(a||"");"none"===a?d&&(b.label=d.remove()):
492 a&&(!d&&(d=b.label=this.paper.text(this).insertBefore(b.tracker)),d.attr({text:a,"text-anchor":"middle","vertical-align":"middle"}),e&&e.length&&d.css.apply(d,e));p&&c["button-label"]!==a&&this.attr("button-repaint",p)},"button-symbol":function(a){var b=this.attrs,c=this._.button,d=c.symbol,e=this.attrs["button-repaint"];a=g(a||"");"none"===a?d&&(c.symbol=d.remove()):a&&!d&&(c.symbol=this.paper.symbol(this).insertAfter(c.bound));e&&b["button-symbol"]!==a&&this.attr("button-repaint",e)},"button-symbol-position":function(a){return{"button-symbol-position":{top:"top",
493 right:"right",bottom:"bottom",left:"left",none:"none"}[g(a).toLowerCase()]||"none"}},"button-symbol-padding":function(a){return{"button-symbol-padding":e(a)}},"button-padding":function(a,b){return{"button-padding":[null==a&&(a=5)||e(a),null==b&&a||e(b)]}},"button-repaint":function(b,c,h,d,e){var g=this._.button,p=g.bound,n=g.label,l=g.symbol,s=this.attrs,S=s["button-padding"],w=S[0],k=S[1],H,v;void 0===b&&(b=0);void 0===c&&(c=0);if(void 0===h||void 0===d)H=n&&n.getBBox()||{width:0,height:0},void 0===
494 h&&(h=2*w+H.width),void 0===d&&(d=2*k+H.height);p=m.crispBound(b,c,h,d,p.attr("stroke-width"));p.r=m.pick(e,D(0.1*a(d,h)));b=p.x;c=p.y;h=p.width;d=p.height;n&&n.attr({x:b+h/2,y:c+d/2});if(l){!m.is(v=s["button-symbol-padding"],"finite")&&(v=0.2*d);e=d-k;H=0.5*e;switch(s["button-symbol-position"]+(n&&"+"||"-")){case "right+":b=b+(h+(2*H+k))-H-w;c+=0.5*d;n.attr("transform",["t",-(e+v),0]);break;case "left+":b=b+w+H;c+=0.5*d;n.attr("transform",["t",e+v,0]);break;case "top+":b+=0.5*h;c=c+S[1]+H;n.attr("transform",
495 ["t",0,e+v]);break;case "bottom+":b+=0.5*h;c=c+(d+(2*H+v))-k-H;n.attr("transform",["t",0,-(e+v)]);break;default:b+=0.5*h,c+=0.5*d}l.attr("symbol",[s["button-symbol"],b,c,H])}g.bound.attr(p);g.tracker.attr(p)},fill:function(a,b,c,d){var e=this._.button,g=e.bound,p=e.symbol,n=e.label,l={normal:e.gradient,active:e.gradientActive,hover:e.gradientHover}[a];l||(a=m.getRGB(a),a.error&&(a=m.color("#cccccc")),a="opacity"in a?"rgba("+[a.r,a.g,a.b,a.opacity]+")":"rgb("+[a.r,a.g,a.b]+")",e.gradient=[90,m.tintshade(a,
496 -0.8).rgba+":0",m.tintshade(a,0.8).rgba+":100"].join("-"),e.gradientActive=[270,m.tintshade(a,-0.8).rgba+":0",m.tintshade(a,0.8).rgba+":100"].join("-"),d=m.getRGB(d),d.error&&(d=a)||(d="opacity"in d?"rgba("+[d.r,d.g,d.b,d.opacity]+")":"rgb("+[d.r,d.g,d.b]+")"),e.gradientHover=[90,m.tintshade(d,-0.9).rgba+":0",m.tintshade(d,0.7).rgba+":100"].join("-"),c=c||m.tintshade(a,0.2).rgba,b=b||m.tintshade(a,-0.2).rgba,e.symbolFill=c,e.labelFill=b,l=(this.pressed||this.active)&&e.gradientActive||this.hovered&&
497 e.gradienthover||e.gradient);g.attr("fill",l);p&&p.attr("fill",e.symbolFill);n&&n.attr("fill",e.labelFill);return!1},stroke:function(a,b){var c=this._.button,d=c.symbol;a=m.color(a);a.error&&(a=m.color("#999999"));c.bound.attr("stroke",a);d&&d.attr("stroke",b||a);return!1},"stroke-width":function(a,b){var c=this._.button,d=c.symbol;c.bound.attr("stroke-width",a);c.tracker.attr("stroke-width",a);d&&d.attr("stroke-width",b);return!1}}}]);m.ca["text-bound"]=function(a,b,c,d,e,g){d=this.paper;var p=this._.textbound;
498 if("text"===this.type){if(!(b&&"none"!==b||a&&"none"!==a))return this._.textbound=p&&p.unfollow(this).remove(),!1;c&&m.is(c,"finite")||(c=0);e&&m.is(e,"finite")||(e=0);!p&&(p=this._.textbound=d.rect(0,0,0,0,this.group).follow(this,m.ca["text-bound"].reposition,"before"));p.attr({stroke:b,"stroke-width":c,fill:a,"shape-rendering":1===c&&"crisp"||"",r:e});g&&p.attr("stroke-dasharray",g);m.ca["text-bound"].reposition.call(p,this.attr(),this);return!1}};m.ca["text-bound"].reposition=function(a,b){var c=
499 {},d,p,n,l,s;a.hasOwnProperty("visibility")&&this.attr("visibility",a.visibility);if(a.hasOwnProperty("text-bound")||a.hasOwnProperty("x")||a.hasOwnProperty("y")||a.hasOwnProperty("text")||a.hasOwnProperty("text-anchor")||a.hasOwnProperty("text-align")||a.hasOwnProperty("font-size")||a.hasOwnProperty("line-height")||a.hasOwnProperty("vertical-align")||a.hasOwnProperty("transform")||a.hasOwnProperty("rotation"))d=b.attrs["text-bound"],p=g(d&&d[3]||"0").split(sa),d=e(p[0])||0,p=m.pick(e(p[1]),d),n=
500 b.getBBox(),l=n.width,s=n.height,isNaN(l)||(c.x=n.x-d,c.y=n.y-p,c.width=l+2*d,c.height=s+2*p),this.attr(c)};m.fn.symbol=function(){var a=arguments,b=a.length-1,c=a[b];c&&c.constructor===m.el.constructor?a[b]=void 0:c=void 0;b=this.path(void 0,c);b.ca.symbol=m.fn.symbol.ca.symbol;return a.length===!!c+0?b:b.attr("symbol",a)};m.fn.symbol.cache={"":m._cacher(function(a,b,c,d){return 3<arguments.length?["M",a,b,"h",c,"v",d,"h",-c,"v",-d,"z"]:["M",a-c,b-c,"h",c*=2,"v",c,"h",-c,"v",-c,"z"]})};m.fn.symbol.ca=
501 {symbol:function(a){var b=m.is(a,"object")&&1===arguments.length&&!m.is(a,"function")?a:arguments,c;b===a&&(a=b[0]);b=(c=m.is(a,"function")&&a||m.fn.symbol.cache[a]||m.fn.symbol.cache[""])&&c.apply(m,n.call(b,1));m.is(b,"array")||m.is(b,"string")?this.attr("path",b):b&&this.attr(b)}};m.addSymbol=function(a,b){var c=m.is(b,"function")&&(c={},c[a]=b,c)||a,d=m.fn.symbol.cache,e=[],g;for(g in c)b=c[g],d[g]=m.is(b,"function")&&m._cacher(b,m)||(e.push(g),b);for(;g=e.pop();)d[g]=d[d[g]]};m.svg?(ya="$1",
502 Y=function(a){a?"string"===typeof a?a=a.replace(fa,ya):a.toString=ca:a="M0,0";this.node.setAttribute("d",a.toString());return this},m._engine.litepath=function(a,b,c,d){a=Q("path");(d||b).canvas.appendChild(a);b=new $(a,b,d);b.type="litepath";b.id=a.raphaelid=m._oid++;a.raphael=!0;X(b,{fill:"none",stroke:"#000"});return b},m._getPath.litepath=function(a){return m.parsePathString(a.node.getAttribute("d"))}):m.vml&&(ya=function(a,b){return S[b]||b},xa=function(){this._transform.apply(this,arguments);
503 this._.bcoord&&(this.node.coordsize=this._.bcoord);return this},Y=function(a){a?"string"===typeof a?a=a.replace(fa,ya):a.toString=ca:a="M0,0";this.node.path=a;return this},m._engine.litepath=function(a,b,c,d){a=Q("shape");var g=a.style,p=new $(a,b,d);g.cssText="position:absolute;left:0;top:0;width:21600px;height:21600px;";c=e(c);isNaN(c)?a.coordsize="21600 21600":(p._.bzoom=c,g.width="1px",g.height="1px",a.coordsize=p._.bcoord=c+" "+c);a.coordorigin=b.coordorigin;p.type="litepath";p.id=a.raphaelid=
504 m._oid++;a.raphael=!0;p._transform=p.transform;p.transform=xa;m._setFillAndStroke(p,{fill:"none",stroke:"#000"});(d||b).canvas.appendChild(a);b=Q("skew");b.on=!0;a.appendChild(b);p.skew=b;return p},m._getPath.litepath=function(a){return m.parsePathString(a.node.path||"")});m.fn.litepath=function(a,b,c){b&&b.constructor===$&&(c=b,b=void 0);a&&a.constructor===$&&(c=a,a="");b=m._engine.litepath(a,this,b,c);b.ca.litepath=Y;a&&b.attr("litepath",m.is(a,"array")?[a]:a);return this.__set__&&this.__set__.push(b),
505 this._elementsById[b.id]=b}}]);
506 FusionCharts.register("module",["private","modules.renderer.js-htmlrenderer",function(){var d=this.hcLib,k=d.Raphael,B=d.dem,v=this.window,l=v.document,c=/msie/i.test(v.navigator.userAgent)&&!v.opera,K="VML"===k.type,b="createTouch"in l,J={cursor:"cursor"},a={x:"left",y:"top",strokeWidth:"borderThickness","stroke-width":"borderThickness",width:"width",height:"height"},D={fill:"backgroundColor",stroke:"borderColor",color:"color"},F={left:0,top:0,padding:0,border:"none",margin:0,outline:"none","-webkit-apperance":"none",
507 position:"absolute",zIndex:20},C,w=function(b,c,d,e){b=l.createElement(b);for(var m in c)a[m]?b.style[m]=c[m]:b.setAttribute(m,c[m]);for(m in d)b.style[m]=d[m];e&&e.appendChild&&e.appendChild(b);return b},e;e=function(a,b,c){b&&b instanceof e&&(b=b.element);(this.element=w(a,c,F,b)).ishot="true";this.nodeName=a.toLowerCase();this.added=Boolean(b)};e.prototype={attr:function(b){var d=this.element,e={},w,m,k,v,C,B,p;if("object"!==typeof b){if(!(e=this[b])){if("string"===typeof b)d&&d.getAttribute&&
508 (v=d.getAttribute(b));else if(void 0!==b&&null!==b&&"object"===typeof b)for(k in b)d.setAttribute(k,b[k]);e=v}return e}for(w in b){k=b[w];if(J[w]){switch(w){case "cursor":"pointer"===k&&K&&(k="hand")}d.style[J[w]]=k;m=!0}else if(a[w])d.style[a[w]]=k+"px",m=!0;else if(D[w])d.style[D[w]]=k&&k.replace(/^#?([a-f0-9]+)/ig,"#$1")||"none",m=!0;else if(/^visibility$/i.test(w))m="hidden"===k,d.style.display=m?"none":"",this.hidden=m,m=!0;else if(/^opacity$/i.test(w))d.style.opacity=k,c&&(m=100*Number(k),d.style.filter=
509 "progid:DXImageTransform.Microsoft.Alpha(Opacity="+m+")"),m=!0;else if(/^innerhtml$/i.test(w)){if(K&&"select"==d.nodeName.toLowerCase()){for(m=k.match(/<option\s?[\s\S]*?(\/>|><\/option>|>[\s\S]*?<\/option>)/ig);d.firstChild;)d.removeChild(d.firstChild);C=0;for(B=m.length;C<B;C+=1)v=m[C],p=l.createElement("option"),/<option\s([\s\S]*[\'\"])\s*?(\/>|>[\s\S]*<\/option>)/ig.test(v)&&(p.value=v.replace(/<option\s([\s\S]*[\'\"])\s*?(\/>|>[\s\S]*<\/option>)/ig,"$1").replace(/[\s\S]*value\s*\=\s*[\'\"]([\s\S]*)[\'\"]/,
510 "$1")),p.text=v.replace(/<option\s*[\s\S]*[\'\"]?\s*?[\/>|\>]([\s\S]*)<\/option>/ig,"$1 "),d.options.add(p)}else"input"!==d.nodeName.toLowerCase()&&void 0!==k&&(d.innerHTML=k||"");m=!0}else/^text$/i.test(w)?("input"!==d.nodeName.toLowerCase()&&(d.innerHTML="",void 0!==k&&d.appendChild(l.createTextNode(k))),m=!0):/^type$/i.test(w)&&c&&this.added&&(m=!0);m&&(e[w]=k,delete b[w],m=!1)}for(w in b)d.setAttribute(w,b[w]);for(w in e)this[w]=b[w]=e[w],delete e[w];return this},val:function(a){var b=this.element,
511 c=void 0===a;return"input"===this.nodeName&&"checkbox"===b.getAttribute("type")?c?this.checked()?1:0:this.checked(a):c?b.value:(b.value=a,this)},checked:function(a){var b=this.element;return void 0===a?b.checked:(a?b.setAttribute("checked","checked"):b.removeAttribute("checked"),this)},css:function(a,b){var c=this.element.style,d;if("object"===typeof a)for(d in a)c[d]=a[d];else d&&void 0!==b&&(c[d]=b);return this},translate:function(a,b){var c=this.element;void 0!==a&&(c.style.left=a+"px");void 0!==
512 b&&(c.style.top=b+"px");return this},add:function(a,b){var c=this.element,d=a.element;b?d.insertBefore(c,d.firstChild):d.appendChild(c);this.added=!0;return this},hide:function(){this.element.style.display="none";return this},show:function(){this.element.style.display="";return this},focus:function(){"function"===typeof this.element.focus?this.element.focus():d.dem.fire(this.element,"focus")},destroy:function(){var a=this.element||{};a.onclick=a.onmouseout=a.onmouseover=a.onmousemove=a.onblur=a.onfocus=
513 null;C||(C=w("div"));a&&C.appendChild(a);C.innerHTML="";delete this.element;return null},on:K?function(a,b){this.element["on"+a]=function(){var a=v.event;a.target=a.srcElement;b(a)};return this}:function(a,c){var d=c;b&&"click"===a&&(a="touchstart",d=function(a){a.preventDefault();c()});this.element["on"+a]=d;return this},bind:function(a,b,c){B.listen(this.element,a,b,c);return this},unbind:function(a,b){B.unlisten(this.element,a,b);return this},trigger:function(a,b){B.fire(this.element,a,b);return this},
514 fadeIn:function(a,b){var c="fast"===a?400:1E3;this.show();this.attr({opacity:0});d.danimate.animate(this.element,{opacity:1},c,"linear",b)}};e.prototype.constructor=e;k.fn.html=function(a,b,c,d){var m={},l;b&&"type"in b&&(m.type=b.type,delete b.type);a=(new e(a,d,m)).css(c).attr(b);for(l in m)b[l]=m[l];return a}}]);
515 FusionCharts.register("module",["private","modules.renderer.js-raphaeltooltip",function(){var d=this,k=d.window,B=k.document,v=B.body||B.getElementsByTagName("body")[0],l=d.hcLib,c=l.Raphael,K=c.eve,b=l.createElement,J=l.addEvent,a=l.removeEvent,D=l.getPosition,F=l.hasTouch,C=l.getTouchEvent,w=k.Math,e=w.ceil,g=w.floor,n={},s=k.screen.availHeight,R=k.screen.availWidth,m={"":1,moz:1,webkit:1,o:1,ms:1},I={borderRadius:"borderRadius",boxShadow:"boxShadow"},Q=/\-([a-z])/ig,X=function(a,b){return b.toUpperCase()},
516 $=function(a){var b=p.forbiddenStyle,d,e,g;for(d in a)e=Q.test(d)?d.replace(Q,X):d,void 0!==a[d]&&!b[e]&&(this[e]=a[d]),c.vml&&/color/ig.test(e)&&(this[e]=c.getRGB(this[e]).toString());for(d in I)if(this[d])for(g in m)this[g+d]=this[d]},p=l.toolTip={elementId:"fusioncharts-tooltip-element",element:null,lastTarget:null,currentTarget:null,currentPaper:null,pointeroffset:12,prevented:!1,defaultStyle:l.extend2($.prototype,{backgroundColor:"#ffffee",borderColor:"#000000",borderWidth:"1px",color:"#000000",
517 fontSize:"10px",lineHeight:"12px",padding:"3px",borderStyle:"solid"}),defaultContainerStyle:{position:"absolute",textAlign:"left",margin:"0",zIndex:"99999",pointer:"default",display:"block"},forbiddenStyle:{}},H=function(b){!0===p._oobready?p._oobready=!1:(a(v,"touchstart",H),!p.hidden&&p.currentTarget&&(b=b.srcElement||b.target||n,b.raphael&&p.currentTarget.paper.getById(b.raphaelid)===p.currentTarget||p.hide()))};c.svg&&(p.defaultContainerStyle.pointerEvents="none",p.defaultStyle.borderRadius="0",
518 p.defaultStyle.boxShadow="none");c.vml&&(p.forbiddenStyle.borderRadius=!0,p.forbiddenStyle.boxShadow=!0,p.defaultStyle.filter="");p.setup=function(){var a=p.container,e=p.textElement,g=p.style,m=p.defaultContainerStyle,n=p.forbiddenStyle,l;a||(a=p.element=b("span"),(B.body||B.getElementsByTagName("body")[0]).appendChild(a),a.setAttribute("id",p.elementId),g=p.containerStyle=a.style,e=p.textElement=b("span"),a.appendChild(e),p.style=c.vml?e.runtimeStyle:e.style,p.style.overflow="hidden",p.style.display=
519 "block",p.hidden=!1,p.hide());for(l in m)!n[l]&&(g[l]=m[l]);p.scatted=!0;K.on("raphael.drag.start.*",function(){p.scatted&&(p.waitingScat=!0)});K.on("raphael.drag.move.*",function(){p.waitingScat&&(p.block(),p.waitingScat=!1)});K.on("raphael.drag.end.*",function(){p.waitingScat=!1;p.scatted&&p.unblock(!0)});K.on("raphael.remove",function(){if(p.currentPaper===this||p.currentTarget&&p.currentTarget.paper===this)p.hide(),p.currentTarget=p.currentPaper=null});d.addEventListener("LinkedChartInvoked",
520 function(a){p.currentPaper===a.sender.jsVars.hcObj.paper&&p.hide()})};p.restyle=function(a){var b=p.style,c;for(c in a)b[c]=a[c]};p.onelement=function(a){if(!a.__tipProcessed){var b=this.paper,c="group"===this.type?b&&b._elementFromEvent(a):this,d=b.__tipStyle;c&&d&&c.__tipNeeded&&((a.originalEvent||a).FusionChartsPreventEvent&&p.preventTooltip(),p.hiding&&(p.hiding=clearTimeout(p.hiding)),p.currentPaper!==b&&(b.__tipCp=b.canvas&&D(b.canvas.parentNode,!0)||{},p.restyle(b.__tipStyle),p.currentPaper=
521 b),p.lastTarget=p.currentTarget,p.currentTarget=c,p.scatted=c.__tipScatted,p.onredraw.call(this,a),a.__tipProcessed=!0,F&&(p._oobready=!0,J(v||(v=B.body||B.getElementsByTagName("body")[0]),"touchstart",H)))}};p.onredraw=function(a){a.__tipProcessed||(a.__tipProcessed=!0,(this.paper&&this.paper._elementFromEvent(a))===p.currentTarget&&(p.redrawing&&clearTimeout(p.redrawing),a=C(a),p.x=g(a.pageX||a.clientX+B.body.scrollLeft+B.documentElement.scrollLeft||0),p.y=g(a.pageY||a.clientY+B.body.scrollTop+
522 B.documentElement.scrollTop||0),p.redrawing=setTimeout(p.redraw,0)))};p.onhide=function(a){a.__tipProcessed||(a.__tipProcessed=!0,(this.paper&&this.paper._elementFromEvent(a))===p.currentTarget&&(p.hiding=setTimeout(p.hide,200)))};p.redraw=function(){if(!p.prevented&&!p.blocked&&p.currentTarget&&p.currentTarget.__tipNeeded){var a=p.currentTarget,b=a.paper,c=p.textElement,d=p.containerStyle,g=p.style,m=a.__tipText,a=p.pointeroffset,n=b.__tipCp,l=B.documentElement||B.body,w=l.scrollLeft,l=l.scrollTop,
523 h=p.x,k=p.y,H,D=b.width,v=b.height,b=b.__tipConstrain;if(100>D||100>v)b=!1;p.hidden&&(p.containerStyle.top="-999em",p.show());m!==p.text&&(p.text=m,d.width=d.height="",c.innerHTML=m,g.whiteSpace="nowrap",m=e(g.pixelWidth||c.offsetWidth||0),H=e(g.pixelHeight||c.offsetHeight||0),(p.textWidthOverflow=m>D)?(d.width=(D||0)-2*a+"px",g.whiteSpace="normal"):d.width="",(p.textHeightOverflow=H>v)?(d.height=(v||0)-2*a+"px",g.whiteSpace="normal"):d.height="");m=e(g.pixelWidth||c.offsetWidth||0);H=e(g.pixelHeight||
524 c.offsetHeight||0);b?(p.textWidthOverflow?h=n.left-w:h+a+m>n.left-w+D-a&&(h=h-m-a),p.textHeightOverflow?k=n.top-l:k+a+H>n.top-l+v-a&&(k=k-H-1.5*a)):(w+R<h+a+m&&(h=h-m-a),l+s<k+a+H&&(k=k-H-1.5*a));d.left=(h+a||0)+"px";d.top=(k+a||0)+"px";p.hidden&&p.show()}};p.hide=function(){p.hiding&&(p.hiding=clearTimeout(p.hiding));p.containerStyle.display="none";p.hidden=!0;p.prevented=!1};p.show=function(){p.blocked||(p.hiding&&(p.hiding=clearTimeout(p.hiding)),p.containerStyle.display="inline",p.hidden=!1)};
525 p.preventTooltip=function(){p.prevented=!0};p.block=function(){p.blocked=!0;p.containerStyle.display="none"};p.unblock=function(a){p.blocked=!1;a&&(p.containerStyle.display=p.hidden&&"none"||"inline")};c.fn.tooltip=function(a,b,d){b&&(b=0.4*(void 0===b.opacity?1:b.opacity),c.svg?a.boxShadow="1px 1px 3px rgba(64,64,64,"+b+")":a.filter='progid:DXImageTransform.Microsoft.Shadow(Strength=2, Direction=135, Color="#404040", shadowOpacity="'+b/2+'")');this.__tipStyle=new $(a);this.__tipCp=this.canvas&&D(this.canvas.parentNode,
526 !0)||{};this.__tipConstrain=Boolean(d);return this};c.el.trackTooltip=function(a){var b=!!this.__tiptracking;if(void 0===a||(a=!!a)===b)return this;a?F?this.touchstart(p.onelement):(this.mouseover(p.onelement),this.mousemove(p.onredraw),this.mouseout(p.onhide)):F?this.untouchstart(p.onelement):(this.unmouseover(p.onelement),this.unmousemove(p.onredraw),this.unmouseout(p.onhide));this.__tiptracking=a;return this};c.el.tooltip=function(a,b,d,e,g){p.setup();c.el.tooltip=function(a,b,c,d,h){b=!1===a||
527 void 0===a||""===a;this.__tipScatted=void 0===d?this.__tipScatted:!d;void 0===this.__tipScatted&&(this.__tipScatted=!0);null!==h&&(this.__tip_blocked=h);b^!this.__tipText&&(this.__tipNeeded=!b);this.__tipText=a;if(p.currentTarget===this&&a!==p.text&&!p.hidden)p[b?"hide":"redraw"]();return this};return c.el.tooltip.call(this,a,b,d,e,g)};d.core._setTooltipZIndex=function(a){a=parseInt(a,10);p&&!isNaN(a)&&(p.defaultContainerStyle.zIndex=a,p.containerStyle&&(p.containerStyle.zIndex=a))}}]);
528 FusionCharts.register("module",["private","modules.renderer.js-smartlabel",function(){var d=this.hcLib,k=d.isIE,B=d.hasSVG,v=Math.max,l=this.window,c=/ HtmlUnit/.test(l.navigator.userAgent),K=l.document,b=/ AppleWebKit\//.test(l.navigator.userAgent),J=!!K.createElement("canvas").getContext,a=!(!J||!K.createElement("canvas").getContext("2d").measureText),l=function(){function l(a,b,c){if(!a||!a.length)return 0;var d=c.getWidthFunction(),e=0,h=0,h=d(a),g=h/a.length;c=b;e=Math.ceil(b/g);if(h<b)return a.length-
529 1;e>a.length&&(c=b-h,e=a.length);for(;0<c;)if(c=b-d(a.substr(0,e)),h=Math.floor(c/g))e+=h;else return e;for(;0>c;)if(c=b-d(a.substr(0,e)),h=Math.floor(c/g))e+=h;else break;return e}function F(a,b){b=5<b?b:5;this.maxContainers=20>b?b:20;this.last=this.first=null;this.containers={};this.length=0;this.rootNode=a;if(p){var c=K.createElementNS("http://www.w3.org/2000/svg","svg");c.setAttributeNS("http://www.w3.org/2000/svg","xlink","http://www.w3.org/1999/xlink");c.setAttributeNS("http://www.w3.org/2000/svg",
530 "height","0");c.setAttributeNS("http://www.w3.org/2000/svg","width","0");this.svgRoot=c;this.rootNode.appendChild(c)}}function C(a,b,d){if("undefined"!==typeof a&&"object"!==typeof a){this.id=a;var e;"string"===typeof b&&(b=K.getElementById(b));a:{if(b&&(b.offsetWidth||b.offsetHeight)){if(b.appendChild){b.appendChild(b=K.createElement("div"));b.className="fusioncharts-smartlabel-container";b.setAttribute("aria-hidden","true");b.setAttribute("role","presentation");a=b;break a}}else if((a=K.getElementsByTagName("body")[0])&&
531 a.appendChild){b=K.createElement("div");b.className="fusioncharts-smartlabel-container";b.setAttribute("aria-hidden","true");b.setAttribute("role","presentation");a.appendChild(b);a=b;break a}a=void 0}a=this.parentContainer=a;a.innerHTML=$;if(c||!a.offsetHeight&&!a.offsetWidth)p=!0;a.innerHTML="";for(e in g)a.style[e]=g[e];this.containerManager=new F(a,10);this.showNoEllipses=!d;this.init=!0;this.style={};this.setStyle()}}var w=d.supportedStyle,e={fontWeight:1,"font-weight":1,fontStyle:1,"font-style":1,
532 fontSize:1,"font-size":1,fontFamily:1,"font-family":1},g={position:"absolute",top:"-9999em",left:"-9999em",whiteSpace:"nowrap",padding:"0px",width:"1px",height:"1px",overflow:"hidden"},n=b?0:4.5,s=0,R=/\b_SmartLabel\b/,m=/\b_SmartLabelBR\b/,I=/(<[^<\>]+?\>)|(&(?:[a-z]+|#[0-9]+);|.)/ig,Q=RegExp("\\<span[^\\>]+?_SmartLabel[^\\>]{0,}\\>(.*?)\\<\\/span\\>","ig"),X=/<[^>][^<]*[^>]+>/i,$="WgI",p=!1,H=0,S=0,fa,sa,ya;K.getElementsByClassName?(fa="getElementsByClassName",sa="_SmartLabel",ya=!0):(fa="getElementsByTagName",
533 sa="span",ya=!1);F.prototype={get:function(a){var b=this.containers,c=this.length,d=this.maxContainers,e,h="",g="",g=this.getCanvasFont(a);for(e in w)void 0!==a[e]&&(h+=w[e]+":"+a[e]+";");if(!h)return!1;if(b[h])h=b[h],this.first!==h&&(h.prev&&(h.prev.next=h.next),h.next&&(h.next.prev=h.prev),h.next=this.first,h.next.prev=h,this.last===h&&(this.last=h.prev),h.prev=null,this.first=h);else{if(c>=d)for(a=c-d+1;a--;)this.removeContainer(this.last);h=this.addContainer(h,g)}return h},getCanvasFont:function(b){var c,
534 d=[];if(!J||!a)return!1;for(c in e)void 0!==b[c]&&d.push(b[c]);return d.join(" ")},setMax:function(a){var b=this.length;a=5<a?a:5;a=20>a?a:20;if(a<b){for(b-=a;b--;)this.removeContainer(this.last);this.length=a}this.maxContainers=a},addContainer:function(a,b){var c,d;this.containers[a]=d={next:null,prev:null,node:null,ellipsesWidth:0,lineHeight:0,dotWidth:0,avgCharWidth:4,keyStr:a,canvasStr:b,charCache:{}};d.next=this.first;d.next&&(d.next.prev=d);this.first=d;this.last||(this.last=d);this.length+=
535 1;c=d.node=K.createElement("div");this.rootNode.appendChild(c);k&&!B?c.style.setAttribute("cssText",a):c.setAttribute("style",a);c.setAttribute("aria-hidden","true");c.setAttribute("role","presentation");c.style.display="inline-block";c.innerHTML=$;d.lineHeight=c.offsetHeight;d.avgCharWidth=c.offsetWidth/3;p?(c=d.svgText=K.createElementNS("http://www.w3.org/2000/svg","text"),c.setAttribute("style",a),this.svgRoot.appendChild(c),c.textContent=$,d.lineHeight=c.getBBox().height,d.avgCharWidth=(c.getBBox().width-
536 n)/3,c.textContent="...",d.ellipsesWidth=c.getBBox().width-n,c.textContent=".",d.dotWidth=c.getBBox().width-n):b?(c=d.canvas=K.createElement("canvas"),c.style.height=c.style.width="0px",this.rootNode.appendChild(c),d.context=c=c.getContext("2d"),c.font=b,d.ellipsesWidth=c.measureText("...").width,d.dotWidth=c.measureText(".").width):(c.innerHTML="...",d.ellipsesWidth=c.offsetWidth,c.innerHTML=".",d.dotWidth=c.offsetWidth,c.innerHTML="");return d},removeContainer:function(a){var b=a.keyStr;b&&this.length&&
537 a&&(this.length-=1,a.prev&&(a.prev.next=a.next),a.next&&(a.next.prev=a.prev),this.first===a&&(this.first=a.next),this.last===a&&(this.last=a.prev),a.node.parentNode.removeChild(a.node),a.canvas&&a.canvas.parentNode.removeChild(a.canvas),delete this.containers[b])},dispose:function(){var a,b=this.containers;this.maxContainers=null;for(a in b)this.removeContainer(b[a]);this.rootNode.parentNode.removeChild(this.rootNode);this.last=this.first=this.rootNode=null}};F.prototype.constructor=F;C.prototype=
538 {dispose:function(){this.init&&(this.containerManager.dispose(),delete this.container,delete this.context,delete this.cache,delete this.containerManager,delete this.containerObj,delete this.id,delete this.style,delete this.parentContainer,delete this.showNoEllipses)},useEllipsesOnOverflow:function(a){this.init&&(this.showNoEllipses=!a)},getWidthFunction:function(){var a=this.context,b=this.container,c=this.containerObj.svgText;return c?function(a){var b;c.textContent=a;a=c.getBBox();b=a.width-n;1>
539 b&&(b=a.width);return b}:a?function(b){return a.measureText(b).width}:function(a){b.innerHTML=a;return b.offsetWidth}},getSmartText:function(a,b,c,d){if(!this.init)return!1;if(void 0===a||null===a)a="";var e={text:a,maxWidth:b,maxHeight:c,width:null,height:null,oriTextWidth:null,oriTextHeight:null,oriText:a,isTruncated:!1},h=!1,g,n,w=0,k,C,B,J=-1,F=h=-1;n=this.container;var $=this.context,ea=0;B=0;var da,aa,ba;ba=[];var ga=0,la=this.showNoEllipses?"":"...";C=this.lineHeight;var za,ea=[],J=g=-1;za=
540 function(a){a=a.replace(/^\s\s*/,"");for(var b=/\s/,c=a.length;b.test(a.charAt(c-=1)););return a.slice(0,c+1)};h=-1;aa=this.getWidthFunction();if(n){if(!p){n.innerHTML=a;e.oriTextWidth=h=n.offsetWidth;e.oriTextHeight=B=n.offsetHeight;if(B<=c&&h<=b)return e.width=e.oriTextWidth=h,e.height=e.oriTextHeight=B,e;if(C>c)return e.text="",e.width=e.oriTextWidth=0,e.height=e.oriTextHeight=0,e}a=za(a).replace(/(\s+)/g," ");h=X.test(a);C=this.showNoEllipses?b:b-s;if(h){w=a.replace(I,"$2");a=a.replace(I,'$1<span class="_SmartLabel">$2</span>');
541 a=a.replace(/(<br\s*\/*\>)/g,'<span class="_SmartLabel _SmartLabelBR">$1</span>');n.innerHTML=a;ga=n[fa](sa);$=0;for(aa=ga.length;$<aa;$+=1)if(a=ga[$],ya||R.test(a.className))za=a.innerHTML,""!==za&&(" "===za?J=ea.length:"-"===za&&(g=ea.length),ea.push({spaceIdx:J,dashIdx:g,elem:a}),ba.push(za));ga=0;g=ea.length;H=ea[0].elem.offsetWidth;if(H>b)return e.text="",e.width=e.oriTextWidth=e.height=e.oriTextHeight=0,e;H>C&&!this.showNoEllipses&&(C=b-2*S,C>H?la="..":(C=b-S,C>H?la=".":(C=0,la="")));ba=ea[0].elem.offsetLeft;
542 $=ea[0].elem.offsetTop;if(d)for(;ga<g;ga+=1)a=ea[ga].elem,aa=a.offsetLeft-ba+a.offsetWidth,aa>C&&(da||(da=ga),n.offsetWidth>b&&(k=ga,ga=g));else for(;ga<g;ga+=1)a=ea[ga].elem,za=a.offsetHeight+(a.offsetTop-$),aa=a.offsetLeft-ba+a.offsetWidth,d=null,aa>C?(da||(da=ga),aa>b&&(h=ea[ga].spaceIdx,J=ea[ga].dashIdx,h>F?(ea[h].elem.innerHTML="<br/>",F=h):J>F?(ea[J].elem.innerHTML=J===ga?"<br/>-":"-<br/>",F=J):a.parentNode.insertBefore(d=K.createElement("br"),a),a.offsetHeight+a.offsetTop>c?(d?d.parentNode.removeChild(d):
543 F===J?ea[J].elem.innerHTML="-":ea[h].elem.innerHTML=" ",k=ga,ga=g):da=null)):za>c&&(k=ga,ga=g);if(k<g){e.isTruncated=!0;da=da?da:k;for(ga=g-1;ga>=da;ga-=1)a=ea[ga].elem,a.parentNode.removeChild(a);for(;0<=ga;ga-=1)a=ea[ga].elem,m.test(a.className)?a.parentNode.removeChild(a):ga=0}e.text=n.innerHTML.replace(Q,"$1");e.isTruncated&&(e.text+=la,e.tooltext=w)}else{ba=a.split("");g=ba.length;n="";k=[];da=ba[0];this.cache[da]?H=this.cache[da].width:(H=aa(da),this.cache[da]={width:H});if(C>H)k=a.substr(0,
544 l(a,C,this)).split(""),ga=k.length;else{if(H>b)return e.text="",e.width=e.oriTextWidth=e.height=e.oriTextHeight=0,e;la&&(C=b-2*S,C>H?la="..":(C=b-S,C>H?la=".":(C=0,la="")))}ea=aa(k.join(""));B=this.lineHeight;if(d){for(;ga<g;ga+=1)if(da=k[ga]=ba[ga],this.cache[da]?H=this.cache[da].width:(H=aa(da),this.cache[da]={width:H}),ea+=H,ea>C&&(n||(n=k.slice(0,-1).join("")),ea>b))return e.text=za(n)+la,e.tooltext=e.oriText,e.width=aa(e.text),e.height=this.lineHeight,e;e.text=k.join("");e.width=ea;e.height=
545 this.lineHeight}else{for(;ga<g;ga+=1)if(da=k[ga]=ba[ga]," "!==da||$||(da="&nbsp;"),this.cache[da]?H=this.cache[da].width:(H=aa(da),this.cache[da]={width:H}),ea+=H,ea>C&&(n||(n=k.slice(0,-1).join("")),ea>b)){h=a.substr(0,k.length).lastIndexOf(" ");J=a.substr(0,k.length).lastIndexOf("-");h>F?(ea=aa(k.slice(F+1,h).join("")),k.splice(h,1,"<br/>"),F=h,d=h+1):J>F?(J===k.length-1?(ea=aa(k.slice(F+1,h).join("")),k.splice(J,1,"<br/>-")):(ea=aa(k.slice(F+1,h).join("")),k.splice(J,1,"-<br/>")),F=J,d=J+1):(k.splice(k.length-
546 1,1,"<br/>"+ba[ga]),h=k.length,ea=aa(k.slice(F,k.length-1)),F=h,d=ga);B+=this.lineHeight;if(B>c)return e.text=za(n)+la,e.tooltext=e.oriText,e.width=b,e.height=B-this.lineHeight,e;w=v(w,ea);n=null;da=l(a.substr(d),C,this);ea=aa(a.substr(d,da||1));k.length<d+da&&(k=k.concat(a.substr(k.length,d+da-k.length).split("")),ga=k.length-1)}w=v(w,ea);e.text=k.join("");e.width=w;e.height=B}return e}e.height=n.offsetHeight;e.width=n.offsetWidth}else e.error=Error("Body Tag Missing!");return e},setStyle:function(a){if(!this.init)return!1;
547 if(a!==this.style||this.styleNotSet){a||(a=this.style);var b=a,c=b.fontSize=b.fontSize||"12px";b.lineHeight=b.lineHeight||b["line-height"]||1.2*parseInt(c,10)+"px";this.style=a;(this.containerObj=a=this.containerManager.get(a))?(this.container=a.node,this.context=a.context,this.cache=a.charCache,this.lineHeight=a.lineHeight,s=a.ellipsesWidth,S=a.dotWidth,this.styleNotSet=!1):this.styleNotSet=!0}},getTextSize:function(a,b,c){if(!this.init)return!1;var d={text:a,width:null,height:null,oriTextWidth:null,
548 oriTextHeight:null,isTruncated:!1},e=this.container;e&&(e.innerHTML=a,d.oriTextWidth=e.offsetWidth,d.oriTextHeight=e.offsetHeight,d.width=Math.min(d.oriTextWidth,b),d.height=Math.min(d.oriTextHeight,c),d.width<d.oriTextWidth||d.height<d.oriTextHeight)&&(d.isTruncated=!0);return d},getOriSize:function(a){if(!this.init)return!1;var b={text:a,width:null,height:null},c=this.container,d=this.getWidthFunction(),e=0;if(p){a=a.split(/(<br\s*\/*\>)/g);c=a.length;for(b.height=this.lineHeight*c;c--;)e=v(e,d(a[c]));
549 b.width=e}else c&&(c.innerHTML=a,b.width=c.offsetWidth,b.height=c.offsetHeight);return b}};return C.prototype.constructor=C}();d.SmartLabelManager=l}]);
550 FusionCharts.register("module",["private","modules.renderer.js-numberformatter",function(){var d=this,k=d.hcLib,B=k.pluckNumber,v=k.extend2,l=k.getValidValue,c=k.pluck,K=k.getFirstValue,b=Math.abs,J=Math.pow,a=Math.round,D="",F="0",C=".",w="-",e=function(a){return a&&a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},g={},n=function(a){var b=[],c;for(c in a)b.push(c+"_"+a[c]);b.sort();return b.join(",")},s=function(a){var b={},c;for(c in a)b[c.toLowerCase()]=a[c];return b};k.NumberFormatter=function(){function d(b,
551 c,e){var g;if(0>=c)return a(b)+D;if(isNaN(c))return b+=D,12<b.length&&-1!=b.indexOf(C)&&(c=12-b.split(C)[0].length,g=J(10,c),b=a(b*g)/g+D),b;g=J(10,c);b=a(b*g)/g+D;if(1==e)for(-1==b.indexOf(C)&&(b+=".0"),e=b.split(C),c-=e[1].length,e=1;e<=c;e++)b+=F;return b}function g(a,b,c,d){var e=Number(a),n=D,m=!1,l=D,s=D,k=l=0;if(isNaN(e))return D;l=0;k=a.length;-1!=a.indexOf(C)&&(n=a.substring(a.indexOf(C)+1,a.length),k=a.indexOf(C));0>e&&(m=!0,l=1);l=a.substring(l,k);a=l.length;e=d.length-1;k=d[e];if(a<k)s=
552 l;else for(;a>=k;)s=(a-k?c:D)+l.substr(a-k,k)+s,a-=k,k=0>=(e-=1)?d[0]:d[e],a<k&&(s=l.substring(a,0)+s);n!=D&&(s=s+b+n);!0===m&&(s=w+s);return s}var n,s={formatnumber:"1",formatnumberscale:"1",defaultnumberscale:D,numberscaleunit:["K","M"],numberscalevalue:[1E3,1E3],numberprefix:D,numbersuffix:D,decimals:D,forcedecimals:F,yaxisvaluedecimals:"2",decimalseparator:C,thousandseparator:",",thousandseparatorposition:[3],indecimalseparator:D,inthousandseparator:D,sformatnumber:"1",sformatnumberscale:F,sdefaultnumberscale:D,
553 snumberscaleunit:["K","M"],snumberscalevalue:[1E3,1E3],snumberprefix:D,snumbersuffix:D,sdecimals:"2",sforcedecimals:F,syaxisvaluedecimals:"2",xFormatNumber:F,xFormatNumberScale:F,xDefaultNumberScale:D,xNumberScaleUnit:["K","M"],xNumberScaleValue:[1E3,1E3],xNumberPrefix:D,xNumberSuffix:D},k={mscombidy2d:{formatnumberscale:"1"}},$=function(a,b,d){var g,n,m,w,D,C,t,J,h,N=b.name,W=v({},s),R,I,Z,F,$,oa,ua,ea,da,aa,ba;(m=k[N])&&(W=v(W,m));this.csConf=W;this.chartAPI=b;l(a.numberscaleunit)&&(g=a.numberscaleunit.split(","));
554 if(n=l(a.snumberscaleunit,a.numberscaleunit))n=n.split(",");if(m=l(a.xnumberscaleunit,a.numberscaleunit))m=m.split(",");if(w=l(a.ticknumberscaleunit,a.numberscaleunit))w=w.split(",");if(D=l(a.ynumberscaleunit,a.numberscaleunit))D=D.split(",");l(a.numberscalevalue)&&(C=a.numberscalevalue.split(","));if(I=l(a.snumberscalevalue,a.numberscalevalue))I=I.split(",");if(t=l(a.xnumberscalevalue,a.numberscalevalue))t=t.split(",");if(J=l(a.ticknumberscalevalue,a.numberscalevalue))J=J.split(",");if(h=l(a.ynumberscalevalue,
555 a.numberscalevalue))h=h.split(",");if(l(a.thousandseparatorposition))for(R=a.thousandseparatorposition.split(","),Z=R.length,$=s.thousandseparatorposition[0];Z--;)F=parseInt(R[Z],10),0>=F&&(F=$),$=R[Z]=F;b||(b={});Z=B(a.scalerecursively,0);F=B(a.sscalerecursively,Z);$=B(a.xscalerecursively,Z);oa=B(a.maxscalerecursion,-1);ua=B(a.smaxscalerecursion,oa);ea=B(a.xmaxscalerecursion,oa);da=l(a.scaleseparator," ");aa=l(a.sscaleseparator,da);ba=l(a.xscaleseparator,da);oa||(oa=-1);this.baseConf=g={cacheStore:[],
556 formatnumber:c(a.formatnumber,b.formatnumber,W.formatnumber),formatnumberscale:c(a.formatnumberscale,b.formatnumberscale,W.formatnumberscale),defaultnumberscale:K(a.defaultnumberscale,b.defaultnumberscale,W.defaultnumberscale),numberscaleunit:c(g,b.numberscaleunit,W.numberscaleunit).concat(),numberscalevalue:c(C,b.numberscalevalue,W.numberscalevalue).concat(),numberprefix:K(a.numberprefix,b.numberprefix,W.numberprefix),numbersuffix:K(a.numbersuffix,b.numbersuffix,W.numbersuffix),decimalprecision:parseInt("auto"===
557 a.decimals?W.decimalprecision:c(a.decimals,a.decimalprecision,b.decimals,W.decimals,b.decimalprecision,W.decimalprecision),10),forcedecimals:c(a.forcedecimals,b.forcedecimals,W.forcedecimals),decimalseparator:c(a.decimalseparator,b.decimalseparator,W.decimalseparator),thousandseparator:c(a.thousandseparator,b.thousandseparator,W.thousandseparator),thousandseparatorposition:c(R,b.thousandseparatorposition,W.thousandseparatorposition),indecimalseparator:K(a.indecimalseparator,b.indecimalseparator,W.indecimalseparator),
558 inthousandseparator:K(a.inthousandseparator,b.inthousandseparator,W.inthousandseparator),scalerecursively:Z,maxscalerecursion:oa,scaleseparator:da};l(g.inthousandseparator)&&(this.baseConf._REGinthousandseparator=RegExp(e(g.inthousandseparator),"g"));l(g.indecimalseparator)&&(this.baseConf._REGindecimalseparator=RegExp(e(g.indecimalseparator)));this.Y=[];d||(d={cacheStore:[],formatnumber:g.formatnumber,formatnumberscale:g.formatnumberscale,defaultnumberscale:g.defaultnumberscale,numberscaleunit:g.numberscaleunit.concat(),
559 numberscalevalue:g.numberscalevalue.concat(),numberprefix:g.numberprefix,numbersuffix:g.numbersuffix,decimalprecision:g.decimalprecision,forcedecimals:g.forcedecimals,decimalseparator:g.decimalseparator,thousandseparator:g.thousandseparator,thousandseparatorposition:g.thousandseparatorposition,indecimalseparator:g.indecimalseparator,inthousandseparator:g.inthousandseparator,scalerecursively:Z,maxscalerecursion:oa,scaleseparator:da},b.useScaleRecursively&&(d.numberscalevalue&&d.numberscalevalue.length)==
560 (d.numberscaleunit&&d.numberscaleunit.length)||(d.scalerecursively=Z=0),C={cacheStore:[],formatnumber:d.formatnumber,formatnumberscale:d.formatnumberscale,defaultnumberscale:d.defaultnumberscale,numberscaleunit:d.numberscaleunit.concat(),numberscalevalue:d.numberscalevalue.concat(),numberprefix:d.numberprefix,numbersuffix:d.numbersuffix,decimalprecision:parseInt(c(a.yaxisvaluedecimals,d.decimalprecision,2),10),forcedecimals:c(a.forceyaxisvaluedecimals,d.forcedecimals),decimalseparator:d.decimalseparator,
561 thousandseparator:d.thousandseparator,thousandseparatorposition:d.thousandseparatorposition.concat(),indecimalseparator:d.indecimalseparator,inthousandseparator:d.inthousandseparator,scalerecursively:Z,maxscalerecursion:oa,scaleseparator:da},I={cacheStore:[],formatnumber:c(a.sformatnumber,b.sformatnumber,s.sformatnumber),formatnumberscale:c(a.sformatnumberscale,b.sformatnumberscale,s.sformatnumberscale),defaultnumberscale:K(a.sdefaultnumberscale,b.sdefaultnumberscale,d.defaultnumberscale),numberscaleunit:c(n,
562 b.snumberscaleunit,s.snumberscaleunit).concat(),numberscalevalue:c(I,b.snumberscalevalue,s.snumberscalevalue).concat(),numberprefix:K(a.snumberprefix,b.snumberprefix,s.snumberprefix),numbersuffix:K(a.snumbersuffix,b.snumbersuffix,s.snumbersuffix),decimalprecision:parseInt(c(a.syaxisvaluedecimals,a.sdecimals,a.decimals,b.sdecimals,s.sdecimals),10),forcedecimals:c(a.forcesyaxisvaluedecimals,a.sforcedecimals,a.forcedecimals,b.sforcedecimals,s.sforcedecimals),decimalseparator:c(a.decimalseparator,b.decimalseparator,
563 s.decimalseparator),thousandseparator:c(a.thousandseparator,b.thousandseparator,s.thousandseparator),thousandseparatorposition:d.thousandseparatorposition.concat(),indecimalseparator:c(a.indecimalseparator,b.indecimalseparator,s.indecimalseparator),inthousandseparator:c(a.inthousandseparator,b.inthousandseparator,s.inthousandseparator),scalerecursively:F,maxscalerecursion:ua,scaleseparator:aa},n=v({},I),n.decimalprecision=parseInt(c(a.sdecimals,a.decimals,a.syaxisvaluedecimals,b.sdecimals,s.sdecimals),
564 10),n.forcedecimals=c(a.sforcedecimals,a.forcedecimals,a.forcesyaxisvaluedecimals,b.sforcedecimals,s.sforcedecimals),n.cacheStore=[],b.useScaleRecursively&&(I.numberscalevalue&&I.numberscalevalue.length)==(I.numberscaleunit&&I.numberscaleunit.length)||(I.scalerecursively=F=0),/^(bubble|scatter|selectscatter)$/.test(N)&&(C.formatnumber=c(a.yformatnumber,C.formatnumber),C.formatnumberscale=c(a.yformatnumberscale,C.formatnumberscale),C.defaultnumberscale=K(a.ydefaultnumberscale,C.defaultnumberscale),
565 C.numberscaleunit=c(D,C.numberscaleunit),C.numberscalevalue=c(h,C.numberscalevalue),C.numberprefix=c(a.ynumberprefix,C.numberprefix),C.numbersuffix=c(a.ynumbersuffix,C.numbersuffix),d.formatnumber=c(a.yformatnumber,d.formatnumber),d.formatnumberscale=c(a.yformatnumberscale,d.formatnumberscale),d.defaultnumberscale=K(a.ydefaultnumberscale,d.defaultnumberscale),d.numberscaleunit=c(a.ynumberscaleunit,d.numberscaleunit.concat()),d.numberscalevalue=c(a.ynumberscalevalue,d.numberscalevalue.concat()),d.numberprefix=
566 c(a.ynumberprefix,d.numberprefix),d.numbersuffix=c(a.ynumbersuffix,d.numbersuffix)),/^(mscombidy2d|mscombidy3d)$/.test(N)&&(I.formatnumberscale=B(a.sformatnumberscale,"1")),/^(pie2d|pie3d|doughnut2d|doughnut3d|marimekko|pareto2d|pareto3d)$/.test(N)&&(d.decimalprecision=c(a.decimals,"2")),Z&&(d.numberscalevalue.push(1),d.numberscaleunit.unshift(d.defaultnumberscale),C.numberscalevalue.push(1),C.numberscaleunit.unshift(C.defaultnumberscale)),F&&(I.numberscalevalue.push(1),I.numberscaleunit.unshift(I.defaultnumberscale),
567 n.numberscalevalue.push(1),n.numberscaleunit.unshift(n.defaultnumberscale)),this.Y[0]={yAxisLabelConf:C,dataLabelConf:d},this.Y[1]={yAxisLabelConf:I,dataLabelConf:n},this.paramLabels=d,this.param1=C,this.param2=I,this.paramLabels2=n);this.paramX={cacheStore:[],formatnumber:c(a.xformatnumber,g.formatnumber),formatnumberscale:c(a.xformatnumberscale,g.formatnumberscale),defaultnumberscale:K(a.xdefaultnumberscale,g.defaultnumberscale),numberscaleunit:c(m,g.numberscaleunit.concat()),numberscalevalue:c(t,
568 g.numberscalevalue.concat()),numberprefix:c(a.xnumberprefix,g.numberprefix),numbersuffix:c(a.xnumbersuffix,g.numbersuffix),decimalprecision:parseInt(c(a.xaxisvaluedecimals,a.xaxisvaluesdecimals,g.decimalprecision,2),10),forcedecimals:c(a.forcexaxisvaluedecimals,0),decimalseparator:g.decimalseparator,thousandseparator:g.thousandseparator,thousandseparatorposition:g.thousandseparatorposition.concat(),indecimalseparator:g.indecimalseparator,inthousandseparator:g.inthousandseparator,scalerecursively:$,
569 maxscalerecursion:ea,scaleseparator:ba};this.paramLegend=v(v({},g),{cacheStore:[],decimalprecision:parseInt(B(a.legendvaluedecimals,g.decimalprecision,2),10),forcedecimals:B(a.legendvalueforcedecimals,g.forcedecimals,0),formatnumberscale:c(a.legendvalueformatnumberscale,g.formatnumberscale),formatnumber:c(a.legendvalueformatnumber,g.formatnumber)});b.useScaleRecursively&&(this.paramX.numberscalevalue&&this.paramX.numberscalevalue.length)==(this.paramX.numberscaleunit&&this.paramX.numberscaleunit.length)||
570 (this.paramX.scalerecursively=$=0);$&&(this.paramX.numberscalevalue.push(1),this.paramX.numberscaleunit.unshift(this.paramX.defaultnumberscale));this.paramScale={cacheStore:[],formatnumber:c(a.tickformatnumber,g.formatnumber),formatnumberscale:c(a.tickformatnumberscale,g.formatnumberscale),defaultnumberscale:K(a.tickdefaultnumberscale,g.defaultnumberscale),numberscaleunit:c(w,g.numberscaleunit.concat()),numberscalevalue:c(J,g.numberscalevalue.concat()),numberprefix:c(a.ticknumberprefix,g.numberprefix),
571 numbersuffix:c(a.ticknumbersuffix,g.numbersuffix),decimalprecision:parseInt(c(a.tickvaluedecimals,g.decimalprecision,"2"),10),forcedecimals:c(a.forcetickvaluedecimals,g.forcedecimals,0),decimalseparator:g.decimalseparator,thousandseparator:g.thousandseparator,thousandseparatorposition:g.thousandseparatorposition.concat(),indecimalseparator:g.indecimalseparator,inthousandseparator:g.inthousandseparator,scalerecursively:Z,maxscalerecursion:oa,scaleseparator:da};Z&&(this.paramScale.numberscalevalue.push(1),
572 this.paramScale.numberscaleunit.unshift(this.paramScale.defaultnumberscale));this.timeConf={inputDateFormat:c(a.inputdateformat,a.dateformat,"mm/dd/yyyy"),outputDateFormat:c(a.outputdateformat,a.inputdateformat,a.dateformat,"mm/dd/yyyy"),days:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),months:"January February March April May June July August September October November December".split(" "),daySuffix:" st nd rd th th th th th th th th th th th th th th th th th st nd rd th th th th th th th st".split(" ")};
573 this.cleaneValueCacheStore={};this.percentStrCacheStore={}};$.prototype={cleaneValueCacheStore:{},percentStrCacheStore:{},dispose:function(){this.Y&&delete this.Y;this.cleaneValueCacheStore&&delete this.cleaneValueCacheStore;this.percentStrCacheStore&&delete this.percentStrCacheStore;this.paramLabels&&delete this.paramLabels;this.param1&&delete this.param1;this.param2&&delete this.param2;this.paramLabels2&&delete this.paramLabels2;this.csConf&&delete this.csConf;this.chartAPI&&delete this.chartAPI;
574 this.baseConf&&delete this.baseConf;this.timeConf&&delete this.timeConf;this.paramX&&delete this.paramX;this.paramScale&&delete this.paramScale},parseMLAxisConf:function(a,d){var e=this.baseConf,g=this.csConf,n=this.chartAPI,m=B(a.scalerecursively,e.scalerecursively),k=B(a.maxscalerecursion,e.maxscalerecursion),w=l(a.scaleseparator,e.scaleseparator),D,t,v,h,N,W;d=B(d,this.Y.length);l(a.numberscaleunit)&&(D=a.numberscaleunit.split(","));l(a.numberscalevalue)&&(t=a.numberscalevalue.split(","));k||(k=
575 -1);if(l(a.thousandseparatorposition))for(v=a.thousandseparatorposition.split(","),h=v.length,W=s.thousandseparatorposition[0];h--;)(N=B(b(v[h])))?W=N:N=W,v[h]=N;e={cacheStore:[],formatnumber:c(a.formatnumber,e.formatnumber),formatnumberscale:c(a.formatnumberscale,e.formatnumberscale),defaultnumberscale:K(a.defaultnumberscale,e.defaultnumberscale),numberscaleunit:c(D,e.numberscaleunit).concat(),numberscalevalue:c(t,e.numberscalevalue).concat(),numberprefix:K(a.numberprefix,e.numberprefix),numbersuffix:K(a.numbersuffix,
576 e.numbersuffix),forcedecimals:c(a.forcedecimals,e.forcedecimals),decimalprecision:parseInt("auto"===a.decimals?g.decimalprecision:c(a.decimals,e.decimalprecision),10),decimalseparator:c(a.decimalseparator,e.decimalseparator),thousandseparator:c(a.thousandseparator,e.thousandseparator),thousandseparatorposition:c(v,e.thousandseparatorposition),indecimalseparator:K(a.indecimalseparator,e.indecimalseparator),inthousandseparator:K(a.inthousandseparator,e.inthousandseparator),scalerecursively:m,maxscalerecursion:k,
577 scaleseparator:w};n.useScaleRecursively&&(e.numberscalevalue&&e.numberscalevalue.length)==(e.numberscaleunit&&e.numberscaleunit.length)||(e.scalerecursively=m=0);n={cacheStore:[],formatnumber:e.formatnumber,formatnumberscale:e.formatnumberscale,defaultnumberscale:e.defaultnumberscale,numberscaleunit:e.numberscaleunit.concat(),numberscalevalue:e.numberscalevalue.concat(),numberprefix:e.numberprefix,numbersuffix:e.numbersuffix,decimalprecision:parseInt(c(a.yaxisvaluedecimals,e.decimalprecision,2),10),
578 forcedecimals:c(a.forceyaxisvaluedecimals,e.forcedecimals),decimalseparator:e.decimalseparator,thousandseparator:e.thousandseparator,thousandseparatorposition:e.thousandseparatorposition.concat(),indecimalseparator:e.indecimalseparator,inthousandseparator:e.inthousandseparator,scalerecursively:m,maxscalerecursion:k,scaleseparator:w};m&&(e.numberscalevalue.push(1),e.numberscaleunit.unshift(e.defaultnumberscale),n.numberscalevalue.push(1),n.numberscaleunit.unshift(n.defaultnumberscale));this.Y[d]={dataLabelConf:e,
579 yAxisLabelConf:n}},percentValue:function(a){var b=this.percentStrCacheStore[a];void 0===b&&(b=isNaN(this.paramLabels.decimalprecision)?"2":this.paramLabels.decimalprecision,b=this.percentStrCacheStore[a]=g(d(a,b,this.paramLabels.forcedecimals),this.paramLabels.decimalseparator,this.paramLabels.thousandseparator,this.paramLabels.thousandseparatorposition)+"%");return b},getCleanValue:function(a,c){var d=this.cleaneValueCacheStore[a];if(void 0===d){var e=this.baseConf,d=a+D;e._REGinthousandseparator&&
580 (d=d.replace(e._REGinthousandseparator,D));e._REGindecimalseparator&&(d=d.replace(e._REGindecimalseparator,C));d=parseFloat(d);d=isFinite(d)?d:NaN;this.cleaneValueCacheStore[a]=d=isNaN(d)?null:c?b(d):d}return d},dataLabels:function(a,b){var c=this.Y[b]||(b?this.Y[1]:this.Y[0]),d,c=c&&c.dataLabelConf||this.baseConf;d=c.cacheStore[a];void 0===d&&(d=c.cacheStore[a]=n(a,c));return d},yAxis:function(a,b){var c=this.Y[b]||(b?this.Y[1]:this.Y[0]),d,c=c&&c.yAxisLabelConf||this.baseConf;d=c.cacheStore[a];
581 void 0===d&&(d=c.cacheStore[a]=n(a,c));return d},xAxis:function(a){var b=this.paramX.cacheStore[a];void 0===b&&(b=this.paramX.cacheStore[a]=n(a,this.paramX));return b},sYAxis:function(a){var b=this.Y[1],c,b=b&&b.yAxisLabelConf||this.baseConf;c=b.cacheStore[a];void 0===c&&(c=b.cacheStore[a]=n(a,b));return c},scale:function(a){var b=this.paramScale.cacheStore[a];void 0===b&&(b=this.paramScale.cacheStore[a]=n(a,this.paramScale));return b},getCleanTime:function(a){var b;this.timeConf.inputDateFormat&&
582 Date.parseExact&&(b=Date.parseExact(a,this.timeConf.inputDateFormat));return b&&b.getTime()},legendValue:function(a){var b=this.paramLegend.cacheStore[a];void 0===b&&(b=this.paramLegend.cacheStore[a]=n(a,this.paramLegend));return b},legendPercentValue:function(a){var b=this.percentStrCacheStore[a],c=this.paramLegend;void 0===b&&(b=isNaN(c.decimalprecision)?"2":c.decimalprecision,b=this.percentStrCacheStore[a]=g(d(a,b,c.forcedecimals),c.decimalseparator,c.thousandseparator,c.thousandseparatorposition)+
583 "%");return b},getDateValue:function(a){var b,c,d;a=/^dd/.test(this.timeConf.inputDateFormat)&&a&&a.replace(/(\d{1,2})\/(\d{1,2})\/(\d{2,4})/,"$2/$1/$3")||a;b=new Date(a);c=b.getTime();!c&&a&&/\:/.test(a)&&(a=a.split(":"),c=B(a[0],0),d=B(a[1],0),a=B(a[2],0),c=23<c?24===c&&0===d&&0===a?c:23:c,d=59<d?59:d,a=59<a?59:a,b=new Date,b.setHours(c),b.setMinutes(d),b.setSeconds(a),c=b.getTime());return{ms:c,date:b}},getFormattedDate:function(a,b){var d="object"===typeof a&&a||new Date(a),e=this.timeConf,g=
584 c(b,e.outputDateFormat),n=d.getFullYear(),m=d.getMonth(),l=d.getDate(),s=d.getDay(),k=d.getMinutes(),w=d.getSeconds(),d=d.getHours(),k=9<k?D+k:F+k,w=9<w?D+w:F+w,d=9<d?D+d:F+d;g.match(/dnl/)&&(g=g.replace(/dnl/ig,e.days[s]));g.match(/dns/)&&(g=g.replace(/dns/ig,e.days[s]&&e.days[s].substr(0,3)));g.match(/dd/)&&(g=g.replace(/dd/ig,l));g.match(/mnl/)&&(g=g.replace(/mnl/ig,e.months[m]));g.match(/mns/)&&(g=g.replace(/mns/ig,e.months[m]&&e.months[m].substr(0,3)));g.match(/mm/)&&(g=g.replace(/mm/ig,m+1));
585 g.match(/yyyy/)&&(g=g.replace(/yyyy/ig,n));g.match(/yy/)&&(g=g.replace(/yy/ig,(n%1E3%100+"").replace(/^(\d)$/,"0$1")));g.match(/hh12/)&&(g=g.replace(/hh12/ig,d%12||12));g.match(/hh/)&&(g=g.replace(/hh/ig,d));g.match(/mn/)&&(g=g.replace(/mn/ig,k));g.match(/ss/)&&(g=g.replace(/ss/ig,w));g.match(/ampm/)&&(g=g.replace(/ampm/ig,12>d?"AM":"PM"));g.match(/ds/)&&(g=g.replace(/ds/ig,e.daySuffix[l]));return g}};$.prototype.constructor=$;n=function(a,b){if(null!==a){a=Number(a);var e=a+D,n,l,s,k,w,v,t;n=1==
586 b.formatnumberscale?b.defaultnumberscale:D;t=(t=e.split(C)[1])?t.length:b.forcedecimals?"2":D;if(1==b.formatnumberscale){e=a;n=b.numberscalevalue;l=b.numberscaleunit;s={};var J=b.defaultnumberscale;k=0;v=[];var h=[];if(b.scalerecursively){for(k=0;k<n.length;k++)if(w=B(n[k])||1E3,Math.abs(Number(e))>=w&&k<n.length-1)J=e%w,e=(e-J)/w,0!==J&&(v.push(J),h.push(l[k]));else{v.push(e);h.push(l[k]);break}v.reverse();h.reverse();s.value=v;s.scale=h}else{if(n.length===l.length)for(k=0;k<n.length;k++)if((w=B(n[k])||
587 1E3)&&Math.abs(Number(e))>=w)J=l[k]||D,e=Number(e)/w;else break;s.value=e;s.scale=J}l=s;a=e=l.value;n=l.scale}if(b.scalerecursively&&0!==b.formatnumberscale&&"0"!==b.formatnumberscale){n=l.value;l=l.scale;s=-1==b.maxscalerecursion?n.length:Math.min(n.length,b.maxscalerecursion);if(1==b.formatnumber)for(e="",v=0;v<s;v++)k=0===v?n[v]:Math.abs(n[v]),w=k+D,v==s-1&&(w=d(k,c(b.decimalprecision,t),b.forcedecimals)),e=e+g(w,b.decimalseparator,b.thousandseparator,b.thousandseparatorposition)+l[v]+(v<s-1?b.scaleseparator:
588 "");else for(e="",v=0;v<s;v++)e=e+(0===v?n[v]:Math.abs(n[v])+D)+l[v]+(v<s-1?b.scaleseparator:"");e=(b.numberprefix||D)+e+(b.numbersuffix||D)}else 1==b.formatnumber&&(e=d(a,c(b.decimalprecision,t),b.forcedecimals),e=g(e,b.decimalseparator,b.thousandseparator,b.thousandseparatorposition)),e=(b.numberprefix||D)+e+n+(b.numbersuffix||D);return e}};return $}();d.extend(d.core,{formatNumber:function(a,b){b=b&&s(b)||{};var c=n(b),d;g[c]?d=g[c]:g[c]=d=new k.NumberFormatter(b,{useScaleRecursively:!0});return d.dataLabels(a)}},
589 !1);d.extend(d.core,{formatNumber:function(a,b,c,e){c=c&&s(c)||{};var l=this.jsVars.instanceAPI||{},w=l.numberFormatter,p;n(c)===D?w?p=w:(w=this.getChartData(d.dataFormats.JSON,!0),w=w.data||{},w=w.chart||{},c=n(w),g[c]?p=g[c]:g[c]=p=new k.NumberFormatter(w,l)):(w=this.getChartData(d.dataFormats.JSON,!0),w=w.data||{},w=w.chart||{},w=v(v({},w),c),c=n(w),g[c]?p=g[c]:g[c]=p=new k.NumberFormatter(w,l));switch((b&&b.toLowerCase?b:D).toLowerCase()){case "yaxisvalues":a=p.yAxis(a,e);break;case "xaxisvalues":a=
590 p.xAxis(a);break;case "scale":a=p.scale(a);break;default:a=p.dataLabels(a,e)}return a}},!0)}]);
591 FusionCharts.register("module",["private","modules.renderer.js-dom",function(){var d=this.hcLib,k=this.window,B=k.document,v=d.extend2,l="ontouchstart"in k;(function(c){var d=function(){var b={},a;b.pointerdrag={start:["mousedown"],end:["mouseup"],onStart:["mousemove"],postHandlers:{},preHandlers:{}};b.pointerhover={start:["mouseover"],end:["mouseout"]};b.click={start:["click"]};b.escape={start:["keydown"],preHandlers:{start:function(a){a=a||k.event;return a.keyCode&&27===a.keyCode?!0:!1}}};l&&(a=
592 b.pointerdrag,a.start.push("touchstart"),a.end.push("touchend"),a.onStart.push("touchmove"),a.postHandlers.onStart=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},a=b.click,a.start.push("touchstart"));return b}(),b;b=v({},d);c.dem=new function(){var c={},a={},d=B.addEventListener?function(a,b,c){a.addEventListener(b,c,!1)}:function(a,b,c){a.attachEvent("on"+b,c)},l=B.removeEventListener?function(a,b,c){a.removeEventListener(b,c)}:function(a,b,c){a.detachEvent("on"+b,c)},C=function(a,
593 c,d){var e=[],m,l,D;D=b[c];d.start=function(b){b=b||k.event;for(var c=D.onStart,e=D.end,n=[],m=[],l=c&&c.length||0;l--;)n.push(w(a,c[l],d,"onStart"));for(l=e&&e.length||0;l--;)m.push(w(a,e[l],d,"end"));d.startUn=d.startUn?d.startUn.concat(n):n;d.endUn=d.endUn?d.endUn.concat(m):m;d.state="start";d.closure(b)};d.onStart=function(a){a=a||k.event;d.state="on";if(d.gDef&&d.gDef.preHandlers&&"function"===typeof d.gDef.preHandlers.onStart)d.gDef.preHandlers.onStart(a);d.closure(a);if(d.gDef&&d.gDef.postHandlers&&
594 "function"===typeof d.gDef.postHandlers.onStart)d.gDef.postHandlers.onStart(a)};d.end=function(a){a=a||k.event;for(var b=d.startUn,c=d.endUn,e=b&&b.length||0;e--;)b[e]();delete d.startUn;d.startUn=[];for(e=c&&c.length||0;e--;)c[e]();delete d.endUn;d.endUn=[];d.state="end";d.closure(a)};if(D)for(c=D.start,l=c.length;l--;)(m=c[l])&&e.push(w(a,m,d,"start"));return e},w=function(a,b,c,e){e=e||"closure";d(a,b,c[e]);return function(){l(a,b,c[e])}},e=function(a){return function(b){b=b||k.event;a.handler.call(a.context||
595 a.elem,{data:a.data,type:a.type,state:a.state,isGesture:a.isGesture,target:b.target||b.srcElement,originalEvent:b})}};return{listen:function(d,n,l,k,m){var D=this;n="string"===typeof n?n.split(" "):n;var v=n.length,F=[],K=function(a,b,c){F.push(function(){D.unlisten(a,b,c)})},p,H,S,fa,sa;if(d.ownerDocument&&d.ownerDocument===B)for(;v--;)H=n[v],fa=Boolean(b[H]),sa="function"===typeof l?l:l[v],S={handler:sa,elem:d,type:H,isGesture:fa,gDef:fa?b[H]:null,data:k,context:m,start:[],end:[],links:{prev:null,
596 next:null}},S.closure=e(S),fa?((p=a[H])||(p=a[H]=[]),p.push(S),C(d,H,S)):((p=c[H])||(p=c[H]=[]),p.push(S),w(d,H,S)),K(d,H,sa);else for(;v--;)H=n[v],sa="function"===typeof l?l:l[v],S={handler:sa,elem:d,type:H,isGesture:fa,data:k,context:m,start:[],end:[],links:{prev:null,next:null}},S.closure=e(S),(p=c[H])||(p=c[H]=[]),p.push(S);return{unlisten:function(){for(var a=F.length;a--;)F[a]()}}},unlisten:function(d,e,k){var w,m=!1,D,v;if(Boolean(b[e]))for(D=(w=a[e])&&w.length||0;D--;){if(v=w[D],v.handler===
597 k&&v.elem===d){var m=d,C=void 0,B=void 0,p=void 0,C=void 0;if(C=b[e])for(C=C.start,p=C.length;p--;)(B=C[p])&&l(m,B,v.start);w.splice(D,1);m=!0}}else for(D=(w=c[e])&&w.length||0;D--;)v=w[D],v.handler===k&&v.elem===d&&(l(d,e,v.closure),w.splice(D,1),m=!0);return m},fire:function(a,b,d,e){var m;if(a.ownerDocument&&a.ownerDocument===B)B.createEvent?(m=B.createEvent("HTMLEvents"),m.initEvent(b,!0,!0),d&&(d.originalEvent?d.originalEvent=m:v(m,d)),"function"===typeof a[b]&&a[b].call(a),a.dispatchEvent(m)):
598 (m=B.createEventObject(),m.eventType=b,d&&(d.originalEvent?d.originalEvent=m:v(m,d)),"function"===typeof a[b]&&a[b].call(a),a.fireEvent("on"+b,m)),e&&!m.returnValue&&e(m);else for(e=(b=c[b])&&b.length||0;e--;)m=b[e],m.elem===a&&m.closure(d)}}}})(d||k);(function(c){function d(a,b){var c="";B.defaultView&&B.defaultView.getComputedStyle?c=B.defaultView.getComputedStyle(a,"").getPropertyValue(b):a.currentStyle&&(b=b.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()}),c=a.currentStyle[b]);c=parseInt(c,
599 10);return isNaN(c)?0:c}function b(b,c,d,g,n,l,k,m){var v=c/F,B=a[l||"linear"](g-d,v),J=0,K=function(){var a;J<v?(a=B[J],b.style[n]=d+a+m,D&&"opacity"===n&&(a=100*Number(a),b.style.filter="progid:DXImageTransform.Microsoft.Alpha(Opacity="+a+")"),J+=1,setTimeout(K,F)):k&&k()};m=m||"";setTimeout(K,F)}var l={width:{suffix:"px"},height:{suffix:"px"},opacity:!0,top:{suffix:"px"},left:{suffix:"px"}},a={linear:function(a,b){for(var c=[],d=a/b,n=0;n<b;n+=1)c[n]=d*(n+1);return c}},D=/msie/i.test(k.navigator.userAgent)&&
600 !k.opera,F=40;c.danimate=v({animate:function(a,c,e,g,n){g={};var k={},D=function(){v+=1;v===m&&"function"===typeof n&&n()},m=0,v=0,B,X;if(e<F){for(X in c)a.style[X]=c[X];n&&n()}else for(X in c)l[X]&&(m+=1,g[X]=c[X],k[X]=d(a,X),B="object"===typeof l[X]&&l[X].suffix,b(a,e,k[X],g[X],X,"linear",D,B))}},{})})(d||k)}]);
601 FusionCharts.register("module",["private","modules.renderer.js-colormanager",function(){var d=this.hcLib,k=d.pluckNumber,B=d.graphics.getDarkColor,v=d.graphics.getLightColor,l="AFD8F8 F6BD0F 8BBA00 FF8E46 008E8E D64646 8E468E 588526 B3AA00 008ED6 9D080D A186BE CC6600 FDC689 ABA000 F26D7D FFF200 0054A6 F7941C CC3300 006600 663300 6DCFF6".split(" "),c="8BBA00 F6BD0F FF654F AFD8F8 FDB398 CDC309 B1D0D2 FAD1B9 B8A79E D7CEA5 C4B3CE E9D3BE EFE9AD CEA7A2 B2D9BA".split(" "),K=d.defaultPaletteOptions={paletteColors:[l,
602 l,l,l,l],bgColor:["CBCBCB,E9E9E9","CFD4BE,F3F5DD","C5DADD,EDFBFE","A86402,FDC16D","FF7CA0,FFD1DD"],bgAngle:[270,270,270,270,270],bgRatio:["0,100","0,100","0,100","0,100","0,100"],bgAlpha:["50,50","60,50","40,20","20,10","30,30"],canvasBgColor:["FFFFFF","FFFFFF","FFFFFF","FFFFFF","FFFFFF"],canvasBgAngle:[0,0,0,0,0],canvasBgAlpha:["100","100","100","100","100"],canvasBgRatio:["","","","",""],canvasBorderColor:["545454","545454","415D6F","845001","68001B"],canvasBorderAlpha:[100,100,100,90,100],showShadow:[0,
603 1,1,1,1],divLineColor:["717170","7B7D6D","92CDD6","965B01","68001B"],divLineAlpha:[40,45,65,40,30],altHGridColor:["EEEEEE","D8DCC5","99C4CD","DEC49C","FEC1D0"],altHGridAlpha:[50,35,10,20,15],altVGridColor:["767575","D8DCC5","99C4CD","DEC49C","FEC1D0"],altVGridAlpha:[10,20,10,15,10],anchorBgColor:["FFFFFF","FFFFFF","FFFFFF","FFFFFF","FFFFFF"],toolTipBgColor:["FFFFFF","FFFFFF","FFFFFF","FFFFFF","FFFFFF"],toolTipBorderColor:["545454","545454","415D6F","845001","68001B"],baseFontColor:["555555","60634E",
604 "025B6A","A15E01","68001B"],borderColor:["767575","545454","415D6F","845001","68001B"],borderAlpha:[50,50,50,50,50],legendBgColor:["FFFFFF","FFFFFF","FFFFFF","FFFFFF","FFFFFF"],legendBorderColor:["545454","545454","415D6F","845001","D55979"],plotGradientColor:["FFFFFF","FFFFFF","FFFFFF","FFFFFF","FFFFFF"],plotBorderColor:["333333","8A8A8A","FFFFFF","FFFFFF","FFFFFF"],plotFillColor:["767575","D8DCC5","99C4CD","DEC49C","FEC1D0"],bgColor3D:["FFFFFF","FFFFFF","FFFFFF","FFFFFF","FFFFFF"],bgAlpha3D:["100",
605 "100","100","100","100"],bgAngle3D:[90,90,90,90,90],bgRatio3D:["","","","",""],canvasBgColor3D:["DDE3D5","D8D8D7","EEDFCA","CFD2D8","FEE8E0"],canvasBaseColor3D:["ACBB99","BCBCBD","C8A06C","96A4AF","FAC7BC"],divLineColor3D:["ACBB99","A4A4A4","BE9B6B","7C8995","D49B8B"],divLineAlpha3D:[100,100,100,100,100],legendBgColor3D:["F0F3ED","F3F3F3","F7F0E8","EEF0F2","FEF8F5"],legendBorderColor3D:["C6CFB8","C8C8C8","DFC29C","CFD5DA","FAD1C7"],toolTipbgColor3D:["FFFFFF","FFFFFF","FFFFFF","FFFFFF","FFFFFF"],toolTipBorderColor3D:["49563A",
606 "666666","49351D","576373","681C09"],baseFontColor3D:["49563A","4A4A4A","49351D","48505A","681C09"],anchorBgColor3D:["FFFFFF","FFFFFF","FFFFFF","FFFFFF","FFFFFF"]},l=d.colorManager=function(b,c){var a=b.chart,l=d.extend2({},K),F=c.defaultPaletteOptions||{},C;l||(l={});for(C in F)l[C]=F[C];l=this.paletteOptions=l;F=this.themeEnabled=a.palettethemecolor;this.paletteIndex=(0<a.palette&&6>a.palette?a.palette:k(c.paletteIndex,1))-1;this.iterator=0;this.paletteColors=l.paletteColors[this.themeEnabled?0:
607 this.paletteIndex];C=a.palettecolors;void 0!==C&&null!==C&&""!==a.palettecolors&&(this.paletteColors=a.palettecolors.split(/\s*\,\s*/));this.paletteLen=this.paletteColors.length;this.useFlatColors=k(a.useflatdataplotcolor,c.useFlatColor,0);F&&(this.paletteIndex=5,l.bgColor.push(v(F,35)+","+v(F,10)),l.bgAngle.push(270),l.bgRatio.push("0,100"),l.bgAlpha.push("50,50"),l.canvasBgColor.push("FFFFFF"),l.canvasBgAngle.push(0),l.canvasBgAlpha.push("100"),l.canvasBgRatio.push(""),l.canvasBorderColor.push(B(F,
608 80)),l.canvasBorderAlpha.push(100),l.showShadow.push(1),l.divLineColor.push(B(F,20)),l.divLineAlpha.push(40),l.altHGridColor.push(v(F,20)),l.altHGridAlpha.push(15),l.altVGridColor.push(v(F,80)),l.altVGridAlpha.push(10),l.anchorBgColor.push("FFFFFF"),l.toolTipBgColor.push("FFFFFF"),l.toolTipBorderColor.push(B(F,80)),l.baseFontColor.push(F.split&&F.split(",")[0]),l.borderColor.push(B(F,60)),l.borderAlpha.push(50),l.legendBgColor.push("FFFFFF"),l.legendBorderColor.push(B(F,80)),l.plotGradientColor.push("FFFFFF"),
609 l.plotBorderColor.push(B(F,85)),l.plotFillColor.push(B(F,85)),l.bgColor3D.push("FFFFFF"),l.bgAlpha3D.push("100"),l.bgAngle3D.push(90),l.bgRatio3D.push(""),l.canvasBgColor3D.push(v(F,20)),l.canvasBaseColor3D.push(v(F,40)),l.divLineColor3D.push(B(F,20)),l.divLineAlpha3D.push(40),l.legendBgColor3D.push("FFFFFF"),l.legendBorderColor3D.push(B(F,80)),l.toolTipbgColor3D.push("FFFFFF"),l.toolTipBorderColor3D.push(B(F,80)),l.baseFontColor3D.push(F.split&&F.split(",")[0]),l.anchorBgColor3D.push("FFFFFF"),l.tickColor&&
610 l.tickColor.push(B(F,90)),l.trendDarkColor&&l.trendDarkColor.push(B(F,90)),l.trendLightColor&&l.trendLightColor.push(v(F,l.TrendLightShadeOffset)),l.msgLogColor&&l.msgLogColor.push(v(F,80)),l.dialColor&&l.dialColor.push(B(F,95)+",FFFFFF,"+B(F,95)),l.dialBorderColor&&l.dialBorderColor.push(B(F,95)+",FFFFFF,"+B(F,95)),l.pivotColor&&l.pivotColor.push(v(F,95)+",FFFFFF,"+v(F,95)),l.pivotBorderColor&&l.pivotBorderColor.push(B(F,95)+",FFFFFF,"+B(F,95)),l.pointerBorderColor&&l.pointerBorderColor.push(B(F,
611 75)),l.pointerBgColor&&l.pointerBgColor.push(B(F,75)),l.thmBorderColor&&l.thmBorderColor.push(B(F,90)),l.thmFillColor&&l.thmFillColor.push(v(F,55)),l.cylFillColor&&l.cylFillColor.push(v(F,55)),l.periodColor&&l.periodColor.push(v(F,10)),l.winColor&&l.winColor.push("666666"),l.lossColor&&l.lossColor.push("CC0000"),l.drawColor&&l.drawColor.push("666666"),l.scorelessColor&&l.scorelessColor.push("FF0000"),l.gridColor&&l.gridColor.push(v(F,30)),l.categoryBgColor&&l.categoryBgColor.push(v(F,10)),l.dataTableBgColor&&
612 l.dataTableBgColor.push(v(F,10)),l.gridResizeBarColor&&l.gridResizeBarColor.push(B(F,90)),l.scrollBarColor&&l.scrollBarColor.push(v(F,50)))};l.prototype={getColor:function(b){return this.paletteOptions[b][this.paletteIndex]},getPlotColor:function(b){var c=this.paletteColors;b=this.useFlatColors?this.getColor("plotFillColor"):c[b%this.paletteLen];b||(this.iterator===this.paletteLen&&(this.iterator=0),b=c[this.iterator],this.iterator+=1);return b},parseColorMix:function(b,c){var a=[],d,l,k,w,e,g,n,
613 s,K,m;c=c.replace(/\s/g,"");c=c.toLowerCase();if(""===c||null===c||void 0===c)a=[b];else for(l=c.split(","),k=b.split(","),w=Math.max(l.length,k.length,1),e=l[0],g=k[0],K=/[\{\}]/ig,m=0;m<w;m++)n=(l[m]||e).replace(K,""),s=k[m]||g,"color"==n?a.push(s):"light"==n.substr(0,5)?(d=n.indexOf("-"),d=-1==d?1:n.substr(d+1,n.length-d),d=100-d,a.push(v(s,d))):"dark"==n.substr(0,4)?(d=n.indexOf("-"),d=-1==d?1:n.substr(d+1,n.length-d),d=100-d,a.push(B(s,d))):a.push(n);return a},parseAlphaList:function(b,c){var a=
614 b.split(","),d=[],l,v=100,w;for(w=0;w<c;w++)l=k(a[w]),void 0!==l&&null!==l&&(v=l),d[w]=v;return d.join()},parseRatioList:function(b,c){var a=b.split(","),d=[],l=0,k,w;for(w=0;w<c;w++)k=a[w],k=isNaN(k)||void 0===k?0:Math.abs(Number(k)),k=100<k?100:k,d[w]=k,l+=k;l=100<l?100:l;if(a.length<c)for(w=a.length;w<c;w++)d[w]=(100-l)/(c-a.length);d[-1]=0;return d.join()}};l.prototype.constructor=l;d.defaultGaugePaletteOptions={paletteColors:[c,c,c,c,c],bgColor:["CBCBCB,E9E9E9","CFD4BE,F3F5DD","C5DADD,EDFBFE",
615 "A86402,FDC16D","FF7CA0,FFD1DD"],bgAngle:[270,270,270,270,270],bgRatio:["0,100","0,100","0,100","0,100","0,100"],bgAlpha:["50,50","60,50","40,20","20,10","30,30"],toolTipBgColor:["FFFFFF","FFFFFF","FFFFFF","FFFFFF","FFFFFF"],toolTipBorderColor:["545454","545454","415D6F","845001","68001B"],baseFontColor:["555555","60634E","025B6A","A15E01","68001B"],tickColor:["333333","60634E","025B6A","A15E01","68001B"],trendDarkColor:["333333","60634E","025B6A","A15E01","68001B"],trendLightColor:["f1f1f1","F3F5DD",
616 "EDFBFE","FFF5E8","FFD1DD"],pointerBorderColor:["545454","60634E","415D6F","845001","68001B"],pointerBgColor:["545454","60634E","415D6F","845001","68001B"],canvasBgColor:["FFFFFF","FFFFFF","FFFFFF","FFFFFF","FFFFFF"],canvasBgAngle:[0,0,0,0,0],canvasBgAlpha:["100","100","100","100","100"],canvasBgRatio:["","","","",""],canvasBorderColor:["545454","545454","415D6F","845001","68001B"],canvasBorderAlpha:[100,100,100,90,100],altHGridColor:["EEEEEE","D8DCC5","99C4CD","DEC49C","FEC1D0"],altHGridAlpha:[50,
617 35,10,20,15],altVGridColor:["767575","D8DCC5","99C4CD","DEC49C","FEC1D0"],altVGridAlpha:[10,20,10,15,10],borderColor:["767575","545454","415D6F","845001","68001B"],borderAlpha:[50,50,50,50,50],legendBgColor:["ffffff","ffffff","ffffff","ffffff","ffffff"],legendBorderColor:["545454","545454","415D6F","845001","D55979"],plotFillColor:["767575","D8DCC5","99C4CD","DEC49C","FEC1D0"],plotBorderColor:["999999","8A8A8A","6BA9B6","C1934D","FC819F"],msgLogColor:["717170","7B7D6D","92CDD6","965B01","68001B"],
618 TrendLightShadeOffset:30}}]);
619 FusionCharts.register("module",["private","modules.renderer.js-annotations",function(){var d=this,k=d.core,B=d.hcLib,v=d.window,l=/msie/i.test(v.navigator.userAgent)&&!v.opera,c=B.addEvent,K=B.removeEvent,b=B.hasTouch,J=v.Number,a=b?6:5,D="rgba(192,192,192,"+(l?0.002:1E-6)+")",l=v.Math,F=l.min,C=l.max,w=l.sin,e=l.cos,g=l.PI,n=g/180,s=d.extend,R=B.pluck,m=B.pluckNumber,I=B.graphics.convertColor,Q=B.getValidValue,X=B.parseUnsafeString,$=B.setImageDisplayMode,p=B.graphics.parseColor,H=B.setLineHeight,
620 S=B.getMouseCoordinate,fa={style:{}},sa=B.toRaphaelColor,ya=function(a,b){return{start:-b,end:-a,angle:a-b}},ca=function(a,b,c,d,e){var g,l,n=0,m=0;l=void 0===b||null===b?1:b;var p;if(!a||!a.toString)return{value:c,hasDynamicMacros:!1};a=a.toString();a=a.toLowerCase().replace(/\s/g,"");if(c=a.match(/^[\+\-]?\d+(\.\d+)?|[\+\-]\d+(\.\d+)?/g)){for(b=0;b<c.length;b+=1)n+=Number(c[b])||0;n*=l}if(c=a.match(/^[\+\-]?(\$[a-z0-9\.]+)|[\+\-](\$[a-z0-9\.]+)/g))for(b=0;b<c.length;b+=1){g=c[b];var k=d,w=e,s=g.split("."),
621 t=void 0,v=void 0,C=0;for(l=void 0;t=s.shift();)switch(typeof(v=k[t])){case "object":k=v[t];break;case "function":v=v(s,w),"-"===g.charAt()&&(v*=-1),l=!0;default:C+=J(v)||0,s.length=0}g=C;l&&(p=!0);m+=g}if(c=a.match(/^[\+\-]?\$\d+(\.\d+)?|[\+\-]\$\d+(\.\d+)?/g))for(b=0;b<c.length;b+=1)m=m+Number(c[b].replace("$",""))||0;return{value:n+m,hasDynamicMacros:p}},Y=function(a,b,c){if(!b.removed){b=b.data("annotation");var e=b.getRenderer(),g=S(e.container,c),l=g.annotationOptions=b.options,n=g.groupOptions=
622 b.group.options;g._shape=b;"id"in l&&(g.annotationId=l.id);"id"in n&&(g.groupId=n.id);d.raiseEvent(a,g,e.fusionCharts,c)}},xa,t,M;t=function(a,b,c,d,e){this.options=a;this.attrs={};this.css={};this.bounds={};this.shared=b;this.snaps=c||{};this.annotations=e;this.items=b=[];this._idstore=d;a.id&&(this._id=a.id,d[a.id]=this);if(a=a.items)for(d=0,c=a.length;d<c;d+=1)b.push(new M(a[d],this))};s(t.prototype,{scaleImageX:1,scaleImageY:1,scaleText:1,scaleValue:1,scaleValueComplement:1,scaleX:1,scaleY:1});
623 t.prototype.setup=function(){var a=this.options,b=this.shared,c=this.getRenderer();c&&(this.isBelow=0!==m(a.showbelow,a.showbelowchart,b.showbelow),this.useTracker=!this.isBelow&&c.layers.tracker&&this.shared.useTracker,this.raiseOwnEvents=b.interactionevents)};t.prototype.scale=function(){var a=this.options,b=this.shared,c=this.bounds,d=this.snaps,e=this.getRenderer(),g=b.rootxscale,l=b.rootyscale,n=c.xs=m(a.xscale,b.xscale,100)/100,p=c.ys=m(a.yscale,b.yscale,100)/100,k,w,s;e&&(this.scaleText*=p,
624 this.scaleImageX*=n,this.scaleImageY*=p,0!==m(a.autoscale,b.autoscale)&&(n=m(a.origw,b.origw),p=m(a.origh,b.origh),n=e.chartWidth/n,p=e.chartHeight/p,e=0!==m(a.constrainedscale,b.constrainedscale),k=n<p?n:p,w=e?k:n,s=e?k:p,this.scaleValue=t.prototype.scaleValue*k,this.scaleValueComplement=t.prototype.scaleValueComplement*(e?k:n<p?p:n),this.scaleX=t.prototype.scaleX*w,this.scaleY=t.prototype.scaleX*s,c.xs*=w,c.ys*=s,g*=w,l*=s,"1"==R(a.scaletext,b.scaletext)&&(this.scaleText=t.prototype.scaleText*s),
625 "1"==R(a.scaleimages,b.scaleimages)&&(this.scaleImageX=t.prototype.scaleImageX*w,this.scaleImageY=t.prototype.scaleImageY*s)),c.x=ca(R(a.x,a.xpos),g,0,d,this.isBelow).value+m(a.grpxshift,b.grpxshift,0),c.y=ca(R(a.y,a.ypos),l,0,d,this.isBelow).value+m(a.grpyshift,b.grpyshift,0),this.xshift=m(a.xshift,b.xshift,0),this.yshift=m(a.yshift,b.yshift,0))};t.prototype.draw=function(){var a=this.getRenderer(),b=this.options,c=this.bounds,d=this.items,e=a&&a.layers.dataset,g=this.wrapper;if(a){g||(this.wrapper=
626 g=a.paper.group("annotations"),e&&(this.isBelow?g.insertBefore(e):g.insertAfter(a.layers.datalabels||e)));this.wrapper.attr({x:0,y:0,visibility:m(b.visible,1)?"":"hidden"}).translate(c.x,c.y);b=0;for(c=d.length;b<c;b+=1)a=d[b],a.scale(!0),a.queueDraw?a.queue():(a.setup(),a.draw());return this}};t.prototype.destroy=function(){for(var a=this.wrapper,b=this.items,c;c=b.shift();)c.destroy();a&&(this.wrapper=a.remove());this._idstore[this._id]===this&&delete this._idstore[this._id]};t.prototype.addItem=
627 function(a,b){var c;this.items.push(c=new M(a,this,this._idstore));b&&null!==this.getRenderer()&&(c.scale(),c.setup(),c.draw());return c};t.prototype.removeItem=function(a){for(var b=this.items,c=b.length;c--;)if(a===b[c]._id)return b.splice(c,1)};t.prototype.getRenderer=function(){return this.annotations&&this.annotations.getRenderer()||null};M=function(a,b){var c=!1,d;this.options=a;this.group=b;this.args=[];this.attrs={};this.attrsTracker={};this.style={};this.bounds={};this._idstore=b._idstore;
628 a.id&&(this._id=a.id,b._idstore[a.id]=this);this.type=a.type&&a.type.toLowerCase&&a.type.toLowerCase();for(d in M.eventNames)"function"===typeof a[d]&&(this[d]=a[d],c=!0);this.hasEvents=c;"function"===typeof a.onload&&(this.onload=a.onload)};d.extend(M.prototype,{getAbsoluteBounds:function(){var a=this.bounds,b=a.x1,c=a.y1,d=a.x2,e=a.y2,g=F(b,d),l=F(c,e),b=C(b,d)-g,c=C(c,e)-l;return{x:g,width:b,y:l,height:c,r:a.r,unscaled:{width:b/a.xs,height:c/a.ys}}},queue:function(){this.group.annotations.shapesToDraw.push(this)},
629 scale:function(a){var b=this,c=b.group,d=c.bounds,e=b.bounds,g=b.options,l=c.snaps,n=R(g.x,g.xpos),p=R(g.y,g.ypos),k=R(g.tox,g.toxpos),w=R(g.toy,g.toypos),s=e.xs=d.xs,d=e.ys=d.ys,t=m(g.xshift,c.xshift,0),v=m(g.yshift,c.yshift,0),C;C=function(d,e,g,l){d=ca(d,e,g,l,c.isBelow);d.hasDynamicMacros&&a&&(b.queueDraw=!0);return d.value};b.hasDimension=!0;b.hasDimensionX=!0;b.hasDimensionY=!0;e.x1=C(n,s,0,l)+t;void 0===k?(b.hasDimension=!1,b.hasDimensionX=!1,e.x2=e.x1):e.x2=C(k,s,0,l)+t;e.y1=C(p,d,0,l)+v;
630 void 0===w?(b.hasDimension=!1,b.hasDimensionY=!1,e.y2=e.y1):e.y2=C(w,d,0,l)+v;M.angularShapeTypes[b.type]&&(e.angles=ya(C(g.startangle,1,0,l),C(g.endangle,1,360,l)));e.r=C(g.radius,c.scaleValue,0,l)},setup:function(){var a=this.options,b=this.group,c=b.options,d=this.attrs,e=this.style,g=b.scaleValue,l=m(c.fillalpha,c.alpha,100),n=this.fillAlpha=R(a.fillalpha,a.alpha,l),p=this.fillColor=R(a.fillcolor,a.color,c.color),k=this.fillPattern=R(a.fillpattern&&a.fillpattern.toLowerCase&&a.fillpattern.toLowerCase(),
631 c.fillpattern&&c.fillpattern.toLowerCase&&c.fillpattern.toLowerCase()),w=this.bordered=m(a.showborder,M.borderedShapeTypes[this.type],!!Q(a.bordercolor)),t=this.borderColor=R(a.bordercolor,c.bordercolor,p),l=this.borderAlpha=m(a.borderalpha,a.alpha,c.borderalpha,l),v=this.dashed=!!m(a.dashed,0),C=m(a.borderthickness,a.thickness,2)*g;this.link=R(a.link,c.link);this.shadow="1"==R(a.showshadow,c.showshadow);void 0===p&&(p=M.borderedShapeTypes[this.type]&&"none"||"#ff0000",void 0===t&&(t="#ff0000"));
632 w&&C?(d.stroke=I(t,l),d["stroke-linecap"]="round",d["stroke-width"]=C,v&&(d["stroke-dasharray"]=[m(a.dashlen,5)*g,m(a.dashgap,3)*g])):d.stroke="none";this.fillOptions={gradientUnits:"objectBoundingBox",color:p,alpha:n,ratio:R(a.fillratio,c.fillratio),angle:360-m(a.fillangle,0),radialGradient:"radial"===k};this.link&&(e.cursor="pointer",e._cursor="hand");d.visibility=m(a.visible,1)?"":"hidden";this.useTracker=b.useTracker;this.toolText=X(R(a.tooltext,c.tooltext));if(this.useTracker||this.link||this.toolText)s(this.attrsTracker,
633 {stroke:D,fill:D}),this.link&&(this.attrsTracker.ishot=+new Date);this.raiseOwnEvents=b.raiseOwnEvents},draw:function(){var a=this.getRenderer(),b=this.type,d=this.attrs,e=this.style,g=a&&a.paper,l=M.types[b]&&M.types[b].call&&M.types[b].call(this,a),n=M.imageShapeTypes[l],m=M.textShapeTypes[l],p=n||m||M.trackerShapeTypes[l],k=this.link||this.toolText,w=this.wrapper,b=this.tracker,s=a&&a.layers.tracker||this.group.wrapper,t=!1,v=b||w,D=M.eventNames,B=M.ownEvents,H,J;if(a){if(l){if(w)if(w.elemType!==
634 l){if(this.ownEventsAttached){for(J in B)v["un"+J].apply(w,B[J]);this.ownEventsAttached=!1}w=w.remove()}else if(this.hasEvents)for(H in D)(J=this[H])&&J.eventAttached&&(K(v.node,D[H],J),J.eventAttached=!1);n||(d.fill=sa(this.fillOptions));w?w.attr(d).css(e):(this.args.push(this.group.wrapper),w=this.wrapper=g[l].apply(g,this.args).attr(d).css(e),w.elemType=l,w.data("annotation",this),t=!0,this.args.pop());!this.shadow||this.shadowAdded||n||m?w.shadow(this.shadowAdded=!1):w.shadow(this.shadowAdded=
635 !0,C(this.borderAlpha,this.fillOptions.alpha)/100);k?this.useTracker&&(b||(this.args.push(s),b=this.tracker=p?g.rect(0,0,0,0,0,s):g[l].apply(g,this.args),this.args.pop()),b.attr(d).attr(this.attrsTracker)):b&&(b=b.remove());v=b||w;if(this.raiseOwnEvents&&!this.ownEventsAttached){for(J in B)v[J].apply(w,B[J]);this.ownEventsAttached=!0}this.link&&v.click(a.linkClickFN,this);this.toolText&&(v.tooltip(this.toolText||""),this.group.wrapper.trackTooltip(!0));if(this.hasEvents)for(H in D)(J=this[H])&&!J.eventAttached&&
636 (c(v.node,D[H],J,this),J.eventAttached=!0);n||(b&&p&&(a=w.getBBox(),b.attr({x:a.x,y:a.y,width:a.width,height:a.height})),t&&this.onload&&this.onload(d))}return this}},destroy:function(){var a=this.wrapper,b=this.tracker,c=b||a,d=M.eventNames,e=M.ownEvents,g,l;if(a){if(this.ownEventsAttached){for(l in e)c["un"+l].apply(a,e[l]);this.ownEventsAttached=!1}if(this.hasEvents)for(g in d)(l=this[g])&&l.eventAttached&&(K(c.node,d[g],l),l.eventAttached=!1);b&&(this.tracker=b.remove());this.wrapper=a.remove()}this._idstore[this._id]===
637 this&&delete this._idstore[this._id]},getRenderer:function(){return this.group&&this.group.getRenderer()||null}});d.extend(M,{imageShapeTypes:{image:!0},angularShapeTypes:{circle:!0,arc:!0},textShapeTypes:{text:!0},trackerShapeTypes:{image:!0,text:!0},borderedShapeTypes:{path:!0,line:!0},eventNames:{onmouseover:b?"touchstart":"mouseover",onmouseout:"mouseout",onmousemove:b?"touchmove":"mousemove",onclick:"click"},ownEvents:{click:[function(a){Y("annotationClick",this,a)}],hover:[function(a){Y("annotationRollOver",
638 this,a)},function(a){Y("annotationRollOut",this,a)}]},textAlignOptions:{left:"start",right:"end",center:"middle"},textVerticalAlignOptions:{top:"bottom",middle:"middle",bottom:"top"},textRotationOptions:{0:"0",1:"270",right:"90",cw:"90",left:"270",ccw:"270"},types:{rectangle:function(){var a=this.args,b=this.attrs,c=this.getAbsoluteBounds(),d=0.5*c.width;c.r>d&&(c.r=d);a[0]=b.x=c.x;a[1]=b.y=c.y;a[2]=b.width=c.width;a[3]=b.height=c.height;a[4]=b.r=c.r;return"rect"},line:function(){var b=this.attrs,
639 c=this.bounds;this.args[0]=b.path=["M",c.x1,c.y1,"L",c.x2,c.y2];1===b["stroke-width"]&&(b["shape-rendering"]="crisp");b["stroke-width"]<a&&(this.attrsTracker["stroke-width"]=a);this.bordered&&this.dashed&&(this.attrsTracker["stroke-dasharray"]="solid");return"path"},path:function(){var a=this.attrs,b=this.bounds;this.args[0]=a.path=this.options.path;a.transform=["T",b.x1,b.y1,"S",b.xs,b.ys,b.x1,b.y1];1===a["stroke-width"]&&(a["shape-rendering"]="crisp");return"path"},polygon:function(){var a=this.args,
640 b=this.attrs,c=this.options,d=this.bounds,e=this.group,g=e.snaps;a[0]=ca(c.sides,1,5,g,e.isBelow).value;a[1]=d.x1;a[2]=d.y1;a[3]=d.r;a[4]=ca(c.startangle,1,0,g,e.isBelow).value;a[5]=0;b.polypath=a.slice(0);return"polypath"},circle:function(a){var b=this.args,c=this.attrs,d=this.options,l=this.bounds,m=a.chartWidth,p=a.chartHeight,k=this.group.scaleValueComplement,s=this.group.snaps,t=l.angles,v=this.group;a=l.r;R(d.radius)||(l.r=m<p?m*l.xs:p*l.ys,l.r=a=0.3*l.r);d=ca(d.yradius,k,a,s,v.isBelow).value;
641 this.fillPattern||(this.fillOptions.radialGradient=!0,this.fillPattern="radial");"radial"===this.fillPattern&&(this.fillOptions.cx=this.fillOptions.cy=0.5);m=t.angle%360;if(!m&&a===d)return b[0]=c.cx=l.x1,b[1]=c.cy=l.y1,b[2]=c.r=l.r,"circle";m||(t.start-=0.001);p=t.start*n;m=t.end*n;t=t.angle*n;k=l.x1;s=l.y1;l=k+e(p)*a;p=s+w(p)*d;k+=e(m)*a;m=s+w(m)*d;b[0]=c.path=["M",l,p,"A",a,d,0,0,t>=g?0:1,k,m,"Z"];return"path"},arc:function(a){var b=this.options,c=this.args,d=this.attrs,e=this.bounds,g=a.chartWidth;
642 a=a.chartHeight;var l=this.group,m=l.scaleValue,p=e.angles;R(b.radius)||(e.r=g<a?g*e.xs:a*e.ys,e.r*=0.3);e.innerR=ca(b.innerradius,m,0.8*e.r,this.group.snaps,l.isBelow).value;e.innerR>e.r&&(e.innerR+=e.r,e.r=e.innerR-e.r,e.innerR-=e.r);this.fillPattern||(this.fillOptions.radialGradient=!0,this.fillPattern="radial");"radial"===this.fillPattern&&(this.fillOptions.cx=this.fillOptions.cy=0.5);c[0]=e.x1;c[1]=e.y1;c[2]=e.r;c[3]=e.innerR;c[4]=p.start*n;c[5]=p.end*n;d.ringpath=c.slice(0);return"ringpath"},
643 text:function(a){var b=this.args,c=this.style,d=this.attrs,e=this.group,g=this.bounds,l=this.options,n=this.getAbsoluteBounds(),k=R(l.align,e.options.textalign,"center").toLowerCase(),w=R(l.valign,e.options.textvalign,"middle").toLowerCase(),t=X(R(l.text,l.label)),v=a.logic.smartLabel,C=m(l.wrap,e.options.wraptext,1),D,B,J=R(l.rotatetext,e.options.rotatetext,"0").toLowerCase(),J=M.textRotationOptions[J],K="0"!==J?"y":"x",I=a.options.orphanStyles;a=s({},I.defaultStyle.style||{});I=e.id&&I[e.id.toLowerCase()]||
644 fa;a=s(a,I.style);var I=parseFloat(a.fontSize),F=R(l.font,e.options.font,a.fontFamily),e=m(l.fontsize,e.options.fontsize,I)*e.scaleText;C&&(D=m(l.wrapwidth,this.hasDimensionX?n.width/g.xs:void 0),B=m(l.wrapheight,this.hasDimensionY?n.height/g.ys:void 0),D&&(D*=g.xs),B&&(B*=g.ys));c.fontFamily=F;c.fontWeight=m(l.bold,l.isbold,0)?"bold":"normal";m(l.italic,l.isitalic,0)&&(c.fontStyle="italic");l.bgcolor&&(!d["text-bound"]&&(d["text-bound"]=[]),d["text-bound"][0]=p(l.bgcolor));l.bordercolor&&(!d["text-bound"]&&
645 (d["text-bound"]=[]),d["text-bound"][1]=p(l.bordercolor),d["text-bound"][2]=m(l.borderthickness,1),d["text-bound"][3]=m(l.padding,1));l.fontcolor&&(d.fill=p(l.fontcolor),this.fillOptions&&(this.fillOptions.color=d.fill));c.fontSize=e+"px";e===I?c.lineHeight=a.lineHeight:H(c);d["text-anchor"]=M.textAlignOptions[k]||M.textAlignOptions.center;v.setStyle(c);c=v.getSmartText(t,D,B,!1);d["vertical-align"]=M.textVerticalAlignOptions[w]||M.textVerticalAlignOptions.middle;d["text-anchor"]===M.textAlignOptions.left?
646 n[K]+=m(l.leftmargin,0):d["text-anchor"]===M.textAlignOptions.center&&(n[K]+=0.5*m(l.leftmargin,0));"0"!==J&&(d.rotation=[parseFloat(J),n.x,n.y]);b[0]=d.x=n.x;b[1]=d.y=n.y;b[2]=d.text=c.text;c.tooltext&&(d.title=c.tooltext);delete d.stroke;delete d["stroke-weight"];return"text"},image:function(a){var b=this,c=b.style,d=a.chartWidth,e=a.chartHeight;a=b.options;var g=b.attrs,l=b.args,n=Q(a.url),p=b.group.scaleImageX*R(Number(a.xscale),100)/100,k=b.group.scaleImageY*R(Number(a.yscale),100)/100,w=b.getAbsoluteBounds(),
647 t={width:1,height:1},D;if(!n)return l[0]=g.x=w.x,l[1]=g.y=w.y,l[2]=g.width=w.width,l[3]=g.height=w.height,l[4]=g.r=w.r,"rect";D=new v.Image;D.onload=function(){t=$("none","top","left",100,0,d,e,D);delete t.x;delete t.y;t=s(t,{width:(b.hasDimensionX?w.unscaled.width:t.width)*p,height:(b.hasDimensionY?w.unscaled.height:t.height)*k});setTimeout(function(){var a,d,e;if(a=b.wrapper){a.attr(t);if(d=b.tracker)e=a.getBBox(),d.attr({x:e.x,y:e.y,width:e.width,height:e.height});a.css({opacity:c.opacity=C(m(b.fillAlpha,
648 b.borderAlpha),b.borderAlpha)/100})}b.onload&&b.onload(t)},0)};D.src=n;l[0]=g.src=n;l[1]=g.x=w.x;l[2]=g.y=w.y;l[3]=g.width=(b.hasDimensionX?w.unscaled.width:t.width)*p;l[4]=g.height=(b.hasDimensionY?w.unscaled.height:t.height)*k;c.opacity=C(m(b.fillAlpha,b.borderAlpha),b.borderAlpha)/100;delete g.stroke;delete g.fill;delete g["stroke-linecap"];return"image"}}});xa=function(){this.groups=[];this._idstore={};this._options={}};B.Annotations=xa;d.extend(xa.prototype,{reset:function(a,b,c){var d=this.groups,
649 e;this.clear();if(c){e={};for(var g in c)switch(typeof c[g]){case "object":case "function":e["-$"+g]=e["$"+g]=e["+$"+g]=c[g];break;default:e["$"+g]=e["+$"+g]=c[g],e["-$"+g]=-1*c[g]}e=this._literals=e}b&&(this._options=b);if(a&&a.groups&&d)for(c=0;c<a.groups.length;c+=1)d.push(new t(a.groups[c],b,e,this._idstore,this))},getRenderer:function(){return this._renderer},addGroup:function(a){var b=this.getRenderer();this.groups.push(a=new t(a,this._options,this._literals,this._idstore,this));b&&(a.setup(),
650 a.scale(),a.draw());return a},addItem:function(a,b,c){var e,g=this.getRenderer();"string"===typeof a?e=this._idstore[a]:(c=b,b=a);if(e&&e.addItem){if(!g&&c){d.raiseWarning(this,"04031411430","run","Annotations~addItem()","Cannot draw the shapeif the group has not been drawn. Use Annotations~draw() to draw the group and pass the renderer to it.");return}a=e.addItem(b,c)}else a=this.addGroup({}).addItem(b,c);return a},draw:function(a){var b=this.groups,c,d;if(b&&(this._renderer=a||this._renderer))for(c=
651 0,d=b.length;c<d;c++)a=b[c],a.setup(),a.scale(),a.draw()},clear:function(){var a=this.groups,b;if(a){for(;b=a.shift();)b.destroy();this.shapesToDraw=[]}},dispose:function(){var a;this.disposing=!0;this.clear();for(a in this)delete this[a];this.disposed=!0},hide:function(a){if(a=this._idstore[a])return a.attrs.visibility="hidden",a.wrapper&&a.wrapper.hide(),a},show:function(a){if(a=this._idstore[a])return a.attrs.visibility="",a.wrapper&&a.wrapper.show(),a},update:function(a,b,c){a=this._idstore[a];
652 var d;if(a&&b){if("object"===typeof b)for(d in b.id&&delete b.id,b.type&&delete b.type,b)a.options[(d+"").toLowerCase()]=b[d]+"";else a.options[(b+"").toLowerCase()]=c+"";a.wrapper&&(a.scale(),a.setup(),a.draw());return a}},destroy:function(a){var b=this._idstore[a],c=b.group;b&&"function"===typeof b.destroy&&(c&&c.removeItem(a),b.destroy())},shapesToDraw:[]});d.core.addEventListener("beforeinitialize",function(a){"javascript"===a.sender.options.renderer&&(a.sender.annotations=new xa)});d.core.addEventListener("disposed",
653 function(a){a.sender.annotations&&a.sender.annotations.dispose()});d.addEventListener("internal.animationComplete",function(a){var b=(a=a.sender.annotations)&&a.shapesToDraw,c=b&&b.length,d,e;if(c){for(e=0;e<c;e++)d=b[e],d.queueDraw=!1,d.scale(),d.setup(),d.draw();a.shapesToDraw=[]}});k.addEventListener("rendered",function(a,b){if("javascript"===b.renderer){var c=a.sender,d=c.jsVars||{},e=d.instanceAPI;d.hcObj&&e&&e.drawAnnotations?(c.showAnnotation||(c.showAnnotation=function(){c.annotations.show.apply(c.annotations,
654 arguments)}),c.hideAnnotation||(c.hideAnnotation=function(){c.annotations.hide.apply(c.annotations,arguments)})):(delete c.showAnnotation,delete c.hideAnnotation)}})}]);
655 FusionCharts.register("module",["private","modules.renderer.js-base",function(){var d=this,k=d.hcLib,B=d.window,v=B.document,l=k.BLANKSTRING,c=k.createTrendLine,K="https:"===B.location.protocol?"https://export.api3.fusioncharts.com/":"http://export.api3.fusioncharts.com/",b=k.pluck,J=k.getValidValue,a=k.pluckNumber,D=k.getFirstValue,F=k.getDefinedColor,C=k.parseUnsafeString,w=k.FC_CONFIG_STRING,e=k.extend2,g=k.getDashStyle,n=k.parseTooltext,s=k.toPrecision,R=k.regex.dropHash,m=k.HASHSTRING,I=k.getSentenceCase,
656 Q=k.addEvent,X=B.Math,$=k.TOUCH_THRESHOLD_PIXELS,p=k.CLICK_THRESHOLD_PIXELS,H=X.min,S=X.max,fa=X.abs,sa=X.ceil,ya=X.floor,ca=X.log,Y=X.pow,xa=X.round,t=k.graphics.getColumnColor,M=k.getFirstColor,h=k.setLineHeight,N=k.pluckFontSize,W=k.getFirstAlpha,na=k.graphics.getDarkColor,ia=k.graphics.getLightColor,Z=k.graphics.convertColor,Aa=k.COLOR_TRANSPARENT,Ga=k.POSITION_CENTER,oa=k.POSITION_TOP,ua=k.POSITION_BOTTOM,ea=k.POSITION_RIGHT,da=k.POSITION_LEFT,aa=k.chartAPI,ba=k.graphics.mapSymbolName,ga=aa.singleseries,
657 la=aa.multiseries,za=k.COMMASTRING,hb=k.STRINGUNDEFINED,Ha=k.ZEROSTRING,La=k.ONESTRING,Oa=k.HUNDREDSTRING,Pa=k.PXSTRING,qb=k.COMMASPACE,sb=B.navigator.userAgent.match(/(iPad|iPhone|iPod)/g),tb=!/fusioncharts\.com$/i.test(B.location.hostname),xb={left:"start",right:"end",center:"middle"},kb=k.BLANKSTRINGPLACEHOLDER,eb=k.BGRATIOSTRING,jb=k.COLOR_WHITE,lb=k.TESTSTR,r=k.graphics.getAngle,E=k.axisLabelAdder,z=k.falseFN,V=k.NumberFormatter,U=k.getLinkAction,P=k.getAxisLimits,ha=k.createDialog,ra=function(a,
658 b){return 0<a?ca(a)/ca(b||10):null},pa=k.hasTouch=void 0!==v.documentElement.ontouchstart,ja=k.fireEvent=function(a,b,c,d){k.dem.fire(a,b,c,d)},Ia={1:"bold",0:"normal"},ka={1:"italic",0:"normal"},Ca={1:"underline",0:"none"},ga={font:function(a,b){b.style.fontFamily=a},size:function(a,b){a&&(b.style.fontSize=N(a)+Pa)},color:function(a,b,c){b.style.color=a&&a.replace&&a.replace(R,m)||l;c&&(b.color=b.style.color)},bgcolor:function(a,b){b.style.backgroundColor=a&&a.replace&&a.replace(R,m)||l},bordercolor:function(a,
659 b){b.style.border="1px solid";b.style.borderColor=a&&a.replace&&a.replace(R,m)||l},ishtml:l,leftmargin:function(b,c){c.style.marginLeft=a(b,0)+Pa},letterspacing:function(b,c){c.style.letterSpacing=a(b,0)+Pa},bold:function(a,b){b.style.fontWeight=Ia[a]||""},italic:function(a,b){b.style.fontStyle=ka[a]||""},underline:function(a,b){b.style.textDecoration=Ca[a]||""}},Ka=k.chartPaletteStr={chart2D:{bgColor:"bgColor",bgAlpha:"bgAlpha",bgAngle:"bgAngle",bgRatio:"bgRatio",canvasBgColor:"canvasBgColor",canvasBaseColor:"canvasBaseColor",
660 divLineColor:"divLineColor",legendBgColor:"legendBgColor",legendBorderColor:"legendBorderColor",toolTipbgColor:"toolTipbgColor",toolTipBorderColor:"toolTipBorderColor",baseFontColor:"baseFontColor",anchorBgColor:"anchorBgColor"},chart3D:{bgColor:"bgColor3D",bgAlpha:"bgAlpha3D",bgAngle:"bgAngle3D",bgRatio:"bgRatio3D",canvasBgColor:"canvasBgColor3D",canvasBaseColor:"canvasBaseColor3D",divLineColor:"divLineColor3D",divLineAlpha:"divLineAlpha3D",legendBgColor:"legendBgColor3D",legendBorderColor:"legendBorderColor3D",
661 toolTipbgColor:"toolTipbgColor3D",toolTipBorderColor:"toolTipBorderColor3D",baseFontColor:"baseFontColor3D",anchorBgColor:"anchorBgColor3D"}},T=function(){var a={},b,c=function(){var e,f,g,h,r=0,l,n,z=parseInt(d.core.options.resizeTrackingInterval,10)||300,m;for(e in a)r+=1,f=a[e],g=f.jsVars,l=f.ref,!f.disposed&&(h=l&&l.parentNode)&&(n=l.style)&&(/\%/g.test(n.width)||/\%/g.test(n.height))?(l=h.offsetWidth,m=h.offsetHeight,!g.resizeLocked&&(l&&g._containerOffsetW!==l||m&&g._containerOffsetH!==m)&&
662 (f.resizeTo&&f.resizeTo(),g._containerOffsetW=l,g._containerOffsetH=m)):(delete a[e],r-=1);b=r?setTimeout(c,z):clearTimeout(b)};return function(e,f){var g=e.jsVars,h=f||e.ref&&e.ref.parentNode||{};g._containerOffsetW=h.parentNode.offsetWidth;g._containerOffsetH=h.parentNode.offsetHeight;a[e.id]=e;b||(b=setTimeout(c,parseInt(d.core.options.resizeTrackingInterval,10)||300))}}(),ob={getExternalInterfaceMethods:function(){var a=aa[this.jsVars.type],a=a&&a.eiMethods,b="saveAsImage,print,exportChart,getXML,hasRendered,signature,cancelExport,getSVGString,lockResize,showChartMessage,",
663 c;if("string"===typeof a)b+=a+za;else if(void 0!==a||null!==a)for(c in a)b+=c+za;return b.substr(0,b.length-1)},drawOverlayButton:function(a){var b=this.jsVars,c=b.overlayButton,e,f;if(a&&a.show){c||(c=b.overlayButton=v.createElement("span"),k.dem.listen(c,"click",function(){d.raiseEvent("OverlayButtonClick",a,b.fcObj)}));for(e=a.message?a.message:"Back";c.firstChild;)c.removeChild(c.firstChild);c.appendChild(v.createTextNode(e));b.overlayButtonMessage=e;e={border:"1px solid "+(a.borderColor?a.borderColor.replace(R,
664 m):"#7f8975"),backgroundColor:a.bgColor?a.bgColor.replace(R,m):"#edefec",fontFamily:a.font?a.font:"Verdana,sans",color:"#"+a.fontColor?a.fontColor:"49563a",fontSize:(a.fontSize?a.fontSize:"10")+Pa,padding:(a.padding?a.padding:"3")+Pa,fontWeight:0===parseInt(a.bold,10)?"normal":"bold",position:"absolute",top:"0",right:"0",_cursor:"hand",cursor:"pointer"};for(f in e)c.style[f]=e[f];b.hcObj.container.appendChild(c);b.overlayButtonActive=!0}else c&&(b.overlayButton=c.parentNode.removeChild(c),b.overlayButtonActive=
665 !1,delete b.overlayButtonMessage)},print:function(a){return this.jsVars.hcObj&&this.jsVars.hcObj.hasRendered&&this.jsVars.hcObj.print(a)},exportChart:function(a){var b=this.jsVars.hcObj;return b&&b.options&&b.options.exporting&&b.options.exporting.enabled?b.exportChart(a):!1},getSVGString:function(){return this.jsVars&&this.jsVars.hcObj&&this.jsVars.hcObj.paper&&this.jsVars.hcObj.paper.toSVG()},resize:function(){var a=this.jsVars,b=a.container,c=a.hcObj;c&&(c&&c.destroy&&c.destroy(),k.createChart(a.fcObj,
666 b,a.type,void 0,void 0,!1,!0),delete a.isResizing)},lockResize:function(a){return"boolean"!==typeof a?!!this.jsVars.resizeLocked:this.jsVars.resizeLocked=a},showChartMessage:function(a,b,c){var d=this.jsVars,f=d.hcObj;d.msgStore[a]&&(a=d.msgStore[a]);b&&f&&f.hasRendered?a?f.showMessage(a,c):f.hideLoading():(f&&f.destroy&&f.destroy(),k.createChart(d.fcObj,d.container,d.type,void 0,a));return a},signature:function(){return"FusionCharts/3.4.0 (XT)"}},Ta=k.HCstub=function(b,c,d,e){b=b.chart;var f=a(b.showborder,
667 1)?a(b.borderthickness,1):0,g=a(b.charttopmargin,e.charttopmargin,15)+f,h=a(b.chartrightmargin,e.chartrightmargin,15)+f,r=a(b.chartbottommargin,e.chartbottommargin,15)+f,f=a(b.chartleftmargin,e.chartleftmargin,15)+f,n=g+r,m=f+h;d*=0.7;c*=0.7;n>d&&(g-=(n-d)*g/n,r-=(n-d)*r/n);m>c&&(f-=(m-c)*f/m,h-=(m-c)*h/m);c={_FCconf:{0:{stack:{}},1:{stack:{}},x:{stack:{}},oriCatTmp:[],noWrap:!1,marginLeftExtraSpace:0,marginRightExtraSpace:0,marginBottomExtraSpace:0,marginTopExtraSpace:0,marimekkoTotal:0},chart:{alignTicks:!1,
668 renderTo:l,ignoreHiddenSeries:!1,events:{},reflow:!1,spacingTop:g,spacingRight:h,spacingBottom:r,spacingLeft:f,marginTop:g,marginRight:h,marginBottom:r,marginLeft:f,borderRadius:0,plotBackgroundColor:"#FFFFFF",style:{},animation:a(b.defaultanimation,b.animation,1)?{duration:500*a(b.animationduration,1)}:!1},colors:"AFD8F8 F6BD0F 8BBA00 FF8E46 008E8E D64646 8E468E 588526 B3AA00 008ED6 9D080D A186BE CC6600 FDC689 ABA000 F26D7D FFF200 0054A6 F7941C CC3300 006600 663300 6DCFF6".split(" "),credits:{href:k.CREDIT_HREF,
669 text:k.CREDIT_STRING,enabled:tb},global:{},labels:{items:[]},lang:{},legend:{enabled:!0,symbolWidth:12,borderRadius:1,backgroundColor:"#FFFFFF",initialItemX:0,title:{text:l,x:0,y:0,padding:2},scroll:{},itemStyle:{}},loading:{},plotOptions:{series:{pointPadding:0,borderColor:"#333333",events:{},animation:a(b.animation,b.defaultanimation,1)?{duration:1E3*a(b.animationduration,1)}:!1,states:{hover:{enabled:!1},select:{enabled:!1}},dataLabels:{enabled:!0,color:"#555555",style:{},formatter:function(){return this.point.showPercentValues?
670 e.numberFormatter.percentValue(this.percentage):this.point.displayValue}},point:{events:{}}},area:{states:{hover:{enabled:!1}},marker:{lineWidth:1,radius:3,states:{hover:{enabled:!1},select:{enabled:!1}}}},radar:{states:{hover:{enabled:!1}},marker:{lineWidth:1,radius:3,states:{hover:{enabled:!1},select:{enabled:!1}}}},areaspline:{states:{hover:{enabled:!1}},marker:{lineWidth:1,radius:3,states:{hover:{enabled:!1},select:{enabled:!1}}}},line:{shadow:!0,states:{hover:{enabled:!1}},marker:{lineWidth:1,
671 radius:3,states:{hover:{enabled:!1},select:{enabled:!1}}}},scatter:{states:{hover:{enabled:!1}},marker:{lineWidth:1,radius:3,states:{hover:{enabled:!1},select:{enabled:!1}}}},bubble:{states:{hover:{enabled:!1}},marker:{lineWidth:1,radius:3,states:{hover:{enabled:!1},select:{enabled:!1}}}},spline:{states:{hover:{enabled:!1}},marker:{lineWidth:1,radius:3,states:{hover:{enabled:!1},select:{enabled:!1}}}},pie:{size:"80%",allowPointSelect:!0,cursor:"pointer",point:{events:{legendItemClick:b.interactivelegend===
672 Ha?z:function(){this.slice()}}}},pie3d:{size:"80%",allowPointSelect:!0,cursor:"pointer",point:{events:{legendItemClick:b.interactivelegend===Ha?z:function(){this.slice()}}}},column:{},floatedcolumn:{},column3d:{},bar:{},bar3d:{}},point:{},series:[],subtitle:{text:l,style:{}},symbols:[],title:{text:l,style:{}},toolbar:{},tooltip:{style:{}},xAxis:{steppedLabels:{style:{}},labels:{x:0,style:{},enabled:!1},lineWidth:0,plotLines:[],plotBands:[],title:{style:{},text:l},tickWidth:0,scroll:{enabled:!1}},
673 yAxis:[{startOnTick:!1,endOnTick:!1,title:{style:{},text:l},tickLength:0,labels:{x:0,style:{}},plotBands:[],plotLines:[]},{tickLength:0,gridLineWidth:0,startOnTick:!1,endOnTick:!1,title:{style:{},text:l},labels:{x:0,style:{},enabled:!1,formatter:function(){return this.value!==kb?this.value:l}},opposite:!0,plotBands:[],plotLines:[]}],exporting:{buttons:{exportButton:{},printButton:{enabled:!1}}}};b.palettecolors&&"string"===typeof b.palettecolors&&(c.colors=b.palettecolors.split(/\s*\,\s*/));return e.hcJSON=
674 c},ab=k.placeVerticalAxis=function(b,c,d,e,f,g,h,r,n,z){var m=d[w],p=m.smartLabel,E,k,s,V,U=0,t=m.marginRightExtraSpace,v=m.marginLeftExtraSpace,P={},ha={},C={},D=b.plotLines,pa=b.plotBands,m=c.verticalAxisValuesPadding,B=isNaN(c.fixedValuesPadding)?0:c.fixedValuesPadding,H=m-B,ra=c.verticalAxisValuesPadding,ka=c.verticalAxisNamePadding,ja=c.verticalAxisNameWidth,Ia=c.rotateVerticalAxisName&&String(c.rotateVerticalAxisName).toLowerCase(),K="none"!==Ia,I=b.offset?b.offset:0,R=0,Ta=0,F=0,N=0,M=0,Ca=
675 0,T=0,ob,Ja,Ka,ma,m=2,T=h?t+5:v+4,ab=S(a(d.chart.plotBorderWidth,1),0),bb=b.showLine?b.lineThickness:ab,W=function(a,b){var f,d;a&&a.label&&void 0!==J(a.label.text)&&(Ka=a.label,Ka.style&&Ka.style!==Ja&&(Ja=Ka.style,p.setStyle(Ja)),E=p.getOriSize(a.label.text),d=(f=E.width)?f+2:0,a.isGrid?(P[b]={width:f,height:E.height,label:Ka},N<=d&&(N=d,c.lYLblIdx=b)):a.isTrend&&(h&&Ka.textAlign===da||Ka.textAlign===ea?(ha[b]={width:f,height:E.height,label:Ka},M=S(M,d)):(C[b]={width:f,height:E.height,label:Ka},
676 Ca=S(Ca,d))))},Q=function(a,c){var d,e=c?U:U+a;d=b.title.style;k=k||{};if(0<e)return K?(e<k.height&&(p.setStyle(d),k=p.getSmartText(b.title.text,f,e)),d=k.height):(e<k.width&&(p.setStyle(d),k=p.getSmartText(b.title.text,e,f)),d=k.width),b.title._actualWidth=d,b.title.text=k.text,k.tooltext&&(b.title.originalText=k.tooltext),c?e-d+a:e-d;b.title.text=l;return 0},$=function(a,b,c){for(var f in a)a[f].label.x=b,a[f].label.y=c},F=0;for(ob=pa.length;F<ob;F+=1)W(pa[F],F);F=0;for(ob=D.length;F<ob;F+=1)W(D[F],
677 F);b.title&&b.title.text!=l&&(Ja=b.title.style,p.setStyle(Ja),s=p.getOriSize(lb).height,b.title._originalText=b.title.text,K?(b.title.rotation="cw"===Ia?90:270,k=p.getSmartText(b.title.text,f,g),U=k.height,V=s):(b.title.rotation=0,k=p.getSmartText(b.title.text,void 0!==ja?ja:g,f),U=k.width,V=20));0<Ca&&(Ta=Ca+ra);n&&(e=a(e.chart.maxlabelwidthpercent,0),1<=e&&100>=e&&(n=e*n/100,N>n&&(N=n)));R=S(M,N);R+=R?H+B:0;0<U&&(R+=U+ka+T);(function(){if(Ta+R>g){ma=Ta+R-g;if(Ta){if(ra>=ma){ra-=ma;return}ma-=ra;
678 ra=0}if(H+ka>=ma)ka>=ma?ka-=ma:(H-=ma-ka,ka=0);else{ma-=H+ka;ka=H=0;if(20<Ca)if(M>N){if(Ca-M>=ma){Ca-=ma;return}if(M-Ca>=ma){M-=ma;return}M>Ca?(ma-=M-Ca,M=Ca):(ma-=Ca-M,Ca=M);if(2*(M-N)>=ma){Ca-=ma/2;M-=ma/2;return}ma-=2*(M-N);Ca=M=N}else{if(Ca-20>=ma){Ca-=ma;return}ma-=Ca-20;Ca=20}if(M>N){if(M-N>=ma){M-=ma;return}ma-=M-N;M=N}U-V>=ma?U-=ma:(ma-=U-V,U=V,Ca>=ma?Ca=0:(ma-=Ca,Ca=0,U>=ma?U=0:(ma-=U,U=0,N>=ma&&(M=N-=ma))))}}})();F=function(a,b){var c,d=0,q=b?Ca-2:Ca+a-2,e;if(0<Ca){for(e in C)Ka=C[e].label,
679 C[e].width>q?(Ka.style&&Ka.style!==Ja&&(Ja=Ka.style,p.setStyle(Ja)),c=p.getSmartText(Ka.text,q,f,!0),Ka.text=c.text,c.tooltext&&(Ka.originalText=c.tooltext),C[e].height=c.height,d=S(d,c.width)):d=S(d,C[e].width);return b?q-d+a:q-d}for(e in C)C[e].label.text=l;return 0}(0,!0);F=Q(F,!0);F=function(a){var b=0,c=S(N,M)+a-2,d;if(0<c){for(d in P)Ka=P[d].label,P[d].width>c?(Ka.style&&Ka.style!==Ja&&(Ja=Ka.style,p.setStyle(Ja)),a=p.getSmartText(Ka.text,c,f,!0),Ka.text=a.text,a.tooltext&&(Ka.originalText=
680 a.tooltext),P[d].height=a.height,b=S(b,a.width)):b=S(b,P[d].width);for(d in ha)Ka=ha[d].label,ha[d].width>c?(Ka.style&&Ka.style!==Ja&&(Ja=Ka.style,p.setStyle(Ja)),a=p.getSmartText(Ka.text,c,f,!0),Ka.text=a.text,a.tooltext&&(Ka.originalText=a.tooltext),ha[d].height=a.height,b=S(b,a.width)):b=S(b,ha[d].width);return c-b}for(d in P)P[d].label.text=l;for(d in ha)ha[d].label.text=l;return 0}(F);F=Q(F);n=c.verticalAxisNamePadding-ka;F&&n&&(F>n?(ka+=n,F-=n):(ka+=F,F=0));n=c.verticalAxisValuesPadding-(H+
681 B);F&&n&&(F>n?(H+=n,F-=n):(H+=F,F=0));n=c.verticalAxisValuesPadding-ra;F&&n&&(F>n?(ra+=n,F-=n):(ra+=F,F=0));0<Ca&&(Ta=Ca+ra);R=S(M,N);R+=R?H+B:0;0<U&&(R+=U+ka+T);n=S(M,N);n+=0<n?H+B:0;0<U?(K?U<k.height&&(k=p.getSmartText(b.title.text,f,U)):(U<k.width&&(k=p.getSmartText(b.title.text,U,f)),b.title.y=-((k.height-s)/2)),b.title.text=k.text,k.tooltext&&(b.title.originalText=k.tooltext),b.title.margin=n+ka+T+(K?U-s:U/2)):b.title.text=l;s=-(H+B+I+v+2);t=t+ra+I+2;T=S(M,N);b.labels.style&&(m=0.35*parseInt(b.labels.style.fontSize,
682 10));h?(0<Ca&&$(C,s,m),0<T&&($(P,t,m),$(ha,t,m))):(0<Ca&&$(C,t,m),0<T&&($(P,s,m),$(ha,s,m)));b.labels._textY=m;b.labels._righttX=t;b.labels._leftX=s;R=R||bb;Ta=Ta||(r?0:ab);z?(d.chart.marginLeft+=h?Ta:R-z,d.chart.marginRight+=h?R-z:Ta):(d.chart.marginLeft+=h?Ta:R,d.chart.marginRight+=h?R:Ta);return Ta+R},la=k.titleSpaceManager=function(b,c,d,e){var f=this.snapLiterals||(this.snapLiterals={}),g=c.chart,h=C(g.caption);c=C(g.subcaption);var r=g=a(g.captionpadding,10),n=b[w],m=this.smartLabel||n.smartLabel,
683 z=!1,p=0,E,k,s=0,V=0,U=0,t=0,v=b.title,P=b.subtitle,ha=S(a(b.chart.plotBorderWidth,1),0),D=0,pa=0;g<ha&&(g=ha+2);h!==l&&(E=v.style,U=a(parseInt(E.fontHeight,10),parseInt(E.lineHeight,10),12));c!==l&&(k=P.style,t=a(parseInt(k.fontHeight,10),parseInt(k.lineHeight,10),12));if(0<U||0<t)p=U+t+g,p>e?(s=p-e,z=!0,s<g?g-=s:(s-=g,g=0,t>s?(V=t-s+10,t=0,P._originalText=P.text,P.text=""):(s-=t,t=0,U>s&&(V=U-s),U=0,v._originalText=v.text,v.text=""))):V=e-p,0<U&&(m.setStyle(E),U+=V,e=m.getSmartText(h,d,U),V=U-e.height,
684 v.height=U=e.height,v.text=e.text,e.tooltext&&(v.originalText=e.tooltext),D=e.width),0<t&&(m.setStyle(k),t+=V,d=m.getSmartText(c,d,t),V=t-d.height,t=d.height,P.text=d.text,P.height=d.height,d.tooltext&&(P.originalText=d.tooltext),pa=d.width),z&&0<V&&(g+=H(r-g,V)),p=U+t+g;p=p||ha;v.isOnTop?(f.captionstarty=b.chart.marginTop,b.chart.marginTop+=p):(b.chart.marginBottom+=p,f.captionstarty=v.y=n.height-b.chart.marginBottom+g,b.chart.marginTop+=5,p+=5);v._captionWidth=D;P._subCaptionWidth=pa;v._lineHeight=
685 U;P._lineHeight=t;return p},mb=k.stepYAxisNames=function(a,b,c,d,f,e){var g=0,h=d.plotLines,r=[],n,m=d.plotLines.length;b=b[w].smartLabel;for(var z=parseFloat(N(c.basefontsize,10)),p;g<m;g+=1)c=h[g],c.isGrid&&c.label&&c.label.text&&(r.push(c),0===c.value&&(n=r.length-1));if(m=r.length)if(d.labels.style?b.setStyle(d.labels.style):r[0].label&&r[0].label.style&&b.setStyle(d.labels.style),g=b.getOriSize("W").height,e||(g+=0.4*z),a/=m-1,a<g){e=S(1,sa(g/a));for(g=a=n;g<m;g+=1)c=r[g],g===f&&((g-a)%e&&p&&
686 (p.label.text=""),a=f),c&&c.label&&((g-a)%e?c.label.text=l:p=c);for(g=a=n;0<=g;g-=1)c=r[g],g===f&&((a-g)%e&&p&&(p.label.text=""),a=f),c&&c.label&&((a-g)%e?c.label.text=l:p=c)}},Fb=k.placeHorizontalAxis=function(b,c,d,e,f,g,h){var r=d[w],n=e&&e.chart||{},m,z,p,E,k,s,V,U,t,v,P,ha,C=0,D=0,pa=10,ra=1,B=0,ka=0,ja=0,F=0,Ia=!1,R=!1,K=!1,M=a(n.labelstep,0),Ca=a(n.xaxisminlabelwidth,0),Ta=c.labelDisplay,N=c.rotateLabels,I=c.horizontalLabelPadding,ma=r.marginBottomExtraSpace,Ka=d.chart.marginLeft,Ja=d.chart.marginRight,
687 T=r.smartLabel,ob=r.plotBorderThickness,ab=c.catCount,W=c.slantLabels,Q=f/(b.max-b.min),bb=0,$=0,Fb=0,X=0,Z=e&&e.chart||{},Eb=1E3*a(Z.updateinterval,Z.refreshinterval),Bb=Z.datastreamurl,ic=Boolean(this.realtimeEnabled&&Eb&&void 0!==Bb),mb,Xb,Y,fa,ca,ga,vb,aa,ba,Gb,ib,oa,Ea,za,ta,la,ia,na,Fa,Pa,Ab,Aa,Ha,Oa,fb,xa=null,Ob=null,Qa,La,fc,Pb,Sb,gc,Lb,pc,Vb,wa,Tb,eb,Na=[],Qb=[],Db,Xa=0,yb=0,Ub,hc,nb,lc,cc,qb,db,mc=c.horizontalAxisNamePadding,Jb=0,Ya=c.staggerLines,wb=bb,kb=!1,dc,ec,lb,jb=!1,xb,tb,sb,Ac,
688 Qc,ad,qc,Lc,Tc,Dc,Uc,Mc,Rc,wc;b.labels.style&&(s=b.labels.style,T.setStyle(s),U=T.getOriSize("W"),pa=T.lineHeight,V=U.width+4,ha=T.getOriSize("WWW").width+4);b.title&&b.title.text!=l&&(s=b.title.style,T.setStyle(s),ka=T.getOriSize("W").height,b.title.rotation=0,E=T.getSmartText(b.title.text,f,g),D=E.height);Ka!=parseInt(n.chartleftmargin,10)&&(Lb=!0);Ja!=parseInt(n.chartrightmargin,10)&&(pc=!0);void 0!==n.canvaspadding&&""!==n.canvaspadding&&(jb=!0);Vb=f-h;switch(Ta){case "none":Ia=K=!0;N&&(C=W?300:
689 270,U=pa,pa=V,V=U);break;case "rotate":C=W?300:270;U=pa;pa=V;V=U;Ia=!0;break;case "stagger":R=Ia=!0;t=ya((g-ka)/pa);t<Ya&&(Ya=t);break;default:N&&(C=W?300:270,U=pa,pa=V,V=U)}r.isBar&&(Ia=!0);wa=0;Tb=b.plotLines;if(typeof d._FCconf.isXYPlot!==hb||r.isBar){mb={};ga=ca=0;Gb=ba=null;na={};kb=!0;Q=f/(b.max-b.min);xb=function(a,c,f){var e,u,g,h,r,G;G=a.plotObj;r=a.labelTextWidth;r||(k=G.label,k.style&&k.style!==s&&(s=k.style,T.setStyle(s)),r=T.getOriSize(k.text).width+4,a.oriWidth=r,r>Xb&&(r=Xb),a.labelTextWidth=
690 r,a.leftEdge=G.value*Q-r/2,a.rightEdge=G.value*Q+r/2,f&&(r=H(r,2*(z.value-b.min)*Q+d.chart.marginLeft),a.labelTextWidth=r));if(typeof c!==hb){if(f=c.plotObj,k=f.label,k.style&&k.style!==s&&(s=k.style,T.setStyle(s)),c.oriWidth?g=c.oriWidth:(g=T.getOriSize(k.text).width+4,c.oriWidth=g),g>Xb&&(g=Xb),c.labelTextWidth=g,c.leftEdge=f.value*Q-g/2,c.rightEdge=f.value*Q+g/2,e=G.value*Q,u=e+r/2,h=f.value*Q,g=h-g/2,g<u)if(e+V<h-V)u-=g,e=h-e,a.labelTextWidth=u>e?H(r,e):S(V,r-u/2),c.labelTextWidth=2*(e-a.labelTextWidth/
691 2),a.leftEdge=G.value*Q-a.labelTextWidth/2,a.rightEdge=G.value*Q+a.labelTextWidth/2,c.leftEdge=f.value*Q-c.labelTextWidth/2,c.rightEdge=f.value*Q+c.labelTextWidth/2;else return c.labelTextWidth=0,f.label.text=l,!1}else f&&(r=H(r,2*(b.max-z.value)*Q+d.chart.marginRight),a.labelTextWidth=r,a.leftEdge=G.value*Q-r/2,a.rightEdge=G.value*Q+r/2);a.nextCat=c;return!0};R?Ya>hc?Ya=hc:2>Ya&&(Ya=2):Ya=1;for(db=Tb.length;wa<db;wa+=1)(z=Tb[wa])&&z.label&&typeof z.label.text!==hb&&(z.isGrid?(fa={plotObj:z},z.isCat&&
692 (aa=wa%Ya,mb[aa]||(mb[aa]=[]),ba?(Gb=fa,mb[aa].push(Gb)):(Gb=ba=fa,mb[aa].push(ba))),Na.push(fa)):z.isTrend&&Qb.push({plotObj:z}));eb=b.plotBands;wa=0;for(db=eb.length;wa<db;wa+=1)(z=eb[wa])&&z.isTrend&&z.label&&typeof z.label.text!==hb&&Qb.push({plotObj:z});if(Na.length)if(!K&&!C)if(r.distributedColumns)for(wa=0,db=Na.length;wa<db;wa+=1)la=Na[wa],ia=wa%Ya,z=la.plotObj,z.label&&z.isCat&&(0<=wa-Ya?(oa=Na[wa-Ya],Ha=oa.plotObj.value*Q+oa.plotObj._weight*Q/2):(oa=null,Ha=b.min*Q-Ka),wa+Ya<db?(ib=Na[wa+
693 Ya],Oa=ib.plotObj.value*Q-ib.plotObj._weight*Q/2):(ib=null,Oa=b.max*Q+Ja),k=z.label,k.style&&k.style!==s&&(s=k.style,T.setStyle(s)),Ea=z.value*Q,sb=Ea-z._weight*Q/2,tb=Ea+z._weight*Q/2,1<Ya?(Pa=sb-Ha,Ab=tb+Oa,fb=tb-sb+H(Pa,Ab)):fb=tb-sb,k=z.label,k.style&&k.style!==s&&T.setStyle(k.style),fb<V&&V<T.getOriSize(k.text).width?(z.label.text=l,la.labelTextWidth=0):(la.labelTextWidth=fb,m=T.getSmartText(k.text,fb-4,g,Ia),fb=m.width+4,la.labelTextWidth=fb,X=S(X,m.height)));else{hc=Na.length;Ub=Na.length-
694 1;(Db=(Na[Ub].plotObj.value-Na[0].plotObj.value)*Q)?(Xb=0.1*Db,Y=S(0.2*Db,Db/hc)):Y=Xb=f;for(p in mb)for(wa=0,za=mb[p].length;wa<za;){for(vb=wa+1;!xb(mb[p][wa],mb[p][vb]);)vb+=1;wa=vb}ba&&(ga=(ba.plotObj.value-b.min)*Q+Ka-ba.labelTextWidth/2);z=Na[0].plotObj;ba&&z===ba.plotObj||(k=z.label,k.style&&k.style!==s&&(s=k.style,T.setStyle(s)),P=T.getOriSize(k.text).width+4,Ea=(z.value-b.min)*Q+Ka,ba&&(Qa=ga-Ea,P=Qa<P&&Qa>V/2?2*Qa:0),Na[0].labelTextWidth=P,0<P&&(U=Ea-P/2),U<ga&&(ga=U));Gb&&(P=Gb.labelTextWidth,
695 ca=(b.max-Gb.plotObj.value)*Q+Ja-P/2);z=Na[Ub].plotObj;Gb&&z===Gb.plotObj||(k=z.label,k.style&&k.style!==s&&(s=k.style,T.setStyle(s)),P=T.getOriSize(k.text).width+4,Ea=(b.max-z.value)*Q+Ja,Gb&&(Qa=Ea-ca,P=Qa<P&&Qa>V/2?2*Qa:0),Na[Ub].labelTextWidth=P,0<P&&(U=Ea-P/2),U<ca&&(ca=U));Xa=0>ga?-ga:0;yb=0>ca?-ca:0;qb=Xa+yb;if(0<qb)for(p in Vb>qb?(ta=(ta=yb*f/(yb+f))?ta+4:0,d.chart.marginRight+=ta,f-=ta,ta=(ta=Xa*f/(Xa+f))?ta+4:0,d.chart.marginLeft+=ta,f-=ta,Q=f/(b.max-b.min)):Xa<yb?Vb>=yb&&pc?(ta=(ta=yb*
696 f/(yb+f))?ta+4:0,d.chart.marginRight+=ta,f-=ta,Q=f/(b.max-b.min)):Lb&&(ta=(ta=Xa*f/(Xa+f))?ta+4:0,d.chart.marginLeft+=ta,f-=ta,Q=f/(b.max-b.min)):Vb>=Xa&&Lb?(ta=(ta=Xa*f/(Xa+f))?ta+4:0,d.chart.marginLeft+=ta,f-=ta,Q=f/(b.max-b.min)):pc&&(ta=(ta=yb*f/(yb+f))?ta+4:0,d.chart.marginRight+=ta,f-=ta,Q=f/(b.max-b.min)),Ja=d.chart.marginRight,Ka=d.chart.marginLeft,Db=(Na[Ub].plotObj.value-Na[0].plotObj.value)*Q,Xb=0.1*Db,Y=S(0.2*Db,Db/hc),mb){wa=0;for(za=mb[p].length;wa<za;){for(vb=wa+1;!xb(mb[p][wa],mb[p][vb],
697 !0);)vb+=1;wa=vb}p+=1}wa=0;for(db=Na.length;wa<db;wa+=1)if(la=Na[wa],ia=wa%Ya,z=la.plotObj,z.label)if(z.isCat)la.labelTextWidth&&(na[ia]=la);else{ib=(oa=na[ia])?oa.nextCat:mb[ia]?mb[ia][0]:null;Fa=null;if(wa>=Ya)for(Ob=wa-Ya,Fa=Na[Ob];!Fa.labelTextWidth;)if(Ob>=Ya)Ob-=Ya,Fa=Na[Ob];else{Fa=null;break}Ha=Fa?Fa.rightEdge:b.min*Q-Ka;Oa=ib?ib.leftEdge:b.max*Q+Ja;k=z.label;k.style&&k.style!==s&&(s=k.style,T.setStyle(s));P=T.getOriSize(k.text).width+4;gc=z.value*Q-P/2;if(r.isBar&&wa==db-1&&Fa)Ha>gc&&(Fa.plotObj.label.text=
698 l,Fa.labelTextWidth=0,Ha=Fa.leftEdge);else if(Ha>gc||Oa<gc+P){z.label.text=l;la.labelTextWidth=0;continue}Ha=S(Ha,gc);Ea=z.value*Q;fb=2*H(Ea-Ha,Oa-Ea);fb.toFixed&&(fb=fb.toFixed(2));k=z.label;k.style&&k.style!==s&&T.setStyle(k.style);fb<V&&V<T.getOriSize(k.text).width?(z.label.text=l,la.labelTextWidth=0):(la.labelTextWidth=fb,m=T.getSmartText(k.text,fb-4,g,Ia),fb=m.width+4,la.labelTextWidth=fb,la.leftEdge=Ea-fb/2,la.rightEdge=Ea+fb/2,X=S(X,m.height))}Fa=Aa=null;wa=0;for(db=Na.length;wa<db;wa+=1)if(la=
699 Na[wa],z=la.plotObj,ia=wa%Ya,z.isCat&&la.labelTextWidth){Fa=Aa=null;Ea=z.value*Q;if(wa>=Ya)for(Ob=wa-Ya,Fa=Na[Ob];!Fa.labelTextWidth;)if(Ob>Ya)Ob-=Ya,Fa=Na[Ob];else{Fa=null;break}Pa=Fa?Ea-Fa.rightEdge:Ea-b.min*Q+d.chart.marginLeft;if(wa+Ya<db)for(xa=wa+Ya,Aa=Na[xa];!Aa.labelTextWidth;)if(xa+Ya<db-1)xa+=Ya,Aa=Na[xa];else{Aa=null;break}Ab=Aa?Aa.leftEdge-Ea:b.max*Q+d.chart.marginRight-Ea;fb=2*H(Pa,Ab);fb>Y&&(fb=Y);fb>la.oriWidth&&(fb=la.oriWidth);la.labelTextWidth=fb;k=z.label;k.style&&k.style!==s&&
700 T.setStyle(k.style);m=T.getSmartText(k.text,fb-4,g,Ia);la.labelTextWidth=m.width+4;X=S(X,m.height);la.rightEdge=Ea+la.labelTextWidth/2}}else if(C)for(wa=0,db=Na.length;wa<db;wa+=1)if((z=Na[wa].plotObj)&&z.label&&z.label.text){k=z.label;k.style&&k.style!==s&&(s=k.style,T.setStyle(s));p=1;if(wa+p<db)for(Ac=Na[p+wa].plotObj;Ac&&(Ac.value-z.value)*Q<V;)if(z.isCat){if(Ac.label){Ac.label.text=l;p+=1;if(p+wa>=db-1)break;Ac=Tb[p+wa].plotObj}}else if(Ac.isCat){z.label.text=l;z=Ac;wa+=p-1;k=z.label;k.style&&
701 k.style!==s&&(s=k.style,T.setStyle(s));break}Fb=S(Fb,T.getOriSize(k.text).width+4)}p=0;for(db=Qb.length;p<db;p+=1)(z=Qb[p].plotObj)&&z.label&&void 0!==J(z.label.text)&&(k=z.label,k.style&&k.style!==s&&(s=k.style,T.setStyle(s)),m=T.getOriSize(k.text),k.verticalAlign===ua?bb=S(bb,m.height):$=S($,m.height))}else{for(db=Tb.length;wa<db;wa+=1)(z=Tb[wa])&&(z.isGrid?Na.push(z):z.isTrend&&Qb.push(z));eb=b.plotBands;wa=0;for(db=eb.length;wa<db;wa+=1)(z=eb[wa])&&Qb.push(z);Ub=Na.length-1;hc=Na.length;R&&(Ya>
702 hc?Ya=hc:2>Ya&&(Ya=2));if(hc)for(b.scroll&&b.scroll.viewPortMin&&b.scroll.viewPortMax?(Pb=b.scroll.viewPortMin,Sb=b.scroll.viewPortMax,pc=Lb=!1):(Pb=b.min,Sb=b.max),Db=(Na[Ub].value-Na[0].value)*Q,nb=Db/(ab-1),lc=(Na[0].value-Pb)*Q,cc=(Sb-Na[Ub].value)*Q,"auto"===Ta?nb<ha&&(C=W?300:270,U=pa,pa=V,V=U,Ia=!0):"stagger"===Ta&&(nb*=Ya),"line"!==this.defaultSeriesType&&("area"===this.defaultSeriesType?r.drawFullAreaBorder&&(ob>lc&&(Pb=b.min-=ob/(2*Q),lc+=(Na[0].value-Pb)*Q),ob>cc&&(Sb=b.max+=ob/(2*Q),cc+=
703 (Sb-Na[Ub].value)*Q)):(ob>lc&&(Pb=b.min-=ob/(2*Q),lc+=(Na[0].value-Pb)*Q),ob>cc&&(Sb=b.max+=ob/(2*Q),cc+=(Sb-Na[Ub].value)*Q))),V<Ca&&(V=Ca),ra=R||K?S(1,M):S(1,M,sa(V/nb)),r.x&&(r.x.stepValue=ra),nb*=ra,v=2*(lc+Ka),(k=Tb[0].label)&&k.text&&(k.style&&T.setStyle(k.style),P=270===C?H(nb,T.getOriSize(k.text).height+4):H(nb,T.getOriSize(k.text).width+4),P>v&&(K||(Xa=(P-v)/2),Lb||(jb&&(Xa=0),nb-=Xa/(ab-1),lb=nb*(ab-1),Q=nb,dc=(Db-lb)/Q,Sb=b.max+=dc,Pb=b.min-=dc,Xa=0,Db=lb,lc=(Na[0].value-Pb)*Q,cc=(Sb-Na[Ub].value)*
704 Q))),v=2*(cc+Ja),(k=Tb[Ub].label)&&k.text&&(k.style&&T.setStyle(k.style),P=270===C?H(nb,T.getOriSize(k.text).height+4):H(nb,T.getOriSize(k.text).width+4),P>v&&(K||(yb=(P-v)/2),pc||(jb&&(yb=0),nb-=yb/(ab-1),lb=nb*(ab-1),Q=nb,dc=(Db-lb)/Q,yb=0,Db=lb,lc=(Na[0].value-Pb)*Q,cc=(Sb-Na[Ub].value)*Q))),qb=Xa+yb,0<qb&&(Vb>qb?(ta=(ta=yb*f/(yb+f))?ta+4:0,d.chart.marginRight+=ta,f-=ta,ta=(ta=Xa*f/(Xa+f))?ta+4:0,d.chart.marginLeft+=ta,f-=ta,Q=f/(b.max-b.min)):Xa<yb?Vb>=yb&&pc?(ta=(ta=yb*f/(yb+f))?ta+4:0,d.chart.marginRight+=
705 ta,f-=ta,Q=f/(b.max-b.min)):Lb&&(ta=(ta=Xa*f/(Xa+f))?ta+4:0,d.chart.marginLeft+=ta,f-=ta,Q=f/(b.max-b.min)):Vb>=Xa&&Lb?(ta=(ta=Xa*f/(Xa+f))?ta+4:0,d.chart.marginLeft+=ta,f-=ta,Q=f/(b.max-b.min)):pc&&(ta=(ta=yb*f/(yb+f))?ta+4:0,d.chart.marginRight+=ta,f-=ta,Q=f/(b.max-b.min)),Db=(Na[Ub].value-Na[0].value)*Q,nb=Db/(ab-1),R&&(nb*=Ya),ra=R||K?S(1,M):C?S(1,M,sa(pa/nb)):S(1,M,sa(V/nb)),r.x&&(r.x.stepValue=ra),nb*=ra),p=0;p<hc;p+=1){z=Na[p];if(p%ra&&z.label){if(z.stepped=!0,z.label.style=b.steppedLabels.style,
706 !ic)continue}else z.stepped=!1,z.label.style=b.labels.style;z&&z.label&&void 0!==J(z.label.text)&&(k=z.label,k.style&&k.style!==s&&(s=k.style,T.setStyle(s)),C&&K?(m=T.getOriSize(k.text),Fb=S(Fb,m.width+4),X=S(X,m.height)):K||(m=C||R?T.getOriSize(k.text):T.getSmartText(k.text,nb-4,g,Ia),Fb=S(Fb,m.width+4),X=S(X,m.height)))}p=0;for(db=Qb.length;p<db;p+=1)(z=Qb[p])&&z.label&&void 0!==J(z.label.text)&&(k=z.label,k.style&&k.style!==s&&(s=k.style,T.setStyle(s)),m=T.getOriSize(k.text),k.verticalAlign===
707 ua?bb=S(bb,m.height):$=S($,m.height));b.scroll&&b.scroll.enabled&&!C&&!K&&(dc=Fb/2,d.chart.marginLeft<dc&&(ec=dc-d.chart.marginLeft,Vb>ec&&(f-=ec,Vb-=ec,d.chart.marginLeft+=ec)),d.chart.marginRight<dc&&(ec=dc-d.chart.marginRight,Vb>ec&&(f-=ec,Vb-=ec,d.chart.marginRight+=ec)))}K?(Jb=pa,C&&(Jb=Fb)):Jb=C?Fb:R?Ya*pa:X;0<Jb&&(wb+=I+Jb);0<D&&(wb+=D+mc);La=I-4;fc=$+wb+2;U=0;fc>g&&(Qa=fc-g,mc>Qa?(mc-=Qa,Qa=0):(Qa-=mc,mc=0,La>Qa?(La-=Qa,Qa=0):(Qa-=La,La=0),I=La+4),$>Qa?($-=Qa,Qa=0):(0<$&&(Qa-=$,$=0),0<Qa&&
708 (bb>Qa?(bb-=Qa,Qa=0):(0<bb&&(Qa-=bb,bb=0),0<Qa&&((U=D-ka)>Qa?(D-=Qa,Qa=0):(Qa-=U,D=ka,0<Qa&&((U=Jb-pa)>Qa?(Jb-=Qa,Qa=0):(Qa-=U,Jb=pa,0<Qa&&(Qa-=D+mc,D=0,0<Qa&&(Qa-=Jb,Jb=0,0<Qa&&(I-=Qa)))))))))));I+=ma;Qc=r.is3d?-d.chart.xDepth:0;ad=Jb+I;Dc=Qc;Uc=0.5*pa;B=pa+I;db=Na.length;ja=0;if(kb)if(C)for(wc=ea,qc=W?I+8:I+4,db=Na.length,p=0;p<db;p+=1)(z=Na[p].plotObj)&&z.label&&void 0!==J(z.label.text)&&(k=z.label,k.style&&k.style!==s&&(s=k.style,T.setStyle(s)),wa=1,m=T.getSmartText(k.text,Jb-4,V,Ia),k.text=m.text,
709 m.tooltext&&(k.originalText=m.tooltext),Dc=Qc+Uc/2,k.y=qc,k.x=Dc,k.rotation=C,k.textAlign=wc,ja+=1);else for(Lc=Jb,wc=Ga,qc=B,p=0;p<db;p+=ra)(z=Na[p].plotObj)&&z.label&&void 0!==J(z.label.text)&&(k=z.label,k.style&&k.style!==s&&(s=k.style,T.setStyle(s)),K||(m=T.getSmartText(k.text,Na[p].labelTextWidth-4,Lc,Ia),k.text=m.text,m.tooltext&&(k.originalText=m.tooltext),R&&(qc=B+ja%Ya*pa)),k.y=qc,k.x=Dc,k.rotation=C,k.textAlign=wc,ja+=1);else{C?(Lc=nb,Tc=Jb-4,wc=ea,qc=W?I+8:I+4):R?(Lc=pa,Tc=nb-4,wc=Ga):
710 (Lc=Jb,Tc=nb-4,wc=Ga,qc=B);for(p=0;p<db;p+=ra)(z=Na[p])&&z.label&&void 0!==J(z.label.text)&&(k=z.label,k.style&&k.style!==s&&(s=k.style,T.setStyle(s)),K||(m=T.getSmartText(k.text,Tc,Lc,Ia),k.text=m.text,m.tooltext&&(k.originalText=m.tooltext),R&&(qc=B+ja%Ya*pa)),C&&(Dc=Qc+Uc),k.y=qc,k.x=Dc,k.rotation=C,k.textAlign=wc,ja+=1);c._labelY=B;c._labelX=Qc;c._yShipment=qc;c._isStagger=R;c._rotation=C;c._textAlign=wc;c._adjustedPx=Uc;c._staggerLines=Ya;c._labelHeight=pa}db=Qb.length;for(p=Rc=Mc=0;p<db;p+=
711 1)(z=Qb[p].plotObj?Qb[p].plotObj:Qb[p])&&z.label&&void 0!==J(z.label.text)&&(k=z.label,k.style&&k.style!==s&&(s=k.style,T.setStyle(s)),k.verticalAlign===ua?(m=T.getSmartText(k.text,f,bb,!0),Rc=S(Rc,m.height),k.text=m.text,m.tooltext&&(k.originalText=m.tooltext),k.y=ad+T.getOriSize(k.text).height,k.x=Dc):(m=T.getSmartText(k.text,f,$,!0),Mc=S(Mc,m.height),k.text=m.text,m.tooltext&&(k.originalText=m.tooltext),k.y=-($-T.getOriSize("W").height+I+2)));0<D&&(T.setStyle(b.title.style),E=T.getSmartText(b.title.text,
712 f,D),b.title.text=E.text,E.tooltext&&(b.title.originalText=E.tooltext),b.title.margin=ad+Rc+mc);wb=Rc;0<Jb&&(r.horizontalAxisHeight=I+Jb-ma,wb+=r.horizontalAxisHeight);0<D&&(wb+=F=D+mc);wb=wb||I-ma;d.chart.marginBottom+=wb;0<Mc&&(d.chart.marginTop+=Mc,wb+=Mc);if(b.opposite)for(b.title.margin-=Jb-(E&&E.height||0)+I,wb-=F,d.chart.marginTop+=wb,d.chart.marginBottom-=wb,d.xAxis.opposite=1,db=Tb.length,wa=0;wa<db;wa+=1)(z=Tb[wa])&&z.isGrid&&(k=z.label)&&void 0!==k.text&&(k.textAlign=da,k.y-=qc+I+4);return wb},
713 Ja=k.configureLegendOptions=function(c,d,e,g,f){g=c.legend;var h=c.chart,r=h.is3D?Ka.chart3D:Ka.chart2D,z=h.useRoundEdges,n=a(d.legendiconscale,1),m=(parseInt(g.itemStyle.fontSize,10)||10)+1,p=this.colorManager,k;if(0>=n||5<n)n=1;g.padding=4;0>=m&&(m=1);k=3*n;m=H(m*n,f-8);0>=m&&(k=m=0);g.symbolWidth=m;g.symbolPadding=k;g.textPadding=4;g.legendHeight=f=m+2*k;g.rowHeight=S(parseInt(g.itemStyle.lineHeight,10)||12,f);e?(g.align=ea,g.verticalAlign="middle",g.layout="vertical"):g.x=(h.marginLeft-h.spacingLeft-
714 h.marginRight+h.spacingRight)/2;e=b(d.legendbordercolor,p.getColor(r.legendBorderColor));f=a(d.legendborderalpha,100);h=a(d.legendbgalpha,100);g.backgroundColor=Z(b(d.legendbgcolor,p.getColor(r.legendBgColor)),h);g.borderColor=Z(e,f);g.borderWidth=a(d.legendborderthickness,!z||d.legendbordercolor?1:0);g.shadow=Boolean(a(d.legendshadow,1));g.symbol3DLighting=Boolean(a(d.use3dlighting,d.useplotgradientcolor,1));g.shadow&&(g.shadow={enabled:g.shadow,opacity:S(f,h)/100});g.reversed=Boolean(a(d.reverselegend,
715 0)-a(this.reverseLegend,0));g.style={padding:4};Boolean(a(d.interactivelegend,1))?g.symbolStyle={_cursor:"hand",cursor:"pointer"}:(c.legend.interactiveLegend=!1,g.itemStyle.cursor="default",g.itemHoverStyle={cursor:"inherit"});g.borderRadius=a(d.legendborderradius,z?3:0);g.legendAllowDrag=Boolean(a(d.legendallowdrag,0));g.title.text=C(D(d.legendcaption,l));g.legendScrollBgColor=M(b(d.legendscrollbgcolor,d.scrollcolor,p.getColor("altHGridColor")));g.legendScrollBarColor=b(d.legendscrollbarcolor,e);
716 g.legendScrollBtnColor=b(d.legendscrollbtncolor,e)},Xb=k.placeLegendBlockRight=function(b,c,d,e,f){this.configureLegendOptions(b,c.chart,!0,f,d);var g=this.snapLiterals||(this.snapLiterals={}),h=0,r=b.series,z,n=b[w],m=this.smartLabel||n.smartLabel,p=b.chart.spacingRight,k=b.legend,E,s=k.textPadding,V=k.title.padding,U=k.symbolWidth+2*k.symbolPadding,t=2*e,v=0,P=a(c.chart.legendpadding,7);c=P+k.borderWidth/2+a(c.chart.canvasborderthickness,1);var ha=2*k.padding,C=ha,pa=!1,D=[];d-=ha+P;f&&(r=r&&r[0]&&
717 r[0].data);if(typeof r===hb||typeof r.length===hb)return 0;f=r.length;for(h=0;h<f;h+=1)(z=r[h])&&!1!==z.showInLegend&&(z.__i=h,D.push(z));D.sort(function(a,b){return a.legendIndex-b.legendIndex||a.__i-b.__i});f=D.length;E=d-U-P-s;0>E&&(E=0);m.setStyle(k.itemStyle);k.reversed&&D.reverse();for(h=0;h<f;h+=1)z=D[h],pa=!0,z._legendX=0,z._legendY=C,0===E?(C+=z._legendH=U,z.name=l):(r=m.getSmartText(z.name,E,t),z.name=r.text,r.tooltext&&(z.originalText=r.tooltext),r.height<U&&(z._legendTestY=(U-r.height)/
718 2),C+=z._legendH=S(r.height,U),v=S(r.width,v));if(pa)return k.itemWidth=v+U+P+s,k.width=k.itemWidth+ha,k.title.text!==l&&(m.setStyle(k.title.style),r=m.getSmartText(k.title.text,d,t),k.title.text=r.text,r.tooltext&&(k.title.originalText=r.tooltext),h=r.width+ha,k.width<h&&(k.initialItemX=(h-k.width)/2,k.width=h),k.initialItemY=r.height+V,C+=k.initialItemY),k.height=k.totalHeight=C,k.height>e&&(k.height=e,k.scroll.enabled=!0,k.scroll.flatScrollBars=n.flatScrollBars,k.scroll.scrollBar3DLighting=n.scrollBar3DLighting,
719 k.width+=(k.scroll.scrollBarWidth=10)+(k.scroll.scrollBarPadding=2)),g.legendstartx=n.width-p-k.width,g.legendwidth=k.width,g.legendendx=g.legendstartx+g.legendwidth,g.legendheight=k.height,c=H(k.width+c,d),b.chart.marginRight+=c+P,c;k.enabled=!1;return 0},ma=k.placeLegendBlockBottom=function(b,c,d,e,f){this.configureLegendOptions(b,c.chart,!1,f,d);var g=this.snapLiterals||(this.snapLiterals={}),h=0,r=b.series,z=b[w],k=z.smartLabel||this.smartLabel,n=b.chart,m=n.spacingBottom,p=n.spacingLeft,n=n.spacingRight,
720 E=b.legend,s,V,U=E.textPadding,t=E.title.padding,v,P=E.symbolPadding,ha=E.legendHeight,C=c.chart;v=0;var pa=2*e,D=E.rowHeight,ra=0.05*D,B=[];V=a(C.minimisewrappinginlegend,0);var C=a(parseInt(C.legendnumcolumns,10),0),ka=0,ja=0,J=0,Ia=h=0,R=2*E.padding;c=a(c.chart.legendpadding,7)+E.borderWidth/2+1;var F=R,T=!1,K=[],I=!1,M=0,Ca=0;0>C&&(C=0);d-=R;k.setStyle(E.itemStyle);h=k.getOriSize(lb).height;c=H(c,e-h-8);e-=c;f&&(r=r&&r[0]&&r[0].data);if(typeof r===hb||typeof r.length===hb)return 0;f=r.length;
721 for(h=0;h<f;h+=1)(s=r[h])&&!1!==s.showInLegend&&(s.__i=h,K.push(s));K.sort(function(a,b){return a.legendIndex-b.legendIndex||a.__i-b.__i});f=K.length;k.setStyle(E.itemStyle);for(h=0;h<f;h+=1)T=!0,s=k.getOriSize(K[h].name),ka=S(ka,s.width),ja+=s.width,J+=1;h=ja/J;r=ha+ra+U+P+R;ja+=r*J;if(T){h+=r;ka+=r;0<C&&J<C&&(C=J);ja<=d&&(0>=C||C===J)?(C=J,Ia=h=ja/J,I=!0):0<C&&(Ia=d/C)>h?Ia>ka&&(Ia=ka):d>ka&&(V||1.5*h>ka)?(C=ya(d/ka),J<C&&(C=J),Ia=ka):d>=2*h?(C=ya(d/h),J<C&&(C=J),Ia=ya(d/C),Ia>ka&&(Ia=ka)):(C=1,
722 Ia=d);E.itemWidth=Ia;V=Ia-r;0>V&&(P=V=U=0);E.symbolPadding=P;E.textPadding=U;E.width=Ia*C-ra;E.title.text!==l&&(k.setStyle(E.title.style),s=k.getSmartText(E.title.text,d,pa),E.title.text=s.text,s.tooltext&&(E.title.originalText=s.tooltext),v=s.width+R,E.width<v&&(E.initialItemX=(v-E.width)/2,E.width=v),E.initialItemY=v=s.height+t);k.setStyle(E.itemStyle);E.reversed&&K.reverse();for(h=0;h<f;h+=1){d=K[h];0===V&&(B[M]=!0,d.name=l,t=1,U=parseInt(M/C,10),P=M%C,d._legendX=P*Ia,d._legendY=U*D+R,d._legendH=
723 t*D);if(I)s=k.getOriSize(d.name),s.height<D&&(d._legendTestY=(D-s.height)/2),d._legendX=Ca,d._legendY=R,d._legendH=D,Ca+=s.width+r;else{s=k.getSmartText(d.name,V,pa);d.name=s.text;for(s.tooltext&&(d.originalText=s.tooltext);!0===B[M];)M+=1;U=s.height/D;P=M;for(t=0;t<U;t+=1,P+=C)B[P]=!0;s.height<D&&(d._legendTestY=(D-s.height)/2);U=parseInt(M/C,10);P=M%C;d._legendX=P*Ia;d._legendY=U*D+R;d._legendH=t*D}M+=1}k=I?1:sa(B.length/C);E.height=E.totalHeight=F+(k*D+v);E.rowHeight=D;E.legendNumColumns=C;E.height>
724 e&&(E.height=e,E.scroll.enabled=!0,E.scroll.flatScrollBars=z.flatScrollBars,E.scroll.scrollBar3DLighting=z.scrollBar3DLighting,E.width+=(E.scroll.scrollBarWidth=10)+(E.scroll.scrollBarPadding=2));g.legendstartx=p+0.5*(z.width-p-n-E.width)+(E.x||0);g.legendwidth=E.width;g.legendendx=g.legendstartx+g.legendwidth;g.legendstarty=z.height-m-E.height;g.legendheight=E.height;g.legendendy=g.legendstarty+g.legendheight;c+=E.height;b.chart.marginBottom+=c;return c}E.enabled=!1;return 0},bb=function(a,b){return a.value-
725 b.value},ic=function(a,b,c){var d=b._originalText;a=a[w].smartLabel;b.text=b.rotation?a.getSmartText(d,c,b._actualWidth).text:a.getSmartText(d,b._actualWidth,c).text;b.centerYAxisName=!0},Eb=k.adjustVerticalAxisTitle=function(a,b,c){if(b&&b.text){var d=b.text,f=a[w].smartLabel,e=2*H(a.chart.marginTop,a.chart.marginBottom)+c,g=c+a.chart.marginTop+a.chart.marginBottom;b.style&&f.setStyle(b.style);d=f.getOriSize(d);void 0===b.centerYAxisName&&(b.centerYAxisName=!0);b.rotation?d.width>e&&(b.y=g/2-(c/
726 2+a.chart.marginTop),b.centerYAxisName=!1):d.height>e&&(b.y=(g/2-(c/2+a.chart.marginTop))/2,b.centerYAxisName=!1)}},Bb=k.adjustVerticalCanvasMargin=function(b,c,d,e){var f=c.chart,g=c=0,h=0,r=a(f.canvastopmargin,0),f=a(f.canvasbottommargin,0),l=r/(r+f),z=b.chart.marginTop,k=b.chart.marginBottom;f>k&&(c+=f-k);r>z&&(c+=r-z);c>d?r>z&&f>k?(g=d*l,h=d*(1-l)):r>z?g=d:h=d:0<c&&(f>k&&(h=f-k),r>z&&(g=r-z));g&&(b.chart.marginTop+=g);h&&(b.chart.marginBottom+=h,e&&e.title&&(e.title.margin+=h));return g+h},vb=
727 k.adjustHorizontalCanvasMargin=function(b,c,d,e,f){var g=c.chart;c=a(g.canvasleftmargin,0);var g=a(g.canvasrightmargin,0),h=c/(c+g),r=0,l=b.chart.marginLeft,z=b.chart.marginRight,k=0,n=0;c>l&&(r+=c-l);g>z&&(r+=g-z);r>d?c>l&&g>z?(k=d*h,n=d*(1-h)):g>z?n=d:k=d:0<r&&(c>l&&(k=c-l),g>z&&(n=g-z));k&&(b.chart.marginLeft+=k,e&&e.title&&(e.title.margin+=k));n&&(b.chart.marginRight+=n,f&&f.title&&(f.title.margin+=n));return n+k},Gb=function(a,b){return a-b},ib=k.getDataParser={column:function(c,d,e){var h=c[w],
728 f=d.borderWidth;return function(r,l,z){var k=d.plotgradientcolor,n=d.is3d,m=d.isRoundEdges,p=d.plotBorderColor,E=b(r.color,d.color),s=b(r.ratio,d.ratio),w=W(d.plotBorderAlpha),V=a(r.dashed,d.dashed),U=b(r.dashlen,d.dashLen),v=b(r.dashgap,d.dashGap),P=d.use3DLighting,C=W(b(r.alpha,d.alpha)).toString(),ha={opacity:C/100},D=d.isBar,pa=d.fillAangle,ra=0>z?D?180-pa:360-pa:pa,pa=t(E+za+k,C,s,ra,m,p,H(C,w).toString(),D,n),B=V?g(U,v,f):"none";l=e.getPointStub(r,z,h.oriCatTmp[l],c,d,d.showValues,d.yAxis);
729 r=e.pointHoverOptions(r,d,{plotType:"column",is3d:n,isBar:D,use3DLighting:P,isRoundEdged:m,color:E,gradientColor:k,alpha:C,ratio:s,angle:ra,borderWidth:f,borderColor:p,borderAlpha:w,borderDashed:V,borderDashGap:v,borderDashLen:U,shadow:ha});l.y=z;l.shadow=ha;l.color=pa[0];l.borderColor=pa[1];l.borderWidth=f;l.use3DLighting=P;l.dashStyle=B;l.tooltipConstraint=e.tooltipConstraint;l.hoverEffects=r.enabled&&r.options;l.rolloverProperties=r.enabled&&r.rolloverOptions;return l}},line:function(c,d,e){var h=
730 c[w];return function(f,r,l){var z=a(f.alpha,d.lineAlpha),k={opacity:z/100},n=a(f.anchorsides,d.anchorSides,0),m=a(f.anchorborderthickness,d.anchorBorderThickness,1),p=M(b(f.anchorbordercolor,d.anchorBorderColor)),E=M(b(f.anchorbgcolor,d.anchorBgColor)),s=a(f.anchorstartangle,d.anchorStartAngle,90),w=b(f.anchoralpha,d.anchorAlpha),V=b(f.anchorbgalpha,w),U=a(f.anchorradius,d.anchorRadius),t=Boolean(a(f.anchorshadow,d.anchorShadow,0));r=e.getPointStub(f,l,h.oriCatTmp[r],c,d,d.showValues,d.yAxis);var v=
731 b(f.anchorimageurl,d.imageUrl),P=b(f.anchorimagescale,d.imageScale),C=b(f.anchorimagealpha,d.imageAlpha);r.y=l;r.shadow=k;r.anchorShadow=d.anchorShadow;r.dashStyle=a(f.dashed,d.lineDashed)?g(d.lineDashLen,d.lineDashGap,d.lineThickness):null;r.color={FCcolor:{color:M(b(f.color,d.lineColor)),alpha:z}};r.valuePosition=b(f.valueposition,d.valuePosition);l=e.pointHoverOptions(f,d,{plotType:"anchor",anchorBgColor:E,anchorAlpha:w,anchorBgAlpha:V,anchorAngle:s,anchorBorderThickness:m,anchorBorderColor:p,
732 anchorBorderAlpha:w,anchorSides:n,anchorRadius:U,imageUrl:v,imageScale:P,imageAlpha:C,shadow:k});r.marker={enabled:void 0===d.drawAnchors?0!==z:!!d.drawAnchors,shadow:t&&{opacity:w/100},fillColor:{FCcolor:{color:M(b(f.anchorbgcolor,d.anchorBgColor)),alpha:(b(f.anchorbgalpha,d.anchorBgAlpha)*w/100).toString()}},lineColor:{FCcolor:{color:M(b(f.anchorbordercolor,d.anchorBorderColor)),alpha:w}},imageUrl:v,imageScale:P,imageAlpha:C,lineWidth:a(f.anchorborderthickness,d.anchorBorderThickness),radius:a(f.anchorradius,
733 d.anchorRadius),symbol:ba(a(f.anchorsides,d.anchorSides)),startAngle:b(f.anchorstartangle,d.anchorAngle)};r.hoverEffects=l.enabled&&l.options;r.rolloverProperties=l.enabled&&l.rolloverOptions;return r}},area:function(c,d,e){var g=c[w];return function(f,h,r){var l=b(f.alpha,d.fillAlpha),z={opacity:S(l,d.lineAlpha)/100,inverted:!0},k=a(f.anchorsides,d.anchorSides,0),n=a(f.anchorborderthickness,d.anchorBorderThickness,1),m=M(b(f.anchorbordercolor,d.anchorBorderColor)),p=M(b(f.anchorbgcolor,d.anchorBgColor)),
734 E=a(f.anchorstartangle,d.anchorStartAngle,90),s=b(f.anchoralpha,d.anchorAlpha),w=b(f.anchorbgalpha,s),V=a(f.anchorradius,d.anchorRadius),U=Boolean(a(f.anchorshadow,d.anchorShadow,0));h=e.getPointStub(f,r,g.oriCatTmp[h],c,d,d.showValues,d.yAxis);var t=b(f.anchorimageurl,d.imageUrl),v=b(f.anchorimagescale,d.imageScale),P=b(f.anchorimagealpha,d.imageAlpha);h.y=r;h.shadow=z;h.anchorShadow=d.anchorShadow;h.color={FCcolor:{color:M(b(f.color,d.fillColor)),alpha:l}};h.valuePosition=b(f.valueposition,d.valuePosition);
735 r=e.pointHoverOptions(f,d,{plotType:"anchor",anchorBgColor:p,anchorAlpha:s,anchorBgAlpha:w,anchorAngle:E,anchorBorderThickness:n,anchorBorderColor:m,anchorBorderAlpha:s,anchorSides:k,anchorRadius:V,imageUrl:t,imageScale:v,imageAlpha:P,shadow:z});h.marker={enabled:d.drawAnchors,shadow:U&&{opacity:s/100},fillColor:{FCcolor:{color:M(b(f.anchorbgcolor,d.anchorBgColor)),alpha:(b(f.anchorbgalpha,d.anchorBgAlpha)*s/100).toString()}},lineColor:{FCcolor:{color:M(b(f.anchorbordercolor,d.anchorBorderColor)),
736 alpha:s}},imageUrl:t,imageScale:v,imageAlpha:P,lineWidth:a(f.anchorborderthickness,d.anchorBorderThickness),radius:V,symbol:ba(a(f.anchorsides,d.anchorSides)),startAngle:b(f.anchorstartangle,d.anchorAngle)};h.hoverEffects=r.enabled&&r.options;h.rolloverProperties=r.enabled&&r.rolloverOptions;h.events={click:d.getLink};return h}}};d.core.options.resizeTrackingInterval=300;d.core.options.preventTrackResize=!1;k.createChart=function(a,b,c,e,f,g,h){var r=a.jsVars,l=r.msgStore,z,n,m=aa[c||(c=a.chartType())],
737 p,E=r.hasNativeMessage,s;s=function(f){var g={renderer:"javascript"},l=r.fcObj,z=l.width,n=l.height,s=m&&m.eiMethods,O=r.overlayButton,w;b.jsVars=a.jsVars;r.container=b;r.hcObj=f;r.type=c;r.width=b.offsetWidth;r.height=b.offsetHeight;r.instanceAPI=p;if(f.hasRendered){d.extend(b,ob);if(s&&"string"!==typeof s)for(w in s)b[w]=s[w];r.overlayButtonActive&&O&&(O.innerHTML="",O.appendChild(v.createTextNode(r.overlayButtonMessage)),f.container.appendChild(O))}(/\%/g.test(z)||/\%/g.test(n))&&b&&b.parentNode&&
738 !d.core.options.preventTrackResize&&T(l,b);e&&(e({success:f.hasRendered,ref:b,id:a.id}),f.hasRendered&&(k.raiseEvent("loaded",{type:c,renderer:"javascript"},a,[a.id]),E||(l.__state.firstRenderNotified=!0,setTimeout(function(){k.raiseEvent("rendered",{renderer:"javascript"},l,[l.id])},0))));f.hasRendered&&r.previousDrawCount<r.drawCount&&(g.width=r.width,g.height=r.height,g.drawCount=r.drawCount,g.displayingMessage=E,g.renderer=l.options.renderer,k.raiseEvent("drawcomplete",g,l,[l.id]),E||h||setTimeout(function(){l.__state.firstRenderNotified||
739 k.raiseEvent("rendered",{renderer:"javascript"},l,[l.id]);d.raiseEvent("renderComplete",g,l)},0))};r.instanceAPI&&r.instanceAPI.dispose&&r.instanceAPI.dispose();p=m?new aa(c):new aa("stub");p.chartInstance=a;p.origRenderWidth=a.__state.renderedWidth;p.origRenderHeight=a.__state.renderedHeight;void 0!==f?"string"===typeof f&&(f=new ha(b,f,a),E=r.hasNativeMessage=!0):!m||!m.init||m&&"stub"===m.name?(f=new ha(b,l.ChartNotSupported,a),E=r.hasNativeMessage=!0):r.message?(f=new ha(b,r.message,a),E=r.hasNativeMessage=
740 !0):r.loadError?(f=new ha(b,l.LoadDataErrorText,a),E=r.hasNativeMessage=!0):r.stallLoad?(f=new ha(b,l.XMLLoadingText,a),E=r.hasNativeMessage=!0):(d.raiseEvent("internal.drawStart",{chartType:c,logicName:p.name,logicBase:p.base&&p.base.name,defaultSeriesType:p.defaultSeriesType},a),z=a.jsVars&&a.jsVars.themeObject&&a.jsVars.themeObject.getThemedJSONData()||a.getChartData(d.dataFormats.JSON,!0),n=z.data,z.error instanceof Error?(f=new ha(b,l.InvalidXMLText,a),E=r.hasNativeMessage=!0,a.__state.dataReady=
741 !1,h||d.raiseEvent("dataInvalid",{error:z.error},r.fcObj,void 0,function(){k.raiseEvent("dataxmlinvalid",{},a,[a.id])})):(h||k.raiseEvent("dataloaded",{},a,[a.id]),f=p.init(b,n,a,s),p.inited=!0,r.previousDrawCount=r.drawCount,r.drawCount+=1,0===f.series.length?(f=new ha(b,l.ChartNoDataText,a),E=r.hasNativeMessage=!0,a.__state.dataReady=!1,h||k.raiseEvent("nodatatodisplay",{},a,[a.id])):(a.__state.dataReady=!0,E=r.hasNativeMessage=!1,delete r.message)));f||(f=new ha(b,"Error rendering chart {0x01}",
742 a),E=r.hasNativeMessage=!0);E&&!p.inited&&p.init(b,n,a,s);f.chart=f.chart||{};f.chart.renderTo=b;f.credits=f.credits||{};f.credits.enabled=m&&!0===m.creditLabel?!0:!1;!1===g&&(f.chart.animation=!1,(f.plotOptions||(f.plotOptions={}))&&(f.plotOptions.series||(f.plotOptions.series={})),f.plotOptions.series.animation=!1);b.style&&(f.chart.containerBackgroundColor=k.getContainerBackgroundColor(a));return p.draw(f,s)};aa("base",{useScaleRecursively:!0,tooltipConstraint:"chart",rendererId:"root",canvasPaddingModifiers:["anchor",
743 "anchorlabel"],drawAnnotations:!0,draw:function(a,b){var c=this.renderer;c||(c=this.renderer=new aa("renderer."+this.rendererId));this.updateDefaultAnnotations();return c.init(this,a,b)},init:function(b,c,d){var g=this.chartInstance||d,f=g.jsVars;d=f._reflowData||(f._reflowData={});var h=f._reflowClean,r,l;this.dataObj=c=e({},c);l=c.chart=c.chart||c.graph||c.map||{};delete c.graph;delete c.map;d&&!this.stateless&&(r=d.hcJSON,delete d.hcJSON,e(this,d,!0),this.preReflowAdjustments&&this.preReflowAdjustments.call(this),
744 d.hcJSON=r);this.containerElement=b;this.config={};this.smartLabel=f.smartLabel;this.smartLabel.useEllipsesOnOverflow(a(l.useellipseswhenoverflow,l.useellipsewhenoverflow,1));this.colorManager=new k.colorManager(c,this);this.linkClickFN=U(c,g);this.numberFormatter=new V(c.chart,this);if(!this.standaloneInit)return new k.createDialog(b,f.msgStore.ChartNotSupported,g);b=this.chart(b.offsetWidth||parseFloat(b.style.width),b.offsetHeight||parseFloat(b.style.height),g);d&&!this.stateless&&(d.hcJSON&&e(b,
745 d.hcJSON,!0),this.postReflowAdjustments&&this.postReflowAdjustments.call(this),h&&this.cleanedData&&(this.cleanedData(this,h),this.cleanedData(d,h)));return b},postSpaceManager:function(){var b=this.hcJSON,c=b._FCconf,d=b.chart,e=d.marginLeft,f=d.spacingLeft,g=d.spacingRight,h=c.width-e-d.marginRight,r=b.title,b=b.subtitle,l=c.width,z=r.align,c=r.x,k=r.horizontalPadding,n=r.alignWithCanvas,m=(xa(e)||0)+a(h,l)/2,e=this.snapLiterals||(this.snapLiterals={}),h=r._captionWidth,p=b._subCaptionWidth,E=r._lineHeight,
746 s=b._lineHeight,w=r.text;if(void 0===c){switch(z){case ea:c=n?l-d.marginRight-k:l-k;break;case da:c=n?d.marginLeft+k:k;break;default:c=n?m:f+0.5*(l-f-g)||l/2}r.align===da?(g=f=0,r.align="start"):r.align===ea?(f=h,g=p,r.align="end"):(f=h/2,g=p/2,r.align="middle");r.x=c;r.y=r.y||d.spacingTop||0;b.y=w?r.y+E+2:r.y||d.spacingTop||0;e.captionstartx=c-f-2;e.captionwidth=h+4;e.captionendx=e.captionstartx+e.captionwidth;e.captionstarty=r.y||0;e.captionheight=E+2;e.captionendy=e.captionstarty+e.captionheight;
747 e.subcaptionstartx=c-g-2;e.subcaptionwidth=p+4;e.subcaptionendx=e.subcaptionstartx+e.subcaptionwidth;e.subcaptionstarty=b.y||0;e.subcaptionheight=s+2;e.subcaptionendy=e.subcaptionstarty+e.subcaptionheight}},chart:function(c,u){var A=this.name,G=this.dataObj,f=G.chart,z=this.colorManager,k,n,m,s,V,U,t,v=this.defaultSeriesType,P,ha,ra,H,ka,ja,R,K,T,F,I,Ca,Q,ma,Ja,ob,ab,bb,W,X,Fb,mb,Eb,Bb,Xb,ic,Y,ca,vb,ga,ba,Gb,aa,la,ib,sa,Aa,ya,xa,Nb,pb,cb,Yb,ub,hb,zb,lb,rb,Wa,Rb,Zb,Ea,Cb,ta,$b,Wb,jb,Fa,Hb,Ab,rc,sc,
748 vc,fb,kb,Ob,Qa,tb,fc,Pb,Sb,gc,Lb,pc,Vb,wa,Tb,sb,Na,Qb,Db,Xa,yb,Ub,hc,nb,lc,cc,fd,db,mc,Jb,Ya,wb,Yc,dc,ec,Zc,$c;k=Ta(G,c,u,this);T=k.chart;K=k.xAxis;P=k[w];this.snapLiterals||(this.snapLiterals={});I=this.snapLiterals;I.chartstartx=0;I.chartstarty=0;I.chartwidth=c;I.chartheight=u;I.chartendx=c;I.chartendy=u;I.chartcenterx=c/2;I.chartcentery=u/2;I.chartbottommargin=T.spacingBottom;I.chartleftmargin=T.spacingLeft;I.chartrightmargin=T.spacingRight;I.charttopmargin=T.spacingTop;this.updateSnapPoints&&
749 this.updateSnapPoints();this.postHCJSONCreation&&this.postHCJSONCreation.call(this,k);d.raiseEvent("internal.postlogic",this,this.chartInstance);k.labels.smartLabel=U=P.smartLabel=this.smartLabel;P.width=c;P.height=u;ra=k.plotOptions;P.isDual=this.isDual;P.numberFormatter=this.numberFormatter;P.axisGridManager=new E(v,f);P.tooltext=f.plottooltext;P.trendLineToolText=f.trendlinetooltext;T.is3D=n=P.is3d=/3d$/.test(v);T.isBar=ha=P.isBar=this.isBar;t=/^pie/.test(v);R=1==f.useroundedges;ja=n?Ka.chart3D:
750 Ka.chart2D;T.events.click=k.plotOptions.series.point.events.click=this.linkClickFN;T.defaultSeriesType=v;ob=0<f.palette&&6>f.palette?f.palette:a(this.paletteIndex,1);ob-=1;T.paletteIndex=ob;T.usePerPointLabelColor=f.colorlabelsfromplot==La;T.syncLabelWithAnchor=a(f.synclabelwithanchoronhover,1);T.useRoundEdges=R&&!n&&!this.distributedColumns&&"pie"!==this.defaultSeriesType;void 0!==b(f.clickurl)&&(T.link=f.clickurl,T.style.cursor="pointer",k.plotOptions.series.point.events.click=function(){T.events.click.call({link:f.clickurl})});
751 ab=b(f.basefont,"Verdana,sans");bb=N(f.basefontsize,10);W=b(f.basefontcolor,z.getColor(ja.baseFontColor));X=b(f.outcnvbasefont,ab);Fb=N(f.outcnvbasefontsize,bb);mb=Fb+Pa;Eb=b(f.outcnvbasefontcolor,W).replace(/^#?([a-f0-9]+)/ig,"#$1");ic=bb;bb+=Pa;W=W.replace(/^#?([a-f0-9]+)/ig,"#$1");P.trendStyle=P.outCanvasStyle={fontFamily:X,color:Eb,fontSize:mb};Bb=h(P.trendStyle);P.inCanvasStyle={fontFamily:ab,fontSize:bb,color:W};Xb=h(P.inCanvasStyle);P.divlineStyle={fontFamily:ab,fontSize:bb,color:W,lineHeight:Xb};
752 K.labels.style={fontFamily:X,fontSize:mb,lineHeight:Bb,color:Eb};K.steppedLabels.style={fontFamily:X,fontSize:mb,lineHeight:Bb,color:Eb,visibility:"hidden"};k.yAxis[0].labels.style={fontFamily:X,fontSize:mb,lineHeight:Bb,color:Eb};k.yAxis[1].labels.style={fontFamily:X,fontSize:mb,lineHeight:Bb,color:Eb};ca=b(f.legenditemfont,X);vb=N(f.legenditemfontsize,Fb);ga=b(f.legenditemfontcolor,Eb).replace(/^#?([a-f0-9]+)/ig,"#$1");ba=Ia[a(f.legenditemfontbold,0)]||"";Y=N(f.legendcaptionfontsize,Fb)+Pa;vb+=
753 Pa;k.legend.itemStyle={fontFamily:ca,fontSize:vb,color:ga,fontWeight:ba};h(k.legend.itemStyle);k.legend.itemHiddenStyle={fontFamily:ca,fontSize:vb,color:b(f.legenditemhiddencolor,"cccccc").replace(/^#?([a-f0-9]+)/ig,"#$1"),fontWeight:ba};h(k.legend.itemHiddenStyle);k.legend.itemHoverStyle={color:b(f.legenditemhoverfontcolor,ga).replace(/^#?([a-f0-9]+)/ig,"#$1")};k.legend.title.style={fontFamily:b(f.legendcaptionfont,ca),fontSize:Y,color:b(f.legendcaptionfontcolor,Eb).replace(/^#?([a-f0-9]+)/ig,"#$1"),
754 fontWeight:Ia[a(f.legendcaptionfontbold,1)]||""};h(k.legend.title.style);k.legend.title.align=xb[f.legendcaptionalignment&&f.legendcaptionalignment.toLowerCase()||Ga]||xb.center;F=(F=D(f.valuebordercolor,l))?Z(F,a(f.valueborderalpha,f.valuealpha,100)):l;k.plotOptions.series.dataLabels.style={fontFamily:b(f.valuefont,ab),fontSize:b(f.valuefontsize,parseInt(bb,10))+Pa,lineHeight:Xb,color:Z(b(f.valuefontcolor,W),a(f.valuefontalpha,f.valuealpha,100)),fontWeight:a(f.valuefontbold)?"bold":"normal",fontStyle:a(f.valuefontitalic)?
755 "italic":"normal",border:F||f.valuebgcolor?a(f.valueborderthickness,1)+"px solid":"",borderColor:F,borderThickness:a(f.valueborderthickness,1),borderPadding:a(f.valueborderpadding,2),borderRadius:a(f.valueborderradius,0),backgroundColor:f.valuebgcolor?Z(f.valuebgcolor,a(f.valuebgalpha,f.valuealpha,100)):l,borderDash:a(f.valueborderdashed,0)?g(a(f.valueborderdashlen,4),a(f.valueborderdashgap,2),a(f.valueborderthickness,1)):"none"};h(k.plotOptions.series.dataLabels.style);k.plotOptions.series.dataLabels.color=
756 k.plotOptions.series.dataLabels.style.color;k.tooltip.style={fontFamily:ab,fontSize:bb,lineHeight:Xb,color:W};k.title.style={fontFamily:b(f.captionfont,X),color:b(f.captionfontcolor,Eb).replace(/^#?([a-f0-9]+)/ig,"#$1"),fontSize:a(f.captionfontsize,Fb+3)+Pa,fontWeight:0===a(f.captionfontbold)?"normal":"bold"};k.title.align=b(f.captionalignment,Ga);k.title.isOnTop=a(f.captionontop,1);k.title.alignWithCanvas=a(f.aligncaptionwithcanvas,this.alignCaptionWithCanvas,1);k.title.horizontalPadding=a(f.captionhorizontalpadding,
757 k.title.alignWithCanvas?0:15);h(k.title.style);k.subtitle.style={fontFamily:b(f.subcaptionfont,f.captionfont,X),color:b(f.subcaptionfontcolor,f.captionfontcolor,Eb).replace(/^#?([a-f0-9]+)/ig,"#$1"),fontSize:a(f.subcaptionfontsize,a(S(a(f.captionfontsize)-3,-1),Fb)+a(this.subTitleFontSizeExtender,1))+Pa,fontWeight:0===a(f.subcaptionfontbold,this.subTitleFontWeight,f.captionfontbold)?"normal":"bold"};k.subtitle.align=k.title.align;k.subtitle.isOnTop=k.title.isOnTop;k.subtitle.alignWithCanvas=k.title.alignWithCanvas;
758 k.subtitle.horizontalPadding=k.title.horizontalPadding;h(k.subtitle.style);F=(F=D(f.xaxisnamebordercolor,l))?Z(F,a(f.xaxisnameborderalpha,f.xaxisnamealpha,100)):l;K.title.style={fontFamily:b(f.xaxisnamefont,X),fontSize:b(f.xaxisnamefontsize,parseInt(mb,10))+Pa,color:Z(b(f.xaxisnamefontcolor,Eb),a(f.xaxisnamefontalpha,f.xaxisnamealpha,100)),fontWeight:a(f.xaxisnamefontbold,1)?"bold":"normal",fontStyle:a(f.xaxisnamefontitalic)?"italic":"normal",border:F||f.xaxisnamebgcolor?a(f.xaxisnameborderthickness,
759 1)+"px solid":void 0,borderColor:F,borderThickness:a(f.xaxisnameborderthickness,1),borderPadding:a(f.xaxisnameborderpadding,2),borderRadius:a(f.xaxisnameborderradius,0),backgroundColor:f.xaxisnamebgcolor?Z(f.xaxisnamebgcolor,a(f.xaxisnamebgalpha,f.xaxisnamealpha,100)):l,borderDash:a(f.xaxisnameborderdashed,0)?g(a(f.xaxisnameborderdashlen,4),a(f.xaxisnameborderdashgap,2),a(f.xaxisnameborderthickness,1)):"none"};h(K.title.style);F=(F=b(f.pyaxisnamebordercolor,f.yaxisnamebordercolor,l))?Z(F,a(f.pyaxisnameborderalpha,
760 f.yaxisnameborderalpha,f.pyaxisnamealpha,f.yaxisnamealpha,100)):l;k.yAxis[0].title.style={fontFamily:b(f.pyaxisnamefont,f.yaxisnamefont,X),fontSize:b(f.pyaxisnamefontsize,f.yaxisnamefontsize,parseInt(mb,10))+Pa,color:Z(b(f.pyaxisnamefontcolor,f.yaxisnamefontcolor,Eb),a(f.pyaxisnamefontalpha,f.yaxisnamefontalpha,f.pyaxisnamealpha,f.yaxisnamealpha,100)),fontWeight:a(f.pyaxisnamefontbold,f.yaxisnamefontbold,1)?"bold":"normal",fontStyle:a(f.pyaxisnamefontitalic,f.yaxisnamefontitalic)?"italic":"normal",
761 border:F||f.pyaxisnamebgcolor||f.yaxisnamebgcolor?a(f.pyaxisnameborderthickness,f.yaxisnameborderthickness,1)+"px solid":void 0,borderColor:F,borderThickness:a(f.pyaxisnameborderthickness,f.yaxisnameborderthickness,1),borderPadding:a(f.pyaxisnameborderpadding,f.yaxisnameborderpadding,2),borderRadius:a(f.pyaxisnameborderradius,f.yaxisnameborderradius,0),backgroundColor:f.pyaxisnamebgcolor||f.yaxisnamebgcolor?Z(b(f.pyaxisnamebgcolor,f.yaxisnamebgcolor),a(f.pyaxisnamebgalpha,f.yaxisnamebgalpha,f.pyaxisnamealpha,
762 f.yaxisnamealpha,100)):l,borderDash:a(f.pyaxisnameborderdashed,f.yaxisnameborderdashed,0)?g(a(f.pyaxisnameborderdashlen,f.yaxisnameborderdashlen,4),a(f.pyaxisnameborderdashgap,f.yaxisnameborderdashgap,2),a(f.pyaxisnameborderthickness,f.yaxisnameborderthickness,1)):"none"};h(k.yAxis[0].title.style);k.yAxis[1].title.style={fontFamily:X,color:Eb,fontSize:mb,lineHeight:void 0,fontWeight:"bold"};F=(F=b(f.syaxisnamebordercolor,f.yaxisnamebordercolor,l))?Z(F,a(f.syaxisnameborderalpha,f.yaxisnameborderalpha,
763 f.syaxisnamealpha,f.yaxisnamealpha,100)):l;k.yAxis[1].title.style={fontFamily:b(f.syaxisnamefont,f.yaxisnamefont,X),fontSize:b(f.syaxisnamefontsize,f.yaxisnamefontsize,parseInt(mb,10))+Pa,color:Z(b(f.syaxisnamefontcolor,f.yaxisnamefontcolor,Eb),a(f.syaxisnamefontalpha,f.yaxisnamefontalpha,f.syaxisnamealpha,f.yaxisnamealpha,100)),fontWeight:a(f.syaxisnamefontbold,f.yaxisnamefontbold,1)?"bold":"normal",fontStyle:a(f.syaxisnamefontitalic,f.yaxisnamefontitalic)?"italic":"normal",border:F||f.syaxisnamebgcolor||
764 f.yaxisnamebgcolor?a(f.syaxisnameborderthickness,f.yaxisnameborderthickness,1)+"px solid":void 0,borderColor:F,borderThickness:a(f.syaxisnameborderthickness,f.yaxisnameborderthickness,1),borderPadding:a(f.syaxisnameborderpadding,f.yaxisnameborderpadding,2),borderRadius:a(f.syaxisnameborderradius,f.yaxisnameborderradius,0),backgroundColor:f.syaxisnamebgcolor||f.yaxisnamebgcolor?Z(b(f.syaxisnamebgcolor,f.yaxisnamebgcolor),a(f.syaxisnamebgalpha,f.yaxisnamebgalpha,f.syaxisnamealpha,f.yaxisnamealpha,100)):
765 l,borderDash:a(f.syaxisnameborderdashed,f.yaxisnameborderdashed,0)?g(a(f.syaxisnameborderdashlen,f.yaxisnameborderdashlen,4),a(f.syaxisnameborderdashgap,f.yaxisnameborderdashgap,2),a(f.syaxisnameborderthickness,f.yaxisnameborderthickness,1)):"none"};h(k.yAxis[1].title.style);T.overlapColumns=a(f[ha&&"overlapbars"||"overlapcolumns"],n?0:1);k.orphanStyles={defaultStyle:{style:e({},P.inCanvasStyle)},connectorlabels:{style:e({},k.plotOptions.series.dataLabels)},vyaxisname:{style:e({},k.yAxis[0].title.style)}};
766 k.plotOptions.series.dataLabels.tlLabelStyle={fontFamily:J(f.tlfont,ab),color:M(J(f.tlfontcolor,W)),fontSize:N(f.tlfontsize,ic)+"px"};h(k.plotOptions.series.dataLabels.tlLabelStyle);k.plotOptions.series.dataLabels.trLabelStyle={fontFamily:J(f.trfont,ab),color:M(J(f.trfontcolor,W)),fontSize:N(f.trfontsize,ic)+"px"};h(k.plotOptions.series.dataLabels.trLabelStyle);k.plotOptions.series.dataLabels.blLabelStyle={fontFamily:J(f.blfont,ab),color:M(J(f.blfontcolor,W)),fontSize:N(f.blfontsize,ic)+"px"};h(k.plotOptions.series.dataLabels.blLabelStyle);
767 k.plotOptions.series.dataLabels.brLabelStyle={fontFamily:J(f.brfont,ab),color:M(J(f.brfontcolor,W)),fontSize:N(f.brfontsize,ic)+"px"};h(k.plotOptions.series.dataLabels.brLabelStyle);this.parseStyles(k);delete k.xAxis.labels.style.backgroundColor;delete k.xAxis.labels.style.borderColor;delete k.yAxis[0].labels.style.backgroundColor;delete k.yAxis[0].labels.style.borderColor;delete k.yAxis[1].labels.style.backgroundColor;delete k.yAxis[1].labels.style.borderColor;P.showTooltip=a(f.showtooltip,this.showtooltip,
768 1);P.tooltipSepChar=b(f.tooltipsepchar,this.tooltipsepchar,qb);P.showValues=a(f.showvalues,this.showValues,1);P.seriesNameInToolTip=a(f.seriesnameintooltip,1);P.showVLines=a(f.showvlines,1);P.showVLinesOnTop=a(f.showvlinesontop,0);P.showVLineLabels=a(f.showvlinelabels,this.showVLineLabels,1);P.showVLineLabelBorder=a(f.showvlinelabelborder,1);P.rotateVLineLabels=a(f.rotatevlinelabels,0);P.vLineColor=b(f.vlinecolor,"333333");P.vLineLabelColor=b(f.vlinelabelcolor);P.vLineThickness=b(f.vlinethickness,
769 1);P.vLineAlpha=a(f.vlinealpha,80);P.vLineLabelBgColor=b(f.vlinelabelbgcolor,"ffffff");P.vLineLabelBgAlpha=a(f.vlinelabelbgalpha,n?50:100);P.trendlineColor=b(f.trendlinecolor,"333333");P.trendlineThickness=b(f.trendlinethickness,1);P.trendlineAlpha=a(f.trendlinealpha);P.showTrendlinesOnTop=b(f.showtrendlinesontop,0);P.trendlineValuesOnOpp=b(f.trendlinevaluesonopp,f.trendlinevaluesonright,0);P.trendlinesAreDashed=a(f.trendlinesaredashed,0);P.trendlinesDashLen=a(f.trendlinedashlen,5);P.trendlinesDashGap=
770 a(f.trendlinedashgap,2);P.showTrendlines=a(f.showtrendlines,1);P.showTrendlineLabels=a(f.showtrendlinelabels,this.showTrendlineLabels,1);P.flatScrollBars=a(f.flatscrollbars,0);P.scrollBar3DLighting=a(f.scrollbar3dlighting,1);T.anchorTrackingRadius=a(f.anchortrackingradius,pa?$:p);k.plotOptions.series.connectNullData=a(f.connectnulldata,0);T.backgroundColor={FCcolor:{color:b(f.bgcolor,z.getColor(ja.bgColor)),alpha:b(f.bgalpha,z.getColor(ja.bgAlpha)),angle:b(f.bgangle,z.getColor(ja.bgAngle)),ratio:b(f.bgratio,
771 z.getColor(ja.bgRatio))}};T.rotateValues=a(f.rotatevalues,0);T.placeValuesInside=a(f.placevaluesinside,0);T.valuePosition=b(f.valueposition,"auto");T.valuePadding=a(f.valuepadding,2);T.managePlotOverflow=a(f.manageplotoverflow,1);T.borderColor=Z(b(f.bordercolor,n?"#666666":z.getColor("borderColor")),b(f.borderalpha,n?"100":z.getColor("borderAlpha")));H=a(f.showborder,n?0:1);T.borderWidth=H?a(f.borderthickness,1):0;T.borderRadius=a(f.borderradius,0);T.borderDashStyle=a(f.borderdashed,0)?g(a(f.borderdashlen,
772 4),a(f.borderdashgap,2),T.borderWidth):void 0;T.plotBorderColor=Z(b(f.canvasbordercolor,z.getColor("canvasBorderColor")),b(f.canvasborderalpha,z.getColor("canvasBorderAlpha")));"0"!==f.showcanvasborder&&(ka=Boolean(b(f.canvasborderthickness,R?0:1)),"1"!==f.showaxislines&&"1"!==f.showxaxisline&&"1"!==f.showyaxisline&&"1"!==f.showsyaxisline||"1"===f.showcanvasborder||(ka=0));T.plotBorderWidth=n||!ka?0:a(f.canvasborderthickness,this.canvasborderthickness,T.useRoundEdges?1:2);T.bgSWF=b(f.bgimage,f.bgswf);
773 T.bgSWFAlpha=a(f.bgimagealpha,f.bgswfalpha,100);Gb=b(f.bgimagedisplaymode,"none").toLowerCase();aa=J(f.bgimagevalign,l).toLowerCase();la=J(f.bgimagehalign,l).toLowerCase();"tile"==Gb||"fill"==Gb||"fit"==Gb?(aa!=oa&&"middle"!=aa&&aa!=ua&&(aa="middle"),la!=da&&"middle"!=la&&la!=ea&&(la="middle")):(aa!=oa&&"middle"!=aa&&aa!=ua&&(aa=oa),la!=da&&"middle"!=la&&la!=ea&&(la=da));T.bgImageDisplayMode=Gb;T.bgImageVAlign=aa;T.bgImageHAlign=la;T.bgImageScale=a(f.bgimagescale,100);T.logoURL=J(f.logourl);T.logoPosition=
774 b(f.logoposition,"tl").toLowerCase();T.logoAlpha=a(f.logoalpha,100);T.logoLink=J(f.logolink);T.logoScale=a(f.logoscale,100);T.logoLeftMargin=a(f.logoleftmargin,0);T.logoTopMargin=a(f.logotopmargin,0);ib=T.toolbar={button:{}};sa=ib.button;sa.scale=a(f.toolbarbuttonscale,1.15);sa.width=a(f.toolbarbuttonwidth,15);sa.height=a(f.toolbarbuttonheight,15);sa.radius=a(f.toolbarbuttonradius,2);sa.spacing=a(f.toolbarbuttonspacing,5);sa.fill=Z(b(f.toolbarbuttoncolor,"ffffff"));sa.labelFill=Z(b(f.toolbarlabelcolor,
775 "cccccc"));sa.symbolFill=Z(b(f.toolbarsymbolcolor,"ffffff"));sa.hoverFill=Z(b(f.toolbarbuttonhovercolor,"ffffff"));sa.stroke=Z(b(f.toolbarbuttonbordercolor,"bbbbbb"));sa.symbolStroke=Z(b(f.toolbarsymbolbordercolor,"9a9a9a"));sa.strokeWidth=a(f.toolbarbuttonborderthickness,1);sa.symbolStrokeWidth=a(f.toolbarsymbolborderthickness,1);Aa=sa.symbolPadding=a(f.toolbarsymbolpadding,5);sa.symbolHPadding=a(f.toolbarsymbolhpadding,Aa);sa.symbolVPadding=a(f.toolbarsymbolvpadding,Aa);ya=ib.position=b(f.toolbarposition,
776 "tr").toLowerCase();switch(ya){case "tr":case "rt":case "top right":case "right top":ya="tr";break;case "br":case "rb":case "bottom right":case "right bottom":ya="br";break;case "tl":case "lt":case "top left":case "left top":ya="tl";break;case "bl":case "lb":case "bottom left":case "left bottom":ya="bl";break;default:ya="tr"}xa=ib.hAlign="left"===(l+f.toolbarhalign).toLowerCase()?"l":ya.charAt(1);Nb=ib.vAlign="bottom"===(l+f.toolbarvalign).toLowerCase()?"b":ya.charAt(0);ib.hDirection=a(f.toolbarhdirection,
777 "r"===xa?-1:1);ib.vDirection=a(f.toolbarvdirection,"b"===Nb?-1:1);ib.vMargin=a(f.toolbarvmargin,6);ib.hMargin=a(f.toolbarhmargin,10);ib.x=a(f.toolbarx,"l"===xa?0:c);ib.y=a(f.toolbary,"t"===Nb?0:u);pb=b(f.divlinecolor,z.getColor(ja.divLineColor));cb=b(f.divlinealpha,n?z.getColor("divLineAlpha3D"):z.getColor("divLineAlpha"));Yb=a(f.divlinethickness,1);ub=Boolean(a(f.divlinedashed,f.divlineisdashed,this.divLineIsDashed,0));hb=a(f.divlinedashlen,4);zb=a(f.divlinedashgap,2);k.yAxis[0].gridLineColor=Z(pb,
778 cb);k.yAxis[0].gridLineWidth=Yb;k.yAxis[0].gridLineDashStyle=ub?g(hb,zb,Yb):"none";k.yAxis[0].alternateGridColor=ha?Z(b(f.alternatevgridcolor,z.getColor("altVGridColor")),1===a(f.showalternatevgridcolor,1)?b(f.alternatevgridalpha,z.getColor("altVGridAlpha")):Ha):Z(b(f.alternatehgridcolor,z.getColor("altHGridColor")),"0"===f.showalternatehgridcolor?0:b(f.alternatehgridalpha,z.getColor("altHGridAlpha")));Ab=a(f.vdivlinethickness,1);rc=Boolean(a(f.vdivlinedashed,f.vdivlineisdashed,0));sc=a(f.vdivlinedashlen,
779 4);vc=a(f.vdivlinedashgap,2);K.gridLineColor=Z(b(f.vdivlinecolor,z.getColor(ja.divLineColor)),b(f.vdivlinealpha,z.getColor("divLineAlpha")));K.gridLineWidth=Ab;K.gridLineDashStyle=rc?g(sc,vc,Ab):"none";K.alternateGridColor=Z(b(f.alternatevgridcolor,z.getColor("altVGridColor")),"1"===f.showalternatehgridcolor?b(f.alternatevgridalpha,z.getColor("altVGridAlpha")):0);rb=b(f.canvasbgcolor,z.getColor(ja.canvasBgColor));Rb=b(f.canvasbgalpha,z.getColor("canvasBgAlpha"));b(f.showcanvasbg,La)==Ha&&(Rb="0");
780 k.plotOptions.series.shadow=a(f.showshadow,f.showcolumnshadow,this.defaultPlotShadow,z.getColor("showShadow"));this.inversed&&(k.yAxis[0].reversed=!0,k.yAxis[1].reversed=!0);this.isStacked&&(this.distributedColumns?(P.showStackTotal=Boolean(a(f.showsum,1)),V=a(f.usepercentdistribution,1),lb=a(f.showpercentvalues,0),Wa=a(f.showpercentintooltip,V,0),P.showXAxisPercentValues=a(f.showxaxispercentvalues,1)):(P.showStackTotal=Boolean(a(this.showSum,f.showsum,0)),V=a(this.stack100percent,f.stack100percent,
781 0),lb=a(f.showpercentvalues,V,0),Wa=a(f.showpercentintooltip,lb)),P.showPercentValues=lb,P.showPercentInToolTip=Wa,V?(P.isValueAbs=!0,ra[v].stacking="percent",P[0].stacking100Percent=!0):ra[v].stacking="normal");this.isDual&&("0"===f.primaryaxisonleft&&(k.yAxis[0].opposite=!0,k.yAxis[1].opposite=!1),k.yAxis[0].showAlways=!0,k.yAxis[1].showAlways=!0);T.useRoundEdges&&(k.plotOptions.series.shadow=a(f.showshadow,f.showcolumnshadow,1),k.plotOptions.series.borderRadius=1,k.tooltip.style.borderRadius="2px",
782 T.plotBorderRadius=3,ka||(T.plotBorderWidth=0),T.plotShadow=k.plotOptions.series.shadow?{enabled:!0,opacity:Rb/100}:0);1===a(f.use3dlighting,1)&&(k.legend.lighting3d=!0);k.plotOptions.series.userMaxColWidth=ha?f.maxbarheight:a(f.maxcolwidth,this.maxColWidth);k.plotOptions.series.maxColWidth=fa(a(k.plotOptions.series.userMaxColWidth,50))||1;k.title.text=C(f.caption);k.subtitle.text=C(f.subcaption);0===a(f.showtooltip,this.showtooltip)&&(k.tooltip.enabled=!1);Zb=k.tooltip.style;Zb.backgroundColor=Z(b(Zb.backgroundColor,
783 f.tooltipbgcolor,z.getColor("toolTipBgColor")),b(f.tooltipbgalpha,100));Zb.borderColor=Z(b(Zb.borderColor,f.tooltipbordercolor,z.getColor("toolTipBorderColor")),b(f.tooltipborderalpha,100));k.tooltip.shadow=a(f.showtooltipshadow,f.showshadow,1)?{enabled:!0,opacity:S(a(f.tooltipbgalpha,100),a(f.tooltipborderalpha,100))/100}:!1;k.tooltip.constrain=a(f.constraintooltip,1);Zb.borderWidth=a(f.tooltipborderthickness,1)+"px";f.tooltipborderradius&&(Zb.borderRadius=a(f.tooltipborderradius,1)+"px");Zb.padding=
784 a(f.tooltippadding,this.tooltippadding,3)+"px";f.tooltipcolor&&(Zb.color=M(f.tooltipcolor));P.userPlotSpacePercent=k.plotOptions.series.userPlotSpacePercent=f.plotspacepercent;Ea=a(f.plotspacepercent,20)%100;P.plotSpacePercent=k.plotOptions.series.groupPadding=Ea/200;n&&!t?(T.series2D3Dshift="mscombi3d"===A?!0:Boolean(a(f.use3dlineshift,0)),T.canvasBaseColor3D=b(f.canvasbasecolor,z.getColor("canvasBaseColor3D")),T.canvasBaseDepth=a(f.canvasbasedepth,10),T.canvasBgDepth=a(f.canvasbgdepth,3),T.showCanvasBg=
785 Boolean(a(f.showcanvasbg,1)),T.showCanvasBase=Boolean(a(f.showcanvasbase,1)),ha?(T.xDepth=5,T.yDepth=5,T.showCanvasBg&&(P.marginTopExtraSpace+=T.canvasBgDepth),P.marginLeftExtraSpace+=T.yDepth+(T.showCanvasBase?T.canvasBaseDepth:0),P.marginBottomExtraSpace+=5):(T.xDepth=10,T.yDepth=10,T.showCanvasBg&&(P.marginRightExtraSpace+=T.canvasBgDepth),P.marginBottomExtraSpace+=T.yDepth+(T.showCanvasBase?T.canvasBaseDepth:0)),rb=rb.split(za)[0],Rb=Rb.split(za)[0],T.use3DLighting=Boolean(a(f.use3dlighting,1)),
786 T.plotBackgroundColor=T.use3DLighting?{FCcolor:{color:na(rb,85)+za+ia(rb,55),alpha:Rb+za+Rb,ratio:eb,angle:r(c-(T.marginLeft+T.marginRight),u-(T.marginTop+T.marginBottom),1)}}:Z(rb,Rb),T.canvasBgColor=Z(na(rb,80),Rb),m=b(f.zeroplanecolor,f.divlinecolor,z.getColor(ja.divLineColor)),s=b(f.zeroplanealpha,f.divlinealpha,z.getColor("divLineAlpha")),T.zeroPlaneColor=Z(m,s),T.zeroPlaneBorderColor=Z(b(f.zeroplanebordercolor,m),a(f.zeroplaneshowborder,1)?s:0),T.zeroPlaneShowBorder=a(f.zeroplaneshowborder,
787 1)):(T.is3D=!1,T.plotBackgroundColor={FCcolor:{color:rb,alpha:Rb,angle:b(f.canvasbgangle,z.getColor("canvasBgAngle")),ratio:b(f.canvasbgratio,z.getColor("canvasBgRatio"))}});this.parseExportOptions(k);this.parseHoverEffectOptions(T);this.preSeriesAddition&&this.preSeriesAddition(k,G,c,u);this.series&&this.series(G,k,A,c,u);this.postSeriesAddition(k,G,c,u);this.spaceManager(k,G,c,u);this.postSpaceManager&&this.postSpaceManager(k,G,c,u);Cb=a(f.drawquadrant,0);P.isXYPlot&&Cb&&(ta=K.min,$b=K.max,Wb=k.yAxis[0].min,
788 jb=k.yAxis[0].max,Fa=a(f.quadrantxval,(ta+$b)/2),Hb=a(f.quadrantyval,(Wb+jb)/2),Hb>=Wb&&Hb<=jb&&Fa>=ta&&Fa<=$b&&(fb=Z(b(f.quadrantlinecolor,T.plotBorderColor),b(f.quadrantlinealpha,Oa)),kb=a(f.quadrantlinethickness,T.plotBorderWidth),Ob=a(f.quadrantlinedashed,f.quadrantlineisdashed,0),Qa=a(f.quadrantlinedashLen,4),tb=a(f.quadrantlinedashgap,2),fc=J(f.quadrantlabeltl,l),Pb=J(f.quadrantlabeltr,l),Sb=J(f.quadrantlabelbl,l),gc=J(f.quadrantlabelbr,l),Lb=a(f.quadrantlabelpadding,3),pc=Ob?g(Qa,tb,kb):"none",
789 K.plotLines.push({color:fb,value:Fa,width:kb,dashStyle:pc,zIndex:3}),k.yAxis[0].plotLines.push({color:fb,value:Hb,width:kb,dashStyle:pc,zIndex:3}),Vb=c-T.marginRight-T.marginLeft,wa=u-T.marginTop-T.marginBottom,Xa=P.inCanvasStyle,Tb=Vb/($b-ta)*(Fa-ta),sb=Vb-Tb,Qb=wa/(jb-Wb)*(Hb-Wb),Na=wa-Qb,Tb-=Lb,sb-=Lb,Na-=Lb,Qb-=Lb,yb=Lb+Pa,Ub=wa-Lb+Pa,hc=Lb+Pa,nb=Vb-Lb+Pa,U.setStyle(Xa),0<Na&&(fc!==l&&0<Tb&&(Db=U.getSmartText(fc,Tb,Na),k.labels.items.push({html:Db.text,zIndex:3,vAlign:oa,style:{left:hc,top:yb,
790 fontSize:Xa.fontSize,lineHeight:Xa.lineHeight,fontFamily:Xa.fontFamily,color:Xa.color}})),Pb!==l&&0<sb&&(Db=U.getSmartText(Pb,sb,Na),k.labels.items.push({html:Db.text,textAlign:ea,vAlign:oa,zIndex:3,style:{left:nb,top:yb,fontSize:Xa.fontSize,lineHeight:Xa.lineHeight,fontFamily:Xa.fontFamily,color:Xa.color}}))),0<Qb&&(Sb!==l&&0<Tb&&(Db=U.getSmartText(Sb,Tb,Qb),k.labels.items.push({html:Db.text,vAlign:ua,zIndex:3,style:{left:hc,top:Ub,fontSize:Xa.fontSize,lineHeight:Xa.lineHeight,fontFamily:Xa.fontFamily,
791 color:Xa.color}})),gc!==l&&0<sb&&(Db=U.getSmartText(gc,sb,Qb),k.labels.items.push({html:Db.text,textAlign:ea,vAlign:ua,zIndex:3,style:{left:nb,top:Ub,fontSize:Xa.fontSize,lineHeight:Xa.lineHeight,fontFamily:Xa.fontFamily,color:Xa.color}})))));if(this.hasVDivLine&&(lc=a(f.showvdivlines,0),cc=a(f.numvdivlines,0)+1,lc&&(cc=P.x.catCount-1),1<cc)){mc=K.min;Jb=P.x.catCount-1;Ya=K.max;Yc=Jb/cc;dc=!0;ec=mc;K.scroll&&!isNaN(K.scroll.viewPortMax)&&(Ya=K.scroll.viewPortMax);fd=b(f.vdivlinecolor,pb);db=a(f.vdivlinealpha,
792 cb);Ab=a(f.vdivlinethickness,Yb);rc=a(f.vdivlinedashed,f.vdivlineisdashed,ub);sc=a(f.vdivlinedashlen,hb);vc=a(f.vdivlinedashgap,zb);($c=a(f.showalternatevgridcolor,0))&&(Zc=Z(b(f.alternatevgridcolor,z.getColor("altVGridColor")),b(f.alternatevgridalpha,z.getColor("altVGridAlpha"))));for(wb=Yc;wb<Jb;wb+=Yc,dc=!dc)dc&&$c&&K.plotBands.push({isNumVDIV:!0,color:Zc,from:ec,to:wb,zIndex:1}),K.plotLines.push({isNumVDIV:!0,width:Ab,color:Z(fd,db),dashStyle:rc?g(sc,vc,Ab):"none",value:wb,zIndex:1}),ec=wb;dc&&
793 $c&&K.plotBands.push({isNumVDIV:!0,color:Zc,from:ec,to:Ya,zIndex:1})}Ca=T.marginTop;Q=T.marginBottom;ma=T.marginLeft;Ja=T.marginRight;I.canvasstartx=ma;I.canvasstarty=Ca;I.canvasendx=c-Ja;I.canvasendy=u-Q;I.canvaswidth=I.canvasendx-I.canvasstartx;I.canvasheight=I.canvasendy-I.canvasstarty;k.legend&&k.legend.enabled&&"vertical"===k.legend.layout&&(I.legendstarty=Ca+0.5*(P.height-Q-Ca-I.legendheight)+(k.legend.y||0),I.legendendy=I.legendstarty+I.legendheight);n&&T.xDepth>T.marginLeft&&(T.marginLeft=
794 T.xDepth);B.console&&B.console.log&&B.FC_DEV_ENVIRONMENT&&console.log(k);return k},parseHoverEffectOptions:function(c){var d=this.dataObj.chart,e;c.showHoverEffect=d.showhovereffect;c.plotHoverEffect=a(d.plothovereffect,d.anchorhovereffect,c.showHoverEffect);e=c.plotHoverEffects={enabled:c.plotHoverEffect};e.highlight=a(d.highlightonhover,d.highlightplotonhover,c.plotHoverEffect);e.columnHighlight=a(e.highlight,d.highlightcolumnonhover,d.highlightbaronhover);e.anchorHighlight=a(e.highlight,d.highlightanchoronhover);
795 e.imageHighlight=a(e.highlight,d.highlightanchorimageonhover);e.anchorImageHoverAlpha=b(d.anchorimagehoveralpha);e.anchorImageHoverScale=b(d.anchorimagehoverscale);e.bubbleHighlight=a(e.highlight,d.highlightbubbleonhover);e.color=b(d.plotfillhovercolor,d.columnhovercolor,d.barhovercolor,d.bubblehovercolor);e.alpha=b(d.plotfillhoveralpha,d.columnhoveralpha,d.barhoveralpha,d.bubblehoveralpha);e.scale=b(d.plothoverscale,d.columnhoverscale,d.barhoverscale,d.bubblehoverscale);e.gradientColor=d.plothovergradientcolor;
796 e.ratio=d.plothoverratio;e.angle=d.plothoverangle;e.borderColor=d.plotborderhovercolor;e.borderAlpha=d.plotborderhoveralpha;e.borderThickness=d.plotborderhoverthickness;e.borderDashed=d.plotborderhoverdashed;e.borderDashGap=d.plotborderhoverdashgap;e.borderDashLen=d.plotborderhoverdashlen;e.shadow=d.plothovershadow;e.anchorScale=d.anchorhoverscale;e.anchorSides=d.anchorhoversides;e.anchorRadius=d.anchorhoverradius;e.anchorAlpha=d.anchorhoveralpha;e.anchorBgColor=b(d.anchorbghovercolor,d.anchorhovercolor);
797 e.anchorBgAlpha=d.anchorbghoveralpha;e.anchorBorderColor=d.anchorborderhovercolor;e.anchorBorderAlpha=d.anchorborderhoveralpha;e.anchorBorderThickness=d.anchorborderhoverthickness;e.anchorStartAngle=d.anchorhoverstartangle;e.anchorDip=a(d.anchorhoverdip);e.anchorAnimation=a(d.anchorhoveranimation,1);e.negativeColor=b(d.negativehovercolor,d.negativecolor);e.is3DBubble=a(d.is3donhover)},parseExportOptions:function(c){var d=this.chartInstance,g=this.dataObj.chart;e(c.exporting,{enabled:a(g.exportenabled,
798 0),bgcolor:d.jsVars.transparent||0===a(d.options.containerBackgroundOpacity,1)?l:d.options.containerBackgroundColor||"#ffffff",bgalpha:(d.jsVars.transparent?0:a(d.options.containerBackgroundOpacity,1))+l,exporttargetwindow:b(g.exporttargetwindow,sb?"_blank":"_self"),exportaction:g.exportaction&&"save"===g.exportaction.toString().toLowerCase()&&"save"||"download",exportfilename:b(g.exportfilename,"FusionCharts"),exporthandler:b(g.html5exporthandler,g.exporthandler,K),exportparameters:b(g.exportparameters,
799 l),exportformat:b(g.exportformat,"PNG"),buttons:{printButton:{enabled:!!a(g.printshowbutton,g.showprintmenuitem,0)},exportButton:{enabled:!(!a(g.exportenabled,0)||!a(g.exportshowbutton,g.exportshowmenuitem,1))}}});var d=c.exporting,h;g=g.exportformats;c=I(c.exporting.exportaction);c={JPG:c+" as JPEG image",PNG:c+" as PNG image",PDF:c+" as PDF document",SVG:c+" as SVG vector image"};var f,r,k;if(g){g=g.split(/\s*?\|\s*?/);for(k=0;k<g.length;k++)r=(f=g[k].split(/\s*?=\s*?/))&&f[0].toUpperCase()||l,
800 f=f&&f[1]||l,c[r]&&(h||(h={}))&&(h[r]=f||c[r]);h=h||c}else h=c;d.exportformats=h},defaultSeriesType:l,paletteIndex:1,creditLabel:tb,titleSpaceManager:la,placeLegendBlockBottom:ma,configureLegendOptions:Ja,placeLegendBlockRight:Xb,placeHorizontalAxis:Fb,placeVerticalAxis:ab,placeHorizontalCanvasMarginAdjustment:vb,placeVerticalCanvasMarginAdjustment:Bb,placeHorizontalXYSpaceManager:function(c,d,e,g){var f=c[w],h,r,l,k,z=d.chart,n,m,p,E,s,V,U,P=c.chart,t=f.marginLeftExtraSpace,v=f.marginTopExtraSpace,
801 C=f.marginBottomExtraSpace,ha=f.marginRightExtraSpace;k=e-(t+ha+P.marginRight+P.marginLeft);var D=g-(C+P.marginBottom+P.marginTop),pa=0.3*k;e=0.3*D;var T=c.xAxis.showLine?c.xAxis.lineThickness:0;l=c.yAxis[0].showLine?c.yAxis[0].lineThickness:0;h=k-pa;g=D-e;n=b(z.legendposition,ua).toLowerCase();c.legend.enabled&&n===ea&&(h-=this.placeLegendBlockRight(c,d,h/2,D));s=a(z.xaxisnamepadding,5);V=a(z.labelpadding,4);U=b(z.rotatexaxisname,"ccw");U=U===Ha?"none":U;m=b(z.showplotborder,f.is3d?Ha:La)===La;m=
802 f.plotBorderThickness=m?f.is3d?1:a(z.plotborderthickness,1):0;p=S(a(P.plotBorderWidth,1),0);!f.isDual&&P.marginRight<p&&void 0===z.chartrightmargin&&(r=p-P.marginRight,k>pa+r&&(P.marginRight=p,k-=r,pa=0.3*k,h=k-pa));r=f.x;E=S(p,m/2);V<E&&(V=E);r.verticalAxisNamePadding=s;r.verticalAxisValuesPadding=V+T;r.rotateVerticalAxisName=U;r.verticalAxisNameWidth=a(z.xaxisnamewidth);h-=ab(c.xAxis,r,c,d,D,h,!1,!1,k);c.xAxis.lineEndExtension=l;h-=vb(c,d,h,c.xAxis);k=h+pa;c.legend.enabled&&n!==ea&&(g-=this.placeLegendBlockBottom(c,
803 d,k,g/2));g-=this.titleSpaceManager(c,d,k,g/2);r=f[0];r.horizontalAxisNamePadding=a(z.yaxisnamepadding,5);r.horizontalLabelPadding=S(a(z.yaxisvaluespadding,4))+l;r.labelDisplay="auto";r.staggerLines=a(z.staggerlines,2);r.slantLabels=a(z.slantlabels,0);r.horizontalLabelPadding=r.horizontalLabelPadding<p?p:r.horizontalLabelPadding;this.xAxisMinMaxSetter(c,d,k);l=c.xAxis;s=l.plotLines;h=g/(l.max-l.min);s&&s.length&&(p=(s[0].value-l.min)*h,s=(l.max-s[s.length-1].value)*h,f.isBar&&(m>p&&(l.min-=(m-p)/
804 (2*h)),m>s&&(l.max+=(m-s)/(2*h))));g-=this.placeHorizontalAxis(c.yAxis[0],r,c,d,k,g,pa);g-=Bb(c,d,g,c.yAxis[0]);mb(e+g,c,z,c.xAxis,f.x.lYLblIdx,!0);Eb(c,c.xAxis.title,g);c.legend.enabled&&n===ea&&(c=c.legend,d=e+g,c.height>d&&(c.height=d,c.scroll.enabled=!0,d=(c.scroll.scrollBarWidth=10)+(c.scroll.scrollBarPadding=2),c.width+=d,P.marginRight+=d),c.y=20);P.marginLeft+=t;P.marginTop+=v;P.marginBottom+=C;P.marginRight+=ha},placeVerticalXYSpaceManager:function(c,d,e,g){var f=c[w],h,r,l=!0,k=0,z=d.chart,
805 n=!1,m,p,E,s,V=c.chart,U,P,t=f.marginLeftExtraSpace,v=f.marginTopExtraSpace,C=f.marginBottomExtraSpace,ha=f.marginRightExtraSpace;h=e-(t+ha+V.marginRight+V.marginLeft);var D=g-(C+V.marginBottom+V.marginTop),pa=0.3*h;g=0.3*D;var T=h-pa;e=D-g;var k=f.drawFullAreaBorder=a(z.drawfullareaborder,1),ra=b(z.legendposition,ua).toLowerCase();s=c.xAxis.showLine?c.xAxis.lineThickness:0;U=c.yAxis[0].showLine?c.yAxis[0].lineThickness:0;P=f.isDual&&c.yAxis[1].showLine?c.yAxis[1].lineThickness:0;m=a(z.yaxisnamepadding,
806 5);p=a(z.yaxisvaluespadding,z.labelypadding,4);r=b(z.showplotborder,f.is3d?Ha:La)===La;r=f.plotBorderThickness=r?f.is3d?1:a(z.plotborderthickness,1):0;E=S(a(V.plotBorderWidth,1),0);r=S(E,r/2);"area"!==this.defaultSeriesType||k||(r=E);p<E&&(p=E);!f.isDual&&V.marginRight<E&&void 0===z.chartrightmargin&&(k=E-c.chart.marginRight,h>pa+k&&(h-=k,pa=0.3*h,T=h-pa));c.legend.enabled&&ra===ea&&(T-=this.placeLegendBlockRight(c,d,T/2,D));f.isDual&&(n=!0,h=f[1],l=c.yAxis[1].opposite,k=b(z.rotateyaxisname,l?"cw":
807 "ccw"),k=k===Ha?"none":k,h.verticalAxisNamePadding=m,h.verticalAxisValuesPadding=p+P,h.rotateVerticalAxisName=k,h.verticalAxisNameWidth=a(z.syaxisnamewidth),T-=ab(c.yAxis[1],h,c,d,D,T/2,l,n));h=f[0];l=!l;k=b(z.rotateyaxisname,l?"cw":"ccw");k=k===Ha?"none":k;h.verticalAxisNamePadding=m;h.verticalAxisValuesPadding=p+U;h.rotateVerticalAxisName=k;h.verticalAxisNameWidth=a(n?z.pyaxisnamewidth:z.yaxisnamewidth);T-=ab(c.yAxis[0],h,c,d,D,T,l,n);T-=vb(c,d,T,c.yAxis[0],c.yAxis[1]);l=T+pa;c.legend.enabled&&
808 ra!==ea&&(e-=this.placeLegendBlockBottom(c,d,l,e/2));e-=this.titleSpaceManager(c,d,l,e/2);h=f.x;h.horizontalAxisNamePadding=a(z.xaxisnamepadding,5);h.horizontalLabelPadding=a(z.labelpadding,z.labelxpadding,4)+s;h.labelDisplay=b(z.labeldisplay,"auto").toLowerCase();h.rotateLabels=a(z.rotatelabels,z.rotatexaxislabels,0);h.staggerLines=a(z.staggerlines,2);h.slantLabels=a(z.slantlabels,z.slantlabel,0);c.yAxis[0].opposite?(c.xAxis.lineEndExtension=U,c.xAxis.lineStartExtension=P):(c.xAxis.lineEndExtension=
809 P,c.xAxis.lineStartExtension=U);h.horizontalLabelPadding<r&&(h.horizontalLabelPadding=r);s={left:0,right:0};s=V.managePlotOverflow&&this.canvasPaddingModifiers&&this.calculateCanvasOverflow(c,!0)||s;U=s.left+s.right;P=0.6*l;U>P&&(m=s.left/U,s.left-=m*(U-P),s.right-=(1-m)*(U-P));this.xAxisMinMaxSetter(c,d,l,s.left,s.right);e-=this.placeHorizontalAxis(c.xAxis,h,c,d,l,e,pa);e-=Bb(c,d,e,c.xAxis);c.title.alignWithCanvas||("left"===c.title.align&&c.yAxis[0].title.text&&ic(c,c.yAxis[0].title,g+e),"right"===
810 c.title.align&&n&&c.yAxis[1].title.text&&ic(c,c.yAxis[1].title,g+e));n&&(mb(g+e,c,z,c.yAxis[1],f[1].lYLblIdx),Eb(c,c.yAxis[1].title,g+e));mb(g+e,c,z,c.yAxis[0],f[0].lYLblIdx);Eb(c,c.yAxis[0].title,g+e);c.legend.enabled&&ra===ea&&(c=c.legend,d=g+e,c.height>d&&"gradient"!==c.type&&(c.height=d,c.scroll.enabled=!0,d=(c.scroll.scrollBarWidth=10)+(c.scroll.scrollBarPadding=2),c.width+=d,V.marginRight+=d));V.marginLeft+=t;V.marginTop+=v;V.marginBottom+=C;V.marginRight+=ha},placeVerticalAxisTitle:Eb,calculateCanvasOverflow:function(a,
811 b){for(var c=this.canvasPaddingModifiers,d=a.chart,f=this.smartLabel,e=0,g=0,h=0,r=0,k=e=!1,z=!1,n=c&&c.length||0,m,p,E,s,V;n--;)switch(g=c[n],g){case "anchor":k=p=e=!0;break;case "anchorlabel":E=p=e=!0;break;case "errorbar":z=e=!0}if(e&&(n=(c=a.series)&&c.length||0,b))for(;n--;)m=c[n],p&&(e=m&&m.data||[],1<e.length&&(s=e[0],V=e[e.length-1],k&&(e=s&&s.marker&&s.marker.enabled&&(s.marker.radius||0)+(s.marker.lineWidth||0)||0,g=V&&V.marker&&V.marker.enabled&&(V.marker.radius||0)+(V.marker.lineWidth||
812 0)||0,h=S(e+2,h),r=S(g+2,r)),E&&(f.setStyle(a.plotOptions.series.dataLabels.style),d.rotateValues?(g=f.getOriSize(s&&s.displayValue||l),e=g.height/2,g=f.getOriSize(V&&V.displayValue||l),g=g.height/2):(g=f.getOriSize(s&&s.displayValue||l),e=g.width/2,g=f.getOriSize(V&&V.displayValue||l),g=g.width/2),h=S(e+2,h),r=S(g+2,r)))),z&&(g=e=m.errorBarWidth/2+m.errorBarThickness||0,h=S(e+2,h),r=S(g+2,r));return{left:h,right:r}},spaceManager:function(){return this.placeVerticalXYSpaceManager.apply(this,arguments)},
813 axisMinMaxSetter:function(b,c,d,e,f,g,h,r){d=c.stacking100Percent?P(99,1,100,0,f,g,h,r):P(a(c.max,d),a(c.min,e),d,e,f,g,h,r);b.min=Number(s(d.Min,10));b.max=Number(s(d.Max,10));b.tickInterval=Number(s(d.divGap,10));c.numdivlines=X.round((b.max-b.min)/b.tickInterval)-1;2>=d.Range/d.divGap&&(b.alternateGridColor=Aa);this.highValue=c.max;this.lowValue=c.min;delete c.max;delete c.min},configurePlotLines:function(c,d,e,g,f,h,r,k,z,n,m){var p=e.min,E=e.max,V=e.tickInterval,U=n?"xAxis":g.stacking100Percent?
814 "percentValue":"yAxis",P=p,t=1,v=e.gridLineColor,C=e.gridLineWidth,ha=e.gridLineDashStyle,T=0>p&&0<E?!0:!1,D=0===p,pa=0===E,ra=0===a(g.showzeroplanevalue,c.showzeroplanevalue),B=!0,ka,ja=1,K=0<a(c.numdivlines,0),I=d[w].axisGridManager,F=this.colorManager,J=this.is3D,Ia=a(c.showaxislimitgridlines,this.showAxisLimitGridLines),J=a(Ia,J||d.chart.plotBorderWidth?0:1),R=this.inversed;d=d.xAxis;m=a(m,z?1:0);delete e._altGrid;delete e._lastValue;n&&!g.catOccupied&&(g.catOccupied={});!T||n&&g.catOccupied[0]||
815 (n?(B=a(c.showvzeroplane,1),ka=a(c.showvzeroplanevalue,h),K=a(c.vzeroplanethickness,1),F=b(c.vzeroplanealpha,c.vdivlinealpha,F.getColor("divLineAlpha")),c=0<K?Z(b(c.vzeroplanecolor,v),F):Aa):(F=a(c.divlinealpha,F.getColor("divLineAlpha")),ka=a(g.showzeroplanevalue,c.showzeroplanevalue,h),!1===this.defaultZeroPlaneHighlighted?(B=a(g.showzeroplane,c.showzeroplane,!(this.defaultZeroPlaneHidden&&!K)),K=C):(K=1===C?2:C,ja=5,F=H(2*F,100)),K=a(g.zeroplanethickness,c.zeroplanethickness,K),F=b(g.zeroplanealpha,
816 c.zeroplanealpha,F),c=0<K?Z(b(g.zeroplanecolor,c.zeroplanecolor,v),F):Aa),B&&(ka=ka?k[U](0,m):l,(ja=I.addAxisGridLine(e,0,ka,K,ha,c,ja,n))&&(ja.isZeroPlane=!0)),e.effectiveZeroPlaneThickness=B&&parseInt(F,10)&&K);n&&g.catOccupied[p]||(ka=!f||D&&ra?l:k[U](p,m),(ja=Ia||J&&(R||!d.showLine)?I.addAxisGridLine(e,p,ka,C,ha,v||Aa,2,n):I.addAxisGridLine(e,p,ka,0.1,void 0,Aa,2,n))&&(ja.isMinLabel=!0));0>=C&&(C=0.1,v=Aa);for(p=Number(s(P+V,10));p<E;p=Number(s(p+V,10)),t+=1)T&&0>P&&0<p&&!z&&(I.addAxisAltGrid(e,
817 0),t+=1),0===p||n&&g.catOccupied[p]||(ka=1===h&&0===t%r?k[U](p,m):l,I.addAxisGridLine(e,p,ka,C,ha,v,2,n)),P=p,z||I.addAxisAltGrid(e,p);z||I.addAxisAltGrid(e,E);0!==t%r||n&&g.catOccupied[E]||(ka=!f||pa&&ra?l:k[U](E,m),(ja=Ia||J&&(!R||!d.showLine)?I.addAxisGridLine(e,E,ka,C,ha,v||Aa,2,n):I.addAxisGridLine(e,E,ka,0.1,ha,Aa,2,n))&&(ja.isMaxLabel=!0));this.realtimeEnabled&&(e.labels._enabled=e.labels.enabled,e._gridLineWidth=e.gridLineWidth,e._alternateGridColor=e.alternateGridColor);e.labels.enabled=
818 !1;e.gridLineWidth=0;e.alternateGridColor=Aa;e.plotLines.sort(bb)},xAxisMinMaxSetter:function(b,d,e,g,f){var h=b[w],r=h.x,k=d.chart,l=r.min=a(r.min,0),z=r.max=a(r.max,r.catCount-1),n=0,m=0,p=b.chart.defaultSeriesType,E=/^(column|column3d|bar|bar3d|floatedcolumn|sparkwinloss|boxandwhisker2d|dragcolumn)$/.test(p),s=/^(line|area|spline|areaspline)$/.test(p),p=/^(scatter|bubble|candlestick|dragnode)$/.test(p),V=b.xAxis,U=V.scroll,P=a(k.canvaspadding),t=void 0!==P&&null!==P,v=sa(H(a(P,g,0),e/2-10)),P=
819 sa(H(a(P,f,0),e/2-10)),C,ha,T,D;r.adjustMinMax&&(C=a(k.setadaptivexmin,1),z=l=!C,ha=a(this.numVDivLines,k.numvdivlines,4),T=k.adjustvdiv!==Ha,D=a(k.showxaxisvalues,k.showxaxisvalue,1),C=a(k.showvlimits,D),D=a(k.showvdivlinevalue,k.showvdivlinevalues,D),this.axisMinMaxSetter(V,r,k.xaxismaxvalue,k.xaxisminvalue,l,z,ha,T),l=V.min,z=V.max,r.requiredAutoNumericLabels&&(ha=a(parseInt(k.xaxisvaluesstep,10),1),this.configurePlotLines(k,b,V,r,C,D,1>ha?1:ha,h.numberFormatter,!1,!0)),V.plotLines.sort(bb));V.labels.enabled=
820 !1;V.gridLineWidth=0;V.alternateGridColor=Aa;!E&&!h.isScroll||h.hasNoColumn||(t||void 0===g||null===g||void 0===f||null===f?m=n=0.5:(m=e/(z-l+1)*0.5,v=0<m-g?0:v,P=0<m-f?0:P,n=0<m-g?0.5:0,m=0<m-f?0.5:0));h.is3d&&(v+=a(b.chart.xDepth,0));b=(e-(v+P))/(z-l+(n+m));V.min=l-(n+v/b);V.max=z+(m+P/b);U&&U.enabled&&(n=U.vxLength,b=V.max-V.min,U.viewPortMin=V.min,U.viewPortMax=V.max,U.scrollRatio=n/b,U.flatScrollBars=h.flatScrollBars,U.scrollBar3DLighting=h.scrollBar3DLighting,V.max=V.min+n);s&&V.min===V.max&&
821 (V.min-=0.65,V.max+=0.65);p&&d.vtrendlines&&c(d.vtrendlines,V,h,!1,!0,!0)},postSeriesAddition:function(c){var d=c[w],g=d.isBar,h=d.is3d,f=c.chart.rotateValues&&!g?270:0,r=d[0],k=r&&r.stacking100Percent,l,z,m,p,E,s,V,U,P,t,v,C,ha,D,T,pa,ra,B,ka,H,ja,K,I;if(this.isStacked)for(m in l=d.plotSpacePercent,z=c.chart.defaultSeriesType,l=1-2*l,pa=c.series,ra=this.numberFormatter,ja=e({},c.plotOptions.series.dataLabels.style),K=parseFloat(ja.fontSize),I=!r.stacking100Percent,ja.color=c.plotOptions.series.dataLabels.color,
822 p=r.stack,p){r=p[m].length;E=l/r;V=-(l-E)/2;D=[];C=0;for(U=pa.length;C<U;C+=1)P=pa[C],P.yAxis||b(P.type,z)!==m||D.push(P);for(s=0;s<r;s+=1,V+=E){v=p[m][s];T=[];C=0;for(U=D.length;C<U;C+=1)P=D[C],a(P.columnPosition,0)===s&&T.push(P.data);if(v&&v.length)for(t=0,P=v.length;t<P;t+=1)if(C=v[t])for(ha=(C.n||0)+(C.p||0),d.showStackTotal&&(U=t,U+=V,C=0>ha?C.n:C.p,c.xAxis.plotLines.push({value:U,width:0,isVline:I,isTrend:!I,zIndex:4,_isStackSum:1,_catPosition:t,_stackIndex:s,label:{align:Ga,textAlign:h||270!==
823 f?g?0>ha?ea:da:Ga:0>ha?ea:da,offsetScale:I?C:void 0,offsetScaleIndex:0,rotation:f,style:ja,verticalAlign:oa,y:g?0:0>ha?270===f?4:K:-4,x:0,text:d.numberFormatter.yAxis(ha)}})),C=0,U=T.length;C<U;C+=1)if(ka=T[C][t])if(H=ha&&(ka.y||0)/ha*100,B=ra.percentValue(H),ka.toolText=n(ka.toolText,[14,24,25,112],{percentValue:B,sum:ra.dataLabels(ha),unformattedSum:ha}),ka.y||0===ka.y)k&&(ka.y=H,ka.previousY||0===ka.previousY)&&(ka.previousY=ka.previousY/ha*100),ka.showPercentValues&&(ka.displayValue=B)}}},styleMapForFont:ga,
824 styleApplicationDefinition_font:function(a,b,c){var d,f,e=!1,g,r,k=this.styleMapForFont;switch(b){case "caption":d=a.title;break;case "datalabels":d=a.xAxis.labels;break;case "datavalues":d=a.plotOptions.series.dataLabels;e=!0;break;case "tldatavalues":d={style:a.plotOptions.series.dataLabels.tlLabelStyle};break;case "trdatavalues":d={style:a.plotOptions.series.dataLabels.trLabelStyle};break;case "bldatavalues":d={style:a.plotOptions.series.dataLabels.blLabelStyle};break;case "brdatavalues":d={style:a.plotOptions.series.dataLabels.brLabelStyle};
825 break;case "subcaption":d=a.subtitle;break;case "tooltip":d=a.tooltip;break;case "trendvalues":d={style:a[w].trendStyle};break;case "xaxisname":d=a.xAxis.title;break;case "yaxisname":case "pyaxisname":case "axistitle":d=[];b=0;for(g=a.yAxis.length;b<g;b+=1)d.push(a.yAxis[b].title);break;case "yaxisvalues":d=[];b=0;for(g=a.yAxis.length;b<g;b+=1)d.push(a.yAxis[b].labels);break;case "vlinelabels":d={style:a[w].divlineStyle};break;case "legend":d={style:a.legend.itemStyle};break;default:(d=a.orphanStyles[b])||
826 (a.orphanStyles[b]=d={text:"",style:{}})}if("object"===typeof d)if(d instanceof Array)for(b=0,g=d.length;b<g;b+=1){r=d[b];for(f in c)if(a=f.toLowerCase(),"function"===typeof k[a])k[a](c[f],r,e);h(r.style)}else{for(f in c)if(a=f.toLowerCase(),"function"===typeof k[a])k[a](c[f],d,e);h(d.style)}},parseStyles:function(a){var b,c,d,f={},e,g=this.dataObj;if(g.styles&&g.styles.definition instanceof Array&&g.styles.application instanceof Array){for(b=0;b<g.styles.definition.length;b+=1)c=g.styles.definition[b],
827 c.type&&c.name&&this["styleApplicationDefinition_"+c.type.toLowerCase()]&&(f[c.name.toLowerCase()]=c);for(b=0;b<g.styles.application.length;b+=1)for(c=g.styles.application[b].styles&&g.styles.application[b].styles.split(za)||[],e=0;e<c.length;e+=1)if(d=c[e].toLowerCase(),f[d]&&g.styles.application[b].toobject)this["styleApplicationDefinition_"+f[d].type.toLowerCase()](a,g.styles.application[b].toobject.toLowerCase(),f[d])}},updateDefaultAnnotations:function(){var c=this.renderer,d=this.dataObj,e=
828 this.chartInstance,g=d&&d.annotations||{},f={},h;if(this.drawAnnotations&&e.dataReady()&&d&&d.chart&&a(d.chart.showannotations,1)){h=a(g.scaleonresize,d.chart.scaleonresize,1);var c={interactionevents:b(this.annotationInteractionEvents,!0),showbelow:b(g.showbelow,g.showbelowchart),autoscale:g.autoscale,scaletext:g.scaletext,scaleimages:g.scaleimages,constrainedscale:g.constrainedscale,scaleonresize:h,origw:b(g.origw,d.chart.origw,h?this.origRenderWidth:c.chartWidth),origh:b(g.origh,d.chart.origh,
829 h?this.origRenderHeight:c.chartHeight),xshift:g.xshift,yshift:g.yshift,grpxshift:g.grpxshift,grpyshift:g.grpyshift,xscale:g.xscale,yscale:g.yscale,rootxscale:a(g.xscale,100)/100,rootyscale:a(g.yscale,100)/100},r;c||(c={});for(r in f)c[r]=f[r];e.annotations.reset(g,c,this.snapLiterals)}else e.annotations.clear()},dispose:function(){var a;this.disposing=!0;this.renderer&&this.renderer.dispose();this.numberFormatter&&this.numberFormatter.dispose();this.hcJSON&&this.hcJSON.chart&&this.hcJSON.chart.renderTo&&
830 delete this.hcJSON.chart.renderTo;for(a in this)delete this[a];delete this.disposing;this.disposed=!0}});aa("stub",{init:function(a,b,c){this.containerElement=a;this.smartLabel=c.jsVars.smartLabel},standaloneInit:!0},aa.base);aa("barbase",{spaceManager:function(){return this.placeHorizontalXYSpaceManager.apply(this,arguments)}},aa.base);aa("singleseries",{series:function(a,b,d){var e=a.data||a.dataset&&a.dataset[0]&&a.dataset[0].data,f;e&&0<e.length&&e instanceof Array&&(f={data:[],hoverEffects:this.parseSeriesHoverOptions(a,
831 b,{},d),colorByPoint:!0},b.legend.enabled=!1,d=this.point(d,f,e,a.chart,b),d instanceof Array?b.series=b.series.concat(d):b.series.push(d),this.configureAxis(b,a),a.trendlines&&c(a.trendlines,b.yAxis,b[w],!1,this.isBar))},defaultSeriesType:l,configureAxis:function(c,d){var e=c[w],g=c.xAxis,f=d.chart,h=c.chart.is3D,r,k,l,z,n,m,p,E,s,V,U,P,t=0,v,ha,D,T,pa,ra,ka,B=this.numberFormatter,ja=a(f.syncaxislimits,0),I;g.title.text=C(f.xaxisname);I=a(parseInt(f.yaxisvaluesstep,10),parseInt(f.yaxisvaluestep,
832 10),1);I=1>I?1:I;r=c.yAxis[0];k=e[0];e.isDual?(l=B.getCleanValue(f.pyaxismaxvalue),z=B.getCleanValue(f.pyaxisminvalue),r.title.text=C(f.pyaxisname),ja&&!k.stacking100Percent?(P=e[1],U=a(P.max),P=a(P.min),void 0!==U&&void 0!==P&&(k.min=H(k.min,P),k.max=S(k.max,U)),U=B.getCleanValue(f.syaxismaxvalue),P=B.getCleanValue(f.syaxisminvalue),null!==P&&(z=null!==z?H(z,P):P),null!==U&&(l=null!==l?S(l,U):U)):ja=0):(l=B.getCleanValue(f.yaxismaxvalue),z=B.getCleanValue(f.yaxisminvalue),r.title.text=C(f.yaxisname));
833 p=a(this.isStacked?0:this.setAdaptiveYMin,f.setadaptiveymin,this.defSetAdaptiveYMin,0);m=n=!p;E=a(e.numdivlines,f.numdivlines,this.numdivlines,4);s=f.adjustdiv!==Ha;V=a(this.showYAxisValues,f.showyaxisvalues,f.showyaxisvalue,1);U=a(f.showyaxislimits,f.showlimits,V);P=a(f.showdivlinevalue,f.showdivlinevalues,V);h||(t=a(f.showaxislines,f.drawAxisLines,0),D=a(f.axislinethickness,1),pa=a(f.axislinealpha,100),100<pa&&(pa=100),ha=Z(b(f.axislinecolor,"#000000"),pa),r.showLine=a(f.showyaxisline,t),v=g.showLine=
834 a(f.showxaxisline,t),T=g.lineThickness=a(f.xaxislinethickness,D),r.lineThickness=a(f.yaxislinethickness,D),ra=g.lineAlpha=a(f.xaxislinealpha,pa),100<ra&&(ra=g.lineAlpha=100),ka=r.lineAlpha=a(f.yaxislinealpha,pa),100<ka&&(ka=r.lineAlpha=100),g.lineColor=Z(b(f.xaxislinecolor,ha),ra),r.lineColor=Z(b(f.yaxislinecolor,ha),ka),c.chart.xAxisLineVisible=v&&!!T&&0<ra);this.axisMinMaxSetter(r,k,l,z,n,m,E,s);this.configurePlotLines(f,c,r,k,U,P,I,e.numberFormatter,!1);r.reversed&&0<=r.min&&(c.plotOptions.series.threshold=
835 r.max);e.isDual&&(r=c.yAxis[1],k=e[1],U=a(f.showsecondarylimits,U),P=a(f.showdivlinesecondaryvalue,V),ja?(g=c.yAxis[0],r.min=g.min,r.max=g.max,r.tickInterval=g.tickInterval,delete k.max,delete k.min):(l=B.getCleanValue(f.syaxismaxvalue),z=B.getCleanValue(f.syaxisminvalue),p=a(f.setadaptivesymin,p),m=n=!p,this.axisMinMaxSetter(r,k,l,z,n,m,E,s)),h||(r.showLine=a(f.showsyaxisline,t),r.lineThickness=a(f.syaxislinethickness,D),h=r.lineAlpha=a(f.syaxislinealpha,pa),100<h&&(h=100),r.lineColor=Z(b(f.syaxislinecolor,
836 ha),h)),this.configurePlotLines(f,c,r,k,U,P,I,e.numberFormatter,!0),r.title.text=C(f.syaxisname))},pointValueWatcher:function(c,d,e,g,f,h,r){c=c[w];var k;if(null!==d)return e=a(e,0),c[e]||(c[e]={}),e=c[e],g&&(this.distributedColumns&&(c.marimekkoTotal+=d),g=e.stack,f=a(f,0),h=a(h,0),r=b(r,hb),g[r]||(g[r]=[]),r=g[r],r[h]||(r[h]=[]),h=r[h],h[f]||(h[f]={}),f=h[f],0<=d?f.p?(k=f.p,d=f.p+=d):f.p=d:f.n?(k=f.n,d=f.n+=d):f.n=d),e.max=e.max>d?e.max:d,e.min=e.min<d?e.min:d,k},parseSeriesHoverOptions:function(c,
837 d,e){c=d.chart.plotHoverEffects;d={enabled:b(e.showhovereffect,e.hovereffect,c.enabled)};d.highlight=a(e.highlightonhover,e.highlightplotonhover,c.highlight);d.columnHighlight=a(d.highlight,e.highlightcolumnonhover,e.highlightbaronhover,c.columnHighlight);d.anchorHighlight=a(d.highlight,e.highlightanchoronhover,c.anchorHighlight);d.anchorHighlight=a(d.highlight,e.highlightimageonhover,c.imageHighlight);d.bubbleHighlight=a(d.highlight,e.highlightbubbleonhover,e.highlightbaronhover,c.bubbleHighlight);
838 d.imageHoverAlpha=b(e.anchorimagehoveralpha,c.anchorImageHoverAlpha);d.imageHoverScale=b(e.anchorimagehoverscale,c.anchorImageHoverScale);d.color=b(e.hovercolor,e.bubblehovercolor,c.color);d.alpha=b(e.hoveralpha,c.alpha);d.scale=b(e.hoverscale,e.bubblehoverscale,c.scale);d.gradientColor=void 0!==e.hovergradientcolor?e.hovergradientcolor:c.gradientColor;d.ratio=b(e.hoverratio,c.ratio);d.angle=b(e.hoverangle,c.angle);d.borderColor=b(e.borderhovercolor,c.borderColor);d.borderAlpha=b(e.borderhoveralpha,
839 c.borderAlpha);d.borderThickness=a(e.borderhoverthickness,c.borderThickness);d.borderDashed=a(e.borderhoverdashed,c.borderDashed);d.borderDashGap=a(e.borderhoverdashgap,c.borderDashGap);d.borderDashLen=a(e.borderhoverdashlen,c.borderDashLen);d.shadow=b(e.hovershadow,c.shadow);d.anchorSides=b(e.anchorhoversides,c.anchorSides);d.anchorRadius=b(e.anchorhoverradius,c.anchorRadius);d.anchorScale=b(e.anchorhoverscale,c.anchorScale);d.anchorAlpha=b(e.anchorhoveralpha,e.hoveralpha,c.anchorAlpha);d.anchorBgColor=
840 b(e.anchorbghovercolor,e.anchorhovercolor,c.anchorBgColor);d.anchorBgAlpha=b(e.anchorbghoveralpha,c.anchorBgAlpha);d.anchorBorderColor=b(e.anchorborderhovercolor,c.anchorBorderColor);d.anchorBorderAlpha=b(e.anchorborderhoveralpha,c.anchorBorderAlpha);d.anchorBorderThickness=a(e.anchorborderhoverthickness,c.anchorBorderThickness);d.anchorStartAngle=b(e.anchorhoverstartangle,c.anchorStartAngle);d.anchorDip=b(e.anchorhoverdip,c.anchorDip);d.anchorAnimation=a(e.anchorhoveranimation,c.anchorAnimation,
841 1);d.negativeColor=b(e.negativehovercolor,c.negativeColor);d.is3DBubble=a(e.is3donhover,c.is3DBubble);return d},pointHoverOptions:function(c,d,e){var h,f,r,k={};h=d.hoverEffects;d=a(c.hovereffect,h&&h.enabled);f=!1;var z={enabled:d},n=e&&l+e.plotType.toLowerCase();if(void 0===d)if(this.forceHoverEnable)f=d=z.enabled=!0;else{"anchor"==n&&(f=e.imageUrl?d=z.enabled=void 0!==b(c.anchorimagehoveralpha,h.imageHoverAlpha,c.anchorimagehoverscale,h.imageHoverScale,void 0):d=z.enabled=void 0!==b(c.hovercolor,
842 c.anchorhovercolor,c.anchorbghovercolor,h.anchorBgColor,h.color,c.hoveralpha,c.anchorhoveralpha,h.anchorAlpha,c.bghoveralpha,c.anchorbghoveralpha,h.anchorBgAlpha,c.anchorborderhovercolor,c.borderhovercolor,h.anchorBorderColor,c.anchorborderhoverthickness,c.borderhoverthickness,h.anchorBorderThickness,c.anchorborderhoveralpha,c.borderhoveralpha,h.anchorBorderAlpha,c.hoverdip,c.anchorhoverdip,h.anchorDip,c.anchorhoverstartangle,h.anchorStartAngle,c.hoversides,c.anchorhoversides,h.anchorSides,c.hoverradius,
843 c.anchorhoverradius,h.anchorRadius,void 0));if("column"==n||"bubble"==n)f=d=z.enabled=void 0!==b(c.hoveralpha,h.alpha,c.hovergradientcolor,h.gradientColor,c.borderhovercolor,h.borderColor,c.borderhoverthickness,h.borderThickness,c.hoverratio,h.ratio,c.hoverangle,h.angle,c.borderhoveralpha,h.borderAlpha,c.borderhoverdashed,h.borderDashed,c.borderhoverdashgap,h.borderDashGap,c.borderhoverdashlen,h.borderDashLen,c.hovercolor,h.color,void 0);f||"bubble"!=n||(f=d=z.enabled=void 0!==b(c.negativehovercolor,
844 h.negativeColor,c.is3donhover,h.is3DBubble,c.hoverscale,h.scale,void 0));"pie"==n&&(f=d=z.enabled=void 0!==b(c.hovercolor,h.color,c.hoveralpha,h.alpha,c.borderhovercolor,h.borderColor,c.borderhoverthickness,h.borderThickness,c.borderhoveralpha,h.borderAlpha,void 0))}if(d){z.highlight=a(c.highlightonhover,h.highlight);z.columnHighlight=a(z.highlight,c.highlightcolumnonhover,c.highlightbaronhover);z.anchorHighlight=a(z.highlight,c.highlightanchoronhover);z.bubbleHighlight=a(z.highlight,c.highlightbubbleonhover);
845 z.alpha=b(c.hoveralpha,h.alpha,e.alpha);z.scale=b(c.hoverscale,h.scale,1);z.gradientColor=void 0===c.hovergradientcolor?h.gradientColor:c.hovergradientcolor;z.borderColor=b(c.borderhovercolor,h.borderColor,e.borderColor);z.borderThickness=a(c.borderhoverthickness,h.borderThickness,e.borderWidth);z.ratio=b(c.hoverratio,h.ratio,e.ratio);z.angle=b(c.hoverangle,h.angle,e.angle);z.borderAlpha=b(c.borderhoveralpha,h.borderAlpha,e.borderAlpha);z.borderDashed=a(c.borderhoverdashed,h.borderDashed,e.borderDashed,
846 0);z.borderDashGap=a(c.borderhoverdashgap,h.borderDashGap,e.borderDashGap);z.borderDashLen=a(c.borderhoverdashlen,h.borderDashLen,e.borderDashLen);z.shadow=b(c.hovershadow,h.shadow,0);z.color=b(c.hovercolor,h.color);"anchor"==n&&(e.imageUrl?(z.imageHoverAlpha=a(c.anchorimagehoveralpha,h.imageHoverAlpha,100),z.imageHoverScale=e.imageScale*fa(a(c.anchorimagehoverscale,h.imageHoverScale,110))*0.01,z.anchorAnimation=a(c.anchorhoveranimation,h.anchorAnimation,1)):(z.anchorColor=M(b(c.hovercolor,c.anchorhovercolor,
847 c.anchorbghovercolor,h.anchorBgColor,h.color,e.anchorBgColor)),z.anchorAlpha=b(c.hoveralpha,c.anchorhoveralpha,h.anchorAlpha,e.anchorAlpha),z.anchorBgAlpha=b(c.bghoveralpha,c.anchorbghoveralpha,h.anchorBgAlpha,z.anchorAlpha,e.anchorBgAlpha),z.anchorBorderColor=b(c.anchorborderhovercolor,c.borderhovercolor,h.anchorBorderColor,e.anchorBorderColor),z.anchorBorderThickness=b(c.anchorborderhoverthickness,c.borderhoverthickness,h.anchorBorderThickness,e.anchorBorderThickness),z.anchorBorderAlpha=a(c.anchorborderhoveralpha,
848 c.borderhoveralpha,h.anchorBorderAlpha,z.anchorAlpha,e.anchorBorderAlpha),z.anchorDip=a(c.hoverdip,c.anchorhoverdip,h.anchorDip),z.startAngle=b(c.anchorhoverstartangle,h.anchorStartAngle,e.anchorAngle),z.anchorSides=a(c.hoversides,c.anchorhoversides,h.anchorSides,e.anchorSides),z.anchorRadius=a(c.hoverradius,c.anchorhoverradius,h.anchorRadius),z.anchorScale=a(c.hoverscale,c.anchorhoverscale,h.anchorScale),z.anchorAnimation=a(c.anchorhoveranimation,h.anchorAnimation,1),void 0===z.anchorRadius&&(z.anchorRadius=
849 !f||z.anchorHighlight?e.anchorRadius&&e.anchorRadius+1:e.anchorRadius)));if(f||(z.columnHighlight||z.bubbleHighlight)&&z.color&&1==z.highlight)z.highlight=0;"column"==n&&(z.color=(b(z.color,e.color)+za+(void 0===z.gradientColor?e.gradientColor:z.gradientColor)).replace(/,+?$/,""));"pie"===n&&(z.color=b(z.color,e.color).replace(/,+?$/,""));"bubble"==n&&(z.negativeColor=b(c.negativehovercolor,h.negativeColor,e.negativeColor),z.is3d=a(c.is3donhover,h.is3DBubble,e.is3d),z.color=z.negativeColor&&0>c.z?
850 z.negativeColor:z.color||e.color,r="string"==typeof z.color,z.color=M(r?z.color:z.color.FCcolor.color),z.color=z.is3d?aa.bubble.getPointColor(z.color,z.alpha):z.color);if(1==z.highlight&&"anchor"!==n){c=(r="string"==typeof z.color)?z.color.split(/\s{0,},\s{0,}/):z.color.FCcolor.color.split(/\s{0,},\s{0,}/);h=c.length;for(f=0;f<h;f++)c[f]=ia(c[f],70);r?z.color=c.join(","):z.color.FCcolor.color=c.join(",")}"pie"===n&&(k={color:this.getPointColor(z.color,z.alpha,e.radius3D),alpha:z.alpha,borderColor:Z(z.borderColor,
851 z.borderAlpha),borderWidth:z.borderThickness});"column"==n&&(z.colorArr=t(z.color,z.alpha,z.ratio,z.angle,e.isRoundEdged,z.borderColor,H(z.alpha,z.borderAlpha).toString(),e.isBar,e.is3d),z.dashStyle=z.borderDashed?g(z.borderDashLen,z.borderDashGap,z.borderThickness):"none",k={shadow:z.shadow,color:z.colorArr[0],borderColor:z.colorArr[1],borderWidth:z.borderThickness,use3DLighting:e.use3DLighting,dashStyle:z.dashStyle});"anchor"==n&&(k=e.imageUrl?{animation:z.anchorAnimation,imageHoverAlpha:z.imageHoverAlpha,
852 imageHoverScale:z.imageHoverScale}:{animation:z.anchorAnimation,shadow:z.shadow,fillColor:{FCcolor:{color:z.anchorColor,alpha:z.anchorBgAlpha*z.anchorAlpha/100+l}},lineColor:{FCcolor:{color:z.anchorBorderColor,alpha:z.anchorBorderAlpha}},lineWidth:z.anchorBorderThickness,radius:z.anchorRadius,symbol:ba(z.anchorSides),startAngle:z.startAngle,sides:z.anchorSides,scale:z.anchorScale,dip:z.anchorDip});"bubble"==n&&(k={symbol:z.seriesAnchorSymbol,shadow:z.shadow,scale:z.scale,fillColor:z.color,lineColor:{FCcolor:{color:z.borderColor,
853 alpha:z.alpha}},lineWidth:z.borderThickness})}return{enabled:d,options:z,rolloverOptions:k}},getPointStub:function(c,d,e,g){var f=this.dataObj.chart;g=g[w];d=null===d?d:g.numberFormatter.dataLabels(d);var h=J(C(b(c.tooltext,g.tooltext))),r=J(C(c.displayvalue)),f=g.showTooltip?void 0!==h?n(h,[1,2,3,5,6,7],{formattedValue:d,label:e,yaxisName:C(f.yaxisname),xaxisName:C(f.xaxisname)},c,f):null===d?!1:e!==l?e+g.tooltipSepChar+d:d:l;g=a(c.showvalue,g.showValues)?void 0!==r?r:d:l;c=b(c.link);return{displayValue:g,
854 categoryLabel:e,toolText:f,link:c}},updateSnapPoints:function(){var a=this,b=a.snapLiterals,c=function(a,b){var c=0;switch(a){case "startx":c=b.x;break;case "starty":c=b.y;break;case "x":case "middlex":case "centerx":c=b.x+b.width/2;break;case "y":case "middley":case "centery":c=b.y+b.height/2;break;case "endx":c=b.x+b.width;break;case "endy":c=b.y+b.height;break;default:c=0}return c};b.dataset=function(b,d){var e=a.renderer&&a.renderer.plots,g,h,r,z;r=a.is3D;if(!e||!e.length)return 0;isNaN(b[0])?
855 g=0:(g=Number(b[0]),b=b.slice(1));h=b[0];if("set"===h){isNaN(b[1])?(z=0,b=b.slice(1)):(z=Number(b[1]),b=b.slice(2));h=b[0];e=(e=e[g]&&e[g].items[z])&&e.graphic;if(!e)return 0;r=d&&r?e._getBBox2():e.getBBox();z=c(h,r)}return z};b.xaxis=function(b){var d=a.renderer&&a.renderer.xAxis&&a.renderer.xAxis[0]&&a.renderer.xAxis[0].labels,e,g;if(!d||!d.length)return 0;g=b[0];if("label"===g){isNaN(b[1])?(e=0,b=b.slice(1)):(e=Number(b[1]),b=b.slice(2));g=b[0];b=d[e];if(!b)return 0;b=b.getBBox();e=c(g,b)}return e};
856 b.yaxis=function(b){var d=a.renderer&&a.renderer.yAxis,e,g;if(!d||!d.length)return 0;isNaN(b[0])?e=0:(e=Number(b[0]),b=b.slice(1));e=d[e];if(!e)return 0;d=b[0];if("label"===d){g=e.labels;isNaN(b[1])?(e=0,b=b.slice(1)):(e=Number(b[1]),b=b.slice(2));d=b[0];b=g[e];if(!b)return 0;b=b.getBBox();g=c(d,b)}return g}}},aa.base);aa("multiseries",{series:function(b,d,e){var g,f,h=d[w],r,z;d.legend.enabled=Boolean(a(b.chart.showlegend,1));if(b.dataset&&0<b.dataset.length){this.categoryAdder(b,d);g=0;for(f=b.dataset.length;g<
857 f;g+=1)r=b.dataset[g],z={hoverEffects:this.parseSeriesHoverOptions(b,d,r,e),visible:!a(r.initiallyhidden,0),data:[]},this.isStacked||(z.numColumns=f),r=this.point(e,z,r,b.chart,d,h.oriCatTmp.length,g),r instanceof Array?d.series=d.series.concat(r):d.series.push(r);this.configureAxis(d,b);b.trendlines&&!this.isLog&&c(b.trendlines,d.yAxis,h,!1,this.isBar,void 0,this.inversed)}},categoryAdder:function(b,c){var d,e=0,f=c[w],g=f.axisGridManager,r=b.chart,z=c.xAxis,k,f=f.x,n,m,p;if(b.categories&&b.categories[0]&&
858 b.categories[0].category)for(b.categories[0].font&&(c.xAxis.labels.style.fontFamily=b.categories[0].font),void 0!==(d=a(b.categories[0].fontsize))&&(1>d&&(d=1),c.xAxis.labels.style.fontSize=d+Pa,h(c.xAxis.labels.style)),b.categories[0].fontcolor&&(c.xAxis.labels.style.color=b.categories[0].fontcolor.split(za)[0].replace(/^\#?/,"#")),m=c[w].oriCatTmp,p=b.categories[0].category,d=0;d<p.length;d+=1)p[d].vline?g.addVline(z,p[d],e,c):(n=a(p[d].showlabel,r.showlabels,1),k=C(D(b.categories[0].category[d].label,
859 b.categories[0].category[d].name)),g.addXaxisCat(z,e,e,n?k:l),m[e]=D(C(b.categories[0].category[d].tooltext),k),e+=1);f.catCount=e},getPointStub:function(c,d,e,g,f,h,r,z,k,m){var p=this.dataObj.chart,E=this.isDual,s=this.isXY,V=this.isMLAxis,U=this.isStacked,P=this.isErrorChart,t;g=g[w];var v,ha,T=null===d?d:this.numberFormatter.dataLabels(d,r),pa,ra=J(C(b(c.tooltext,f.plottooltext,g.tooltext))),ka=g.tooltipSepChar,B,H={},I,ja,K,F,Ia,R,M,Ca,Ta;P&&(ja=null===z?z:this.numberFormatter.dataLabels(z,r),
860 R=null===d?l:this.numberFormatter.percentValue(z/d*100),B=[1,2,3,4,5,6,7,99,100,101,102],d={yaxisName:F=C(E?r?p.syaxisname:p.pyaxisname:p.yaxisname),xaxisName:Ia=C(p.xaxisname),formattedValue:T,label:e,errorDataValue:ja,errorPercentValue:R},s?(K=null===k?k:this.numberFormatter.xAxis(k),M=null===m?l:this.numberFormatter.percentValue(k/m*100),B.push(103,104,105,106,107,108,109,110),Ta=b(c.horizontalerrorvalue,c.errorvalue),d.errorValue=Ca=b(c.verticalerrorvalue,c.errorvalue),m=J(C(b(c.verticalerrorplottooltext,
861 c.errorplottooltext,f.verticalerrorplottooltext,f.errorplottooltext,p.verticalerrorplottooltext,p.errorplottooltext))),null!==z&&(d.verticalErrorDataValue=ja,d.verticalErrorPercentValue=R,d.verticalErrorValue=Ca),null!==k&&(d.horizontalErrorDataValue=K,d.horizontalErrorPercentValue=M,d.horizontalErrorValue=Ta),I=J(C(b(c.horizontalerrorplottooltext,c.errorplottooltext,f.horizontalerrorplottooltext,f.errorplottooltext,p.horizontalerrorplottooltext,p.errorplottooltext))),H._hErrortoolText=g.showTooltip?
862 void 0!==I?n(I,B,{yaxisName:F=C(E?r?p.syaxisname:p.pyaxisname:p.yaxisname),xaxisName:Ia=C(p.xaxisname),formattedValue:T,label:e,errorDataValue:K,errorPercentValue:M,errorValue:Ta,verticalErrorDataValue:ja,verticalErrorPercentValue:R,verticalErrorValue:Ca,horizontalErrorDataValue:K,horizontalErrorPercentValue:M,horizontalErrorValue:Ta},c,p,f):null===z?!1:K:!1):(m=J(C(b(c.errorplottooltext,f.errorplottooltext,p.errorplottooltext))),d.errorValue=Ca=b(c.errorvalue)),H._errortoolText=g.showTooltip?void 0!==
863 m?n(m,B,d,c,p,f):null===z?!1:ja:!1);g.showTooltip?void 0!==ra?(U=[4,5,6,7],r={yaxisName:F||C(E?r?p.syaxisname:p.pyaxisname:V?f._yAxisName:p.yaxisname),xaxisName:Ia||C(p.xaxisname)},s?(U.push(8,9,10,11),r.yDataValue=T,r.xDataValue=e,P&&(U.push(103,104,105,106,107,108,109,110),null!==z&&(r.verticalErrorDataValue=ja,r.verticalErrorPercentValue=R,r.verticalErrorValue=Ca),null!==k&&(r.horizontalErrorDataValue=K,r.horizontalErrorPercentValue=M,r.horizontalErrorValue=Ta))):(U.push(1,2,3),r.formattedValue=
864 T,r.label=e,P&&(U.push(99,100,101,102),r.errorValue=Ca,null!==z&&(r.errorDataValue=ja,r.errorPercentValue=R))),f=n(ra,U,r,c,p,f)):null===T?f=!1:(g.seriesNameInToolTip&&(pa=D(f&&f.seriesname)),f=pa?pa+ka:l,f+=e?e+ka:l,g.showPercentInToolTip&&U?(ha=!0,f+="$percentValue"):f+=T):f=!1;a(c.showvalue,h)?void 0!==J(c.displayvalue)?t=C(c.displayvalue):g.showPercentValues?v=!0:t=T:t=l;H.link=b(c.link);H.displayValue=t;H.categoryLabel=e;H.toolText=f;H.showPercentValues=v;H.showPercentInToolTip=ha;return H}},
865 aa.singleseries);aa("xybase",{hideRLine:function(){var a=this.chart.series[this.index+1];a&&a.hide&&a.hide()},showRLine:function(){var a=this.chart.series[this.index+1];a&&a.show&&a.show()},getRegressionLineSeries:function(a,b,c){var d,f,e,g;g=a.sumXY;var h=a.sumX,r=a.sumY;f=a.xValues;e=a.sumXsqure;d=a.yValues;a=a.sumYsqure;b?(f.sort(Gb),d=f[0],f=f[f.length-1],g=(c*g-h*r)/(c*e-Y(h,2)),e=isNaN(g)?r/c:g*(d-h/c)+r/c,c=isNaN(g)?r/c:g*(f-h/c)+r/c,c=[{x:d,y:e},{x:f,y:c}]):(d.sort(Gb),e=d[0],d=d[d.length-
866 1],g=(c*g-h*r)/(c*a-Y(r,2)),f=isNaN(g)?h/c:g*(e-r/c)+h/c,c=isNaN(g)?h/c:g*(d-r/c)+h/c,c=[{x:f,y:e},{x:c,y:d}]);return c},pointValueWatcher:function(a,b,c,d){var f=a[w];null!==b&&(a=f[0],a.max=a.max>b?a.max:b,a.min=a.min<b?a.min:b);null!==c&&(a=f.x,a.max=a.max>c?a.max:c,a.min=a.min<c?a.min:c);d&&(c=c||0,b=b||0,d.sumX+=c,d.sumY+=b,d.sumXY+=c*b,d.sumXsqure+=Y(c,2),d.xValues.push(c),d.sumYsqure+=Y(b,2),d.yValues.push(b))}},aa.multiseries);aa("scrollbase",{postSeriesAddition:function(){var c=this.hcJSON,
867 d=c.xAxis.scroll,e=c[w],g=e.width,f=e.x.catCount,h=this.dataObj.chart,r=this.colorManager,z,k,l,n,p,m;e.isScroll=!0;c.chart.hasScroll=!0;if(this.isStacked)z=1;else{k=z=0;n=c.series;m=c.chart.defaultSeriesType;for(l=n.length;k<l;k++)p=b(n[k].type,m),"column"===p&&(z+=1);1>z&&(z=1)}f*=z;g=a(h.numvisibleplot,ya(g/this.avgScrollPointWidth));d&&2<=g&&g<f&&(d.enabled=!0,d.vxLength=g/z,d.startPercent=H(1,S(0,parseFloat(h.scrolltoend)||0)),d.padding=a(h.scrollpadding,0),d.height=a(h.scrollheight,16),d.showButtons=
868 !!a(h.scrollshowbuttons,1),d.buttonPadding=a(h.scrollbtnpadding,0),d.color=M(b(h.scrollcolor,r.getColor("altHGridColor"))),e.marginBottomExtraSpace+=d.padding+d.height);if(pa||a(h.enabletouchscroll,0))c.chart.zoomType="x",c.chart.nativeZoom=!1,c.chart.selectionMarkerFill="rgba(255,255,255,0)",(c.callbacks||(c.callbacks=[])).push(function(a){Q(a,"selectionstart selectiondrag",aa.scrollbase.performTouchScroll,{})})},performTouchScroll:function(a){var b=this.xAxis[0].scroller,c=b.config,c=c.trackLength/
869 (c.width/c.scrollRatio)*(a.chartX||1);!0!==a.isOutsidePlot&&ja(b.elements.anchor.element,"selectionstart"===a.type?"dragstart":"drag",{pageX:-c,pageY:-a.chartY})}},aa.multiseries);aa("logbase",{isLog:!0,isValueAbs:!0,configureAxis:function(d,g){var h=d[w],r=h.axisGridManager,f=this.numberFormatter,z=d.series,k=d.xAxis,n=d.yAxis[0],p=h[0],m=g.chart,E=!a(m.showyaxislimits,m.showlimits,m.showyaxisvalues,1),s=!a(m.showdivlinevalues,m.showyaxisvalues,1),V=a(m.base,m.logbase,10),U=a(m.yaxismaxvalue),P=
870 a(m.yaxisminvalue),t=this.colorManager,v=1===a(m.showminordivlinevalues),ha=b(m.minordivlinecolor,n.gridLineColor,t.getColor("divLineColor")),T=a(m.minordivlinealpha,m.divlinealpha,t.getColor("divLineAlpha")),t=[n,void 0,void 0,a(m.divlinethickness,2),n.gridLineDashStyle,n.gridLineColor,2],ha=[n,void 0,void 0,a(m.minordivlinethickness,1),n.gridLineDashStyle,Z(b(m.minordivlinecolor,ha),a(m.minordivlinealpha,T/2)),2],T=v||T&&ha[3],D=a(m.showaxislimitgridlines,this.showAxisLimitGridLines),pa=a(D,this.is3D||
871 d.chart.plotBorderWidth?0:1),B,ka;0>=V&&(V=10);0>=U&&(U=void 0);0>=P&&(P=void 0);U=this.getLogAxisLimits(p.max||V,p.min||1,U,P,V,T?m.numminordivlines:0);k.title.text=C(m.xaxisname);k.showLine=a(m.showxaxisline,m.showaxislines,0);k.lineThickness=a(m.xaxislinethickness,m.axislinethickness,1);k.lineAlpha=a(m.xaxislinealpha,m.axislinealpha,100);k.lineColor=Z(b(m.xaxislinecolor,m.axislinecolor,"000"));e(n,{title:{text:C(m.yaxisname)},labels:{enabled:!1},gridLineWidth:0,alternateGridColor:Aa,reversed:"1"===
872 m.invertyaxis,max:ra(U.Max,V),min:ra(U.Min,V),showLine:a(m.showyaxisline,m.showaxislines,0),lineThickness:a(m.yaxislinethickness,m.axislinethickness,1),lineAlpha:a(m.yaxislinealpha,m.axislinealpha,100),lineColor:Z(b(m.yaxislinecolor,m.axislinecolor,"000"))});for(m=z.length;m--;)if(P=z[m])for(P.threshold=n.min,ka=(P=P.data)&&P.length||0;ka--;)B=P[ka],B.y=ra(B.y,V);delete p.max;delete p.min;p.isLog=!0;n.reversed&&0<=n.min&&(d.plotOptions.series.threshold=n.max);g.trendlines&&c(g.trendlines,[{max:U.Max,
873 min:U.Min,plotLines:n.plotLines,plotBands:n.plotBands,title:n.title}],h);for(m=n.plotLines.length;m--;)B=n.plotLines[m],B.value&&(B.value=ra(B.value,V)),B.from&&(B.from=ra(B.from,V)),B.to&&(B.to=ra(B.to,V));for(m=n.plotBands.length;m--;)B=n.plotBands[m],B.from&&(B.from=ra(B.from,V)),B.to&&(B.to=ra(B.to,V));for(m=U.divArr.length;m--;){B=U.divArr[m];if(B.ismajor)t[1]=ra(B.value,V),t[2]=f.yAxis(B.value),r.addAxisGridLine.apply(r,t);else if(T||B.isextreme)ha[1]=ra(B.value,V),ha[2]=v||B.isextreme?f.yAxis(B.value):
874 l,r.addAxisGridLine.apply(r,ha);P=n.plotLines[n.plotLines.length-1];B.isextreme?(P.width=D||pa&&(!B.isMin||!k.showLine)?P.width:0.1,E&&(P.label.text=l)):s&&P.label&&(P.label.text=l)}},getLogAxisLimits:function(a,b,c,d,f,e){var g=function(a){return null===a||void 0===a||""===a||isNaN(a)?!1:!0},h=0,r=[],z,k,l,m,n,p,E,s;g(c)&&Number(c)>=a?a=Number(c):(c=1<f?sa(ca(a)/ca(f)):ya(ca(a)/ca(f)),a=Y(f,c),k=c);k||(k=1<f?sa(ca(a)/ca(f)):ya(ca(a)/ca(f)));g(d)&&Number(d)<=b?b=Number(d):(c=1<f?ya(ca(b)/ca(f)):sa(ca(b)/
875 ca(f)),b=Y(f,c),z=c);z||(z=1<f?ya(ca(b)/ca(f)):sa(ca(b)/ca(f)));d=Number(String(ca(f)/ca(10)));e=Number(e)||(ya(d)==d?8:4);1<f?(l=k,m=z):0<f&&1>f&&(l=z,m=k);d=k;for(z=l;z>=m;--z)if(l=Y(f,d),b<=l&&a>=l&&(r[h++]={value:l,ismajor:!0}),z!=m){k=1<f?-1:1;l=Y(f,d)-Y(f,d+k);c=l/(e+1);for(g=1;g<=e;++g)l=Y(f,d+k)+c*g,b<=l&&a>=l&&(r[h++]={value:l,ismajor:!1});1<f?d--:d++}for(E in r)for(s in r[E])"value"==s&&(n||(n=r[E][s]==b&&(r[E].isextreme=r[E].isMin=!0)),p||(p=r[E][s]==a&&(r[E].isextreme=r[E].isMax=!0)));
876 n||(r[h++]={value:b,ismajor:!0,isMin:!0,isextreme:!0});p||(r[h]={value:a,ismajor:!0,isMax:!0,isextreme:!0});return{Max:a,Min:b,divArr:r}},pointValueWatcher:function(b,c,d){b=b[w];d=a(d,0);0<c&&(b[d]||(b[d]={}),d=b[d],d.max=d.max>c?d.max:c,d.min=d.min<c?d.min:c)}},aa.mslinebase);ga=aa.singleseries;la=aa.multiseries;aa("column2dbase",{point:function(c,d,h,r,f){var z=h.length,k=f[w],m=k.axisGridManager,n=f.xAxis,k=k.x,p=this.colorManager,E=/3d$/.test(f.chart.defaultSeriesType),s=this.isBar,V=/^spark/i.test(c);
877 c=b(r.showplotborder,V||E?Ha:La)===La?E?1:a(r.plotborderthickness,1):0;var U=f.chart.useRoundEdges,P=a(r.plotborderalpha,r.plotfillalpha,100),v=b(r.plotbordercolor,p.getColor("plotBorderColor")).split(za)[0],V=V?"":a(r.useplotgradientcolor,1)?F(r.plotgradientcolor,p.getColor("plotGradientColor")):l,ha=0,T=Boolean(a(r.use3dlighting,1)),pa=f[w].numberFormatter,B,ra=a(r.plotborderdashed,0),ka=a(r.plotborderdashlen,5),H=a(r.plotborderdashgap,4),ja,I,K,Ia,J,R,M,Ca,Ta,Q,N,ma,Ja,Ka;for(K=0;K<z;K+=1)Ja=h[K],
878 Ja.vline?m.addVline(n,Ja,ha,f):(I=pa.getCleanValue(Ja.value),B=a(Ja.showlabel,r.showlabels,1),Ia=C(D(Ja.label,Ja.name)),m.addXaxisCat(n,ha,ha,B?Ia:l),ha+=1,ja=b(Ja.color,p.getPlotColor()),J=b(Ja.alpha,r.plotfillalpha,Oa),R=b(Ja.ratio,r.plotfillratio),M=b(360-r.plotfillangle,s?180:90),Ca=b(Ja.alpha,P),Ta=a(Ja.dashed,ra),Q=b(Ja.dashgap,H),N=b(Ja.dashlen,ka),0>I&&(M=s?180-M:360-M),Ka={opacity:J/100},ma=t(ja+za+V.replace(/,+?$/,""),J,R,M,U,v,Ca+l,s,E),B=Ta?g(N,Q,c):"none",ja=this.pointHoverOptions(Ja,
879 d,{plotType:"column",is3d:E,isBar:s,use3DLighting:T,isRoundEdged:U,color:ja,gradientColor:V,alpha:J,ratio:R,angle:M,borderWidth:c,borderColor:v,borderAlpha:Ca,borderDashed:Ta,borderDashGap:Q,borderDashLen:N,shadow:Ka}),d.data.push(e(this.getPointStub(Ja,I,Ia,f),{y:I,shadow:Ka,color:ma[0],borderColor:ma[1],borderWidth:c,use3DLighting:T,dashStyle:B,tooltipConstraint:this.tooltipConstraint,hoverEffects:ja.enabled&&ja.options,rolloverProperties:ja.enabled&&ja.rolloverOptions})),this.pointValueWatcher(f,
880 I));k.catCount=ha;return d},defaultSeriesType:"column"},ga);aa("linebase",{defaultSeriesType:"line",hasVDivLine:!0,defaultPlotShadow:1,point:function(c,d,h,r,f){var z,k,m,n,p,E,s,V,U,P,t,v,ha,T,pa,B,ra,ka,H,ja,I,K,F,Ia,J,R;c=f.chart;var Ca=h.length,Ta=f.xAxis;z=f[w];var Q=this.colorManager,N,Ja=z.axisGridManager,ma=0,Ka=z.x,S=f[w].numberFormatter,ob,ab,bb;T=M(b(r.linecolor,r.palettecolors,Q.getColor("plotFillColor")));pa=b(r.linealpha,Oa);t=a(r.linethickness,this.lineThickness,4);v=Boolean(a(r.linedashed,
881 0));s=a(r.linedashlen,5);V=a(r.linedashgap,4);J=a(r.anchorshadow,0);d.color={FCcolor:{color:T,alpha:pa}};d.lineWidth=t;d.anchorShadow=J;d.step=b(this.stepLine,d.step);d.drawVerticalJoins=Boolean(a(d.drawVerticalJoins,r.drawverticaljoins,1));d.useForwardSteps=Boolean(a(d.useForwardSteps,r.useforwardsteps,1));ha=a(r.drawanchors,r.showanchors);for(k=0;k<Ca;k+=1)n=h[k],n.vline?Ja.addVline(Ta,n,ma,f):(z=S.getCleanValue(n.value),p=a(n.showlabel,r.showlabels,1),m=C(D(n.label,n.name)),Ja.addXaxisCat(Ta,ma,
882 ma,p?m:l),ma+=1,U=M(b(n.color,T)),P=a(n.alpha,pa),p=a(n.dashed,v)?g(s,V,t):"none",E={opacity:P/100},ra=a(n.anchorsides,r.anchorsides,0),Ia=a(n.anchorstartangle,r.anchorstartangle,90),ja=a(n.anchorradius,r.anchorradius,this.anchorRadius,3),H=M(b(n.anchorbordercolor,r.anchorbordercolor,T)),ka=a(n.anchorborderthickness,r.anchorborderthickness,this.anchorBorderThickness,1),I=M(b(n.anchorbgcolor,r.anchorbgcolor,Q.getColor("anchorBgColor"))),K=b(n.anchoralpha,r.anchoralpha,Oa),F=b(n.anchorbgalpha,r.anchorbgalpha,
883 K),ob=b(n.anchorimageurl,r.anchorimageurl),ab=b(n.anchorimagescale,r.anchorimagescale,100),bb=b(n.anchorimagealpha,r.anchorimagealpha,100),B=void 0===ha?0!==P:!!ha,R=Boolean(a(n.anchorshadow,J,0)),N=this.pointHoverOptions(n,d,{plotType:"anchor",anchorBgColor:I,anchorAlpha:K,anchorBgAlpha:F,anchorAngle:Ia,anchorBorderThickness:ka,anchorBorderColor:H,anchorBorderAlpha:K,anchorSides:ra,anchorRadius:ja,imageUrl:ob,imageScale:ab,imageAlpha:bb,shadow:E}),d.data.push(e(this.getPointStub(n,z,m,f),{y:z,color:{FCcolor:{color:U,
884 alpha:P}},shadow:E,dashStyle:p,valuePosition:b(n.valueposition,c.valuePosition),marker:{enabled:!!B,shadow:R&&{opacity:K/100},fillColor:{FCcolor:{color:I,alpha:F*K/100+l}},lineColor:{FCcolor:{color:H,alpha:K}},lineWidth:ka,radius:ja,startAngle:Ia,symbol:ba(ra),imageUrl:ob,imageScale:ab,imageAlpha:bb},tooltipConstraint:this.tooltipConstraint,hoverEffects:N.enabled&&N.options,rolloverProperties:N.enabled&&N.rolloverOptions})),this.pointValueWatcher(f,z));Ka.catCount=ma;return d},defaultZeroPlaneHighlighted:!1},
885 ga);aa("area2dbase",{defaultSeriesType:"area",hasVDivLine:!0,point:function(c,d,h,r,f){c=f.chart;var z=h.length,k=f.xAxis,n=f[w],m=n.axisGridManager,n=n.x,p=f[w].numberFormatter,E=this.colorManager,s=0,V,U,P,t,v,ha,T,pa,B,ra,ka,H,ja,I,K,Ia,R,Ca,Ta,N,Q,Ja,ma,Ka,ob,ab,bb,X;v=b(r.plotfillcolor,r.areabgcolor,J(r.palettecolors)?E.getPlotColor(0):E.getColor("plotFillColor")).split(/\s*\,\s*/)[0];Q=za+(a(r.useplotgradientcolor,1)?F(r.plotgradientcolor,E.getColor("plotGradientColor")):l);ha=b(r.plotfillalpha,
886 r.areaalpha,this.isStacked?Oa:"90");T=a(r.plotfillangle,270);pa=b(r.plotbordercolor,r.areabordercolor,J(r.palettecolors)?E.getPlotColor(0):E.getColor("plotBorderColor")).split(/\s*\,\s*/)[0];B=r.showplotborder==Ha?Ha:b(r.plotborderalpha,r.plotfillalpha,r.areaalpha,Oa);V=a(r.plotborderangle,270);U=Boolean(a(r.plotborderdashed,0));P=a(r.plotborderdashlen,5);ja=a(r.plotborderdashgap,4);R=a(r.plotborderthickness,r.areaborderthickness,1);Ja=d.fillColor={FCcolor:{color:v+Q.replace(/,+?$/,""),alpha:ha,ratio:eb,
887 angle:T}};d.lineWidth=R;d.dashStyle=U?g(P,ja,R):"none";d.lineColor={FCcolor:{color:pa,alpha:B,ratio:Oa,angle:V}};d.step=b(this.stepLine,d.step);d.drawVerticalJoins=Boolean(a(d.drawVerticalJoins,r.drawverticaljoins,1));d.useForwardSteps=Boolean(a(d.useForwardSteps,r.useforwardsteps,1));R=Boolean(a(r.drawanchors,r.showanchors,1));d.anchorShadow=ma=a(r.anchorshadow,0);for(U=0;U<z;U+=1)ja=h[U],ja.vline?m.addVline(k,ja,s,f):(V=p.getCleanValue(ja.value),t=a(ja.showlabel,r.showlabels,1),P=C(D(ja.label,ja.name)),
888 m.addXaxisCat(k,s,s,t?P:l),s+=1,t=a(ja.anchorsides,r.anchorsides,0),H=a(ja.anchorstartangle,r.anchorstartangle,90),ra=a(ja.anchorradius,r.anchorradius,3),ka=M(b(ja.anchorbordercolor,r.anchorbordercolor,pa)),Ca=a(ja.anchorborderthickness,r.anchorborderthickness,1),I=M(b(ja.anchorbgcolor,r.anchorbgcolor,E.getColor("anchorBgColor"))),K=b(ja.anchoralpha,r.anchoralpha,this.anchorAlpha,Ha),Ia=b(ja.anchorbgalpha,r.anchorbgalpha,K),Ka=Boolean(a(ja.anchorshadow,ma,0)),Ta=J(ja.color),N=a(ja.alpha),Ta=void 0!==
889 Ta||void 0!==N?{FCcolor:{color:Ta?M(Ta)+Q:v,alpha:void 0===N?W(N)+l:ha,ratio:eb,angle:T}}:Ja,ob=b(ja.anchorimageurl,r.anchorimageurl),ab=b(ja.anchorimagescale,r.anchorimagescale,100),bb=b(ja.anchorimagealpha,r.anchorimagealpha,100),N={opacity:S(N,B)/100,inverted:!0},X=this.pointHoverOptions(ja,d,{plotType:"anchor",anchorBgColor:I,anchorAlpha:K,anchorBgAlpha:Ia,anchorAngle:H,anchorBorderThickness:Ca,anchorBorderColor:ka,anchorBorderAlpha:K,anchorSides:t,anchorRadius:ra,imageUrl:ob,imageScale:ab,imageAlpha:bb,
890 shadow:N}),d.data.push(e(this.getPointStub(ja,V,P,f),{y:V,shadow:N,color:Ta,valuePosition:b(ja.valueposition,c.valuePosition),marker:{enabled:R,shadow:Ka&&{opacity:K/100},fillColor:{FCcolor:{color:I,alpha:Ia*K/100+l}},lineColor:{FCcolor:{color:ka,alpha:K}},lineWidth:Ca,radius:ra,symbol:ba(t),startAngle:H,imageUrl:ob,imageScale:ab,imageAlpha:bb},tooltipConstraint:this.tooltipConstraint,previousY:this.pointValueWatcher(f,V),hoverEffects:X.enabled&&X.options,rolloverProperties:X.enabled&&X.rolloverOptions})));
891 n.catCount=s;return d}},ga);aa("mscolumn2dbase",{point:function(c,d,e,g,f,h,r,z,k){c=a(g.ignoreemptydatasets,0);var n=!1,m=e.data||[],p=f[w],E=b(d.type,this.defaultSeriesType),s=b(d.isStacked,f.plotOptions[E]&&f.plotOptions[E].stacking),V=b(this.isValueAbs,p.isValueAbs,!1),U=a(d.yAxis,0),P=f[w].numberFormatter,t=this.colorManager,v=t.getPlotColor(),C,ha=f._FCconf.isBar,T=d.hoverEffects;s||(d.columnPosition=a(k,z,r));d.name=J(e.seriesname);if(0===a(e.includeinlegend)||void 0===d.name)d.showInLegend=
892 !1;d.color=b(e.color,v).split(za)[0].replace(/^#?/g,"#");r=/3d$/.test(f.chart.defaultSeriesType);k=b(360-g.plotfillangle,ha?180:90);0>C&&(k=360-k);e=d._dataParser=ib.column(f,{seriesname:d.name,plottooltext:e.plottooltext,color:b(e.color,v),alpha:b(e.alpha,g.plotfillalpha,Oa),plotgradientcolor:a(g.useplotgradientcolor,1)?F(g.plotgradientcolor,t.getColor("plotGradientColor")):l,ratio:b(e.ratio,g.plotfillratio),fillAangle:k,isRoundEdges:f.chart.useRoundEdges,plotBorderColor:b(g.plotbordercolor,r?jb:
893 t.getColor("plotBorderColor")).split(za)[0],plotBorderAlpha:g.showplotborder==Ha||r&&g.showplotborder!=La?Ha:b(g.plotborderalpha,Oa),isBar:this.isBar,is3d:r,dashed:a(e.dashed,g.plotborderdashed,0),dashLen:a(e.dashlen,g.plotborderdashlen,5),dashGap:a(e.dashgap,g.plotborderdashgap,4),borderWidth:a(g.plotborderthickness,La),showValues:a(e.showvalues,p.showValues),yAxis:U,use3DLighting:a(g.use3dlighting,1),_sourceDataset:e,hoverEffects:T},this);for(g=0;g<h;g+=1)(p=m[g])?(C=P.getCleanValue(p.value,V),
894 null===C?d.data.push({y:null}):(n=!0,p=e(p,g,C),d.data.push(p),p.previousY=this.pointValueWatcher(f,C,U,s,g,z,E))):d.data.push({y:null});!c||n||this.realtimeEnabled||(d.showInLegend=!1);return d},defaultSeriesType:"column"},la);aa("mslinebase",{hasVDivLine:!0,point:function(c,d,e,g,f,h){c=a(g.ignoreemptydatasets,0);var r=!1,z=this.colorManager,k,n;k=f.chart;var m=e.data||[];n=f[w];var p=b(d.type,this.defaultSeriesType),E=b(d.isStacked,f.plotOptions[p]&&f.plotOptions[p].stacking),s=b(this.isValueAbs,
895 n.isValueAbs,!1),V=a(d.yAxis,0),U=this.numberFormatter,P=M(b(e.color,g.linecolor,z.getPlotColor())),t=a(e.alpha,g.linealpha,Oa),v=a(g.showshadow,this.defaultPlotShadow,1),C=a(e.drawanchors,e.showanchors,g.drawanchors,g.showanchors),ha=a(e.anchorsides,g.anchorsides,0),T=a(e.anchorstartangle,g.anchorstartangle,90),pa=a(e.anchorradius,g.anchorradius,3),B=M(b(e.anchorbordercolor,g.anchorbordercolor,P)),D=a(e.anchorborderthickness,g.anchorborderthickness,1),z=M(b(e.anchorbgcolor,g.anchorbgcolor,z.getColor("anchorBgColor"))),
896 ra=b(e.anchoralpha,g.anchoralpha,Oa),ka=b(e.anchorbgalpha,g.anchorbgalpha,ra),ja=ra&&b(e.anchorshadow,g.anchorshadow,0),H=d.hoverEffects;d.name=J(e.seriesname);if(0===a(e.includeinlegend)||void 0===d.name||0===t&&1!==C)d.showInLegend=!1;d.marker={fillColor:{FCcolor:{color:z,alpha:ka*ra/100+l}},lineColor:{FCcolor:{color:B,alpha:ra+l}},lineWidth:D,radius:pa,symbol:ba(ha),startAngle:T};d.color={FCcolor:{color:P,alpha:t}};d.shadow=v?{opacity:v?t/100:0}:!1;d.anchorShadow=ja;d.step=b(this.stepLine,d.step);
897 d.drawVerticalJoins=Boolean(a(d.drawVerticalJoins,g.drawverticaljoins,1));d.useForwardSteps=Boolean(a(d.useForwardSteps,g.useforwardsteps,1));d.lineWidth=a(e.linethickness,g.linethickness,2);k=d._dataParser=ib.line(f,{seriesname:d.name,plottooltext:e.plottooltext,lineAlpha:t,anchorAlpha:ra,showValues:a(e.showvalues,n.showValues),yAxis:V,lineDashed:Boolean(a(e.dashed,g.linedashed,0)),lineDashLen:a(e.linedashlen,g.linedashlen,5),lineDashGap:a(e.linedashgap,g.linedashgap,4),lineThickness:d.lineWidth,
898 lineColor:P,valuePosition:b(e.valueposition,k.valuePosition),drawAnchors:C,anchorBgColor:z,anchorBgAlpha:ka,anchorBorderColor:B,anchorBorderThickness:D,anchorRadius:pa,anchorSides:ha,anchorAngle:T,anchorShadow:d.anchorShadow,anchorStartAngle:a(e.anchorstartangle,g.anchorstartangle),_sourceDataset:e,hoverEffects:H,imageUrl:b(e.anchorimageurl,g.anchorimageurl),imageScale:b(e.anchorimagescale,g.anchorimagescale,100),imageAlpha:b(e.anchorimagealpha,g.anchorimagealpha,100)},this);for(g=0;g<h;g+=1)(n=m[g])?
899 (e=U.getCleanValue(n.value,s),null===e?d.data.push({y:null}):(r=!0,n=k(n,g,e),d.data.push(n),n.previousY=this.pointValueWatcher(f,e,V,E,g,0,p))):d.data.push({y:null});!c||r||this.realtimeEnabled||(d.showInLegend=!1);return d},defaultSeriesType:"line",defaultPlotShadow:1,defaultZeroPlaneHighlighted:!1},la);aa("msareabase",{hasVDivLine:!0,point:function(c,d,e,h,f,r){c=a(h.ignoreemptydatasets,0);var z=!1,k=f.chart,n=e.data||[],m=f[w],p=b(d.type,this.defaultSeriesType),E=b(d.isStacked,f.plotOptions[p]&&
900 f.plotOptions[p].stacking),s=b(this.isValueAbs,m.isValueAbs,!1),V=a(d.yAxis,0),U=f[w].numberFormatter,P=this.colorManager,t=P.getPlotColor(),v=b(e.color,h.plotfillcolor,t).split(za)[0].replace(/^#?/g,"#").split(za)[0],C=b(e.alpha,h.plotfillalpha,h.areaalpha,this.areaAlpha,70),ha=a(h.plotfillangle,270),t=b(e.plotbordercolor,h.plotbordercolor,h.areabordercolor,this.isRadar?t:"666666").split(za)[0],T=b(e.showplotborder,h.showplotborder)==Ha?Ha:b(e.plotborderalpha,h.plotborderalpha,e.alpha,h.plotfillalpha,
901 h.areaalpha,"95"),pa=a(h.plotborderangle,270),B=a(e.anchorsides,h.anchorsides,0),D=a(e.anchorstartangle,h.anchorstartangle,90),ra=a(e.anchorradius,h.anchorradius,3),ka=M(b(e.anchorbordercolor,h.anchorbordercolor,v)),ja=a(e.anchorborderthickness,h.anchorborderthickness,1),H=M(b(e.anchorbgcolor,h.anchorbgcolor,P.getColor("anchorBgColor"))),K=a(e.anchoralpha,h.anchoralpha,this.anchorAlpha,0),I=a(e.anchorbgalpha,h.anchorbgalpha,K),Ia=K&&b(e.anchorshadow,h.anchorshadow,0),R=d.hoverEffects;this.isRadar||
902 (v+=za+(a(h.useplotgradientcolor,1)?F(h.plotgradientcolor,P.getColor("plotGradientColor")):l),v=v.replace(/,+?$/,""));d.step=b(this.stepLine,d.step);d.drawVerticalJoins=Boolean(a(d.drawVerticalJoins,h.drawverticaljoins,1));d.useForwardSteps=Boolean(a(d.useForwardSteps,h.useforwardsteps,1));d.name=b(e.seriesname);if(0===a(e.includeinlegend)||void 0===d.name)d.showInLegend=!1;d.fillColor={FCcolor:{color:v,alpha:C,ratio:eb,angle:ha}};d.color=v;d.shadow={opacity:a(h.showshadow,1)?T/100:0};d.anchorShadow=
903 Ia;d.lineColor={FCcolor:{color:t,alpha:T,ratio:Oa,angle:pa}};d.lineWidth=b(e.plotborderthickness,h.plotborderthickness,1);d.dashStyle=Boolean(a(e.dashed,h.plotborderdashed,0))?g(a(e.dashlen,h.plotborderdashlen,5),a(e.dashgap,h.plotborderdashgap,4),d.lineWidth):void 0;d.marker={fillColor:{FCcolor:{color:H,alpha:I*K/100+l}},lineColor:{FCcolor:{color:ka,alpha:K+l}},lineWidth:ja,radius:ra,symbol:ba(B),startAngle:D};e=d._dataParser=ib.area(f,{seriesname:d.name,plottooltext:e.plottooltext,lineAlpha:T,anchorAlpha:K,
904 showValues:a(e.showvalues,m.showValues),yAxis:V,fillColor:v,fillAlpha:C,valuePosition:b(e.valueposition,k.valuePosition),drawAnchors:Boolean(a(e.drawanchors,h.drawanchors,h.showanchors,1)),anchorBgColor:H,anchorBgAlpha:I,anchorBorderColor:ka,anchorBorderThickness:ja,anchorRadius:ra,anchorSides:B,anchorAngle:D,anchorShadow:d.anchorShadow,getLink:this.linkClickFN,anchorStartAngle:a(e.anchorstartangle,h.anchorstartangle),_sourceDataset:e,hoverEffects:R,imageUrl:b(e.anchorimageurl,h.anchorimageurl),imageScale:b(e.anchorimagescale,
905 h.anchorimagescale,100),imageAlpha:b(e.anchorimagealpha,h.anchorimagealpha,100)},this);for(k=0;k<r;k+=1)(m=n[k])?(h=m?U.getCleanValue(m.value,s):null,null===h?d.data.push({y:null}):(z=!0,m=e(m,k,h),d.data.push(m),m.previousY=this.pointValueWatcher(f,h,V,E,k,0,p))):d.data.push({y:null});!c||z||this.realtimeEnabled||(d.showInLegend=!1);return d},defaultSeriesType:"area",defaultPlotShadow:0},la);aa("scatterbase",{showValues:0,defaultPlotShadow:0,rendererId:"cartesian",defaultSeriesType:"scatter",canvasPaddingModifiers:["anchorlabel"],
906 point:function(c,d,e,h,f,r,z){c=a(h.ignoreemptydatasets,0);var k=this.colorManager,n=k.getPlotColor(),m,p,E,s,V,U,P,t,v,C,ha,T,pa,B,D,ra,ka,ja,H;r=!1;var K,I;V=a(e.drawline,h.drawlines,0);U=a(e.drawprogressioncurve,0);s=e.data||[];var F,Ia,R,Ca,Ta,N=a(e.showvalues,f[w].showValues),Q=this.numberFormatter,Ja,ma=d._showRegression=a(e.showregressionline,h.showregressionline,0);d.zIndex=1;d.name=J(e.seriesname);if(0===a(e.includeinlegend)||void 0===d.name)d.showInLegend=!1;if(V||U)E=M(b(e.color,n)),s=
907 b(e.alpha,Oa),V=a(e.linethickness,h.linethickness,2),U=Boolean(a(e.linedashed,e.dashed,h.linedashed,0)),P=a(e.linedashlen,h.linedashlen,5),t=a(e.linedashgap,h.linedashgap,4),d.color=Z(b(e.linecolor,h.linecolor,E),a(e.linealpha,h.linealpha,s)),d.lineWidth=V,d.dashStyle=U?g(P,t,V):"none";V=Boolean(a(e.drawanchors,e.showanchors,h.drawanchors,h.showanchors,1));z=a(e.anchorsides,h.anchorsides,z+3);U=a(e.anchorradius,h.anchorradius,3);E=M(b(e.anchorbordercolor,e.color,h.anchorbordercolor,E,n));n=a(e.anchorborderthickness,
908 h.anchorborderthickness,1);P=M(b(e.anchorbgcolor,h.anchorbgcolor,k.getColor("anchorBgColor")));t=b(e.anchoralpha,e.alpha,h.anchoralpha,Oa);ha=b(e.anchorbgalpha,e.alpha,h.anchorbgalpha,t);K=b(e.anchorstartangle,h.anchorstartangle,90);d.anchorShadow=k=a(h.anchorshadow,0);d.marker={fillColor:this.getPointColor(P,Oa),lineColor:{FCcolor:{color:E,alpha:t+l}},lineWidth:n,radius:U,symbol:ba(z)};s=e.data||[];Ta=s.length;ma&&(d.events={hide:this.hideRLine,show:this.showRLine},F={sumX:0,sumY:0,sumXY:0,sumXsqure:0,
909 sumYsqure:0,xValues:[],yValues:[]},Ca=a(e.showyonx,h.showyonx,1),Ia=M(b(e.regressionlinecolor,h.regressionlinecolor,E)),R=a(e.regressionlinethickness,h.regressionlinethickness,n),m=W(a(e.regressionlinealpha,h.regressionlinealpha,t)),Ia=Z(Ia,m));for(p=0;p<Ta;p+=1)(v=s[p])?(m=Q.getCleanValue(v.y),H=Q.getCleanValue(v.x),null===m?d.data.push({y:null,x:H}):(r=!0,I=this.getPointStub(v,m,Q.xAxis(H),f,e,N),T=a(v.anchorsides,z),pa=a(v.anchorradius,U),B=M(b(v.anchorbordercolor,E)),D=a(v.anchorborderthickness,
910 n),ra=M(b(v.anchorbgcolor,P)),ka=b(v.anchoralpha,v.alpha,t),ja=b(v.anchorbgalpha,ha),C=Boolean(a(v.anchorshadow,k,0)),Ja=this.pointHoverOptions(v,d,{plotType:"anchor",anchorBgColor:ra,anchorAlpha:ka,anchorBgAlpha:ja,anchorAngle:K,anchorBorderThickness:D,anchorBorderColor:B,anchorBorderAlpha:ka,anchorSides:T,anchorRadius:pa,shadow:void 0}),d.data.push({y:m,x:H,displayValue:I.displayValue,toolText:I.toolText,link:I.link,marker:{enabled:V,shadow:C&&{opacity:ka/100},fillColor:{FCcolor:{color:ra,alpha:ja*
911 ka/100+l}},lineColor:{FCcolor:{color:B,alpha:ka}},lineWidth:D,radius:pa,symbol:ba(T),startAngle:b(v.anchorstartangle,e.anchorstartangle,h.anchorstartangle,90)},hoverEffects:Ja.enabled&&Ja.options,rolloverProperties:Ja.enabled&&Ja.rolloverOptions}),this.pointValueWatcher(f,m,H,ma&&F))):d.data.push({y:null});ma&&(e=this.getRegressionLineSeries(F,Ca,Ta),this.pointValueWatcher(f,e[0].y,e[0].x),this.pointValueWatcher(f,e[1].y,e[1].x),f={type:"line",color:Ia,showInLegend:!1,lineWidth:R,enableMouseTracking:!1,
912 marker:{enabled:!1},data:e,zIndex:0},d=[d,f]);c&&!r&&(d.showInLegend=!1);return d},postSeriesAddition:function(b,c){for(var d=b.chart,e=c.chart,f=b.series,g=0,h=f.length;g<h;g+=1)f[g]._showRegression&&(f[g].relatedSeries=[g+1]);d.clipBubbles=a(e.clipbubbles,1)},categoryAdder:function(c,d){var e,r=0,f,z=d[w].x,k,n=d.xAxis,m,p;p=c.chart;var E=parseInt(p.labelstep,10),s=a(p.showlabels,1),V=b(p.xaxislabelmode,"categories").toLowerCase(),U=this.colorManager,P=d[w].numberFormatter,t,v,ha,T,pa,B;d._FCconf.isXYPlot=
913 !0;E=1<E?E:1;z.catOccupied={};if("auto"!==V&&c.categories&&c.categories[0]&&c.categories[0].category){p=c.categories[0];p.font&&(d.xAxis.labels.style.fontFamily=p.font);void 0!==(f=a(p.fontsize))&&(1>f&&(f=1),d.xAxis.labels.style.fontSize=f+Pa,h(d.xAxis.labels.style));p.fontcolor&&(d.xAxis.labels.style.color=p.fontcolor.split(za)[0].replace(/^\#?/,"#"));e=b(p.verticallinecolor,U.getColor("divLineColor"));f=a(p.verticallinethickness,1);k=a(p.verticallinealpha,U.getColor("divLineAlpha"));U=a(p.verticallinedashed,
914 0);t=a(p.verticallinedashlen,4);v=a(p.verticallinedashgap,2);ha=Z(e,k);for(e=0;e<p.category.length;e+=1)m=p.category[e],k=P.getCleanValue(m.x),null===k||m.vline||(z.catOccupied[k]=!0,B=a(m.showlabel,m.showname,s),T=a(m.showverticalline,m.showline,m.sl,0),pa=a(m.linedashed,U),m=0===B||0!==r%E?l:C(D(m.label,m.name)),n.plotLines.push({isGrid:!0,isCat:!0,width:T?f:0,color:ha,dashStyle:g(t,v,f,pa),value:k,label:{text:m,style:n.labels.style,align:Ga,verticalAlign:ua,textAlign:Ga,rotation:0,x:0,y:0}}),this.pointValueWatcher(d,
915 null,k),r+=1);"mixed"===V&&(z.requiredAutoNumericLabels=a(this.requiredAutoNumericLabels,1))}else z.requiredAutoNumericLabels=a(this.requiredAutoNumericLabels,1);z.adjustMinMax=!0},getPointColor:function(a,b){var c,d;a=M(a);b=W(b);c=ia(a,70);d=na(a,50);return{FCcolor:{gradientUnits:"objectBoundingBox",cx:0.4,cy:0.4,r:"100%",color:c+za+d,alpha:b+za+b,ratio:eb,radialGradient:!0}}}},aa.xybase);aa("mscombibase",{canvasPaddingModifiers:["anchor","anchorlabel"],series:function(d,e,g){var h,f,r,z,k=d.chart,
916 l,n=[],m=[],p=[],E,s,V=e[w],U=this.isDual,P=0,t;e.legend.enabled=Boolean(a(d.chart.showlegend,1));if(d.dataset&&0<d.dataset.length){this.categoryAdder(d,e);z=V.oriCatTmp.length;h=0;for(f=d.dataset.length;h<f;h+=1)switch(r=d.dataset[h],E=U&&"s"===b(r.parentyaxis,"p").toLowerCase()?!0:!1,l={hoverEffects:this.parseSeriesHoverOptions(d,e,r,g),visible:!a(r.initiallyhidden,0),legendIndex:h,data:[]},E?(l.yAxis=1,s=D(r.renderas,this.secondarySeriesType),this.secondarySeriesFilter&&(t=this.secondarySeriesFilter[s])):
917 (s=D(r.renderas,this.defaultSeriesType),this.defaultSeriesFilter&&(t=this.defaultSeriesFilter[s])),s=s.toLowerCase(),s){case "line":case "spline":l.type=!0===t?s:"line";n.push(aa.mslinebase.point.call(this,g,l,r,k,e,z,h));break;case "area":case "splinearea":l.type=!0===t?s:"area";e.chart.series2D3Dshift=!0;p.push(aa.msareabase.point.call(this,g,l,r,k,e,z,h));break;case "column":case "column3d":m.push(aa.mscolumn2dbase.point.call(this,g,l,d.dataset[h],k,e,z,h,void 0,P));P+=1;break;default:E?(l.type=
918 "line",n.push(aa.mslinebase.point.call(this,g,l,r,k,e,z,h))):(m.push(aa.mscolumn2dbase.point.call(this,g,l,d.dataset[h],k,e,z,h,void 0,P)),P+=1)}"0"!==k.areaovercolumns?(e.chart.areaOverColumns=!0,e.series=e.series.concat(m,p,n)):(e.chart.areaOverColumns=!1,e.series=e.series.concat(p,m,n));if(0===m.length&&1!==z)V.hasNoColumn=!0;else if(!this.isStacked)for(g=0,h=m.length;g<h;g+=1)m[g].numColumns=h;this.configureAxis(e,d);d.trendlines&&c(d.trendlines,e.yAxis,e[w],U,this.isBar)}}},aa.mscolumn2dbase)}]);
919 FusionCharts.register("module",["private","modules.renderer.js-renderer",function(){function d(a,b,c,d){var e=b.paper,g=b.layers,h=c?"y-axis":"x-axis",k=this.layerAboveDataset=g.layerAboveDataset,l=this.layerBelowDataset=g.layerBelowDataset,g=k.bands||(k.bands=[]),n=g.length,m=l.bands||(l.bands=[]),p=m.length,s=k.lines||(k.lines=[]),w=s.length,t=l.lines||(l.lines=[]),v=t.length,k=k.labels||(k.labels=[]),C=k.length,l=l.labels||(l.labels=[]),B=l.length;this.renderer=b;this.axisData=a||{};this.globalOptions=
920 b.options;this.isVertical=c;this.topBandGroup=this.topBandGroup||e.group(h+"-bands",this.layerAboveDataset);this.belowBandGroup=this.belowBandGroup||e.group(h+"-bands",this.layerBelowDataset);g.push(this.topBandGroup);n&&g[n].insertAfter(g[n-1]);m.push(this.belowBandGroup);p&&m[p].insertAfter(m[p-1]);this.topLineGroup=this.topLineGroup||e.group(h+"-lines",this.layerAboveDataset);this.belowLineGroup=this.belowLineGroup||e.group(h+"-lines",this.layerBelowDataset);this.topLabelGroup=this.topLabelGroup||
921 e.group(h+"-labels",this.layerAboveDataset);this.belowLabelGroup=this.belowLabelGroup||e.group(h+"-labels",this.layerBelowDataset);s.push(this.topLineGroup);w&&s[w].insertAfter(s[w-1]);t.push(this.belowLineGroup);v&&t[v].insertAfter(t[v-1]);k.push(this.topLabelGroup);C&&k[C].insertAfter(k[C-1]);l.push(this.belowLabelGroup);B&&l[B].insertAfter(l[B-1]);this.isReverse=d;this.configure()}function k(a,b,c,d){return aa(b-c[1]-d.top,a-c[0]-d.left)}function B(a,b){var c=b?360:qb;a=(a||0)%c;return 0>a?c+a:
922 a}var v=this,l=v.window,c=v.hcLib,K=c.Raphael,b=c.chartAPI,J=/msie/i.test(l.navigator.userAgent)&&!l.opera,a=l.document,D=l.Image,F="VML"===K.type,C=c.BLANKSTRING,w="rgba(192,192,192,"+(J?0.002:1E-6)+")",J=c.TOUCH_THRESHOLD_PIXELS,e=c.CLICK_THRESHOLD_PIXELS,g=c.stubFN,n={pageX:0,pageY:0},s=parseFloat,R=parseInt,m=c.extend2,I=c.addEvent,Q=c.getMouseCoordinate,X=c.removeEvent,$=c.pluck,p=c.pluckNumber,H=c.toRaphaelColor,S=c.setImageDisplayMode,fa=c.FC_CONFIG_STRING,sa=c.plotEventHandler,ya=c.isArray,
923 ca=c.each=function(a,b,c,d){var e;c||(c=a);d||(d={});if(ya(a))for(e=0;e<a.length;e+=1){if(!1===b.call(c,a[e],e,a,d))return e}else if(null!==a&&void 0!==a)for(e in a)if(!1===b.call(c,a[e],e,a,d))return e},Y=c.createElement,xa=c.createContextMenu,t=c.hasTouch,M=t?J:e,h=c.getSentenceCase,N=c.getCrispValues,W=c.getValidValue,na=c.getFirstValue,ia=c.regex.dropHash,Z=c.HASHSTRING,Aa=function(a){return a!==Ga&&null!==a},Ga,oa=8===a.documentMode?"visible":"",ua=l.Math,ea=ua.sin,da=ua.cos,aa=ua.atan2,ba=ua.round,
924 ga=ua.min,la=ua.max,za=ua.abs,hb=ua.ceil,Ha=ua.floor,La=180/ua.PI,Oa=ua.PI,Pa=Oa/2,qb=2*Oa,sb=Oa+Pa,tb=c.getFirstColor,xb=c.graphics.getLightColor,kb=c.POSITION_TOP,eb=c.POSITION_BOTTOM,jb=c.POSITION_RIGHT,lb=c.POSITION_LEFT;K.ca.ishot=function(a){if(this.removed)return!1;var b=this.node;a=a||"";b.ishot=a;switch(this.type){case "group":for(b=this.bottom;b;)b.attr("ishot",a),b=b.next;break;case "text":if(K.svg)for(b=b.getElementsByTagName("tspan")[0];b;)b.ishot=a,b=b.nextSibling}return!1};K.addSymbol({printIcon:function(a,
925 b,c){var d=0.75*c,e=0.5*c,g=0.33*c,h=ba(a-c)+0.5,k=ba(b-c)+0.5,l=ba(a+c)+0.5;c=ba(b+c)+0.5;var n=ba(a-d)+0.5,m=ba(b-d)+0.5,d=ba(a+d)+0.5,p=ba(b+e)+0.5,s=ba(a+e)+0.5,w=ba(b+g)+0.5;a=ba(a-e)+0.5;g=ba(b+g+g)+0.5;return["M",n,k,"L",d,k,d,m,n,m,"Z","M",h,m,"L",h,p,n,p,n,b,d,b,d,p,l,p,l,m,"Z","M",n,b,"L",n,c,d,c,d,b,"Z","M",s,w,"L",a,w,"M",s,g,"L",a,g]},exportIcon:function(a,b,c){var d=0.66*c,e=0.5*d,g=ba(a-c)+0.5,h=ba(b-c)+0.5,k=ba(a+c)+0.5;c=ba(b+c)-0.5;var l=ba(a-e)+0.5,n=b<c-3?c-3:ba(b)+0.5,e=ba(a+
926 e)-0.5,m=ba(a+d)-0.5,d=ba(a-d)+0.5;return["M",g,n,"L",g,c,k,c,k,n,k,c,g,c,"Z","M",a,c-1,"L",d,b,l,b,l,h,e,h,e,b,m,b,"Z"]}});c.rendererRoot=b("renderer.root",{standaloneInit:!1,isRenderer:!0,inited:!1,callbacks:[],init:function(a,b,c){var d=this,e=d.container=b.chart.renderTo,g=b.tooltip,h=d.layer,k,l;d.options=b;d.logic=a;d.definition=a.dataObj;d.smartLabel=a.smartLabel;d.numberFormatter=a.numberFormatter;d.fusionCharts=a.chartInstance;d.linkClickFN=a.linkClickFN;l=(k=b.chart)&&k.animation&&k.animation.duration;
927 d.animationCompleteQueue=[];e.innerHTML=C;e=d.paper=d.fusionCharts.jsVars.paper=new K(e,e.offsetWidth||a.width,e.offsetHeight||a.height);!1!==v.core.options._useSVGDescTag&&e._desc&&(k=a.friendlyName||"Vector image",d.definition&&d.definition.chart&&d.definition.chart.caption&&(k+=' with caption "'+d.definition.chart.caption+'"'),e._desc(k));d.chartWidth=e.width;d.chartHeight=e.height;d.elements||(d.elements={});h||(h=d.layers={},h.background=h.background||e.group("background"),h.dataset=h.dataset||
928 e.group("dataset").insertAfter(h.background),h.tracker=h.tracker||e.group("hot").insertAfter(h.dataset));g&&!1!==g.enabled&&(e.tooltip(g.style,g.shadow,g.constrain),h.tracker.trackTooltip(!0),h.dataset.trackTooltip(!0));d.disposeChartStyleSheet();d.setMargins();d.drawBackground();d.drawButtons();d.drawGraph();b.legend&&b.legend.enabled&&d.drawLegend();d.drawCaption();d.drawLogo();d.setChartEvents();d.drawLabels&&d.drawLabels();ca(b.callbacks,function(a){a.apply(d,this)},[a]);ca(d.callbacks,function(a){a.apply(d,
929 this)},[a]);d.fusionCharts.annotations&&d.fusionCharts.annotations.draw(d);d.createChartStyleSheet();d.options.nativeMessage||l||v.raiseEvent("internal.animationComplete",{},d.fusionCharts);d.hasRendered=!0;c&&c(d)},disposeChartStyleSheet:function(){this.paper.cssClear()},createChartStyleSheet:function(){this.paper.cssRender()},addCSSDefinition:function(a,b){var c=this.paper;b.color&&(b.fill=b.color);c.cssAddRule(a,b)},animationCompleteQueue:[],animationComplete:function(){var a,b,c,d;this.animatedElements=
930 this.animatedElements?++this.animatedElements:1;if(this.animatedElements===this.animatingElementsCount){c=this.animationCompleteQueue;a=0;for(b=c.length;a<b;a++)d=c[a],d.fn&&d.fn.call(d.scope);this.animationCompleteQueue=[];v.raiseEvent("internal.animationComplete",{},this.fusionCharts)}},getAnimationCompleteFn:function(){var a=this;a.animatingElementsCount=a.animatingElementsCount?++a.animatingElementsCount:1;return function(){a.animationComplete()}},reinit:function(a,b,c){this.hasRendered||this.init(b,
931 c)},dispose:function(){var a=this.eventListeners,b=a&&a.length;this.disposing=!0;if(b)for(;b--;)a[b].unlisten();if(this.toolbar&&this.toolbar.length){for(;this.toolbar.length;)a=this.toolbar.pop(),a.remove();this.toolbar.add=null}if(this.menus&&this.menus.length)for(;this.menus.length;)a=this.menus.pop(),a.destroy();this.paper&&(this.paper.clear(),this.paper.remove(),delete this.paper);this.exportIframe&&(this.exportIframe.parentNode.removeChild(this.exportIframe),delete this.exportIframe);delete this.disposing;
932 this.disposed=!0},onContainerClick:function(a){var b=a.target||a.originalTarget||a.srcElement||a.relatedTarget||a.fromElement,d=a.data,e=d.fusionCharts;a=c.getMouseCoordinate(d.container,a.originalEvent);e.ref&&(e=m({height:e.args.height,width:e.args.width,pixelHeight:e.ref.offsetHeight,pixelWidth:e.ref.offsetWidth,id:e.args.id,renderer:e.args.renderer,container:e.options.containerElement},a),v.raiseEvent("chartclick",e,d.logic.chartInstance),b&&b.ishot&&d||d.options.chart.link&&d.linkClickFN.call(d,
933 d))},onContainerMouseMove:function(a){var b=a.data,d=b.fusionCharts;a=c.getMouseCoordinate(b.container,a.originalEvent);d.ref&&(d=m({height:d.args.height,width:d.args.width,pixelHeight:d.ref.offsetHeight,pixelWidth:d.ref.offsetWidth,id:d.args.id,renderer:d.args.renderer,container:d.options.containerElement},a),v.raiseEvent("chartMouseMove",d,b.logic.chartInstance))},onContainerRollOver:function(a){var b=a.data,d=b.fusionCharts;a=c.getMouseCoordinate(b.container,a.originalEvent);d.ref&&(d=m({height:d.args.height,
934 width:d.args.width,pixelHeight:d.ref.offsetHeight,pixelWidth:d.ref.offsetWidth,id:d.args.id,renderer:d.args.renderer,container:d.options.containerElement},a),v.raiseEvent("chartRollOver",d,b.logic.chartInstance))},onContainerRollOut:function(a){var b=a.chart,d=b.fusionCharts;a=c.getMouseCoordinate(b.container,a.event);d.ref&&(d=m({height:d.args.height,width:d.args.width,pixelHeight:d.ref.offsetHeight,pixelWidth:d.ref.offsetWidth,id:d.args.id,renderer:d.args.renderer,container:d.options.containerElement},
935 a),v.raiseEvent("chartRollOut",d,b.logic.chartInstance))},chartHoverManager:function(){var b=!1,c=function(c){var d=function(e){var g=e.target||e.originalTarget||e.srcElement||e.relatedTarget||e.fromElement,h=c.paper;e={chart:c,event:e};F?h.getById(g.parentNode.raphaelid)||(c.onContainerRollOut(e),b=!1,a.detachEvent("onmouseover",d)):g.viewportElement||(b=!1,c.onContainerRollOut(e),l.removeEventListener("mouseover",d))};return d};return function(d){var e=d.type,g=d.data;"mouseover"!==e&&"touchstart"!==
936 e||!1!==b||(b=!0,g.onContainerRollOver(d),F?a.attachEvent("onmouseover",c(g)):l.addEventListener("mouseover",c(g)))}}(),setChartEvents:function(){var a=this.options,b=this.eventListeners||(this.eventListeners=[]),a=this.link=a.chart.link,c=this.container,d=p(this.definition&&this.definition.chart.enablechartmousemoveevent,0);X(c,"click",this.onContainerClick);b.push(I(c,"click",this.onContainerClick,this));X(this.paper.canvas,"mouseover",this.chartHoverManager,this);X(this.paper.canvas,"touchstart",
937 this.chartHoverManager,this);X(this.paper.canvas,"mouseout",this.chartHoverManager,this);X(this.paper.canvas,"touchend",this.chartHoverManager,this);b.push(I(this.paper.canvas,"mouseover touchstart mouseout touchend",this.chartHoverManager,this));X(c,"mousemove",this.onContainerMouseMove,this);X(c,"touchmove",this.onContainerMouseMove,this);d&&b.push(I(c,"mousemove touchmove",this.onContainerMouseMove,this));this.paper.canvas.style.cursor=K.svg?a&&"pointer"||"default":a&&"hand"||"default"},onOverlayMessageClick:function(){var a=
938 this.elements;K.animation({opacity:0},1E3);a.messageText&&a.messageText.hide();a.messageVeil&&a.messageVeil.hide()},showMessage:function(a,b){var c=this.paper,d=this.options.chart,e=this.elements,g=e.messageText,h=e.messageVeil,k=c.width,l=c.height;h||(h=e.messageVeil=c.rect(0,0,k,l).attr({fill:"rgba(0,0,0,0.2)",stroke:"none"}));h.show().toFront().attr("cursor",b?"pointer":"default")[b?"click":"unclick"](this.onOverlayMessageClick,this);g||(g=e.messageText=c.text(k/2,l/2,C).attr({fill:"rgba(255,255,255,1)",
939 "font-family":"Verdana,sans","font-size":10,"line-height":14,ishot:!0}));a=a||C;this.smartLabel.setStyle({"line-height":"14px","font-family":"Verdana,sans","font-size":"10px"});c=this.smartLabel.getSmartText(a,k-(d.spacingRight||0)-(d.spacingLeft||0),l-(d.spacingTop||0)-(d.spacingBotton||0));g.attr({text:c.text,ishot:!0,cursor:b?"pointer":"default"})[b?"click":"unclick"](this.onOverlayMessageClick,this).show().toFront()},drawButtons:function(){var a=this,b=a.logic,c="zoomline"===b.rendererId,d=a.paper,
940 e=a.elements,g=a.toolbar||(a.toolbar=[]),h=a.menus||(a.menus=[]),k=a.layers,l=a.options,n=l[fa],b=n&&n.outCanvasStyle||b.outCanvasStyle||{},n=l.chart.toolbar||{},m=n.hDirection,p=c?1:n.vDirection,s=n.button||{},w=s.scale,t=s.width*s.scale,v=s.height*s.scale,C=m*(s.spacing*s.scale+t),B=s.radius,D=(l=l.exporting)&&l.buttons||{},H=D.exportButton&&!1!==D.exportButton.enabled,D=D.printButton&&!1!==D.printButton.enabled,K,I=k.buttons||(k.buttons=d.group("buttons").trackTooltip(!0));g.y||(g.y=(c?0:n.y)+
941 n.vMargin*p+ga(0,v*p));g.x||(g.x=n.x+n.hMargin*m-la(0,t*m));g.count=0;g.add=function(a,b,c){c="string"===typeof c?{tooltip:c}:c||{};var e=0===g.count?C-m*s.spacing*s.scale:C,e=c.x||(g.x+=e),h=c.tooltip||"";g.push(a=d.button(e,c.y||g.y,Ga,a,{width:t,height:v,r:B,id:g.count++,verticalPadding:s.symbolHPadding*w,horizontalPadding:s.symbolHPadding},I).attr({ishot:!0,fill:[s.fill,s.labelFill,s.symbolFill,s.hoverFill],stroke:[s.stroke,s.symbolStroke],"stroke-width":[s.strokeWidth,s.symbolStrokeWidth]}).tooltip(h).buttonclick(b));
942 return a};H&&(h.push(K=e.exportMenu=xa({chart:a,basicStyle:b,items:function(b){var c=[],d=function(b){return function(){a.logic.chartInstance.exportChart({exportFormat:b})}},e;for(e in b)c.push({text:b[e],onclick:d(e)});return c}(l.exportformats)})),e.exportButton=g.add("exportIcon",function(a,b){return function(){K.visible?K.hide():K.show({x:a,y:b+1})}}(g.x+t,g.y+v),{tooltip:"Export chart"}));D&&(e.printButton=g.add("printIcon",function(){a.print()},{tooltip:"Print chart"}))},setMargins:function(){var a=
943 this.paper,b=this.options.chart||{};this.canvasBorderWidth=b.plotBorderWidth||0;this.canvasTop=ba(b.marginTop)||0;this.canvasLeft=ba(b.marginLeft)||0;this.canvasWidth=ba(a.width-(b.marginLeft||0)-(b.marginRight||0));this.canvasHeight=ba(a.height-(b.marginTop||0)-(b.marginBottom||0));this.canvasRight=this.canvasLeft+this.canvasWidth;this.canvasBottom=this.canvasTop+this.canvasHeight},drawBackground:function(){var a=this,b=a.paper,c=a.layers,d=a.elements,e=c.background,g=d.background,h=d.chartborder,
944 k=a.options.chart||{},l=s(k.borderWidth)||0,n=0.5*l,m=2*l,p=k.borderWidth||0,w=a.chartHeight,t=a.chartWidth,C=d.backgroundImage,B=k.bgSWF,K=k.bgSWFAlpha/100,I=k.bgImageDisplayMode,F=k.bgImageVAlign,R=k.bgImageHAlign,J=k.bgImageScale,M=p+","+p+","+(t-2*p)+","+(w-2*p),N,Q,W,X,$,Z,Y;b.canvas.style.backgroundColor=k.containerBackgroundColor;!e&&(e=c.background=b.group("background"));c={x:l,y:l,width:b.width-m,height:b.height-m,stroke:"none",fill:H(k.backgroundColor)};g?g.attr(c):g=d.background=b.rect(c,
945 e);c={x:n,y:n,width:b.width-l,height:b.height-l,stroke:k.borderColor,"stroke-width":l,"stroke-dasharray":k.borderDashStyle,fill:"none",r:k.borderRadius||0};h?h.attr(c):h=d.chartborder=b.rect(c,e);B&&(N=new D,$=W=1,C=[],N.onload=function(){Q=S(I,F,R,J,p,t,w,N);Q["clip-rect"]=M;if(Q.tileInfo)for(W=Q.tileInfo.xCount,$=Z=Q.tileInfo.yCount,Y=Q.y,delete Q.tileInfo;W&&Q.width&&Q.height;)Z-=1,X?(C[void 0]=X.clone().attr({x:Q.x,y:Q.y}),e.appendChild(C[void 0])):C[void 0]=X=b.image(B,e).attr(Q).css({opacity:K}),
946 Q.y+=Q.height,0===Z&&(Z=$,W-=1,Q.x+=Q.width,Q.y=Y);else C[0]=b.image(B,e),C[0].attr(Q).css({opacity:K}).attr({visibility:oa,"clip-rect":M});v.raiseEvent("BackgroundLoaded",{url:B,bgImageAlpha:100*K,bgImageDisplayMode:I,bgImageVAlign:F,bgImageHAlign:R,bgImageScale:J,imageWidth:N.width,imageHeight:N.height},a.logic.chartInstance)},N.onerror=function(b){v.raiseEvent("BackgroundLoadError",{url:B,bgImageAlpha:100*K,error:b,bgImageDisplayMode:I,bgImageVAlign:F,bgImageHAlign:R,bgImageScale:J},a.logic.chartInstance)},
947 N.src=B,d.backgroundImage=C)},drawGraph:function(){var a=this,b=a.paper,c=a.plots=a.elements.plots,d=a.logic,e=a.layers,g=a.options,k=a.elements,l=g.chart,g=a.datasets=g.series,n=na(l.rendererId,l.defaultSeriesType),p=e.background,s=e.dataset=e.dataset||b.group("dataset").insertAfter(p),w,t,p=function(a,b){return function(e){var g=c[a],h,r={hcJSON:{series:[]}},k=r.hcJSON.series[a]||(r.hcJSON.series[a]={}),l=d.chartInstance.jsVars._reflowData;h=(e=na(e,!g.visible))?"visible":"hidden";ca(g.graphics,
948 function(a){!0!==a.data("alwaysInvisible")&&a.attr("visibility",h)});g.visible=e;b.visible=e;k.visible=e;m(l,r,!0)}},v=function(b){return function(d,e){a["legendClick"+n]&&a["legendClick"+n](c[b],d,e)||a.legendClick&&a.legendClick(c[b],d,e)}},C=function(b){return function(){return a.getEventArgs&&a.getEventArgs(c[b])}},B=function(b,d,e){return function(g,h){d.call(a,c[b],e,{numUpdate:g,hasAxisChanged:h})}};e.tracker=e.tracker||b.group("hot").insertAfter(s);a.drawCanvas();a.drawAxes();c||(c=a.plots=
949 a.plots||[],k.plots=c);e=0;for(k=g.length;e<k;e++)b=g[e]||{},s=b.updatePlot="updatePlot"+h($(b.type,b.plotType,n)),s=a[s],w=b.drawPlot="drawPlot"+h($(b.type,b.plotType,n)),w=a[w]||a.drawPlot,(t=c[e])||(c.push(t={index:e,items:[],data:b.data||[],name:b.name,userID:b.userID,setVisible:p(e,b),legendClick:v(e),getEventArgs:C(e),realtimeUpdate:B(e,s||w,b)}),b.plot=t,b.legendClick=t.legendClick,b.getEventArgs=t.getEventArgs,b.setVisible=t.setVisible),w.call(a,t,b);l.hasScroll&&(a.drawScroller(),a.finalizeScrollPlots())},
950 drawPlot:g,drawCanvas:g,drawAxes:g,drawScroller:function(){},drawLegend:function(){var a=this,b=a.options,c=a.paper,d=b.chart||{},e=b.legend,g=e.scroll,b={elements:{}},k=b.elements,l=a.layers.legend,n=k.box,s=k.caption,w=k.elementGroup,t="vertical"===e.layout,v=d.marginBottom,B=d.spacingBottom,D=d.spacingLeft,H=d.spacingRight,I=c.width,F=c.height,R=a.canvasTop,J=e.width,M=e.height,Q=e.borderRadius,N=e.backgroundColor,S=e.borderColor,W=e.borderWidth||0,X=0.5*W,$=0.5*W+2,d=p(e.padding,4),Z=0.5*d,Y,
951 ca,q,u,A,G,f,O=g&&g.enabled;t?(t=I-H-J,v=R+0.5*(F-v-R-M)+(e.y||0)):(t=D+0.5*(I-D-H-J)+(e.x||0),v=F-B-M);B=K.crispBound(t,v,J,M,W);t=B.x;v=B.y;J=B.width;M=B.height;l||(l=a.layers.legend=c.group("legend").insertBefore(a.layers.tracker).translate(t,v).attr("class","fusioncharts-legend"));a.addCSSDefinition(".fusioncharts-legend .fusioncharts-caption",m({"text-anchor":e.title.align},e.title.style));e.legendAllowDrag&&(a.addCSSDefinition(".fusioncharts-legend",{cursor:"move"}),ca=t,q=v,l.drag(function(a,
952 b){u=G+a;A=f+b;u+J+$>I&&(u=I-J-$);A+M+$>F&&(A=F-M-$);u<$&&(u=$);A<$&&(A=$);l.translate(u-ca,A-q);ca=u;q=A},function(){G=ca;f=q}));Q={x:0,y:0,width:J,height:M,r:Q,stroke:S,"stroke-width":W,fill:N||"none",ishot:e.legendAllowDrag};n?n.attr(Q):n=k.box=c.rect(Q,l);n.shadow(e&&e.shadow);O?(Y=M-d,n=","+J+","+Y,w=k.elementGroup=c.group("legenditems",l).attr({"clip-rect":"0,"+Z+n}),g=k.scroller||(k.scroller=c.scroller(J-10+Z-W,X,10,M-W,!1,{scrollPosition:g.scrollPosition||0,scrollRatio:(Y+d)/e.totalHeight,
953 showButtons:!1,displayStyleFlat:g.flatScrollBars},l)),g.attr("fill",e.legendScrollBgColor).scroll(function(b){w.transform(["T",0,(Y-e.totalHeight)*b]);m(a.fusionCharts.jsVars._reflowData,{hcJSON:{legend:{scroll:{position:b}}}},!0)})):w=k.elementGroup=l;if(e.title&&e.title.text!==C){switch(e.title.align){case "start":g=d;break;case "end":g=J-d-(O?10:0);break;default:g=0.5*J}Q={"class":"fusioncharts-caption","text-anchor":e.title.align,text:e.title.text,title:e.title.originalText||"",x:g,y:d,fill:e.title.style.color,
954 "vertical-align":"top","line-height":e.title.style.lineHeight};s?s.attr(Q):s=k.caption=c.text(Q,w).attr("class","fusioncharts-caption")}this["draw"+h(e.type||"point")+"LegendItem"](b)},drawPointLegendItem:function(a){var b=this,c=b.paper,d=b.options,e=d.series,g=d.chart.defaultSeriesType,d=d.legend,h=d.legendHeight,k=d.symbolPadding,l=d.textPadding||2,n=p(d.padding,4),s=d.itemHoverStyle,t=d.itemHiddenStyle,C=d.itemStyle,B=C.color,t=t&&t.color||"#CCCCCC",D=s&&s.color||B,s=d.symbol3DLighting,K=d.symbolWidth,
955 I=d.itemWidth,F=!1!==d.interactiveLegend,J=a.elements,R=J.elementGroup;a=a.item=[];var J=J.item=[],M=[],N={line:!0,spline:!0,scatter:!0,bubble:!0,dragnode:!0,zoomline:!0},ma,S,W,X,Z,Y,ca,fa,q,u,A,G,f,O,L,va,aa,Ib,ga,Va,ba;G=0;for(f=e.length;G<f;G+=1)if((ma=e[G])&&!1!==ma.showInLegend)if(fa=ma.type||g,"point"===ma.legendType)for(ma=ma.data||[],Z=0,Y=ma.length;Z<Y;Z+=1)W=ma[Z]||{},!1!==W.showInLegend&&(W._legendType=fa,M.push(W));else switch(ma._legendType=fa,fa){case "pie":case "pie3d":case "funnel":case "pyramid":M=
956 ma.data;break;default:M.push(ma)}M.sort(function(a,b){return(a.legendIndex||0)-(b.legendIndex||0)||a.__i-b.__i});d.reversed&&M.reverse();e=d.initialItemX||0;g=d.initialItemY||0;Z=function(a){var c=this.data("legendItem"),d=c.getEventArgs?c.getEventArgs():{},e;a=Q(b.logic.chartInstance.ref,a);d.chartX=a.chartX;d.chartY=a.chartY;d.pageX=a.pageX;d.pageY=a.pageY;d.preventDefaults=function(){e=!0};v.raiseEvent("LegendItemClicked",d,b.logic.chartInstance);F&&!e&&c.legendClick()};Y=function(a){var c=this.data("legendItem"),
957 d=c.getEventArgs?c.getEventArgs():{};a=Q(b.logic.chartInstance.ref,a);var e=!1!==c.visible,c=c.plot.legend.elements.legendItemText;d.chartX=a.chartX;d.chartY=a.chartY;d.pageX=a.pageX;d.pageY=a.pageY;e&&c&&c.attr({fill:D});v.raiseEvent("LegendItemRollover",d,b.logic.chartInstance)};ca=function(a){var c=this.data("legendItem"),d=c.getEventArgs?c.getEventArgs():{};a=Q(b.logic.chartInstance.ref,a);var e=!1!==c.visible,c=c.plot.legend.elements.legendItemText;d.chartX=a.chartX;d.chartY=a.chartY;d.pageX=
958 a.pageX;d.pageY=a.pageY;e&&c&&c.attr({fill:B});v.raiseEvent("LegendItemRollout",d,b.logic.chartInstance)};b.addCSSDefinition(".fusioncharts-legend .fusioncharts-legenditem",d.itemStyle);G=0;for(f=M.length;G<f;G+=1)!1!==M[G].showInLegend&&(ba={elements:{},hiddenColor:t,itemTextColor:B,hoverColor:D},a.push(ba),J.push(ba.elements),ma=M[G],q=e+ma._legendX+n,u=g+ma._legendY-n,A=ma._legendH,S=ma._legendType||fa,W=!1!==ma.visible,X=ba.itemLineColor=H(ma.color||{}),ma.plot.legend=ba,ba.elements.legendItemText=
959 c.text({"class":"fusioncharts-legenditem",x:q+h+l-2,y:u+(ma._legendTestY||0),text:ma.name,fill:W?B:t,"vertical-align":"top","text-anchor":"start",cursor:C.cursor||"pointer",ishot:F,"line-height":C.lineHeight,"font-size":C.fontSize},R).data("legendItem",ma),N[S]?(S=u+k+0.5*K,ma.lineWidth&&(Va=ba.elements.legendItemLine=c.path({"stroke-width":ma.lineWidth,stroke:W?X:t,cursor:C.cursor||"pointer",ishot:F,path:["M",q+k,S,"L",q+k+K,S]},R).data("legendItem",ma)),ma&&(aa=ma.marker)&&!1!==aa.enabled&&(ba.symbolStroke=
960 H($((Ib=aa.lineColor)&&(Ib.FCcolor&&Ib.FCcolor.color.split(",")[0]||Ib),X)),s?aa.fillColor&&aa.fillColor.FCcolor?(S=m({},aa.fillColor),S.FCcolor.alpha="100"):S=$(aa.fillColor,X):S={FCcolor:{color:$((ga=aa.fillColor)&&(ga.FCcolor&&ga.FCcolor.color.split(",")[0]||ga),X),angle:0,ratio:"0",alpha:"100"}},ba.symbolColor=H(S),O=0.5*K,X=q+k+O,S=u+k+O,Va&&(O*=0.6),L=aa.symbol.split("_"),va="spoke"===L[0]?1:0,S=L[1]?ba.elements.legendItemSymbol=c.polypath(L[1],X,S,O,aa.startAngle,va,R):ba.elements.legendItemSymbol=
961 c.circle(X,S,O,R),S.data("legendItem",ma).attr({cursor:C.cursor||"pointer",stroke:W?ba.symbolStroke:t,fill:W?ba.symbolColor:t,"stroke-width":1,ishot:F}))):(S=b.getSymbolPath(q+k,u+k,K,K,S,ma,!s),ba.symbolColor=H(S.color),ba.symbolStroke=H(S.strokeColor),S=ba.elements.legendItemSymbol=c.path({path:S.path,"stroke-width":S.strokeWidth,stroke:W?ba.symbolStroke:t,fill:W?ba.symbolColor:t,cursor:C.cursor||"pointer",ishot:F},R).data("legendItem",ma)),ba.elements.legendItemBackground=c.rect({x:q,y:u,width:I,
962 height:A,r:0,fill:H(ma.legendFillColor||w),"stroke-width":1,stroke:H(ma.legendBorderColor||"none"),cursor:C.cursor||"pointer",ishot:F},R).click(Z).mouseover(Y).mouseout(ca).data("legendItem",ma));d.reversed&&M.reverse()},drawCaption:function(){var a=this.options.chart,b=this.options.title,c=this.options.subtitle,d=this.paper,e=this.smartLabel,g=this.elements,h=this.layers,k=h.caption,l=g.caption,n=g.subcaption,m=b.text,p=c&&c.text,s=b.x,t;!m&&!p||k||(k=h.caption=d.group("caption"),h.tracker?k.insertBefore(h.tracker):
963 k.insertAfter(h.dataset));m?(this.addCSSDefinition(".fusioncharts-caption",b.style),t={"class":"fusioncharts-caption",text:b.text,fill:b.style.color,x:s,y:b.y||a.spacingTop||0,"text-anchor":b.align||"middle","vertical-align":b.verticalAlign||"top",visibility:"visible",title:b.originalText||""},l?l.attr(t):l=g.caption=d.text(t,k).attr("class","fusioncharts-caption"),l.css(b.style),e?(e.setStyle(b.style),t=e.getOriSize(b.text).height):t=10):l&&(l=g.caption=l.remove());p?(this.addCSSDefinition(".fusioncharts-subcaption",
964 c.style),t={"class":"fusioncharts-subcaption",text:c.text,title:c.originalText||"",fill:c.style.color,x:s,y:m?l.attrs.y+t+2:b.y||a.spacingTop||0,"text-anchor":b.align||"middle","vertical-align":"top",visibility:"visible"},n?n.attr(t):n=g.subcaption=d.text(t,k).attr("class","fusioncharts-subcaption"),n.css(c.style)):n&&(g.subcaption=n.remove());m||p||!k||(h.caption=k.remove())},drawLogo:function(){var a=this,b=a.paper,c=a.elements,d=a.options,e=d.credits,g=d.chart||{},h=g.borderWidth||0,k=a.chartHeight,
965 n=a.chartWidth,m=c.logoImage,p=g.logoURL,s=g.logoAlpha/100,t=g.logoPosition,w=g.logoLink,C=g.logoScale,B=g.logoLeftMargin,H=g.logoTopMargin,d={tr:{vAlign:kb,hAlign:jb},bl:{vAlign:eb,hAlign:lb},br:{vAlign:eb,hAlign:jb},cc:{vAlign:"middle",hAlign:"middle"}},K,I,F;a.logic&&e.enabled&&b.text().attr({text:e.text,x:6,y:k-4,"vertical-align":eb,"text-anchor":"start",fill:"rgba(0,0,0,0.5)",title:e.title||""}).css({fontSize:9,fontFamily:"Verdana,sans",cursor:"pointer",_cursor:"hand"}).click(function(){try{l.open(e.href)}catch(a){(l.top||
966 l).location.href=e.href}});p&&(K=new D,(F=d[t])||(F={vAlign:kb,hAlign:lb}),K.onload=function(){a.disposed||b.disposed||(I=S("none",F.vAlign,F.hAlign,C,h,n,k,K),I.src=p,m=a.paper.image(I).translate(B,H).css("opacity",s),w&&m.css({cursor:"pointer",_cursor:"hand"}),m.mouseover(function(b){b=Q(a.logic.chartInstance.ref,b);v.raiseEvent("LogoRollover",{logoURL:p,logoAlpha:100*s,logoPosition:t||"tl",logoScale:C,logoLink:w,chartX:b.chartX,chartY:b.chartY,pageX:b.pageX,pageY:b.pageY},a.logic.chartInstance)}),
967 m.mouseout(function(b){b=Q(a.logic.chartInstance.ref,b);v.raiseEvent("LogoRollout",{logoURL:p,logoAlpha:100*s,logoPosition:t||"tl",logoScale:C,logoLink:w,chartX:b.chartX,chartY:b.chartY,pageX:b.pageX,pageY:b.pageY},a.logic.chartInstance)}),m.click(function(b){b=Q(a.logic.chartInstance.ref,b);v.raiseEvent("LogoClick",{logoURL:p,logoAlpha:100*s,logoPosition:t||"tl",logoScale:C,logoLink:w,chartX:b.chartX,chartY:b.chartY,pageX:b.pageX,pageY:b.pageY},a.logic.chartInstance,void 0,function(){w&&g.events.click.call({link:w})})}),
968 v.raiseEvent("LogoLoaded",{logoURL:p,logoAlpha:100*s,logoPosition:t||"tl",logoScale:C,logoLink:w},a.logic.chartInstance))},K.onerror=function(b){v.raiseEvent("LogoLoadError",{logoURL:p,logoAlpha:100*s,logoPosition:t||"tl",logoScale:C,logoLink:w,error:b},a.logic.chartInstance)},K.src=p,c.logoImage=m)},getEventArgs:function(a){a=a||{};return{datasetName:a.name,datasetIndex:a.index,id:a.userID,visible:a.visible}},legendClick:function(a,b){var c=a.legend,d=c&&c.elements,e=d&&d.legendItemText,g=d&&d.legendItemSymbol,
969 d=d&&d.legendItemLine,h=c&&c.hiddenColor,k=c&&c.itemLineColor,l=c&&c.itemTextColor,n=c&&c.symbolColor,m=c&&c.symbolStroke,c=$(b,!a.visible);a.setVisible(b);c?(g&&g.attr({fill:n||k,stroke:m}),e&&e.attr({fill:l}),d&&d.attr({stroke:k})):(g&&g.attr({fill:h,stroke:h}),e&&e.attr({fill:h}),d&&d.attr({stroke:h}));if((e=this.datasets&&this.datasets[a.index]&&this.datasets[a.index].relatedSeries)&&e instanceof Array&&0<e.length)for(g=e.length;g--;)d=parseFloat(e[g]),d=this.plots[d],d.legendClick.call(d,c,!1)},
970 exportChart:function(b){var d=this,e=d.fusionCharts,g=d.options;b="object"===typeof b&&function(a){var b={},c;for(c in a)b[c.toLowerCase()]=a[c];return b}(b)||{};var h=m(m({},g.exporting),b),k=(h.exportformat||"png").toLowerCase(),n=h.exporthandler,p=(h.exportaction||C).toLowerCase(),s=h.exporttargetwindow||C,t=h.exportfilename,w=h.exportparameters;if(!g.exporting||!g.exporting.enabled||!n)return!1;v.raiseEvent("beforeExport",h,e,void 0,function(){var b=d.layers.buttons,g=e.id,r=d.paper,m,V;b&&b.attr("visibility",
971 "hidden");m=r.toSVG();b&&b.attr("visibility","visible");m=m.replace(/(\sd\s*=\s*["'])[M\s\d\.]*(["'])/ig,"$1M 0 0 L 0 0$2");b={charttype:e.chartType(),stream:m,stream_type:"svg",meta_bgColor:h.bgcolor||"",meta_bgAlpha:h.bgalpha||"1",meta_DOMId:e.id,meta_width:r.width,meta_height:r.height,parameters:["exportfilename="+t,"exportformat="+k,"exportaction="+p,"exportparameters="+w].join("|")};v.raiseEvent("exportDataReady",b,e);if("download"===p){/webkit/ig.test(l.navigator.userAgent)&&"_self"===s&&(s=
972 m=g+"export_iframe",d.exportIframe||(d.exportIframe=m=Y("IFRAME",{name:m,width:"1px",height:"1px"},a.body),m.style.cssText="position:absolute;left:-10px;top:-10px;"));m=Y("form",{method:"POST",action:n,target:s,style:"display:none;"},a.body);for(V in b)Y("input",{type:"hidden",name:V,value:b[V]},m);m.submit();a.body.removeChild(m);m=void 0;return!0}(new v.ajax(function(a){var b={};a.replace(RegExp("([^?=&]+)(=([^&]*))?","g"),function(a,c,d,e){b[c]=e});c.raiseEvent("exported",b,e)},function(a){a={statusCode:0,
973 statusMessage:"failure",error:a,DOMId:g,width:r.width,height:r.height};c.raiseEvent("exported",a,e,[a])})).post(n,b)},function(){v.raiseEvent("exportCancelled",h,e)})},print:function(b){var c=this,d=m({},b);if(c.isPrinting)return!1;v.raiseEvent("BeforePrint",d,c.logic.chartInstance,void 0,function(){var b=c.container,e=c.elements,g=e.printButton,h=e.exportButton,r=[],k=b.parentNode,e=a.body||a.getElementsByTagName("body")[0],n=e.childNodes;c.isPrinting=!0;ca(n,function(a,b){1==a.nodeType&&(r[b]=a.style.display,
974 a.style.display="none")});!1!==d.hideButtons&&(g&&"hidden"!=g.attrs.visibility&&g.attr({visibility:"hidden"}),h&&"hidden"!=h.attrs.visibility&&h.attr({visibility:"hidden"}));e.appendChild(b);l.print();setTimeout(function(){g&&g.attr({visibility:"visible"});h&&h.attr({visibility:"visible"});k.appendChild(b);ca(n,function(a,b){1==a.nodeType&&(a.style.display=r[b])});c.isPrinting=!1;v.raiseEvent("PrintComplete",d,c.logic.chartInstance)},1E3)},function(){v.raiseEvent("PrintCancelled",d,c.logic.chartInstance)})},
975 getSymbolPath:function(a,b,c,d,e,g,h){var k=["M"],l,n,m;l=(g.color&&tb("string"===typeof g.color?g.color:g.color.FCcolor.color)||C).replace(ia,"");m=xb(l,60).replace(ia,Z);h?l={FCcolor:{color:l,angle:0,ratio:"0",alpha:"100"}}:(h=xb(l,40),l={FCcolor:{color:l+","+l+","+h+","+l+","+l,ratio:"0,30,30,30,10",angle:0,alpha:"100,100,100,100,100"}});switch(e){case "column":case "dragcolumn":case "column3d":g=0.25*c;e=0.5*g;h=0.7*d;n=0.4*d;k=k.concat([a,b+d,"l",0,-h,g,0,0,h,"z","m",g+e,0,"l",0,-d,g,0,0,d,"z",
976 "m",g+e,0,"l",0,-n,g,0,0,n,"z"]);l.FCcolor.angle=270;break;case "bar":case "bar3d":g=0.3*c;e=0.6*c;h=d/4;n=h/2;k=k.concat([a,b,"L",a+e,b,a+e,b+h,a,b+h,"Z","M",a,b+h+n,"L",a+c,b+h+n,a+c,b+h+n+h,a,b+2*h+n,"Z","M",a,b+2*(h+n),"L",a+g,b+2*(h+n),a+g,b+d,a,b+d,"Z"]);break;case "area":case "area3d":case "areaspline":case "dragarea":h=0.6*d;n=0.2*d;d*=0.8;k=k.concat([a,b+d,"L",a,b+h,a+0.3*c,b+n,a+0.6*c,b+h,a+c,b+n,a+c,b+d,"Z"]);l.FCcolor.angle=270;break;case "pie":case "pie3d":g=0.5*c;e=0.9*g;c=a+g+1;d=b+
977 g-1;a=a+g-1;b=b+g+1;k=k.concat(["M",c,d,"L",c,d-e+1,"A",e-1,e-1,0,0,1,c+e-1,d,"Z","M",a,b,"L",a,b-e,"A",e,e,0,1,0,a+e,b,"Z"]);l.FCcolor.radialGradient="1";l.FCcolor.ratio="0,0,0,100,0";break;case "boxandwhisker2d":k=k.concat([a,b,"L",a+c,b,a+c,b+d,a,b+d,"Z"]);l=g.color;m="#000000";break;default:k=k.concat([a,b,"L",a+c,b,a+c,b+d,a,b+d,"Z"]),l.FCcolor.angle=270,l.FCcolor.ratio="0,70,30"}return{path:k,color:l,strokeWidth:0.5,strokeColor:m}}});d.prototype={configure:function(){var a=this.axisData,b=this.renderer,
978 c=this.isVertical,d=this.isReverse,e=b.options,g=e.chart,h=g.marginBottom,g=g.marginRight,k=b.canvasTop,l=b.canvasLeft,n=this.min=a.min,n=this.span=(this.max=a.max)-n,l=this.startX=p(a.startX,l),k=this.startY=p(a.startY,k),m=this.endX=p(a.endX,b.canvasRight),a=this.endY=p(a.endY,b.canvasBottom),n=this.pixelRatio=c?(a-k)/n:(m-l)/n,s=this.relatedObj={};s.marginObj={top:k,right:g,bottom:h,left:l};s.canvasObj={x:l,y:k,w:m-l,h:a-k,toX:m,toY:a};this.startPixel=d?c?a:m:c?k:l;this.pixelValueRatio=d?-n:n;
979 this.primaryOffset=this.secondaryOffset=0;this.cache={lowestVal:0,highestVal:0,indexArr:[],hashTable:{}};this.elements=this.elements||{};this.belowBandGroup&&(b.elements.axes=b.elements.axes||{},b.elements.axes.belowBandGroup=this.belowBandGroup,e&&e.chart&&e.chart.hasScroll&&this.belowBandGroup.attr({"clip-rect":b.elements["clip-canvas"]}));this.poi={}},draw:function(){var a=this.axisData,b=a&&a.plotLines||[],c=a&&a.plotBands||[],d=a&&a.showLine,e=a&&a.tickLength,g=a&&a.tickWidth;a&&a.title&&this.drawAxisName();
980 a&&a.labels&&(this.renderer.addCSSDefinition("."+a.labels.className+" .fusioncharts-label",a.labels.style),this.belowLabelGroup&&this.belowLabelGroup.attr("class",a.labels.className),this.topLabelGroup&&this.topLabelGroup.attr("class",a.labels.className));b&&0<b.length&&this.drawPlotLine();c&&0<c.length&&this.drawPlotBands();isNaN(e)||0===e||isNaN(g)||0===g||this.drawTicks();d&&this.drawLine()},scroll:function(){},setOffset:function(a,b){var c=this.primaryOffset=a,d=this.secondaryOffset=b||this.secondaryOffset,
981 e=this.isVertical,g,h,k,l=[this.topLabelGroup,this.belowLabelGroup,this.topLineGroup,this.belowLineGroup,this.topBandGroup,this.belowBandGroup],n,m;n=0;for(m=l.length;n<m;n+=1)if(k=l[n])g=e?d:c,h=e?c:d,k.attr({transform:"t"+g+","+h});e||this.drawPlotLine&&this.drawPlotLine()},update:function(){},drawTicks:function(){var a=this.axisData,b=this.renderer.paper,c=this.min,d=this.max,e=this.isVertical,g=this.layerBelowDataset,g=this.tickGroup=this.tickGroup||b.group("axis-ticks",g),h=this.relatedObj.canvasObj,
982 k=a.offset,l=a.opposite,n=a.showAxis,m=a.tickInterval,p=a.tickLength,s=a.tickWidth,a=a.tickColor,t=c;if(e&&n)for(c=this.getAxisPosition(c),e=this.getAxisPosition(d),h=l?h.toX+k:h.x-k,b.path(["M",h,c,"L",h,e],g).attr({stroke:a,"stroke-width":s});Ha(t)<=d;)k=this.getAxisPosition(t),c=l?h+p:h-p,b.path(["M",h,k,"L",c,k],g).attr({stroke:a,"stroke-width":s}),t+=m},getAxisPosition:function(a,b){var c;b?c=(a-this.startPixel)/this.pixelValueRatio+this.min:(a=this.axisData.reversed?this.min+(this.max-a):a,
983 c=this.startPixel+(a-this.min)*this.pixelValueRatio);return c},drawPlotLine:function(){var a=this.renderer,b=a.paper,c=this.isVertical,d=+!c,e=this.lines=this.lines||[],g=this.labels=this.labels||[],h=this.relatedObj.canvasObj,k=this.globalOptions||{},l=this.elements||{},n=this.axisData.plotLines||[],m=this.primaryOffset,s=c?this.startY:this.startX,t=c?this.endY:this.endX,v=parseFloat(a.canvasBorderWidth)||0,B=la(n.length,la(e.length,g.length)),D=a.layers.datalabels,K,I,F=this.belowLineGroup,R=this.topLineGroup,
984 J=this.belowLabelGroup,Q=this.topLabelGroup,N,S,W=!1!==(a.tooltip||{}).enabled,X,$,Z,Y,ca,q,u,A,G,f,O,L,va,aa,fa,ga,Va,ea,qa,sa,da,oa,za,Ba,ua,Da,ia,Sa,ya=k.chart.xDepth||0,na,Aa,Ha,$a,Za,xa,Ga,Pa,Oa,Ma,Ra=[];for(Ma=0;Ma<B;Ma+=1){S=null;k=e[Ma];N=g[Ma];if(X=n[Ma])if($=X.width,Z=X.isVline,Y=X.isTrend,ca=X.isGrid,q=X.tooltext,u=X.value,A=X.color,G=X.dashStyle,f=Y?X.to:null,O=X._isStackSum,K=3<X.zIndex?R:F,L=X.label){va=L.style;aa=L.text;fa=va&&va.color;ga=L.offsetScaleIndex||0;Va=L.offsetScale;if(ea=
985 va&&va.fontSize)qa=ea,-1!==qa.indexOf("px")&&(qa=qa.replace("px",""),qa=parseFloat(qa));I=va&&va.lineHeight;ea=va?{fontFamily:va.fontFamily,fontSize:va.fontSize,lineHeight:va.lineHeight,fontWeight:va.fontWeight,fontStyle:va.fontStyle}:null;I&&(sa=I,-1!==sa.indexOf("px")&&(sa=sa.replace("px",""),sa=parseFloat(sa)));da=L.rotation;oa=L.x||0;za=L.y||0;Ba=L.align;ua=L.verticalAlign;Da=L.textAlign;ia=(ia=L.borderWidth)?-1!==ia.indexOf("px")?ia.replace("px",""):1:1;I=O?D:3<=X.zIndex?Q:J;L.backgroundColor&&
986 (L.labelBgClr=H({color:L.backgroundColor,alpha:100*L.backgroundOpacity}));L.borderColor&&(L.labelBorderClr=H({color:L.borderColor,alpha:"100"}));Sa=qa?0.2*qa:2;Da="left"===Da?"start":"right"===Da?"end":"middle"}Pa=Ga="visible";Oa=0>p(Va,u,0);c?(na=this.getAxisPosition(u),Ha=Y?this.getAxisPosition(f)||na:na,xa=na!==Ha?!0:!1,$a=["M",h.x,na,"L",h.toX,Ha],Z?a.logic.isBar&&(Za=a.yAxis[ga],!O&&!isNaN(Va)&&0<=Va&&1>=Va&&(Va=Za.min+(Za.max-Za.min)*Va),Aa=Za.getAxisPosition(p(Va,u))+oa+Sa*(Oa?-1:1)):Aa=L?
987 this.axisData.isOpposite||"right"===Ba?h.toX+oa:h.x+oa:this.axisData.isOpposite?h.toX:h.x):(na=this.getAxisPosition(u)||0,Aa=Y?this.getAxisPosition(f)||na:na,!Y&&!Z&&0<ya&&(na+=ya,Aa+=ya,t+=ya),xa=na!==Aa?!0:!1,$a=["M"+na,h.y,"L",Aa,h.toY],Ga=na+m<s||na+m>t?"hidden":Ga,Z?(Za=a.yAxis[ga],!O&&!isNaN(Va)&&0<=Va&&1>=Va&&(Va=Za.min+(Za.max-Za.min)*(1-Va)),na=Za.getAxisPosition(p(Va,u))+za,na-=(v+parseFloat(ia))*(za&&(0<za?-1:1))):na=this.axisData.opposite||"top"===ua&&!ca?h.y+za:h.toY+za,Ha=na);Pa=c?Pa:
988 Aa+m<s||Aa+m>t?"hidden":Pa;if(X&&"visible"===Ga&&0.1<$){Za=$a;var La=$;Za[1]===Za[4]&&(Za[1]=Za[4]=ba(Za[1])+La%2/2);Za[2]===Za[5]&&(Za[2]=Za[5]=ba(Za[2])+La%2/2);xa={path:Za,stroke:A,"stroke-width":$,"shape-rendering":!xa&&1<=$?"crisp":void 0,"stroke-dasharray":G?G:void 0,visibility:Ga};k?k.attr(xa):(k=e[Ma]=b.path(xa,K).css(X.style),l.lines=l.lines||[],l.lines.push(k));W&&q&&$<M&&Ga&&(S=b.path({stroke:w,"stroke-width":M,ishot:!0,path:$a,fill:w},a.layers.tracker));S=S||k;W&&q&&S.tooltip(q)}else if(k||
989 N)k&&k.remove(),k=null,e&&(e[Ma]=null),l&&l.lines&&(l.lines[Ma]=null);L&&X&&!X.stepped&&"visible"===Pa&&L.text!=C&&" "!=L.text?($a=Y?"left"===Ba?na:Ha:Ha,S=Aa-+!Z*d*ya+d*(oa||0),O?(Ga=c||da?"middle":"bottom",$a+=c?0:qa*(Oa?-0.4:0.4),da&&($a+=Oa?4:-2,Da=Oa?"end":"start")):d&&this.axisData.opposite?(Ga=eb,Da=da?"start":"middle"):Ga=ua,/\n|<br\s*?\/?>/ig.test(aa)&&ca&&(da?(Ga="middle",S-=d*(oa||0)):(Ga=d&&this.axisData.opposite&&!da?"middle":kb,$a-=sa)),xa={"class":"fusioncharts-label",text:aa,fill:ea?
990 fa||A:null,title:L&&(L.originalText||""),x:S,y:$a,"text-anchor":Da,"vertical-align":Ga,transform:" ","text-bound":O?[va.backgroundColor,va.borderColor,va.borderThickness,va.borderPadding,va.borderRadius,va.borderDash]:L&&[L.labelBgClr,L.labelBorderClr,ia,Sa],visibility:Pa,"line-height":va.lineHeight},N?N.attr(xa):(N=g[Ma]=b.text(xa,I).attr("class","fusioncharts-label"),k&&(k.label=N),l.labels=l.labels||[],l.labels.push(N)),!ca&&ea&&N.css(ea),da&&N.attr("transform",["r",da,S,$a]),O&&N&&Ra.push(N)):
991 N&&(N.isRotationSet=!1,N.remove(),g&&(g[Ma]=null),l&&l.labels&&(l.labels[Ma]=null));!k&&!N||X&&null===X.value||(X&&X.isMinLabel?this.poi.min={label:N,index:Ma,line:k}:X&&X.isMaxLabel?this.poi.max={label:N,index:Ma,line:k}:X&&X.isZeroPlane&&(this.poi.zero={label:N,index:Ma,line:k}))}p(a.options.plotOptions.series.animation.duration,0)},drawPlotBands:function(){var a=this.renderer,b=a.paper,c=this.isVertical,d=this.axisData.plotBands||[],e=this.bands=this.bands||[],g=this.bandLabels=this.bandLabels||
992 [],h=this.relatedObj.canvasObj,k=this.primaryOffset,l=c?this.startY:this.startX,n=c?this.endY:this.endX,m=a.options.chart.hasScroll,s=this.belowBandGroup,t=this.topBandGroup,w=this.belowLabelGroup,v=this.topLabelGroup,C=this.elements||{},a=!1!==(a.tooltip||{}).enabled,B,D,K,I,F,R,J,M,N,Q,S,X,W,$,q,u,A,G,f,O,L,Z,Y,ca,ba,aa,fa,qa,ga,ea,sa,da,Ba,oa,Da,na=la(d.length,e.length);for(Da=0;Da<na;Da+=1){oa="visible";da=e[Da];Ba=g[Da];if(B=d[Da])if(D=B.tooltext,K=B.to,I=B.from,F=B.value,R=B.width,J=B.color,
993 ea=3<B.zIndex?t:s,M=B.label){if(N=M.style){if($=N.fontSize)Q=$,-1!==Q.indexOf("px")&&(Q=Q.replace("px",""),parseFloat(Q));(Q=N.lineHeight)&&-1!==Q.indexOf("px")&&(Q=Q.replace("px",""),parseFloat(Q));f=N.color}(Q=M.borderWidth)&&-1!==Q.indexOf("px")&&Q.replace("px","");S=M.align;X=M.x;W=M.y;A=M.text;G=M.originalText;q=M.backgroundColor;u=M.backgroundOpacity;q&&(L=M.labelBgClr=H({color:q,alpha:100*u}));if(q=M.borderColor)Z=M.labelBorderClr=H({color:q,alpha:"100"});q=M.textAlign;q="left"===q?"start":
994 "right"===q?"end":"middle";u=M.verticalAlign;O=M.borderType;sa=3<B.zIndex?v:w}Y=this.getAxisPosition(p(K,F));ca=this.getAxisPosition(p(I,F));ba=c?h.x:ca;aa=c?Y:h.y;fa=c?h.w:(this.axisData.reversed?ca-Y:Y-ca)||R||1;ca=c?ca-Y||1:h.h;Y=ba+fa;fa=za(fa);0>ca&&(ca=za(ca),aa-=ca);c||(oa=m?"hidden":ba+k>n||Y+k<l?"hidden":oa);M&&(qa=c?"right"===S?h.toX+X:h.x+X:ba+fa/2,ga=c?aa+ca/2:h.toY+W);if(!da&&B&&"visible"===oa)B={x:ba,y:aa,width:fa,height:ca,fill:H(J),"stroke-width":0},da?da.attr(B):(da=e[Da]=b.rect(B,
995 ea),C.bands=C.bands||[],C.bands[Da]=da),a&&D&&da.tooltip(D);else if(da&&(!B||"hidden"===oa)){C.labels&&(g[Da]=C.labels[Da]=null);da.label&&da.label.remove();e[Da]=C.bands[Da]=null;da.remove();continue}da&&M&&M.text&&(B={"class":"fusioncharts-label",text:A,title:G||"",fill:f,"text-bound":[L,Z,Q,0.2*$,"solid"===O?!1:!0],x:qa,y:ga,"text-anchor":q,"vertical-align":u,"line-height":N.lineHeight},Ba?Ba.attr(B):(Ba=g[Da]=da.label=b.text(B,sa).attr("class","fusioncharts-label"),N&&Ba.css(N),C.labels=C.labels||
996 [],C.labels[Da]=Ba))}},drawAxisName:function(){var a=this.axisData,b=a.title||{},c=b&&b.style,d=b&&b.className,e=b.align,g=b.centerYAxisName||!1,h=this.renderer.paper,k=this.isVertical,l=this.relatedObj.canvasObj,n=p(a.offset,0)+p(b.margin,0),m=b.text||"",s=this.name||void 0,a=a.opposite,t=this.layerBelowDataset,t=t.nameGroup=t.nameGroup||h.group("axis-name",t),w=p(b.rotation,a?90:270),v=k?a?l.toX+n:l.x-n:(l.x+l.toX)/2,C={fontFamily:c.fontFamily,fontSize:c.fontSize,lineHeight:c.lineHeight,fontWeight:c.fontWeight,
997 fontStyle:c.fontStyle},B,g=k?"low"===e?l.toY:g?(l.y+l.toY)/2:this.renderer.chartHeight/2:l.toY+n;m?(!isNaN(w)&&w&&k&&(B=c.fontSize,B=-1!=B.indexOf("px")?B.replace("px",""):B,a?(v+=parseFloat(B),B=270===w?"bottom":"top"):(v-=parseFloat(B),B=270===w?"top":"bottom")),this.renderer.addCSSDefinition("."+d,C),d={"class":d,x:0,y:0,text:m,fill:c.color,"text-anchor":"low"===e?90==w?"end":"start":"middle","vertical-align":k?w?B:"middle":a?eb:"top",transform:k?"t"+v+","+g+"r"+w:"t"+v+","+g,"font-size":c.fontSize},
998 b.originalText&&(d.title=b.originalText),s?s.attr(d):s=this.name=h.text(d,t),s.attr({"line-height":c.lineHeight,"text-bound":[c.backgroundColor,c.borderColor,c.borderThickness,c.borderPadding,c.borderRadius,c.borderDash]})):s&&s.remove();this.elements.name=s},drawLine:function(){var a=this.axisData,b=this.renderer.paper,c=this.min,d=this.max,e=this.isVertical,g=a.opposite,h=this.layerBelowDataset,h=this.lineGroup=this.lineGroup||b.group("axis-lines",h),k=a.lineColor,l=a.lineThickness,n=a.lineEndExtension||
999 0,m=a.lineStartExtension||0,a=this.relatedObj.canvasObj;e?(c=this.getAxisPosition(c)-m,n=this.getAxisPosition(d)+n,d=e=g?a.toX+l/2:a.x-l/2):(d=a.x-m,e=a.toX+n,c=n=g?a.y-l/2:a.toY+l/2);b=b.path({path:["M",d,c,"L",e,n],stroke:k,"stroke-width":l},h);this.elements.axisLine=b},realtimeUpdateX:function(a){if(0<a){for(var b=this.axisData.plotBands,c=this.min+a,d,e=b.length;e--;)(d=b[e])&&!d.isNumVDIV&&(d.value<c||d.from<c||d.to<c?b.splice(e,1):(void 0!==d.value&&(d.value-=a),void 0!==d.from&&(d.from-=a),
1000 void 0!==d.to&&(d.to-=a)));this.drawPlotLine();this.drawPlotBands()}},realtimeUpdateY:function(a,b){var c=this.axisData,d=this.min=c.min=a,c=this.span=(this.max=c.max=b)-d,c=this.pixelRatio=this.isVertical?this.relatedObj.canvasObj.h/c:this.relatedObj.canvasObj.w/c;this.pixelValueRatio=this.isReverse?-c:c;this.drawPlotLine();this.drawPlotBands()}};d.prototype.constructor=d;b("renderer.cartesian",{drawCanvas:function(){var a=this.options.chart||{},b=a.plotBackgroundColor,c=this.paper,d=this.elements,
1001 e=d.canvas,g=d.canvas3DBase,h=d.canvas3dbaseline,g=d.canvasBorder,k=d.canvasBg,l=this.canvasTop,n=this.canvasLeft,m=this.canvasWidth,s=this.canvasHeight,t=p(a.plotBorderRadius,0),k=a.plotBorderWidth,w=0.5*k,v=a.plotBorderColor,C=a.isBar,B=a.is3D,D=a.use3DLighting,I=a.showCanvasBg,R=a.canvasBgDepth,J=a.showCanvasBase,M=a.canvasBaseColor3D,Q=a.canvasBaseDepth,N=a.plotShadow,S=F&&0===k&&N&&N.enabled,X=a.xDepth||0,a=a.yDepth||0,W=this.layers,$=W.background,Y=W.dataset;W.tracker=W.tracker||c.group("hot").insertAfter(Y);
1002 W.datalabels=W.datalabels||c.group("datalabels").insertAfter(Y);W=W.canvas=W.canvas||c.group("canvas").insertAfter($);g||(d.canvasBorder=c.rect({x:n-w,y:l-w,width:m+k,height:s+k,r:t,"stroke-width":k,stroke:v,"stroke-linejoin":2<k?"round":"miter"},W).shadow(N));d["clip-canvas"]=[la(0,n-X),la(0,l-a),la(1,m+2*X),la(1,s+2*a)];d["clip-canvas-init"]=[la(0,n-X),la(0,l-a),1,la(1,s+2*a)];B&&(I&&(k=C?d.canvasBg=c.path(["M",n,",",l,"L",n+1.2*R,",",l-R,",",n+m-R,",",l-R,",",n+m,",",l,"Z"],W):d.canvasBg=c.path(["M",
1003 n+m,",",l,"L",n+m+R,",",l+1.2*R,",",n+m+R,",",l+s-R,",",n+m,",",l+s,"Z"],W),k.attr({"stroke-width":0,stroke:"none",fill:H(b)})),J&&(g=C?d.canvas3DBase=c.cubepath(n-X-Q-1,l+a+1,Q,s,X+1,a+1,W):d.canvas3DBase=c.cubepath(n-X-1,l+s+a+1,m,Q,X+1,a+1,W),g.attr({stroke:"none","stroke-width":0,fill:[M.replace(ia,Z),!D]}),h||(h=d.canvas3dbaseline=c.path(void 0,W)),h.attr({path:C?["M",n,l,"V",s+l]:["M",n,l+s,"H",m+n],stroke:K.tintshade(M.replace(ia,Z),0.05).rgba})));!e&&b&&(d.canvas=c.rect({x:n,y:l,width:m,height:s,
1004 r:t,"stroke-width":0,stroke:"none",fill:H(b)},W).shadow(S))},drawAxes:function(){var a=this.logic,b=this.options,c=this.paper,e=this.layers,g=e.dataset,h=e.layerBelowDataset=e.layerBelowDataset||c.group("axisbottom").trackTooltip(!0),k=e.layerAboveDataset=e.layerAboveDataset||c.group("axistop").trackTooltip(!0),c=this.xAxis=[],e=this.yAxis=[];h.insertBefore(g);k.insertAfter(g);if(b.xAxis&&b.xAxis.length)for(g=0,h=b.xAxis.length;g<h;g+=1)c[g]=this.xAxis[g]=new d(b.xAxis[g],this,a.isBar);else c[0]=
1005 this.xAxis[0]=new d(b.xAxis,this,a.isBar);if(b.yAxis)for(g=0,h=b.yAxis.length;g<h;g+=1)e[g]=this.yAxis[g]=new d(b.yAxis[g],this,!a.isBar,!a.isBar);g=0;for(h=e.length;g<h;g+=1)e[g].axisData&&(e[g].axisData.title&&(e[g].axisData.title.className="fusioncharts-yaxis-"+g+"-title"),e[g].axisData.labels&&(e[g].axisData.labels.className="fusioncharts-yaxis-"+g+"-gridlabels")),e[g].draw();g=0;for(h=c.length;g<h;g+=1)c[g].axisData&&(c[g].axisData.title&&(c[g].axisData.title.className="fusioncharts-xaxis-"+
1006 g+"-title"),c[g].axisData.labels&&(c[g].axisData.labels.className="fusioncharts-xaxis-"+g+"-gridlabels")),c[g].draw()},drawScroller:function(){var a=this,b=a.options,c=a.paper,d=a.layers,e=a.xAxis["0"]||{},g=e.axisData||{},h=g.scroll||{},k=a.canvasTop,l=a.canvasLeft,n=a.canvasWidth,s=a.canvasHeight,t=a.canvasBorderWidth,w=t||(g.showLine?g.lineThickness:0),C=t||g.lineStartExtension,g=t||g.lineEndExtension,t=b.chart.useRoundEdges,B,D,H,I,F,R,J,M,Q,N,S,X,W,$,Z,Y=d.dataset,q=d.datalabels,u=d.tracker;
1007 I=d.layerAboveDataset;var A,G;h.enabled&&(A=d.scroll=d.scroll||c.group("scroll").insertAfter(I),I=h.scrollRatio,b=p(b[fa].xAxisScrollPos,h.startPercent),F=h.viewPortMax,R=h.viewPortMin,D=h.vxLength,J=hb(D),M=h.showButtons,Q=h.height,N=h.padding,S=h.color,X=h.flatScrollBars,D=h.windowedCanvasWidth=e.getAxisPosition(D),B=h.fullCanvasWidth=e.getAxisPosition(F-R)-D,H=ba(b*B),W=a.fusionCharts.jsVars._reflowData,$={hcJSON:{_FCconf:{xAxisScrollPos:0}}},Z=$.hcJSON._FCconf,d.scroller=c.scroller(l-C,k+s+w+
1008 N-!!w,n+C+g,Q,!0,{showButtons:M,displayStyleFlat:X,scrollRatio:I,scrollPosition:b},A).data("fullCanvasWidth",B).data("windowedCanvasWidth",D).attr({"scroll-display-style":X,fill:S,r:t&&2||0}).scroll(function(b){var c;H=-ba(b*B);Y&&Y.transform(["T",H,0]);q&&q.transform(["T",H,0]);u&&u.transform(["T",H,0]);e.setOffset&&e.setOffset(H);c={position:b,direction:b-h.lastPos||0,vxLength:J};Z.xAxisScrollPos=h.lastPos=b;m(W,$,!0);if(0!==c.direction)for(G=0;G<a.datasets.length;G++)a[a.datasets[G].drawPlot+"Scroll"]&&
1009 a[a.datasets[G].drawPlot+"Scroll"].call(a,a.plots[G],a.datasets[G],c)}),function(){var b;K.eve.on("raphael.scroll.start."+d.scroller.id,function(c){b=c;v.raiseEvent("scrollstart",{scrollPosition:c},a.logic.chartInstance)});K.eve.on("raphael.scroll.end."+d.scroller.id,function(c){v.raiseEvent("scrollend",{prevScrollPosition:b,scrollPosition:c},a.logic.chartInstance)})}());return h.enabled},finalizeScrollPlots:function(){var a=this,b=a.container,d=a.elements,e=a.layers,g=e.scroller,h=e.dataset,k=e.datalabels,
1010 e=e.tracker,l,m={},s,w=a.xAxis["0"]||{},C=(w.axisData||{}).scroll||{},B=p(a.options[fa].xAxisScrollPos,C.startPercent),D=C.fullCanvasWidth;C.enabled&&(h.attr({"clip-rect":d["clip-canvas"]}),k.attr({"clip-rect":d["clip-canvas"]}),e.attr({"clip-rect":d["clip-canvas"]}),d=function(b){var d=a.elements.canvas,e=l.left,h=l.top,k=b.state,p=t&&c.getTouchEvent(b)||n;b=b.originalEvent;e=(b.clientX||b.pageX||p.pageX)-e;h=(b.clientY||b.pageY||p.pageY)-h;switch(k){case "start":s=d.isPointInside(e,h);m.ox=s&&e||
1011 null;if(!s)return!1;m.prevScrollPosition=g.attrs["scroll-position"];v.raiseEvent("scrollstart",{scrollPosition:m.prevScrollPosition},a.logic.chartInstance);break;case "end":v.raiseEvent("scrollend",{prevScrollPosition:m.prevScrollPosition,scrollPosition:m.scrollPosition},a.logic.chartInstance);s=!1;m={};break;default:if(!s)break;d=e-m.ox;m.ox=e;m.scrollPosition=g.attrs["scroll-position"]-d/D;g.attr({"scroll-position":m.scrollPosition})}},t&&(l=c.getPosition(b),b&&(X(b,"pointerdrag",d),I(b,"pointerdrag",
1012 d))),0<B&&(b=-ba(B*D),h&&h.transform(["T",b,0]),k&&k.transform(["T",b,0]),e&&e.transform(["T",b,0]),w.setOffset&&w.setOffset(b)))},drawPlotColumn:function(a,b,c){var d=this,e=a.data,g=e.length,h=a.items,k=a.graphics||(a.graphics=[]),l=d.paper,n=d.smartLabel,m=d.logic,t=d.layers,v=d.options,C=d.elements,B=v.chart,D=!1!==(v.tooltip||{}).enabled,I,F=d.definition.chart,J=v.plotOptions.series,Q=J.dataLabels.style,N=d.xAxis[b.xAxis||0],S=d.yAxis[b.yAxis||0],X=d.chartWidth,W=d.chartHeight,Z=S.axisData.reversed,
1013 Y=m.isLog,ca=m.is3D,aa=m.isStacked,ea=m.isWaterfall,da=m.isCandleStick,q=$(N.axisData.scroll,{}),u=c||{},A=q.enabled,G=p(u.position,v[fa].xAxisScrollPos,q.startPercent),f=u.vxLength||hb(q.vxLength),O=u.scrollStart||la(0,ba((g-f)*G)-1)||0,L=u.scrollEnd||ga(g,O+f+2)||g,va=B.canvasBorderOpacity=K.color(B.plotBorderColor).opacity,oa=d.canvasBorderWidth,Ib=B.isCanvasBorder=0!==va&&0<oa,na,Va=c!==Ga?0:isNaN(+J.animation)&&J.animation.duration||1E3*J.animation,ia=b.numColumns||1,qa=b.columnPosition||0,ua=
1014 B.use3DLighting,ya=!1===b.visible?"hidden":"visible",xa=B.overlapColumns,Ha=N.getAxisPosition(0),Ba=N.getAxisPosition(1)-Ha,Pa=F&&F.plotspacepercent,Da=p(F&&F.plotpaddingpercent),Oa=J.groupPadding,Sa=J.maxColWidth,La=(1-0.01*Pa)*Ba||ga(Ba*(1-2*Oa),Sa*ia),lb=La/2,yc=La/ia,Sc=ga(yc-1,1<ia?xa||Da!==Ga?0<Da?yc*Da/100:0:4:0),$a=qa*yc-lb+Sc/2,Za=S.max,eb=S.min,sb=0<Za&&0<=eb,qb=0>=Za&&0>eb,jb=0<Za&&0>eb,Ma=qb||Z&&sb?Za:Y||sb?eb:0,Ra=S.yBasePos=S.getAxisPosition(Ma),kb,Jc=p(B.useRoundEdges,0),oc=t.dataset=
1015 t.dataset||l.group("dataset-orphan"),Ua=t.datalabels=t.datalabels||l.group("datalabels").insertAfter(oc),gb=t.tracker,zc=d.canvasTop,tb=d.canvasLeft,Mb=d.canvasWidth,xb=d.canvasBottom,Fc=d.canvasRight,uc,Gc,Bc,Hc,ac,bc,Nc,Kb,Nb,pb,cb,Yb,ub,xc,zb,jc,rb,Wa,Rb,Zb,Ea,Cb,ta,$b,Wb,Oc,Fa,Hb,Ab,rc,sc,vc,fb,Pc,Ob,Qa,Ic,fc,Pb,Sb=function(a){sa.call(this,d,a)},gc=function(a,b){return function(c){a.attr(b);sa.call(this,d,c,"DataPlotRollOver")}},Lb=function(a,b){return function(c){a.attr(b);sa.call(this,d,c,"DataPlotRollOut")}};
1016 d.addCSSDefinition(".fusioncharts-datalabels .fusioncharts-label",{fontFamily:Q.fontFamily,fontSize:Q.fontSize,lineHeight:Q.lineHeight,fontWeight:Q.fontWeight,fontStyle:Q.fontStyle,color:Q.color});Ua.attr("class","fusioncharts-datalabels");Va&&(!c&&Ua.attr({transform:"...t"+X+","+W}),d.animationCompleteQueue.push({fn:function(){Ua.attr({transform:"...t"+-X+","+-W})},scope:d}));yc-=Sc;A&&O>L-f-2&&(O=la(0,L-f-2));aa&&(Qa=oc.shadows||(oc.shadows=l.group("shadows",oc).toBack()));Ab=oc.column||(oc.column=
1017 l.group("columns",oc));da||ca||A||Ab.attrs["clip-rect"]||Ab.attr({"clip-rect":C["clip-canvas"]});ea&&Ab.toBack();if(ca)for(ac=B.xDepth||0,bc=B.yDepth||0,rc=Ab.negative=Ab.negative||l.group("negative-values",Ab),fb=Ab.column=Ab.column||l.group("positive-values",Ab),vc=Ab.zeroPlane,!vc&&0>eb&&0<=Za&&(vc=Ab.zeroPlane=l.group("zero-plane",Ab).insertBefore(fb),Gc=B.zeroPlaneColor,Bc=B.zeroPlaneBorderColor,Hc=B.zeroPlaneShowBorder,C.zeroplane=l.cubepath(tb-ac,Ra+bc,Mb,1,ac,bc,vc).attr({fill:[Gc,!ua],stroke:Bc||
1018 "none","stroke-width":Hc?1:0})),(sc=rc.data("categoryplots"))||(rc.data("categoryplots",Array(g)),sc=rc.data("categoryplots")),(Pc=fb.data("categoryplots"))||(fb.data("categoryplots",Array(g)),Pc=fb.data("categoryplots")),pb=0;pb<g;pb+=1)sc[pb]=sc[pb]||l.group(rc),Pc[pb]=Pc[pb]||l.group(fb);else Ob=Ab;n.setStyle({fontFamily:Q.fontFamily,fontSize:Q.fontSize,lineHeight:Q.lineHeight,fontWeight:Q.fontWeight,fontStyle:Q.fontStyle});for(pb=O;pb<L;pb+=1){cb=e[pb];zb=cb.y;I=cb.toolText;uc=a.index+"_"+pb;
1019 Fa=Hb=null;if(null===zb){if(Nb=h[pb])Fa=Nb.graphic,ca||Fa.attr({height:0})}else{Nc=!1;xc=p(cb.x,pb);Yb=cb.link;ub=s(cb.borderWidth)||0;Oc=cb._FCW*Ba;rb=N.getAxisPosition(cb._FCX)||N.getAxisPosition(xc)+$a;jc=cb.previousY;Rb=S.getAxisPosition(jc||Ma);Wa=S.getAxisPosition(zb+(jc||0));Ea=za(Wa-Rb);Cb=Oc||yc;Pb={index:pb,link:Yb,value:cb.y,displayValue:cb.displayValue,categoryLabel:cb.categoryLabel,toolText:cb.toolText,id:a.userID,datasetIndex:a.index,datasetName:a.name,visible:a.visible};if(ca){0>zb&&
1020 (Wa=Rb,Nc=!0);Ob=0>zb?sc:Pc;(Nb=h[pb])||(Nb=h[pb]={index:pb,value:zb,graphic:l.cubepath(Ob[pb]),dataLabel:null,tracker:null,hot:null});Fa=Nb.graphic;$b=Wb={};cb.hoverEffects&&($b={fill:[H(cb.color),!ua],stroke:ub&&H(cb.borderColor)||"NONE","stroke-width":ub},ta=cb.rolloverProperties,Wb={fill:[H(ta.color),!ua],stroke:ta.borderWidth&&H(ta.borderColor)||"NONE","stroke-width":ta.borderWidth});Fa.attr({cubepath:[rb-ac,Va?Ra+bc:Wa+bc,Cb,Va?0:Ea,ac,bc],fill:[H(cb.color),!ua],stroke:ub&&H(cb.borderColor)||
1021 "NONE","stroke-width":ub,visibility:ya}).shadow(J.shadow&&cb.shadow,Qa).data("BBox",{height:Ea,width:Cb,x:rb,y:Wa});Va&&Fa.animate({cubepath:[rb-ac,Wa+bc,Cb,Ea,ac,bc]},Va,"normal",d.getAnimationCompleteFn());if(Yb||D)!aa&&Ea<M&&(Wa-=(M-Ea)/2,Ea=M),Nb.tracker||(Nb.tracker=l.cubepath(gb)),Hb=Nb.tracker,Hb.attr({cubepath:[rb-ac,Wa+bc,Cb,Ea,ac,bc],cursor:Yb?"pointer":"",stroke:ub&&w||"NONE","stroke-width":ub,fill:w,ishot:!0,visibility:ya});(Hb||Fa).data("eventArgs",Pb).data("groupId",uc).click(Sb).hover(gc(Fa,
1022 Wb),Lb(Fa,$b)).tooltip(I);(Hb||Fa)._.cubetop.data("eventArgs",Pb).data("groupId",uc).click(Sb).hover(gc(Fa,Wb),Lb(Fa,$b)).tooltip(I);(Hb||Fa)._.cubeside.data("eventArgs",Pb).data("groupId",uc).click(Sb).hover(gc(Fa,Wb),Lb(Fa,$b)).tooltip(I);aa&&Nc&&(Fa.toBack(),Hb&&Hb.toBack())}else{Kb=!1;if(!Y&&!Z&&0>zb||!Y&&Z&&0<zb)Wa=Rb,Kb=!0;Z&&!jb&&0<zb&&(Wa=Rb-Ea,Kb=!1);ea&&0>zb&&Aa(jc)&&(Wa-=Ea,Kb=!0);da||A||(R(Wa)<=zc&&(Ea-=zc-Wa-+Ib,Wa=zc-+Ib),ba(Wa+Ea)>=xb&&(Ea-=ba(Wa+Ea)-xb+ +!!ub+ +Ib,B.xAxisLineVisible&&
1023 !Ib&&(Ea+=1)),1>=ub&&(ba(rb)<=tb&&(Cb+=rb,rb=tb-ub/2+ +!!ub-+Ib,Cb-=rb),ba(rb+Cb)>=Fc&&(Cb=Fc-rb+ub/2-+!!ub+ +Ib)));Ic=K.crispBound(rb,Wa,Cb,Ea,ub);rb=Ic.x;Wa=Ic.y;Cb=Ic.width;Ea=Ic.height;if(!da&&Ib&&(!Aa(jc)||ea&&jc===zb&&zb===cb._FCY))if(qb&&!Z)na=Wa-(zc-ub/2),Ea+=na,Ra=Wa-=na;else if(Y||sb||Z&&qb)Ea=xb-Wa+ub/2,Ra=Wa+Ea;ea&&jc&&0<ub&&0!==J.connectorOpacity&&1===J.connectorWidth&&J.connectorDashStyle&&(Ea-=1,0>zb&&(Wa+=1));1>=Ea&&(Ea=1,Wa+=0>zb?1:0===zb?0:-Ea);b._columnWidth=Cb;if(!(Nb=h[pb])){Nb=
1024 h[pb]={index:pb,value:zb,width:Cb,graphic:null,valueBelowPlot:Kb,dataLabel:null,tracker:null};kb=0;Va||(Ra=Wa,kb=Ea||1);$b=Wb={};cb.hoverEffects&&($b={fill:H(cb.color),stroke:H(cb.borderColor),"stroke-width":ub,"stroke-dasharray":cb.dashStyle},ta=cb.rolloverProperties,Wb={fill:H(ta.color),stroke:H(ta.borderColor),"stroke-width":ta.borderWidth,"stroke-dasharray":ta.dashStyle});fc={x:rb,y:Ra,width:Cb,height:kb,r:Jc,fill:H(cb.color),stroke:H(cb.borderColor),"stroke-width":ub,"stroke-dasharray":cb.dashStyle,
1025 "stroke-linejoin":"miter",visibility:ya};Fa?Fa.attr(fc):Fa=Nb.graphic=l.rect(fc,Ob);Fa.shadow(J.shadow&&cb.shadow,Qa).data("BBox",Ic);Va&&Fa.animate({y:Wa,height:Ea||1},Va,"normal",d.getAnimationCompleteFn());if(Yb||D)!aa&&Ea<M&&(Wa-=(M-Ea)/2,Ea=M),fc={x:rb,y:Wa,width:Cb,height:Ea,r:Jc,cursor:Yb?"pointer":"",stroke:w,"stroke-width":ub,fill:w,ishot:!0,visibility:ya},(Hb=Nb.tracker)?Hb.attr(fc):Hb=Nb.tracker=l.rect(fc,gb);Hb=Nb.tracker;(Hb||Fa).data("eventArgs",Pb).data("groupId",uc).click(Sb).hover(gc(Fa,
1026 Wb),Lb(Fa,$b)).tooltip(I)}}Zb=d.drawPlotColumnLabel(a,b,pb,rb,Wa)}Zb&&k.push(Zb);Fa&&k.push(Fa);Hb&&k.push(Hb);d.drawTracker&&d.drawTracker.call(d,a,b,pb)}a.visible=!1!==b.visible;return a},drawPlotColumnScroll:function(a,b,c){var d=a.data.length,e=a.items,g;g=c.vxLength;var h=la(0,ba((d-g)*c.position)-1)||0,d=ga(d,h+g+2)||d;h>d-g-2&&(h=la(0,d-g-2));c.scrollEnd=d;for(g=h;g<d;g++)if(!e[g]){c.scrollStart=g;this.drawPlotColumn(a,b,c);break}},drawPlotColumnLabel:function(a,b,c,d,e,g){var h=this.options,
1027 k=this.logic,l=h.chart;d=this.paper;var n=this.smartLabel,m=this.layers,h=h.plotOptions.series.dataLabels.style,p=1===l.rotateValues?270:0,s=this.canvasHeight,t=this.canvasTop,w=a.data[c];a=a.items[c];var v=l.valuePadding+2,B=a.graphic;c=a.dataLabel;var D=$(a.valueBelowPlot,0>w.y),H=k.isStacked,k=k.is3D,I=l.xDepth||0,K=l.yDepth||0,F=w.displayValue;b=!1===b.visible?"hidden":"visible";var l=l.placeValuesInside,J;g=g||m.datalabels;Aa(F)&&F!==C&&null!==w.y?(a._state&&a._state.labelWidth||(n=n.getOriSize(F),
1028 a._state=p?{labelWidth:n.height,labelHeight:n.width}:{labelWidth:n.width,labelHeight:n.height}),B=B.data("BBox"),n=B.height,m=J=a._state.labelHeight+v,v=0.5*J+v,B=B.x+0.5*B.width,s=D?t+s-(e+n):e-t,H?(e=e+0.5*n+(K||0),B-=I):l?n>=m?(e+=D?n-v:v,w._valueBelowPoint=1,k&&(B-=I,e+=K)):s>=m?(e+=D?n+v:-v,k&&D&&(B-=I,e+=K)):(e+=D?n-v:v,w._valueBelowPoint=1,k&&(B-=I,e+=K)):s>=m?(e+=D?n+v:-v,k&&(D?(B-=I,e+=K):B-=I/2)):(e+=D?n-v:v,w._valueBelowPoint=1,k&&(B-=I,e+=K)),c?c.attr({x:B,y:e,visibility:b}):c=a.dataLabel=
1029 d.text({text:F,"class":"fusioncharts-label",x:B,y:e,fill:h.color,"font-size":h.fontSize,visibility:b},g).attr({"line-height":h.lineHeight,"text-bound":[h.backgroundColor,h.borderColor,h.borderThickness,h.borderPadding,h.borderRadius,h.borderDash]}),p&&c.attr("transform","T0,0,R"+p)):c&&c.attr({text:C});return c},drawPlotFloatedcolumn:function(a,b){this.drawPlotColumn.call(this,a,b)},drawPlotColumn3d:function(a,b){this.drawPlotColumn.call(this,a,b)},drawPlotBar:function(a,b){var c=this,d=a.data,e=
1030 d.length,g=a.items,h=a.graphics=[],k=c.paper,l=c.logic,n=c.layers,m=c.options,t=c.elements,v=m.chart,C=!1!==(m.tooltip||{}).enabled,B,D=c.definition.chart,m=m.plotOptions.series,I=m.dataLabels.style,F={fontFamily:I.fontFamily,fontSize:I.fontSize,lineHeight:I.lineHeight,fontWeight:I.fontWeight,fontStyle:I.fontStyle},I=c.xAxis[b.xAxis||0],J=c.yAxis[b.yAxis||0],Q=l.is3D,l=l.isStacked,N=v.canvasBorderOpacity=K.color(v.plotBorderColor).opacity,S=c.canvasBorderWidth,N=v.isCanvasBorder=0!==N&&0<S,S=isNaN(+m.animation)&&
1031 m.animation.duration||1E3*m.animation,X=b.numColumns||1,W=b.columnPosition||0,$=v.use3DLighting,Z=!1===b.visible?"hidden":"visible",Y=v.overlapColumns,ca=I.getAxisPosition(0),ca=I.getAxisPosition(1)-ca,aa=D&&D.plotspacepercent,D=p(D&&D.plotpaddingpercent),fa=m.groupPadding,q=m.maxColWidth,aa=(1-0.01*aa)*ca||ga(ca*(1-2*fa),q*X),ca=aa/2,aa=aa/X,Y=ga(aa-1,1<X?Y||D!==Ga?0<D?aa*D/100:0:4:0),X=aa-Y,W=W*aa-ca+Y/2,u=J.max,A=J.min,Y=J.getAxisPosition(0>u&&0>A?u:0<u&&0<A?A:0),D=p(v.useRoundEdges,0),G=c.canvasTop,
1032 ca=c.canvasLeft,f=c.canvasHeight,aa=c.canvasRight,O=c.chartWidth,L=c.chartHeight,va,ea,da,la,Va,oa,qa,na,ia,ua,fa=J.axisData.effectiveZeroPlaneThickness;qa=n.dataset=n.dataset||k.group("dataset-orphan");var ya=n.datalabels=n.datalabels||k.group("datalabels").insertAfter(qa),n=n.tracker,Ba,Aa,Da,xa,Sa,Ha,q=function(a){sa.call(this,c,a)},Pa=function(a,b){return function(d){a.attr(b);sa.call(this,c,d,"DataPlotRollOver")}},Oa=function(a,b){return function(d){a.attr(b);sa.call(this,c,d,"DataPlotRollOut")}};
1033 c.addCSSDefinition(".fusioncharts-datalabels .fusioncharts-label",F);ya.attr("class","fusioncharts-datalabels");S&&(c.animationCompleteQueue.push({fn:function(){ya.attr({transform:"...t"+-O+","+-L})},scope:c}),ya.attr({transform:"...t"+O+","+L}));l&&(Sa=qa.shadows||(qa.shadows=k.group("shadows",qa).toBack()));na=qa.column=qa.column||k.group("bars",qa);if(Q)for(va=v.xDepth||0,ea=v.yDepth||0,F=na.negative=na.negative||k.group("negative-values",na),qa=na.column=na.column||k.group("positive-values",na),
1034 Da=na.zeroPlane,!Da&&0>A&&0<=u&&(Da=na.zeroPlane=k.group("zero-plane",na).insertBefore(qa),ua=v.zeroPlaneColor,u=v.zeroPlaneBorderColor,A=v.zeroPlaneShowBorder,t.zeroplane=k.cubepath(Y-va,G+ea,1,f,va,ea,Da).attr({fill:[ua,!$],stroke:u||"none","stroke-width":A?1:0})),(Da=F.data("categoryplots"))||(F.data("categoryplots",Array(e)),Da=F.data("categoryplots")),(ua=qa.data("categoryplots"))||(qa.data("categoryplots",Array(e)),ua=qa.data("categoryplots")),t=0;t<e;t+=1)Da[t]=Da[t]||k.group(F),ua[t]=ua[t]||
1035 k.group(qa);else na.attrs["clip-rect"]||na.attr({"clip-rect":t["clip-canvas"]}),xa=na;t=0;for(F=e-1;t<e;t+=1,F-=1){G=d[t];A=G.y;Ba=f=null;if(null===A){if(oa=g[t])Ba=oa.graphic,Q||Ba.attr({width:0})}else{na=p(G.x,t);qa=G.link;B=G.toolText;u=s(G.borderWidth)||0;na=I.getAxisPosition(na)+W;oa=(da=G.previousY)?J.getAxisPosition(da):Y;ia=J.getAxisPosition(A+(da||0));da=za(ia-oa);0<A&&(ia=oa);Aa={index:t,link:qa,value:G.y,displayValue:G.displayValue,categoryLabel:G.categoryLabel,toolText:G.toolText,id:a.userID,
1036 datasetIndex:a.index,datasetName:a.name,visible:a.visible};if(Q){xa=0>A?Da:ua;(oa=g[t])||(oa=g[t]={index:t,value:A,graphic:k.cubepath(xa[F]),dataLabel:null,tracker:null});Ba=oa.graphic;Va=la={};G.hoverEffects&&(Va={fill:[H(G.color),!$],stroke:u&&H(G.borderColor)||"NONE","stroke-width":u},la=G.rolloverProperties,la={fill:[H(la.color),!$],stroke:la.borderWidth&&H(la.borderColor)||"NONE","stroke-width":la.borderWidth});Ba.attr({cubepath:[S?Y-va:ia-va,na+ea,S?0:da,X,va,ea],fill:[H(G.color),!$],stroke:u&&
1037 H(G.borderColor)||"NONE","stroke-width":u,"stroke-dasharray":G.dashStyle,cursor:qa?"pointer":"",visibility:Z}).shadow(m.shadow&&G.shadow,Sa).data("BBox",{height:X,width:da,x:ia,y:na});S&&Ba.animate({cubepath:[ia-va,na+ea,da,X,va,ea]},S,"normal",c.getAnimationCompleteFn());if(qa||C)!l&&da<M&&(ia-=(M-da)/2,da=M),oa.tracker||(oa.tracker=k.cubepath(n)),f=oa.tracker,f.attr({cubepath:[ia-va,na+ea,da,X,va,ea],cursor:qa?"pointer":"",stroke:u&&w||"NONE","stroke-width":u,fill:w,ishot:!0});(f||Ba).data("eventArgs",
1038 Aa).click(q).hover(Pa(Ba,la),Oa(Ba,Va)).tooltip(B);(f||Ba)._.cubetop.data("eventArgs",Aa).click(q).hover(Pa(Ba,la),Oa(Ba,Va));(f||Ba)._.cubeside.data("eventArgs",Aa).click(q).hover(Pa(Ba,la),Oa(Ba,Va));if(!l||l&&0>A)Ba.toBack(),f&&f.toBack()}else{R(ia)<=ca&&(da+=ia,ia=ca+u/2+0.2,v.xAxisLineVisible&&!N&&(ia-=1),da-=ia);ba(ia+da)>=aa&&(da=aa-ia-u/2-0.2);Ha=K.crispBound(ia,na,da,X,u);ia=Ha.x;na=Ha.y;da=Ha.width;X=Ha.height;1>=da&&(da=1,ia+=0>A?-da:0===A?0:1<fa?da:0);(oa=g[t])||(oa=g[t]={index:t,value:A,
1039 height:X,graphic:null,dataLabel:null,tracker:null});Ba=oa.graphic;Va=la={};G.hoverEffects&&(Va={fill:H(G.color),stroke:H(G.borderColor),"stroke-width":u,"stroke-dasharray":G.dashStyle},la=G.rolloverProperties,la={fill:H(la.color),stroke:H(la.borderColor),"stroke-width":la.borderWidth,"stroke-dasharray":la.dashStyle});A={x:S?Y:ia,y:na,width:S?0:da||1,height:X,r:D,fill:H(G.color),stroke:H(G.borderColor),"stroke-width":u,"stroke-dasharray":G.dashStyle,"stroke-linejoin":"miter",cursor:qa?"pointer":"",
1040 visibility:Z};Ba?Ba.attr(A):Ba=oa.graphic=k.rect(A,xa);Ba.shadow(m.shadow&&G.shadow,Sa).data("BBox",Ha);S&&Ba.animate({x:ia,width:da||1},S,"normal",c.getAnimationCompleteFn());if(qa||C)!l&&da<M&&(ia-=(M-da)/2,da=M),f=oa.tracker,A={x:ia,y:na,width:da,height:X,r:D,cursor:qa?"pointer":"",stroke:w,"stroke-width":u,fill:w,ishot:!0},f?f.attr(A):f=oa.tracker=k.rect(A,n),f.data("eventArgs",Aa);(f||Ba).data("eventArgs",Aa).click(q).hover(Pa(Ba,la),Oa(Ba,Va)).tooltip(B)}B=c.drawPlotBarLabel(a,b,t,ia,na)}B&&
1041 h.push(B);Ba&&h.push(Ba);f&&h.push(f);c.drawTracker&&c.drawTracker.call(c,a,b,t)}a.visible=!1!==b.visible;return a},drawPlotBarLabel:function(a,b,c,d,e,g){var h=this.options,k=this.logic,l=h.chart,n=this.paper,m=this.layers,p=h.plotOptions.series.dataLabels.style,h=this.canvasLeft,s=this.canvasWidth,t=a.data[c],w=a.items[c];a=l.valuePadding+2;var v=w.graphic;c=w.dataLabel;var B=0>t.y,D=k.isStacked,k=k.is3D,I=l.xDepth||0,H=l.yDepth||0,K=t.displayValue;b=!1===b.visible?"hidden":"visible";l=l.placeValuesInside;
1042 g=g||m.datalabels;Aa(K)&&K!==C&&null!==t.y?(c||(c=w.dataLabel=n.text({"class":"fusioncharts-label",text:K,"font-size":p.fontSize,"text-anchor":D?"middle":B?l?"start":"end":l?"end":"start",title:t.originalText||"",fill:p.color,x:0,y:0,"line-height":p.lineHeight},g).attr("text-bound",[p.backgroundColor,p.borderColor,p.borderThickness,p.borderPadding,p.borderRadius,p.borderDash])),g=c.getBBox(),n=v.data("BBox"),p=n.height,m=n.width,n=g.width,n+=a,e+=0.5*p,p=d+(B?0:m),d=B?d-h:h+s-(d+m),D?(p=p+0.5*(B?
1043 m:-m)-(k?I:0),e+=k?H:0):(l?m>=n?(p+=B?a:-a,k&&(p-=I,e+=H)):(p+=B?-a:a,k&&B&&(p-=I)):d>=n?(p+=B?-a:a,k&&B&&(p-=I,e+=I)):(p+=B?a:-a,k&&(p-=I,e+=H)),p>h+s&&(p=h+s-0.5*g.width-4),p<h&&(p=h+0.5*g.width+4)),c.attr({x:p,y:e,visibility:b})):c&&c.attr({text:C});return c},drawPlotBar3d:function(a,b){this.drawPlotBar.call(this,a,b)},drawPlotLine:function(a,b){var c=this,d=c.paper,e=c.elements,g=c.options,h=g.chart,k=c.logic,l=g.plotOptions.series,n=a.items,m=a.graphics=a.graphics||[],t,v=c.xAxis[b.xAxis||0],
1044 B=c.yAxis[b.yAxis||0],C=k.multisetRealtime||k.dragExtended,I=k.isWaterfall,F,J,R,Q,M,S=0,X=!1!==(g.tooltip||{}).enabled,W,$=isNaN(+l.animation)&&l.animation.duration||1E3*l.animation,Z,Y=l.dataLabels.style,ca={fontFamily:Y.fontFamily,fontSize:Y.fontSize,lineHeight:Y.lineHeight,fontWeight:Y.fontWeight,fontStyle:Y.fontStyle},aa=h.xDepth||0,da=h.yDepth||0,q=h.series2D3Dshift,u=b.step,A=b.drawVerticalJoins,G=b.useForwardSteps,f=a.data,O=!1===b.visible?"hidden":"visible",L,fa=f.length,ba=v.getAxisPosition(0),
1045 ea=v.getAxisPosition(1)-ba,na=ea*fa,oa=v.axisData.scroll||{},ia=h.hasScroll||!1,qa,ua=l.connectNullData,za=c.chartWidth,ya=c.chartHeight,Aa=function(){jc.attr({"clip-rect":null});zb.show();xc.show();rb.show();Fc.attr({transform:"...t"+-za+","+-ya})},Ba,xa,Da,Ha,Sa,Pa,Ga,Oa=null,La,$a,Za=l.connectorWidth=s(b.lineWidth),eb=b.color,lb,hb,sb=l.connectorDashStyle=b.dashStyle,Ma,Ra,qb,kb,jb,Ua,gb,tb,xb,Mb=c.layers,Ec=Mb.dataset=Mb.dataset||d.group("dataset-orphan"),Fc=Mb.datalabels=Mb.datalabels||d.group("datalabels").insertAfter(Ec),
1046 uc=Mb.tracker,Gc=e["clip-canvas-init"].slice(0),Bc=e["clip-canvas"].slice(0),Hc=B.axisData.reversed,ac=B.max,bc=B.min,Nc=B.getAxisPosition(0<ac&&0<bc?Hc?ac:bc:0>ac&&0>bc?Hc?bc:ac:Hc?ac:0)+(q?da:0),Kb=[],Nb=h.anchorTrackingRadius,pb=/drag/ig.test(c.logic.rendererId),cb,Yb,ub,xc,zb,jc,rb,Wa,Rb,Zb,Ea,Cb,ta=[],$b=function(a){sa.call(this,c,a)},Wb=function(a){return function(b){c.hoverPlotAnchor(this,b,"DataPlotRollOver",a,c)}},Oc=function(a){return function(b){c.hoverPlotAnchor(this,b,"DataPlotRollOut",
1047 a,c)}},Fa=function(e,f,g,h,k,l,n,p){return function(){var q=g.imageUrl,s=g.imageScale,u=g.imageAlpha,t=n.imageHoverAlpha,A=n.imageHoverScale,v=this.height*s*0.01,B=this.width*s*0.01,C=this.width*A*0.01;gb={x:e-this.width*s*0.005,y:f-this.height*s*0.005,width:B,height:v,alpha:u};tb={x:e-this.width*A*0.005,y:f-this.height*A*0.005,width:C,height:this.height*A*0.01,alpha:t};t=C>B?tb:gb;pb&&(t={cx:e,cy:f,r:0.5*la(v,B)});(h.graphic=kb=d.image(q,rb).attr(gb).css({opacity:0.01*u}).data("alwaysInvisible",
1048 !s).data("setRolloverProperties",n).data("setRolloverAttr",tb).data("setRolloutAttr",gb).data("anchorRadius",s).data("anchorHoverRadius",A))&&m.push(kb);if(xa||X||n)jb=h.tracker=(pb?d.circle(uc):d.rect(uc)).attr(t).attr({cursor:xa?"pointer":"",stroke:w,"stroke-width":g.lineWidth,fill:w,ishot:!0,visibility:O}).data("eventArgs",k).data("groupId",cb).click($b).hover(Wb(h),Oc(h)).tooltip(l);c.drawTracker&&c.drawTracker.call(c,a,b,p);(Ea=h.dataLabel=c.drawPlotLineLabel(a,b,p,e,f))&&m.push(Ea)}},Hb=function(d,
1049 e,f,g,h,k,l,n){return function(){(Ea=g.dataLabel=c.drawPlotLineLabel(a,b,n,d,e))&&m.push(Ea)}};c.addCSSDefinition(".fusioncharts-datalabels .fusioncharts-label",ca);Fc.attr("class","fusioncharts-datalabels");l.connectorOpacity=K.color(eb).opacity;B.yBasePos=Nc;I&&(F=(J=c.definition.chart)&&J.plotspacepercent,R=l.groupPadding,Q=l.maxColWidth,M=(1-0.01*F)*ea||ga(ea*(1-2*R),1*Q),S=M/2);Fc.attr({transform:"...t"+za+","+ya});$&&c.animationCompleteQueue.push({fn:Aa,scope:c});ub=Ec.line||(Ec.line=d.group("line-connector",
1050 Ec));xc=a.lineShadowLayer||(a.lineShadowLayer=d.group("connector-shadow",ub));zb=a.anchorShadowLayer||(a.anchorShadowLayer=d.group("anchor-shadow",ub));jc=a.lineLayer||(a.lineLayer=d.group("connector",ub));rb=a.anchorLayer||(a.anchorLayer=d.group("anchors",ub));rb.hide();xc.hide();zb.hide();for(L=0;L<fa;L+=1){Ba=f[L];Sa=Ba.y;Pa=Ba.previousY||0;W=Ba.toolText;cb=a.index+"_"+L;xb=Ea=kb=jb=null;t=n[L]={index:L,value:null,graphic:null,connector:null,dataLabel:null,shadowGroup:zb,tracker:null};if(null===
1051 Sa)ta.length=0,0===ua&&(Oa=null);else{Ha=p(Ba.x,L);xa=Ba.link;"boxandwhisker"===b.relatedSeries&&b.pointStart&&(Ha+=b.pointStart);$a=B.getAxisPosition(Sa+Pa)+(q?da:0);La=v.getAxisPosition(Ha)-aa;La=N(La,Za,Za).position;$a=N($a,Za,Za).position;if((Ma=Ba.marker)&&Ma.enabled)if(Ra=Ma.symbol.split("_"),qb="spoke"===Ra[0]?1:0,Da=Ma.radius,Wa=Ma.shadow,Yb={index:L,link:xa,value:Ba.y,displayValue:Ba.displayValue,categoryLabel:Ba.categoryLabel,toolText:Ba.toolText,id:a.userID,datasetIndex:a.index,datasetName:a.name,
1052 visible:a.visible},gb=tb={},Ua=Ba.rolloverProperties,Ma.imageUrl)Cb=new D,Cb.onload=Fa(La,$a,Ma,t,Yb,W,Ua,L),Cb.onerror=Hb(La,$a,Ma,t,Yb,W,Ua,L),Cb.src=Ma.imageUrl;else{Ua&&(gb={polypath:[Ra[1]||2,La,$a,Da,Ma.startAngle,qb],fill:H(Ma.fillColor),"stroke-width":Ma.lineWidth,stroke:H(Ma.lineColor)},tb={polypath:[Ua.sides||2,La,$a,Ua.radius,Ua.startAngle,Ua.dip],fill:H(Ua.fillColor),"stroke-width":Ua.lineWidth,stroke:H(Ua.lineColor)});kb=t.graphic=d.polypath(Ra[1]||2,La,$a,Da,Ma.startAngle,qb,rb).attr({fill:H(Ma.fillColor),
1053 "stroke-width":Ma.lineWidth,stroke:H(Ma.lineColor),cursor:xa?"pointer":"",visibility:Da?O:"hidden"}).data("alwaysInvisible",!Da).data("setRolloverProperties",Ua).data("setRolloverAttr",tb).data("setRolloutAttr",gb).data("anchorRadius",Da).data("anchorHoverRadius",Ua&&Ua.radius).shadow(Wa||!1,zb);if(xa||X||Ua)Da=la(Da,Ua&&Ua.radius||0,Nb),jb=t.tracker=d.circle({cx:La,cy:$a,r:Da,cursor:xa?"pointer":"",stroke:w,"stroke-width":Ma.lineWidth,fill:w,ishot:!0,visibility:O},uc);(jb||kb).data("eventArgs",Yb).data("groupId",
1054 cb).click($b).hover(Wb(t),Oc(t)).tooltip(W);c.drawTracker&&c.drawTracker.call(c,a,b,L)}Rb=Zb!==[H(Ba.color||eb),Ba.dashStyle||sb].join(":");if(null!==Oa){if(ta.length&&(Kb=Kb.concat(ta),ta.length=0),(C||I||!Kb.join(""))&&Kb.push("M",Ga,Oa),I&&Kb.push("m",-S,0),u?G?(Kb.push("H",La),I&&Kb.push("h",S),A?Kb.push("V",$a):Kb.push("m",0,$a-Oa)):(A&&Kb.push("V",$a),Kb.push("M",Ga,$a,"H",La)):Kb.push("L",La,$a),C||Rb)xb=t.connector=d.path(Kb,jc).attr({"stroke-dasharray":hb,"stroke-width":Za,stroke:lb,"stroke-linecap":"round",
1055 "stroke-linejoin":2<Za?"round":"miter",visibility:O}).shadow(l.shadow&&Ba.shadow,xc),Kb=[]}else!C&&ta.push("M",La,$a);Ma&&Ma.imageUrl||(Ea=t.dataLabel=c.drawPlotLineLabel(a,b,L,La,$a));Ga=La;Oa=$a;lb=H(Ba.color||eb);hb=Ba.dashStyle||sb;Zb=[lb,hb].join(":")}Ea&&m.push(Ea);kb&&m.push(kb);xb&&m.push(xb);jb&&m.push(jb)}!C&&Kb.join("")&&(xb=d.path(Kb,jc).attr({"stroke-dasharray":hb,"stroke-width":Za,stroke:lb,"stroke-linecap":"round","stroke-linejoin":2<Za?"round":"miter",visibility:O}).shadow(l.shadow&&
1056 Ba.shadow,xc))&&m.push(xb);ia&&(qa=oa.startPercent,Bc[2]=na+Gc[0],1===qa&&(Gc[0]=Bc[2],Bc[0]=0));$?(Z=K.animation({"clip-rect":Bc},$,ia?"easeIn":"normal",c.getAnimationCompleteFn()),jc.attr({"clip-rect":Gc}).animate(I?Z.delay($):Z)):(Aa&&Aa(),Aa=void 0);a.visible=!1!==b.visible;return a},hoverPlotAnchor:function(a,b,c,d,e){var g=d.graphic;d=d.dataLabel;var h=e.options.chart,k=1===h.rotateValues?270:0,l=g.data("setRolloverProperties"),n=g.data("isRealtime"),m=n&&g.attr("polypath"),p=g.data("setRolloverAttr"),
1057 s="image"===g.type,t=g.data("setRolloutAttr"),w=d&&(d.data("isBelow")?1:-1)*(s?0.5*(p.height-t.height):g.data("anchorHoverRadius")-g.data("anchorRadius")),v="DataPlotRollOver"==c?p:t,B={transform:"T0,"+("DataPlotRollOver"===c?w:0)+"R"+k},C={fill:v.fill,"stroke-width":v["stroke-width"],stroke:v.stroke},v=s?v:{polypath:v.polypath},h=h.syncLabelWithAnchor,D=g.data("anchorRadius"),I=g.data("anchorHoverRadius"),p=!(/,0\)$/.test(p.fill)&&/,0\)$/.test(t.fill))&&g.data("anchorHoverRadius")-g.data("anchorRadius")&&
1058 l.animation&&50;d&&d.data("isMiddle")&&(B={transform:"T,"+("DataPlotRollOver"===c?w:0)+",0R"+k});l&&(("DataPlotRollOver"==c&&0!==I||"DataPlotRollOut"==c&&0!==D)&&g.attr({visibility:"visible"}),s?g.css({opacity:0.01*v.alpha}):g.attr(C),n&&!s&&(v.polypath[1]=m[1],v.polypath[2]=m[2]),g.stop(),g.animate(v,p,"easeOut",function(){("DataPlotRollOver"==c&&!I||"DataPlotRollOut"==c&&!D)&&g.attr({visibility:"hidden"})}),d&&d.stop(),p&&h&&d&&d.animate(B,p,"easeOut"));sa.call(a,e,b,c)},drawPlotArea:function(a,
1059 b){var c=this,d=c.paper,e=c.options,g=e.chart,h=c.logic,k=e.plotOptions.series,l=c.elements,n=a.items,s=a.graphics=a.graphics||[],t,v=c.xAxis[b.xAxis||0],B=c.yAxis[b.yAxis||0],C=B.axisData.reversed,I=g.xDepth||0,K=g.yDepth||0,h=h.isStacked,F=!1!==(e.tooltip||{}).enabled,J,R,e=k.dataLabels.style,Q={fontFamily:e.fontFamily,fontSize:e.fontSize,lineHeight:e.lineHeight,fontWeight:e.fontWeight,fontStyle:e.fontStyle,color:e.color},e=isNaN(+k.animation)&&k.animation.duration||1E3*k.animation,M=g.series2D3Dshift,
1060 N="0"===c.definition.chart.drawfullareaborder,S=a.data,X=!1===b.visible?"hidden":"visible",W=S.length,$=v.getAxisPosition(0),Z=(v.getAxisPosition(1)-$)*W,Y=v.axisData.scroll||{},$=g.hasScroll||!1,ca=k.connectNullData,q,u,A,G,f,O=B.max,L=B.min,aa=B.getAxisPosition(0<O&&0>L?0:!C&&0<O&&0<=L?L:O)+(M?K:0),da=c.chartWidth,fa=c.chartHeight,C=function(){Ra.attr({"clip-rect":null});Ma.show();lb.show();Pa.attr({transform:"...t"+-da+","+-fa})},ba=null,ea,ga,O=b.lineWidth,L=b.dashStyle,qa=H(b.fillColor),na=H(b.lineColor),
1061 ia=0,oa=/drag/ig.test(c.logic.rendererId),ua,Ba,za,Da,ya,Aa,xa=[],Ha=[],La=null,Oa=[],Ga=c.layers;G=Ga.dataset=Ga.dataset||d.group("dataset-orphan");var Pa=Ga.datalabels=Ga.datalabels||d.group("datalabels").insertAfter(G),eb=Ga.tracker,Ga=l["clip-canvas-init"].slice(0),l=l["clip-canvas"].slice(0),g=g.anchorTrackingRadius,kb,lb,hb,Ma,Ra,jb,qb,sb,Ua,gb,tb=function(a){sa.call(this,c,a)},xb=function(a){return function(b){c.hoverPlotAnchor(this,b,"DataPlotRollOver",a,c)}},Mb=function(a){return function(b){c.hoverPlotAnchor(this,
1062 b,"DataPlotRollOut",a,c)}},La=function(e,f,g,h,k,l,n,p){return function(){var q=g.imageUrl,t=g.imageScale,v=g.imageAlpha,A=n.imageHoverAlpha,B=n.imageHoverScale,C=this.width*t*0.01,D=this.width*B*0.01;ya={x:e-this.width*t*0.005,y:f-this.height*t*0.005,width:C,height:this.height*t*0.01,alpha:v};Aa={x:e-this.width*B*0.005,y:f-this.height*B*0.005,width:D,height:this.height*B*0.01,alpha:A};A=D>C?Aa:ya;oa&&(A={cx:e,cy:f,r:0.5*la(D,C)});(h.graphic=Ba=d.image(q,Ma).attr(ya).css({opacity:0.01*v}).data("alwaysInvisible",
1063 !t).data("setRolloverProperties",n).data("setRolloverAttr",Aa).data("setRolloutAttr",ya).data("anchorRadius",t).data("anchorHoverRadius",B))&&s.push(Ba);if(u||F||n)kb=m({cursor:u?"pointer":"",stroke:w,"stroke-width":g.lineWidth,fill:w,ishot:!0,visibility:X},A),za=h.tracker=(oa?d.circle(kb,eb):d.rect(kb,eb)).data("eventArgs",k).click(tb).hover(xb(h),Mb(h)).tooltip(l),c.drawTracker&&c.drawTracker.call(c,a,b,p);(gb=h.dataLabel=c.drawPlotLineLabel(a,b,p,e,f))&&s.push(gb)}},Ec=function(d,e,f,g,h,k,l,n){return function(){(gb=
1064 g.dataLabel=c.drawPlotLineLabel(a,b,n,d,e))&&s.push(gb)}};c.addCSSDefinition(".fusioncharts-datalabels .fusioncharts-label",Q);Pa.attr("class","fusioncharts-datalabels");B.yBasePos=aa;Pa.attr({transform:"...t"+da+","+fa});e&&c.animationCompleteQueue.push({fn:C,scope:c});Q=G;h&&(jb=Q.shadows||(Q.shadows=d.group("shadows",Q).toBack()));Ra=Q.area=Q.area||d.group("area",Q);Q=Q.line||(Q.line=d.group("line-connector",Q));a.lineShadowLayer||(a.lineShadowLayer=d.group("connector-shadow",Q));lb=a.anchorShadowLayer||
1065 (a.anchorShadowLayer=d.group("anchor-shadow",Q));hb=a.lineLayer||(a.lineLayer=d.group("connector",Q));Ma=a.anchorLayer||(a.anchorLayer=d.group("anchors",Q));Ma.hide();lb.hide();Q=G;for(Q=0;Q<W;Q+=1){q=S[Q];G=q.y;t=p(q.x,Q);ea=v.getAxisPosition(t)-I;Ba=gb=za=null;t=n[Q]={};if(null===G)0===ca&&(ba=null,0<ia&&(1===ia?xa.splice(-8,8):(xa=xa.concat(Ha),xa.push("Z")),Ha=[])),t.chart=c,t.index=Q,t.value=G;else{u=q.link;J=q.toolText;R=q.previousY;f=(f=B.getAxisPosition(R)||null)||aa;ga=B.getAxisPosition(G+
1066 (R||0))+(M?K:0);if((Ua=q.marker)&&Ua.enabled)if(R={index:Q,link:u,value:q.y,displayValue:q.displayValue,categoryLabel:q.categoryLabel,toolText:q.toolText,id:a.userID,datasetIndex:a.index,datasetName:a.name,visible:a.visible},ya=Aa={},Da=q.rolloverProperties,Ua.imageUrl)A=new D,A.onload=La(ea,ga,Ua,t,R,J,Da,Q),A.onerror=Ec(ea,ga,Ua,t,R,J,Da,Q),A.src=Ua.imageUrl;else{ua=Ua.symbol.split("_");A=Ua.radius;sb=Ua.shadow;Da&&(ya={polypath:[ua[1]||2,ea,ga,A,Ua.startAngle,0],fill:H(Ua.fillColor),"stroke-width":Ua.lineWidth,
1067 stroke:H(Ua.lineColor)},Da=q.rolloverProperties,Aa={polypath:[Da.sides||2,ea,ga,Da.radius,Da.startAngle,Da.dip],fill:H(Da.fillColor),"stroke-width":Da.lineWidth,stroke:H(Da.lineColor)});Ba=t.graphic=d.polypath(ua[1]||2,ea,ga,A,Ua.startAngle,0,Ma).attr({fill:H(Ua.fillColor),"stroke-width":Ua.lineWidth,stroke:H(Ua.lineColor),cursor:u?"pointer":"",visibility:A?X:"hidden"}).data("alwaysInvisible",!A).data("setRolloverProperties",Da).data("setRolloverAttr",Aa).data("setRolloutAttr",ya).data("anchorRadius",
1068 A).data("anchorHoverRadius",Da&&Da.radius).shadow(sb||!1,lb);if(u||F||Da)h||(A=la(A,Da&&Da.radius||0,g)),za=t.tracker=d.circle({cx:ea,cy:ga,r:A,cursor:u?"pointer":"",stroke:w,"stroke-width":Ua.lineWidth,fill:w,ishot:!0,visibility:X},eb);(za||Ba).data("eventArgs",R).click(tb).hover(xb(t),Mb(t)).tooltip(J);c.drawTracker&&c.drawTracker.call(c,a,b,Q)}null===ba?(Oa.push("M",ea,",",ga),xa.push("M",ea,",",f),ia=0):Oa.push("L",ea,",",ga);xa.push("L",ea,",",ga);Ha.unshift("L",ea,",",f);ia++;ba=ga;Ua&&Ua.imageUrl||
1069 (gb=t.dataLabel=c.drawPlotLineLabel(a,b,Q,ea,ga));t.chart=c;t.index=Q;t.value=G;t.dataLabel=gb}gb&&s.push(gb);Ba&&s.push(Ba);za&&s.push(za)}0<ia&&(1===ia?xa.splice(-8,8):(xa=xa.concat(Ha),xa.push("Z")));(La=a.graphic=d.path(xa,Ra).attr({fill:qa,"stroke-dasharray":L,"stroke-width":N?0:O,stroke:na,"stroke-linecap":"round","stroke-linejoin":2<O?"round":"miter",visibility:X}).shadow(k.shadow&&q.shadow,jb))&&s.push(La);$&&(k=Y.startPercent,l[2]=Z+Ga[0],1===k&&(Ga[0]=l[2],l[0]=0));e?qb=Ra.attr({"clip-rect":Ga}).animate({"clip-rect":l},
1070 e,$?"easeIn":"normal",c.getAnimationCompleteFn()):(C&&C(),C=void 0);jb&&(e?jb.attr({"clip-rect":Ga}).animateWith(Ra,qb,{"clip-rect":l},e,$?"easeIn":"normal",function(){jb.attr({"clip-rect":null})}):jb.attr({"clip-rect":null}));N&&(k=a.connector=d.path(Oa,hb).attr({"stroke-dasharray":L,"stroke-width":O,stroke:na,"stroke-linecap":"round","stroke-linejoin":2<O?"round":"miter",visibility:X}),e?hb.attr({"clip-rect":Ga}).animateWith(Ra,qb,{"clip-rect":l},e,$?"easeIn":"normal",function(){hb.attr({"clip-rect":null})}):
1071 hb.attr({"clip-rect":null}),k&&s.push(k));a.visible=!1!==b.visible;return a},drawPlotScatter:function(a,b){var c=this,d=c.options,e=d.chart,g=d.plotOptions.series,h=c.paper,k=c.elements,l=a.items,n,m=a.graphics=a.graphics||[],p=c.xAxis[b.xAxis||0],s=c.yAxis[b.yAxis||0],t=a.data,v=!1===b.visible?"hidden":"visible",d=!1!==(d.tooltip||{}).enabled,B,C=g.dataLabels.style,D={fontFamily:C.fontFamily,fontSize:C.fontSize,lineHeight:C.lineHeight,fontWeight:C.fontWeight,fontStyle:C.fontStyle,color:C.color},
1072 C=isNaN(+g.animation)&&g.animation.duration||1E3*g.animation,I=c.chartWidth,K=c.chartHeight,F,Q,J,R,M,N,S,X,W,$=b.lineWidth,q=0<$,u=b.color,A=b.dashStyle,G=g.connectNullData,f=[],O,L,Z,Y,ca,aa,da=c.layers,ea=da.dataset||(da.dataset=h.group("dataset-orphan")),fa=da.datalabels||(da.datalabels=h.group("datalabels").insertAfter(ea)),da=da.tracker,e=e.anchorTrackingRadius,ba,ga,ia,na=function(a){sa.call(this,c,a)},oa=function(a){return function(b){c.hoverPlotAnchor(this,b,"DataPlotRollOver",a,c)}},ua=
1073 function(a){return function(b){c.hoverPlotAnchor(this,b,"DataPlotRollOut",a,c)}};c.addCSSDefinition(".fusioncharts-datalabels .fusioncharts-label",D);fa.attr("class","fusioncharts-datalabels");C&&(c.animationCompleteQueue.push({fn:function(){fa.attr({transform:"...t"+-I+","+-K})},scope:c}),fa.attr({transform:"...t"+I+","+K}));ba=ea.line||(ea.line=h.group("line-connector",ea));a.lineShadowLayer=h.group("connector-shadow",ba);ea=a.anchorShadowLayer=h.group("anchor-shadow",ba);D=a.lineLayer=h.group("connector",
1074 ba);ba=a.anchorLayer=h.group("anchors",ba);F=0;for(Q=t.length;F<Q;F+=1){J=t[F];O=J.marker;X=W=Y=B=ca=null;ia=a.index+"_"+F;N=J.y;M=J.x;if(null!==N&&null!==M){if(O&&O.enabled){R=J.link;B=J.toolText;Z=O.radius;ga=O.shadow;W=s.getAxisPosition(N);X=p.getAxisPosition(M);L={index:F,link:R,y:J.y,x:J.x,displayValue:J.displayValue,categoryLabel:J.categoryLabel,toolText:J.toolText,id:a.userID,datasetIndex:a.index,datasetName:a.name,visible:a.visible};Y=O.symbol.split("_");n=l[F]={index:F,x:M,y:N,value:N};M=
1075 N={};J.hoverEffects&&(M={polypath:[Y[1]||2,X,W,Z,O.startAngle,0],fill:H(O.fillColor),"stroke-width":O.lineWidth,stroke:H(O.lineColor)},aa=J.rolloverProperties,N={polypath:[aa.sides||2,X,W,aa.radius,aa.startAngle,aa.dip],fill:H(aa.fillColor),"stroke-width":aa.lineWidth,stroke:H(aa.lineColor)});Y=n.graphic=h.polypath(Y[1]||2,X,W,Z,O.startAngle,0,ba).attr({fill:H(O.fillColor),"stroke-width":O.lineWidth,stroke:H(O.lineColor),cursor:R?"pointer":"",visibility:Z?v:"hidden"}).data("alwaysInvisible",!Z).data("setRolloverProperties",
1076 aa).data("setRolloverAttr",N).data("setRolloutAttr",M).data("anchorRadius",Z).data("anchorHoverRadius",aa&&aa.radius).shadow(ga||!1,ea);if(R||d||aa)Z=la(Z,aa&&aa.radius||0,e),ca=n.tracker=h.circle({cx:X,cy:W,r:Z,cursor:R?"pointer":"",stroke:w,"stroke-width":O.lineWidth,fill:w,ishot:!0,visibility:v},da);(ca||Y).data("eventArgs",L).data("groupId",ia).click(na).hover(oa(n),ua(n)).tooltip(B)}q&&((void 0===S||null===S&&0===G)&&X&&W&&f.push("M",X,",",W),X&&W&&f.push("L",X,",",W),S=W);B=n.dataLabel=c.drawPlotLineLabel(a,
1077 b,F,X,W)}else q&&0===G&&(S=null),l[F]={chart:c,index:F,x:M,y:N};B&&m.push(B);Y&&m.push(Y);ca&&m.push(ca);c.drawTracker&&c.drawTracker.call(c,a,b,F)}f.length&&(g=a.graphic=h.path(f,D).attr({"stroke-dasharray":A,"stroke-width":$,stroke:u,"stroke-linecap":"round","stroke-linejoin":2<$?"round":"miter",visibility:v}).shadow(g.shadow&&J.shadow),D.attr({"clip-rect":k[C?"clip-canvas-init":"clip-canvas"]}),C&&D.animate({"clip-rect":k["clip-canvas"]},C,"normal"),m.push(g));C&&ba.attr({opacity:0}).animate({opacity:1},
1078 C,"normal",c.getAnimationCompleteFn());a.visible=!1!==b.visible;return a},drawPlotLineLabel:function(a,b,c,d,e,g){var h=this.options,k=h.chart,l=this.paper,n=this.layers,m=h.plotOptions.series.dataLabels.style,h=1===k.rotateValues?270:0,p=this.canvasHeight,s=this.canvasTop,t=a.data,w=t[c],v=a.items[c],B=W(w.valuePosition,"auto").toLowerCase();a=this.logic.defaultSeriesType;var D=v.graphic,I=w.marker,D=I&&I.enabled?D&&"image"==D.type&&0.5*D.attr("height")||I&&I.radius-3:0,k=k.valuePadding+2+D;b=!1===
1079 b.visible?"hidden":"visible";D=v.dataLabel;g=g||n.datalabels;switch(B){case "above":c=0;break;case "below":c=1;break;default:n=t[c-1]||{},t=t[c+1]||{},c=c?n.y>w.y?1:(null==n.y&&t.y)>w.y?1:0:0}n=w.displayValue;Aa(n)&&n!==C?(D?h&&D.attr("transform",["r",360-h]):D=v.dataLabel=l.text(g).attr({"class":"fusioncharts-label",text:n,fill:m.color,"text-bound":[m.backgroundColor,m.borderColor,m.borderThickness,m.borderPadding,m.borderRadius,m.borderDash],"font-weight":m.fontWeight,"font-style":m.fontStyle,"font-family":m.fontFamily,
1080 "font-size":m.fontSize,"line-height":m.lineHeight}),D.attr({title:w.originalText||"",fill:m.color}),v._state&&v._state.labelWidth||(g=D.getBBox(),v._state={labelWidth:g.width,labelHeight:g.height}),l=m=h?v._state.labelWidth:v._state.labelHeight,g=e-s,p=s+p-e,l=l+k+4,s=0.5*m+k,/bubble/i.test(a)||(c?p>l?(e+=s,w._valueBelowPoint=1):g>l&&(e-=s,w._valueBelowPoint=0):g>l?(e-=s,w._valueBelowPoint=0):p>l&&(e+=s,w._valueBelowPoint=1)),D.attr({x:d,y:e,visibility:b}).data("isBelow",w._valueBelowPoint),h&&D.attr("transform",
1081 "T0,0,R"+h)):D&&D.attr({text:C});return D},drawLabels:function(){for(var a=this.paper,b=this.options,c=(b=b.labels&&b.labels.items&&b.labels.items)&&b.length,d=this.layers.layerAboveDataset,e=this.elements.quadran||(this.elements.quadran=[]),g=this.canvasTop,h=this.canvasLeft,k={right:"end",left:"start",undefined:"start"},l,n,m;c--;)m=b[c],l=m.style,n={fontFamily:l.fontFamily,fontSize:l.fontSize,lineHeight:l.lineHeight,fontWeight:l.fontWeight,fontStyle:l.fontStyle,fill:l.color},Aa(m.html)&&m.html!==
1082 C&&(e[c]=a.text(d).attr({text:m.html,x:parseInt(l.left,10)+h,y:parseInt(l.top,10)+g,"text-anchor":k[m.textAlign],"vertical-align":m.vAlign}).css(n))}},b["renderer.root"]);b("renderer.piebase",{isHovered:!1,getPlotData:function(a,b){var c=this.datasets[0],d=c.data[a],c=c.userData||(c.userData=[]),e,g;if(c[a])c=c[a];else{c=c[a]={};for(g in d)"object"!==typeof(e=d[g])&&"function"!==typeof e&&0!==g.indexOf("_")&&(c[g]=e);c.value=c.y;c.label=c.name;delete c.y;delete c.total;delete c.doNotSlice;delete c.name;
1083 delete c.centerAngle;delete c.showInLegend}c.sliced=b;return c},redrawDataLabels:function(a){var b=a.elements.plots[0];a.placeDataLabels(!0,b.items,b);return{}},sliceInOtherPies:function(a){var b=this.options.series[0],c=b.plot.items,d=c.length,e=0,g;for(b.enableMultiSlicing=!0;d--;)d!==a&&(g=c[d]).sliced&&++e&&this.plotGraphicClick.call(g);b.enableMultiSlicing=!1;return!!e},plotGraphicClick:function(a){var b=this.graphic||this,c=b.plotItem||b.data("plotItem"),d=c.seriesData,e=c.chart,g=e.logic.chartInstance,
1084 h=c.index,k=e.options.series[0].enableMultiSlicing,l=d.data[c.index].doNotSlice,n=c.slicedTranslation,p,s;!d.isRotating&&sa.call(b,e,a);if(!(d.isRotating||d.singletonCase||l||(b=!k&&e.sliceInOtherPies(h),(a=c.sliced)&&b)))return b=c.graphic,d=c.connector,k=c.dataLabel,n="object"===typeof n?"t"+n:n,l=c.connectorPath,p=(a?-1:1)*c.transX,s=(a?-1:1)*c.transY,v.raiseEvent("slicingStart",{slicedState:a,data:e.getPlotData(h,a)},g),b.animate({transform:a?"t0,0":n},200,"easeIn",function(){v.raiseEvent("slicingEnd",
1085 {slicedState:c.sliced,data:e.getPlotData(h,c.sliced)},g)}),k&&k.x&&k.animate({x:k.x+(a?0:p)},200,"easeIn"),l&&(l[1]+=p,l[2]+=s,l[4]+=p,l[6]+=p,d.animate({path:l},200,"easeIn")),a=c.sliced=!a,b={hcJSON:{series:[]}},b.hcJSON.series[0]={data:n=[]},n[h]={sliced:a},m(g.jsVars._reflowData,b,!0),a},plotDragStart:function(a,b,c){var d=this.data("plotItem"),e=d.chart,d=d.seriesData,g=-e.datasets[0].startAngle*La;e.options.series[0].enableRotation&&(a=k.call(c,a,b,d.pieCenter,d.chartPosition),d.dragStartAngle=
1086 a,d.startingAngleOnDragStart=g)},plotDragEnd:function(){var a=this.data("plotItem"),b=a.chart,c=a.seriesData,a=-b.datasets[0].startAngle*La,d={hcJSON:{series:[{startAngle:a}]}};b.disposed||(m(b.logic.chartInstance.jsVars._reflowData,d,!0),b.rotate(c,b.options.series[0]));c.isRotating&&(setTimeout(function(){c.isRotating=!1},0),v.raiseEvent("RotationEnd",{startingAngle:B(a,!0),changeInAngle:a-c.startingAngleOnDragStart},b.logic.chartInstance));!b.isHovered&&b.onPlotHover(this,!1)},plotDragMove:function(a,
1087 b,c,d,e){a=this.data("plotItem");var g=a.chart,h=a.seriesData,l=g.options.series;l[0].enableRotation&&!h.singletonCase&&(h.isRotating||(h.isRotating=!0,v.raiseEvent("RotationStart",{startingAngle:B(h.startingAngleOnDragStart,!0)},g.logic.chartInstance)),c=k.call(e,c,d,h.pieCenter,h.chartPosition),l[0].startAngle+=c-h.dragStartAngle,h.dragStartAngle=c,h.moveDuration=0,c=(new Date).getTime(),!h._lastTime||h._lastTime+h.timerThreshold<c)&&(setTimeout(function(){g.rotate(h,l[0])},0),h._lastTime=c)},plotMouseDown:function(){(this.plotItem||
1088 this.data("plotItem")).seriesData.isRotating=!1},plotMouseUp:function(){var a=this.plotItem||this.data("plotItem"),b=a.chart,c=a.seriesData;K.supportsTouch&&!c.isRotating&&b.plotGraphicClick.call(a)},plotRollOver:function(a){var b=this.plotItem||this.data("plotItem"),c=b.chart,d,e;b.seriesData.isRotating||(sa.call(this,c,a,"DataPlotRollOver"),c.onPlotHover(this,!0));c.isHovered=!0;(a=b.innerDiameter)&&(d=b.centerLabelConfig)&&(e=d.label)&&c.drawDoughnutCenterLabel(e,b.center[0],b.center[1],a,a,d,
1089 !1)},plotRollOut:function(a){var b=this.plotItem||this.data("plotItem"),c=b.chart,d=c.options.series[0],e,g;b.seriesData.isRotating||(sa.call(this,c,a,"DataPlotRollOut"),c.onPlotHover(this,!1));c.isHovered=!1;(a=b.innerDiameter)&&(e=d.centerLabelConfig)&&((g=e.label)||!g)&&c.drawDoughnutCenterLabel(g,b.center[0],b.center[1],a,a,e,!1)},onPlotHover:function(a,b){var c=a.data("plotItem"),d=c.rolloverProperties,e=b?d.color:c.color,g=b?d.borderWidth:c.borderWidth,h=b?d.borderColor:c.borderColor;d&&c.graphic.attr({fill:H(e),
1090 "stroke-width":g,stroke:h})},getEventArgs:function(a){a=a||{};return{datasetName:a.label,datasetIndex:a.originalIndex,id:a.userID,visible:!0,label:a.label,value:a.value,percentValue:a.percentage,tooltext:a.toolText,link:a.link,sliced:a.sliced}},legendClick:function(a){var b=a.chart;b.elements.plots[0].isRotating=!1;b.plotGraphicClick.call(a)},placeDataLabels:function(){var a=function(a,b){return a.point.value-b.point.value},b=function(a,b){return a.angle-b.angle},c=["start","start","end","end"],d=
1091 [-1,1,1,-1],e=[1,1,-1,-1];return function(g,h,k,l){var n=this.options.plotOptions,m=n.pie,s=this.canvasLeft+0.5*this.canvasWidth,t=this.canvasTop+0.5*this.canvasHeight,w=this.smartLabel,v=n.series.dataLabels,B=v.style,n=p(hb(parseFloat(B.lineHeight)),12),C=na(v.placeLabelsInside,1===h.length?!0:!1),D=v.skipOverlapLabels,I=v.manageLabelOverflow,K=v.connectorPadding,H=v.distance,F=l&&l.metrics||[s,t,m.size,m.innerSize||0],J=F[1],Q=F[0];l=0.5*F[2];var R=[[],[],[],[]],M=this.canvasLeft,N=this.canvasTop,
1092 m=this.canvasWidth,H=k.labelsRadius||(k.labelsRadius=l+H),t=s=parseInt(B.fontSize,10),S=t/2,K=[K,K,-K,-K];k=k.labelsMaxInQuadrant||(k.labelsMaxInQuadrant=Ha(H/t));var v=v.isSmartLineSlanted,F=F[3]/2,X,W,q,u,A,G,f,O,L,$,Z,Y,aa,ba,fa,ia,sa,xa,ya;g||w.setStyle(B);if(1==h.length&&!F&&C)F=h[0],(ba=F.dataLabel)&&ba.show(),F.slicedTranslation=[M,N],ba&&(ba.attr({visibility:oa,align:"middle",transform:["t",Q,J+S-2]}),ba.x=Q);else if(C)ya=F+(l-F)/2,ca(h,function(a){(ba=a.dataLabel)&&ba.show();ba&&(Y=a.angle,
1093 Z=J+ya*ea(Y)+S-2,f=Q+ya*da(Y),ba.x=f,ba._x=f,ba.y=Z,a.sliced&&(xa=a.slicedTranslation,ia=xa[0]-M,sa=xa[1]-N,f+=ia,Z+=sa),ba.attr({visibility:oa,align:"middle",transform:["t",f,Z]}))});else{ca(h,function(a){(ba=a.dataLabel)&&ba.show();ba&&(Y=a.angle%qb,0>Y&&(Y=qb+Y),fa=0<=Y&&Y<Pa?1:Y<Oa?2:Y<sb?3:0,R[fa].push({point:a,angle:Y}))});for(h=g=4;h--;){if(D&&(B=R[h].length-k,0<B))for(R[h].sort(a),C=R[h].splice(0,B),B=0,u=C.length;B<u;B+=1)F=C[B].point,F.dataLabel.attr({visibility:"hidden"}),F.connector&&
1094 F.connector.attr({visibility:"hidden"});R[h].sort(b)}h=la(R[0].length,R[1].length,R[2].length,R[3].length);aa=la(ga(h,k)*t,H+t);R[1].reverse();for(R[3].reverse();g--;){C=R[g];u=C.length;D||(t=u>k?aa/u:s,S=t/2);F=u*t;B=aa;for(h=0;h<u;h+=1,F-=t)q=za(aa*ea(C[h].angle)),B<q?q=B:q<F&&(q=F),B=(C[h].oriY=q)-t;X=c[g];u=aa-(u-1)*t;B=0;for(h=C.length-1;0<=h;h-=1,u+=t)if(F=C[h].point,Y=C[h].angle,A=F.sliced,ba=F.dataLabel,q=za(aa*ea(Y)),q<B?q=B:q>u&&(q=u),B=q+t,L=(q+C[h].oriY)/2,q=Q+e[g]*H*da(ua.asin(L/aa)),
1095 L*=d[g],L+=J,$=J+l*ea(Y),G=Q+l*da(Y),(2>g&&q<G||1<g&&q>G)&&(q=G),f=q+K[g],Z=L-S-2,O=f+K[g],ba.x=O,ba._x=O,I&&(W=1<g?O-this.canvasLeft:this.canvasLeft+m-O,W=w.getSmartText(F.labelText,W,n),ba.attr({text:W.text,title:W.tooltext||""})),ba.y=Z,A&&(ia=F.transX,sa=F.transY,f+=ia,q+=ia,G+=ia,$+=sa,O+=ia),ba.attr({visibility:oa,"text-anchor":X,vAlign:"middle",x:O,y:L}),A=F.connector)F.connectorPath=F=["M",G,$,"L",v?q:G,L,f,L],A.attr({path:F,visibility:oa})}}}}()},b["renderer.root"])}]);
1096 FusionCharts.register("module",["private","modules.renderer.js-interface",function(){var d=this,k=d.hcLib,B=d.renderer.getRenderer("javascript"),v=k.hasModule,l=k.loadModule,c=k.getMetaSentence,K=k.moduleCmdQueue,b=k.executeWaitingCommands,J=k.injectModuleDependency,a=k.moduleDependencies,D=k.getDependentModuleName,F,C;F=function(a){var e,g,l,s={},v;a=c(a);for(e in d.core.items)e=d.core.items[e],g=e.chartType(),l=e.options.chartTypeSourcePath+g,(g=e.jsVars)&&g.waitingModule&&e.__state.rendering&&
1097 k.needsModule(a.predicate,l)&&(g.waitingModuleError=!0,g=D(l).concat(g.userModules),g.length&&(g=g[g.length-1],s[g]=k.moduleCmdQueue[g]));for(v in s)b(s[v]);d.raiseError(d.core,"11171116151","run","HC-interface~renderer.load","Unable to load required modules and resources: "+a.key)};C=function(a,b,c){d.hcLib.createChart(a,b,"stub",c,a.jsVars.msgStore.ChartNotSupported)};k.eventList=d.extend(d.legacyEventList,{loaded:"FC_Loaded",dataloaded:"FC_DataLoaded",rendered:"FC_Rendered",drawcomplete:"FC_DrawComplete",
1098 dataxmlinvalid:"FC_DataXMLInvalid",nodatatodisplay:"FC_NoDataToDisplay",exported:"FC_Exported"});k.raiseEvent=d.raiseEventWithLegacy;a.charts=d.extend(a.charts||{},{column2d:0,column3d:0,bar2d:0,bar3d:0,pie2d:0,pie3d:0,line:0,area2d:0,doughnut2d:0,doughnut3d:0,pareto2d:0,pareto3d:0,mscolumn2d:0,mscolumn3d:0,msline:0,msarea:0,msbar2d:0,msbar3d:0,stackedcolumn2d:0,marimekko:0,stackedcolumn3d:0,stackedarea2d:0,stackedcolumn2dline:0,stackedcolumn3dline:0,stackedbar2d:0,stackedbar3d:0,msstackedcolumn2d:0,
1099 mscombi2d:0,mscombi3d:0,mscolumnline3d:0,mscombidy2d:0,mscolumn3dlinedy:0,stackedcolumn3dlinedy:0,msstackedcolumn2dlinedy:0,scatter:0,bubble:0,ssgrid:0,scrollcolumn2d:0,scrollcolumn3d:0,scrollline2d:0,scrollarea2d:0,scrollstackedcolumn2d:0,scrollcombi2d:0,scrollcombidy2d:0,zoomline:0});a.powercharts=d.extend(a.powercharts||{},{spline:0,splinearea:0,msspline:0,mssplinearea:0,mssplinedy:0,multiaxisline:0,multilevelpie:0,waterfall2d:0,msstepline:0,inversemsline:0,inversemscolumn2d:0,inversemsarea:0,
1100 errorbar2d:0,errorscatter:0,errorline:0,logmsline:0,logmscolumn2d:0,logstackedcolumn2d:0,radar:0,dragnode:0,candlestick:0,selectscatter:0,dragcolumn2d:0,dragline:0,dragarea:0,boxandwhisker2d:0,kagi:0,heatmap:0});a.widgets=d.extend(a.widgets||{},{angulargauge:0,bulb:0,cylinder:0,drawingpad:0,funnel:0,hbullet:0,hled:0,hlineargauge:0,vlineargauge:0,pyramid:0,realtimearea:0,realtimecolumn:0,realtimeline:0,realtimelinedy:0,realtimestackedarea:0,realtimestackedcolumn:0,sparkcolumn:0,sparkline:0,sparkwinloss:0,
1101 thermometer:0,vbullet:0,gantt:0,vled:0});a.maps=d.extend(a.maps||{},{});d.extend(B,{render:function(a,b){var c=this.chartType(),l=this.options.chartTypeSourcePath+c,s=this.jsVars,F=this.__state,m=k.chartAPI,I,Q;I=D(l).concat(s.userModules);s.isResizing&&(s.isResizing=clearTimeout(s.isResizing));s.hcObj&&s.hcObj.destroy&&s.hcObj.destroy();if(m[c]){if(m[F.lastRenderedType]&&F.lastRenderedType!==c)for(Q in d.raiseEvent("chartTypeChanged",{previousType:F.lastRenderedType,newType:c},this),m[F.lastRenderedType].eiMethods)delete this[Q];
1102 F.lastRenderedType=c;F.lastRenderedSrc=this.src;!s.waitingModuleError&&k.raiseEvent("internal.loaded",{type:c,triggeredModuleLoad:s.drLoadAttempted||s.waitingModule},this,[this.id]);delete s.waitingModule;delete s.waitingModuleError;delete s.drLoadAttempted;d.hcLib.createChart(this,a,c,b)}else{if(c&&v(I)){if(s.drLoadAttempted){d.raiseError(this,11112822001,"run","HC-interface~renderer.render","Chart runtimes not loaded even when resource is present");C(this,a,b);return}J(l)&&(I=D(l).concat(s.userModules));
1103 s.drLoadAttempted=!0}else{if(!I.length){C(this,a,b);return}if(s.waitingModuleError){C(this,a,b);delete s.waitingModule;delete s.waitingModuleError;return}}(c=K[I[I.length-1]])?(c.push({cmd:"render",obj:this,args:arguments}),s.waitingModule||(d.hcLib.createChart(this,a,"stub",void 0,s.msgStore.PBarLoadingText||s.msgStore.LoadingText),B.load.call(this,a,b))):(d.raiseError(this,12080515551,"run","HC-interface~renderer.render","Unregistered module in dependentModule definition."),d.hcLib.createChart(this,
1104 a,"stub",void 0,s.msgStore.RenderChartErrorText))}},update:function(a){var b=this.ref,c=this.jsVars;c.hcObj&&c.hcObj.destroy&&c.hcObj.destroy();c.isResizing&&(c.isResizing=clearTimeout(c.isResizing));void 0===a.error?(delete c.stallLoad,delete c.loadError,this.isActive()?this.src!==this.__state.lastRenderedSrc?this.render():d.hcLib.createChart(this,c.container):this.__state.rendering&&!c.waitingModule&&d.hcLib.createChart(this,c.container)):(this.isActive()&&"function"===typeof b.showChartMessage&&
1105 b.showChartMessage("InvalidXMLText"),delete c.loadError)},resize:function(a){var b=this.ref,c,k=this.jsVars;b&&b.resize&&(k.isResizing&&(k.isResizing=clearTimeout(k.isResizing)),k.isResizing=setTimeout(function(){c=d.normalizeCSSDimension(a.width,a.height,b);void 0!==a.width&&(b.style.width=c.width);void 0!==a.height&&(b.style.height=c.height);b.resize();delete k.isResizing},0))},dispose:function(){var a;a=this.jsVars;a.isResizing&&(a.isResizing=clearTimeout(a.isResizing));a.instanceAPI&&a.instanceAPI.dispose&&
1106 (a.instanceAPI.dispose(),delete a.instanceAPI);if(a=this.ref)d.purgeDOM(a),a.parentNode&&a.parentNode.removeChild(a);k.cleanupWaitingCommands(this)},load:function(a,c){var g=this.jsVars,n=this.chartType(),s=d.hcLib.chartAPI[n],n=D(n).concat(g.userModules),v=n[n.length-1];s||!n||n&&0===n.length?(delete g.waitingModule,a&&C(this,a||this.ref,c)):g.waitingModule||(g.waitingModule=!0,delete g.waitingModuleError,l(n,function(){delete g.waitingModule;b(k.moduleCmdQueue[v])},F,this))}})}]);
1107 FusionCharts.register("module",["private","modules.api.dynamicchartattributes",function(){var d=this;d.extend(d.core,{setChartAttribute:function(k,B){var v,l,c,K;if("string"===typeof k)v=k,k={},k[v]=B;else if(null===k||"object"!==typeof k)return;K=0;if(c=(v=this.getChartData(d.dataFormats.JSON))&&(v.chart||v.graph||v.map)){for(l in k)K+=1,null===k[l]?delete c[l.toLowerCase()]:c[l.toLowerCase()]=k[l];0<K&&("undefined"===typeof c.animation&&(c.animation="0"),this.setChartData(v,d.dataFormats.JSON))}else d.raiseError(this,
1108 "2105141421","run","#setChartAttribute()","Could not retrieve attribute list. Is data ready?")},getChartAttribute:function(k){var B=this.getChartData(d.dataFormats.JSON),B=B&&(B.chart||B.graph||B.map),v,l;if(0===arguments.length||void 0===k||void 0===B)return B;if("string"===typeof k)v=B[k.toString().toLowerCase()];else if(k instanceof Array)for(v={},l=0;l<k.length;l+=1)v[k[l]]=B[k[l].toString().toLowerCase()];else d.raiseError(this,"25081429","param","~getChartAttribute()",'Unexpected value of "attribute"');
1109 return v}},!0)}]);
1110 FusionCharts.register("module",["private","api.linkmanager",function(){var d=this,k=d.FusionChartsDOMInsertModes,B={},v=function(c,k){this.items={};this.root=c;this.parent=k;k instanceof d.core?this.level=this.parent.link.level+1:(B[c.id]=[{}],this.level=0)},l=function(c,d){return(c.options.containerElement===d.options.containerElement||c.options.containerElementId===d.options.containerElementId)&&c.options.insertMode===k.REPLACE};d.policies.link=["link",void 0];v.prototype.configuration=function(){return B[this.root.id][this.level]||
1111 (B[this.root.id][this.level]={})};d.extend(d.core,{configureLink:function(c,k){var b;if(c instanceof Array){for(b=0;b<c.length;b+=1)"object"!==typeof B[this.link.root.id][b]&&(B[this.link.root.id][b]={}),d.extend(B[this.link.root.id][b],c[b]);B[this.link.root.id].splice(c.length)}else"object"===typeof c?("number"!==typeof k&&(k=this.link.level),void 0===B[this.link.root.id][k]&&(B[this.link.root.id][k]={}),d.extend(B[this.link.root.id][k],c)):d.raiseError(this,"25081731","param","~configureLink()",
1112 "Unable to update link configuration from set parameters")}},!0);d.addEventListener("beforeInitialize",function(c){c.sender.link instanceof v?c.sender.link.parent instanceof d.core&&(c.sender.link.parent.link.items[c.sender.id]=c.sender):c.sender.link=new v(c.sender)});d.addEventListener("linkedChartInvoked",function(c,k){var b=c.sender,B=b.clone({dataSource:k.data,dataFormat:k.linkType,link:new v(b.link.root,b)},!0),a=k.alias,D;a&&(!B.typeSource&&B.swfUrl&&(B.typeSource=B.swfUrl.replace(/(.*?)?[^\/]*\.swf.*?/ig,
1113 "$1")),B.type=a);b.args&&0!==parseInt(b.args.animate,10)&&delete B.animate;d.extend(B,b.link.configuration());d.raiseEvent("beforeLinkedItemOpen",{level:b.link.level},b.link.root,void 0,function(){d.core.items[B.id]instanceof d.core&&d.core.items[B.id].dispose();D=new d.core(B);l(D,b)||b.options.overlayButton&&b.options.overlayButton.message||("object"!==typeof b.options.overlayButton&&(b.options.overlayButton={}),b.options.overlayButton.message="Close");D.render();d.raiseEvent("linkedItemOpened",
1114 {level:b.link.level,item:D},b.link.root)})});d.addEventListener("overlayButtonClick",function(c,k){if("LinkManager"===k.id){var b=c.sender,v=b.link.level-1,a=b.link.parent,B=b.link.root;d.raiseEvent("beforeLinkedItemClose",{level:v,item:b},B,b,function(){setTimeout(function(){d.core.items[b.id]&&b.dispose();d.raiseEvent("linkedItemClosed",{level:v},B)},0);a.disposed||a.isActive()||!l(b,a)||a.render()})}});d.addEventListener("Loaded",function(c){c=c.sender;var k;c&&void 0!==c.link&&c.link.root!==c&&
1115 c.link.parent instanceof d.core&&(c.ref&&"function"===typeof c.ref.drawOverlayButton?(k=d.extend({show:!0,id:"LinkManager"},c.link.parent.options.overlayButton),d.extend(k,c.link.parent.link.configuration().overlayButton||{}),c.ref.drawOverlayButton(k)):d.raiseWarning(c,"04091602","run","::LinkManager^Loaded","Unable to draw overlay button on object. -"+c.id))});d.addEventListener("beforeDispose",function(c){var k=c.sender;k&&k.link instanceof v&&(k&&k.link&&k.link.parent instanceof d.core&&k.link.parent.link&&
1116 k.link.parent.link.items&&delete k.link.parent.link.items[c.sender.id],delete B[k.id])})}]);
1117 FusionCharts.register("module",["private","modules.renderer.js-thememanager",function(){var d=this,k,B,v,l=/\s+!important$/,c=/\\!important$/,K=function(a,b){for(var c=b.length,d=-1;c--;)if(a===b[c]){d=c;break}return d},b=function(a,c,d,k,l){var m,v,w,B;l?(k.push(a),l.push(c)):(k=[a],l=[c]);if(c instanceof Array)for(m=0;m<c.length;m+=1){try{v=a[m],w=c[m]}catch(C){continue}if("object"!==typeof w)d&&void 0===w||(a[m]=w);else{if(null===v||"object"!==typeof v)v=a[m]=w instanceof Array?[]:{};B=K(w,l);
1118 -1!==B?v=a[m]=k[B]:b(v,w,d,k,l)}}else for(m in c){try{v=a[m],w=c[m]}catch(p){continue}if(null!==w&&"object"===typeof w)if(B=Object.prototype.toString.call(w),"[object Object]"===B){if(null===v||"object"!==typeof v)v=a[m]={};B=K(w,l);-1!==B?v=a[m]=k[B]:b(v,w,d,k,l)}else"[object Array]"===B?(null!==v&&v instanceof Array||(v=a[m]=[]),B=K(w,l),-1!==B?v=a[m]=k[B]:b(v,w,d,k,l)):a[m]=w;else a[m]=w}return a},J=function(a,c,d){if("object"!==typeof a&&"object"!==typeof c)return null;if("object"!==typeof c||
1119 null===c)return a;"object"!==typeof a&&(a=c instanceof Array?[]:{});b(a,c,d);return a},a=function(a){var b={important:!1,str:""};if(!a)return b;a=a.toString();l.test(a)?(a=a.replace(l,""),b.important=!0):(a=a.replace(c,"!imporant"),b.important=!1);b.str=a;return b},D=function(a,b){var c,d,k,l,v,w,B=0,C=0;for(c in a)if(d=a[c],d instanceof Array)for(w=d.length,v=0;v<w;v+=1){if(l=d[v],"object"===typeof l)if("category"===c)if("true"===l.vline){if(k=b.component("vline",B,l))F(l,k),B+=1}else{if(k=b.component("category",
1120 C,l,w))F(l,k),C+=1}else if(k=b.component(c,v,l,w))F(l,k),D(l,k)}else"object"===typeof d&&(k=b.component(c,null,d))&&(F(d,k),D(d,k))},F=function(b,c){var d=c.getAll(),k,l;for(k in d)l=d[k].toString(),l=a(l),l.important?b[k.toLowerCase()]=l.str:void 0===b[k.toLowerCase()]&&(b[k.toLowerCase()]=l.str)},C=function(a,b){"geo"===b.defaultSeriesType&&w.call(this,a,b)},w=function(a,b){var c=a.sender,k=c.getChartData(d.dataFormats.JSON,!0),l;k.error||((l=k.data.chart.theme)?v.themify(l,c,c.chartType(),k.data,
1121 "geo"===b.defaultSeriesType&&"geo"):c.jsVars.themeObject&&c.jsVars.themeObject.dispose())};k=function(){this.themeStore={}};k.prototype={constructor:k,add:function(a){for(var b=0,c=a.length,d;b<c;b+=1)(d=a[b].name)&&(this.themeStore[d]=a[b])},themify:function(a,b,c,k,l){var m=b.jsVars,v=a.split(","),D=[],F=v.length,J,p;if(F){for(p=0;p<F;p+=1){J=this.themeStore;var H;H=v[p];H=H.replace(/^\s\s*/,"");for(var K=/\s/,fa=H.length;K.test(H.charAt(fa-=1)););H=H.slice(0,fa+1);(J=J[H])&&D.push(this.evaluateThemeJSON(J.theme,
1122 b,c,l))}D.length?(m.themeObject=new B(D,b,!1,k),this.applyTheme(b),b.addEventListener("chartTypeChanged",w),b.addEventListener("internal.drawstart",C)):d.raiseWarning(b,"14051100501","run","api.themes~themify()",'The theme "'+a+'" requested has not been registered.')}},evaluateThemeJSON:function(a,b,c,d){var k={},l=b.jsVars,v=function(a){var b,c;for(b in a)c=a[b],k[b]=c instanceof Array?J(k[b]||[],c):"object"===typeof c?J(k[b]||{},c):c};c=c||b.chartType();l.themeObject&&a!==l.themeObject&&(l.themeObject.dispose(),
1123 delete l.themeObject);v(a.base);d&&a[d]&&v(a[d]);c&&a[c]&&v(a[c]);return k},applyTheme:function(a){a=a.jsVars.themeObject;var b=a.getThemedJSONData().data;b&&D(b,a)}};B=function(a,b,c,d){this.themeArray=a;this.themeComponents={};this.base={};this.chartInstance=b;this.isChildInstance=Boolean(c);this.themedData=c?null:J({},d);this.length=a.length;b=0;for(c=a.length;b<c;b+=1)this.parse(a[b])};B.prototype={constructor:B,pushTheme:function(a){a&&(this.themeArray.push(a),this.parse(a),this.length+=1)},
1124 popTheme:function(){},parse:function(b){var c=this.themeComponents,d=this.chartInstance,k=this.base,l,m,v;for(m in b)if("string"===typeof b[m]||"number"===typeof b[m])if(k[m]){if(l=a(b[m]),v=a(k[m]),l.important||!v.important)k[m]=b[m]}else k[m]=b[m];else c[m]||(c[m]=[]),l=c[m],b[m]instanceof Array?l.push(J([],b[m])):"object"===typeof b[m]?l.push(new B([b[m]],d,!0)):"function"===typeof b[m]&&l.push(b[m])},merge:function(b){var c=this.base,d=b.base,k=this.themeComponents,l=b.themeComponents,m,v,w;for(w in d)if(m=
1125 a(c[w]),v=a(d[w]),!m.important||v.important)c[w]=d[w];for(w in l)k[w]=k[w]?k[w].concat(l[w]):[].concat(l[w]);this.length+=b.length},get:function(a){return this.base[a]},getAll:function(){return J({},this.base)},component:function(a,b,c,d){var k=this.themeComponents,l=this.chartInstance,v=new B([],l,!0),w,C,D;C=k[a];if(!C)return null;a=0;for(k=C.length;a<k;a+=1)D=C[a],"function"===typeof D?(b=b||0,v.pushTheme(D.call(l,b,c,d))):D instanceof Array?(b=b||0,w=D.length,b%=w,w=D[b],w instanceof B?v.merge(w):
1126 "function"===typeof w?v.pushTheme(w.call(l,b,c,d)):v.pushTheme(w)):D instanceof B?v.merge(D):v.pushTheme(D);return v},getThemedJSONData:function(){return{data:this.themedData}},dispose:function(){var a=this.themeComponents,b=this.chartInstance,c,d;for(c in a)if(d=a[c].length){for(;d--;)a[c][d].dispose&&a[c][d].dispose();delete a[c]}this.isChildInstance||(b.removeEventListener("chartTypeChanged",w),b.removeEventListener("internal.drawstart",C));this.dataWithoutTheme=this.isChildInstance=this.themeArray=
1127 this.base=this.chartInstance=this.themeComponents=null}};v=new k;d.registrars.theme=d.registerTheme=function(a){a&&("[object Array]"!==Object.prototype.toString.call(a)&&(a=[a]),v.add(a))};d.addEventListener("beforeDataUpdate",function(a,b){var c=a.sender,k=d.core.transcodeData(b.data,b.format,d.dataFormats.JSON),l=k.chart&&k.chart.theme;l?v.themify(l,c,c.args.type,k):c.jsVars.themeObject&&(c.jsVars.themeObject.dispose(),delete c.jsVars.themeObject)})}]);
1128 FusionCharts.register("theme",{name:"default",theme:{base:{chart:{labelDisplay:"stagger !important",caption:"Theme Caption \\!important",canvasBgColor:"#56EF22",borderThickness:"5 !important",borderColor:"#E60539",baseFontColor:"#781129"},categories:[{fontColor:"#0F4F40",fontSize:15,category:function(d){return{showLabel:d%2?0:1}},vline:{color:"#000000",thickness:2}}],dataset:[{color:"#8C3146",data:function(d,k){8==d&&(k.value="");return{color:32E3>Number(k.value)?"#8C3146":"#FF0000",alpha:"100"}}}],
1129 trendlines:[{line:function(d){return d?{color:"#ff0000",thickness:3}:{color:"#ffff00",thickness:3}}}]},pie2d:{chart:{bgColor:"#FF0000"}},msline:{chart:{canvasBgColor:"#ff0000"}},geo:{chart:{canvasBgColor:"#0000ff"}},world:{chart:{canvasBgColor:"#00ff00"}}}});
1 /* 1130

6.17 KB

File was created 1 @import url(http://fonts.googleapis.com/css?family=Lato:300);
2
3 body {
4 background-color: #FFFFFF;
5 margin-left: 32px;
6 margin-top: 20px;
7 margin-right: 20px;
8 margin-bottom: 20px;
9 font-family: "Lato", Arial;
10 font-size: 14px;
11 line-height:16px;
12 }
13
14 hr{
15 border: 1px solid #FFFFFF;
16 }
17
18 a:link{
19 color:#0055CC;
20 }
21 a:visited{
22 color:#990099;
23 }
24 a:hover{
25 color:#CC0000;
26 }
27
28 th{
29 background-color:#FFFFFF;
30 font-weight:bold;
31 }
32
33 td{
34 background-color:#ecf7fe;
35 text-align:center;
36 }
File was created 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <title>Intro to JavaScript amCharts</title>
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
6 <link href="images/style.css" rel="stylesheet" type="text/css">
7 </head>
8
9 <body bgcolor="#FFFFFF">
10 <p><img src="images/logo.png" /></p>
11 <hr>
12 <h2>A very short tutorial for those who don't like reading</h2>
13 <ul>
14 <li>Copy <b>amcharts</b> folder to your working dir.</li>
15 <li>Go to <i>samples</i> folder and open one of HTML files in your browser - you should see a chart.</li>
16 <li>View source of the page or open this HTML file with text editor.</li>
17 <li>Try to make some changes.</li>
18 <li>Copy/Paste everything to your html/php/asp/etc file and fix paths to scripts</li>
19 <li>Open your file in browser - you should see the same chart.</li>
20 <li>Now it's time to read all the tutorials and check the examples :)</li>
21 </ul>
22 <hr>
23 <h2>Documentation</h2>
24 <ul>
25 <li><a href="http://docs.amcharts.com/3/javascriptcharts/">JavaScript reference</a></li>
26 </ul>
27 <hr>
28 <h2>Live Editor</h2>
29 <ul>
30 <li>It's a lot esier to configure your charts using our <a href="http://live.amcharts.com/">Live Editor</a>. Even if you are not programmer, you can create stunning charts!</li>
31 </ul>
32 <hr>
33 <h2>Tutorials</h2>
34 <ul>
35 <li>For the latest list of tutorials, <a href="http://www.amcharts.com/tutorials/">visit tutorials page</a>.</li>
36 </ul>
37 <hr>
38 <h2>Examples</h2>
39 We think that the best way to start learning amCharts (and any other similar software) is to study examples. Check samples folder - there are plenty of them! In case you prefer working in jsFiddle, visit our web site - all samples have a link to jsFiddle where you can edit and view the result instantly.
40 <h2>Support</h2>
41 In case you have a question, go to our <a href="http://www.amcharts.com/support/">support section</a>. You'll find a lot of information there, and if you won't - you can always ask.
42 <hr>
43 <h2>Good luck!</h2>
44 <hr>
45 </body>
46 </html>
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 47
jeff_code/V001.txt
File was created 1 ddasddqwdwdd
jeff_code/V002.txt
File was created 1 vvvvv
jeff_code/V003.txt
File was created 1 vvvv
jeff_code/V004.txt
File was created 1 *********************************************************************************
2 This AmCharts software is free under a linkware license.
3
4 This means you may not remove or hide in any other way link to amcharts
5 web site - www.amcharts.com.
6
7 If you wish to remove the link, you should purchase commercial license.
8
9 You may not redistribute, sublicense or sell this program without written
10 permission of Antanas Marcelionis, the author of amcharts software.
11
12 This software is provided without warranty.
13 *********************************************************************************
14 A commercial version (without link) is available at amCharts's website:
15 http://shop.amcharts.com/
16 *********************************************************************************
File was created 1 <<<<<<< HEAD
2 fyhdrfjhl
1 fyhdrfjhl 3 =======
2 mohiup9g] 4 fyhdrfjhl
5 >>>>>>> 170b5319e9961afd5839d2ad8b2d880fad3f7e3f
6 mohiup9g]
File was created 1 ๏ปฟ<!DOCTYPE html>
2 <html style="height:100%;">
3 <head>
4 <title>aaaa</title>
5 <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.js"></script>
6 <script type="text/javascript" src="http://cdn.kendostatic.com/2012.2.621/js/kendo.all.min.js"></script>
7 </head>
8 <body style="margin:0px;height:100%;">
9 <table cellpadding="0px" cellspacing="0px" style="table-layout:fixed;width:100%;height:100%;">
10 <tr height="694px">
11 <td valign="middle" align="center">
12 <div id="gauge"></div>
13 <div id="gauge1"></div>
14 </div>
15 </td>
16 </tr>
17 </table>
18 </body>
19 <script language="javascript" type="text/javascript">
20 function createGauge() {
21 $("#gauge").kendoLinearGauge({
22
23 pointer: {
24 value: 50,
25 size: 18,
26 shape: "arrow",
27 color: '#0000ff'
28 },
29
30 scale: {
31 majorUnit: 5,
32 minorUnit: 5,
33 min:-20,
34 max: 100,
35 labels: {
36 format: "n2"
37 },
38 vertical: false,
39 ranges: [{
40 from: -20,
41 to: 10,
42 color: "#00ff00"
43 }, {
44 from: -10,
45 to: 20,
46 color: "#0000ff"
47 },
48 {
49 from: 30,
50 to: 60,
51 color: "#ffff00"
52 }, {
53 from: 60,
54 to: 100,
55 color: "#ff0000"
56 }]
57 }
58 });
59 }
60
61 function createGauge1() {
62 $("#gauge1").kendoLinearGauge({
63
64 pointer: {
65 value: 50,
66 size: 18,
67 shape: "arrow",
68 color: '#0000ff'
69 },
70
71 scale: {
72 majorUnit: 5,
73 minorUnit: 5,
74 min:-20,
75 max: 100,
76 labels: {
77 format: "n2"
78 },
79 vertical: false,
80 ranges: [{
81 from: -20,
82 to: 10,
83 color: "#00ff00"
84 }, {
85 from: -10,
86 to: 20,
87 color: "#0000ff"
88 },
89 {
90 from: 30,
91 to: 60,
92 color: "#ffff00"
93 }, {
94 from: 60,
95 to: 100,
96 color: "#ff0000"
97 }]
98 }
99 });
100 }
101 $(document).ready(function () {
102 setTimeout(function () {
103 createGauge1();
104
105 $("#example").bind("kendo:skinChange", function (e) {
106 createGauge1();
107 });
108 }, 400);
109 });
110
111 $(document).ready(function () {
112 setTimeout(function () {
113 createGauge();
114
115 $("#example").bind("kendo:skinChange", function (e) {
116 createGauge();
117 });
118 }, 400);
119 });
120 </script>
121 </html>
1 ๏ปฟ<!DOCTYPE html> 122
project_sensor_chart_query.html
File was created 1 <style type="text/css">
2
3 ::-webkit-input-placeholder { color:#B9B9B9; }
4 input:-moz-placeholder { color:fff; }
5 .select_box{ width: 200px;
6 height: 34px;
7 overflow: hidden;
8 border: 1px solid #ccc;
9 font-size: 16px;}
10 </style>
11 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
12 <!--[if IE]><script lang="javascript" type="text/javascript" src="../../js/excanvas.js"></script><![endif]-->
13 <hr class="noscreen" />
14 <!-- Content (Right Column) -->
15 <div id="content" class="box">
16 <h3 class="tit"><? echo gettext('ๆญทๅฒๆ›ฒ็ทšๅœ–ๆŸฅ่ฉข'); ?></h3>
17 <fieldset>
18 <legend><? echo gettext('ๆŸฅ่ฉขๅƒๆ•ธ'); ?></legend>
19 <form method="post" enctype="multipart/form-data" action="../ajax/query/project_sensor_chart_query_edit.php">
20 <table class="nostyle">
21 <tr>
22 <td><? echo gettext('ๅ ฑ่กจๅ็จฑ'); ?></td>
23 <td colspan="2" style="text-align:left">
24 <input class="input-text" type="text" name="query_name" required="required" value="<?=$query_name ?>">
25 </td>
26 </tr>
27 <tr>
28 <td><? echo gettext('้ธๆ“‡ๅ„€ๅ™จ็จฎ้กž'); ?></td>
29 <td colspan="4" style="text-align:left">
30 <?
31 $name = explode(',',$array['0']['sensor_name']);
32 $totoal_sensor = count($name);
33 /*if(device_list != ""){
34 foreach($device_list as $key => $value){
35 $state = ($value['device_code'] == $array['0']['device_code']) ? 'checked=checked':'';
36 if($value['device_code'] == $array['0']['device_code']) { $chart_title = $value['device_name']; }
37 echo "<input type='radio' name='device_code' value='".$value['device_code']."' ".$state." />".$value['device_name'];
38
39 $sensor_name = $Device->get_sensor_data($_GET['project_number'],$value['device_code']);
40 foreach($sensor_name as $k => $v){
41 if($value['device_code'] == $array['0']['device_code']) {
42 $checked = (in_array($v['sensor_id'], $name)) ? 'checked':'';
43 echo "<span class='sensor_name ".$value['device_code']."' ><input type='checkbox' name='".$value['device_code']."[]' style='margin:5px' value='".$v['sensor_id']."' ".$checked.">".$v['sensor_id']."</span>";
44 }else{
45 echo "<span class='sensor_name ".$value['device_code']."' style='display:none'><input type='checkbox' name='".$value['device_code']."[]' style='margin:5px' value='".$v['sensor_id']."' checked>".$v['sensor_id']."</span>";
46 }
47 }
48 echo "<br>";
49 }
50 }*/
51
52 if($device_list != ""){
53 echo "<select name='device_code' id='select_option' class='select_box'>";
54 foreach($device_list as $key => $value){
55 if($value['device_code'] == $array['0']['device_code']) { $chart_title = $value['device_name']; }
56 $state = ($value['device_code'] == $array['0']['device_code']) ? 'selected':'';
57 echo "<option value='".$value['device_code']."'".$state .">".$value['device_name']."</option>";
58 }
59 echo "</select>";
60 echo "<div style='border-width: 1px;border-style:solid;width:350px;height: 100px;display: -webkit-inline-box;float: right;overflow-y:auto;'>";
61 foreach($device_list as $key => $value){
62 $sensor_name = $Device->get_sensor_data($_GET['project_number'],$value['device_code']);
63 foreach($sensor_name as $k => $v){
64 if($value['device_code'] == $array['0']['device_code']) {
65 $checked = (in_array($v['sensor_id'], $name)) ? 'checked':'';
66 echo "<span class='sensor_name ".$value['device_code']."' ><input type='checkbox' name='".$value['device_code']."[]' style='margin:5px' value='".$v['sensor_id']."' ".$checked.">".$v['sensor_id']."</span>";
67 }else{
68 echo "<span class='sensor_name ".$value['device_code']."' style='display:none'><input type='checkbox' name='".$value['device_code']."[]' style='margin:5px' value='".$v['sensor_id']."' checked>".$v['sensor_id']."</span>";
69 }
70 }
71 }
72 echo "</div>";
73 }
74
75
76
77 ?>
78
79 </td>
80 </tr>
81 <tr>
82 <td><? echo gettext('่จญๅฎšX่ปธ้–“่ท'); ?></td>
83 <td colspan="2" style="text-align:left">
84 <input class="input-text" type="text" name="x_tickInterval" value="<?=$array['0']['x_tickInterval']?>">
85 </td>
86 </tr>
87 <tr>
88 <td><? echo gettext('่จญๅฎšY่ปธ้–“่ท'); ?></td>
89 <td colspan="2" style="text-align:left">
90 <input class="input-text" type="text" name="y_tickInterval" value="<?=$array['0']['y_tickInterval'] ?>">
91 </td>
92 </tr>
93 <tr>
94 <td><? echo gettext('่จญๅฎšY่ปธๆœ€ๅคงๅ€ผ'); ?></td>
95 <td colspan="2" style="text-align:left">
96 <input class="input-text" type="text" name="y_max" value="<?=$array['0']['y_max'] ?>">
97 </td>
98 </tr>
99 <tr>
100 <td><? echo gettext('่จญๅฎšY่ปธๆœ€ๅฐๅ€ผ'); ?></td>
101 <td colspan="2" style="text-align:left">
102 <input class="input-text" type="text" name="y_min" value="<?=$array['0']['y_min'] ?>">
103 </td>
104 <td><? echo gettext('ๆŸฅ่ฉขๅœ–่กจ้กžๅž‹'); ?></td>
105 <td style="text-align:left">
106 <select name="chart_type" class='select_box'>
107 <?php foreach($chart_type as $key =>$value){ ?>
108 <option value="<?=$key?>" <? echo ($array[0]['chart_type'] == $key) ? "selected":""; ?>><?php echo $value ?></option>
109 <?php } ?>
110
111 </select>
112 </td>
113 </tr>
114 <tr>
115 <td><? echo gettext('ๆŸฅ่ฉข่ตทๅง‹ๆ—ฅ'); ?></td>
116 <td><input class="date input-text" type="date" name="query_date_start" required="required" value="<? echo date('Y-m-d',$array['0']['query_date_start']); ?>"></td>
117 <td><? echo gettext('ๆŸฅ่ฉข็ต‚ๆญขๆ—ฅ'); ?></td>
118 <td><input class="date input-text" type="date" name="query_date_end" required="required" value="<? echo date('Y-m-d',$array['0']['query_date_end']); ?>"></td>
119 <td class="t-right">
120 <input type="submit" class="input-submit buttonblue" value="<? echo gettext('ๆ›ดๆ”น'); ?>" />
121 <a href="<?=INDEX ?>sanlien/ajax/query/project_chart_del.php?project_number=<?=$_GET['project_number'] ?>&id=<?=$_GET['id'] ?>"><input type="button" class="input-submit buttonred" value="<? echo gettext('ๅˆช้™ค'); ?>" /></a>
122 </td>
123 </tr>
124 </table>
125 <input type="hidden" name="creater" value="<?=$_SESSION['user']['manager'] ?>" />
126 <input type="hidden" name="project_code" value="<?=$_GET['project_number'] ?>" />
127 <input type="hidden" name="id" value="<?=$_GET['id'] ?>" />
128 </form>
129 </fieldset>
130
131 <h3 class="tit"><? echo gettext('ๆญทๅฒๆ›ฒ็ทšๅœ–'); ?></h3>
132 <input type="button" id="buttonPrint" class="buttonred" value="<? echo gettext('ๅˆ—ๅฐๆ›ฒ็ทšๅœ–'); ?>"/>
133 <select id="ExportOption" class="select_box" >
134 <option value="PNG">PNG Image</option>
135 <option value="JPEG">JPEG Image</option>
136 <option value="PDF">PDF Document</option>
137 <option value="SVG">SVG Vector Image</option>
138 </select>
139 <input type="button" id="buttonExport" class="buttongreen" value="<? echo gettext('ๅŒฏๅ‡บๆช”ๆกˆ'); ?>"/>
140 <?php
141 switch($array[0]['chart_type']){
142 case "0":
143 if($device_load != ""){
144 foreach($device_load as $key => $value){
145 //echo date('Y-m-d H:i',$value['date'])."|".$value['date']."<br>";
146 $date_xAxis[] = "'".date('Y-m-d H:i',$value['date'])."'";
147 $device_date[date('Y-m-d H:i',$value['date'])][$value['name']] = ($value['formula_val'] != "") ? number_format($value['formula_val'],2,".",""):'null';
148 }
149
150 $xAxis = implode(',',array_unique($date_xAxis)); //ๅˆ—่ปธๆ™‚้–“ๆ›็ฎ—
151 //ๅฐ‡sensor็š„ๅ€ผ ๅญ˜็‚บ้™ฃๅˆ—
152 foreach($device_date as $key => $value){
153 foreach($name as $k => $v){
154 $device_name_1[$v][] = ($value[$v] != "") ? $value[$v]:'null';
155 }
156 }
157
158
159 //่งฃๆžsensor็š„้™ฃๅˆ— ๆไพ›็ตฆๅœ–ๅ…ง็š„ๆŸฅ่ฉข
160 $i = 0;
161 foreach($device_name_1 as $key => $value){
162 if(in_array($key,$name)){
163 $Y_Axisp[] = "{name: '".$key."', marker: {symbol: '".$chart_symbol[$i]."'}, data: [".implode(',',$value)."]}";
164 $i++;
165 }
166 }
167 $series = implode(',',$Y_Axisp); //ๅ€ผ็š„ๆ™‚้–“ๆ›็ฎ—
168
169 $unit = "'".$array['0']['unit']."'";
170
171 }else{
172 echo gettext('ๆŸฅ่ฉขๅ…งๅฎนไธๆญฃ็ขบ');
173 }
174
175 $range = implode(',',$alert_range);
176 $total_number = count($date_xAxis);
177 $x_tickInterval = ($array['0']['x_tickInterval'] != "") ? ",tickInterval:".round($total_number/$array['0']['x_tickInterval']/$totoal_sensor):"";
178
179 $y_tickInterval = ($array['0']['y_tickInterval'] != "") ? ",tickInterval:".$array['0']['y_tickInterval']:"";
180 $y_max = ($array['0']['y_max'] != "") ? ",max:".$array['0']['y_max']:"";
181 $y_min = ($array['0']['y_min'] != "") ? ",min:".$array['0']['y_min']:"";
182
183 break;
184
185 case "1":
186 //print_r($device_load);
187 $date_xAxis = implode("','",$name);
188 $xAxis = "'".$date_xAxis."'"; //ๅˆ—่ปธๆ™‚้–“ๆ›็ฎ—
189 foreach($device_load as $key => $value){
190 $device_date[date('Y-m-d H:i',$value['date'])][$value['name']] = ($value['formula_val'] != "") ? number_format($value['formula_val'],2,'.',''):'null';
191 }
192
193 foreach($device_date as $key => $value){
194 $totoal_number = 0;
195 ksort($value);
196
197 foreach($name as $k => $v){
198 $totoal_number += ($value[$v] != "") ? $value[$v]:0;
199 $device_name_1[$key][] = $totoal_number;
200 }
201 }
202 $i = 0;
203 foreach($device_name_1 as $key => $value){
204 $Y_Axisp[] = "{name: '".$key."', marker: {symbol: '".$chart_symbol[$i]."'}, data: [".implode(',',$value)."]}";
205 $i++;
206 }
207
208 $series = implode(',',$Y_Axisp); //ๅ€ผ็š„ๆ™‚้–“ๆ›็ฎ—
209 $unit = "'".$device_name['0']['unit']."'";
210 break;
211
212 }
213
214 ?>
215 <script type="text/javascript">
216 $(function () {
217 var chart = new Highcharts.Chart({
218 chart: {
219 renderTo: 'container',
220 type: 'spline',
221 zoomType: 'xy'
222 },
223 title: {
224 text: '<?php echo $chart_title; ?>'
225 },
226 xAxis: {
227 categories: [<?php echo $xAxis; ?>]
228 <?php echo $x_tickInterval; ?>
229 },
230 yAxis: {
231 title: {
232 text: <?php echo $unit; ?>
233 },
234 plotLines: [{
235 value: <?php echo ($device_name[0]['top_alert'] != "") ? $device_name[0]['top_alert']:0; ?>,
236 color: 'blue',
237 width: 2,
238 label: {
239 text: 'T-WARRING:<?php echo ($device_name[0]['top_alert'] != "") ? $device_name[0]['top_alert']:0; ?>',
240 align: 'left',
241 style: {
242 color: 'black'
243 }
244 }
245 },{
246 value: <?php echo ($device_name[0]['down_alert'] != "") ? $device_name[0]['down_alert']:0; ?>,
247 color: 'blue',
248 width: 2,
249 label: {
250 text: 'B-WARRING:<?php echo ($device_name[0]['down_alert'] != "") ? $device_name[0]['down_alert']:0; ?>',
251 align: 'left',
252 style: {
253 color: 'black'
254 }
255 }
256 },{
257 value: <?php echo ($device_name[0]['top_active'] != "") ? $device_name[0]['top_active']:0; ?>,
258 color: 'red',
259 width: 2,
260 label: {
261 text: 'T-ACTION:<?php echo ($device_name[0]['top_active'] != "") ? $device_name[0]['top_active']:0; ?>',
262 align: 'left',
263 style: {
264 color: 'gray'
265 }
266 }
267 },{
268 value: <?php echo ($device_name[0]['down_active'] != "") ? $device_name[0]['down_active']:0; ?>,
269 color: 'red',
270 width: 2,
271 label: {
272 text: 'B-ACTION:<?php echo ($device_name[0]['down_active'] != "") ? $device_name[0]['down_active']:0; ?>',
273 align: 'left',
274 style: {
275 color: 'gray'
276 }
277 }
278 }],
279 labels: {
280 formatter: function() {
281 return this.value
282 }
283 }
284 <?php echo $y_tickInterval.$y_max.$y_min; ?>
285 },
286 tooltip: {
287 crosshairs: true,
288 shared: true
289 },
290 plotOptions: {
291 spline: {
292 marker: {
293 radius: 4,
294 lineColor: '#666666',
295 lineWidth: 1
296 }
297 }
298 },
299 series: [<?php echo $series; ?>],
300 navigation: {
301 buttonOptions: {
302 enabled: false
303 }
304 }
305 });
306
307 $('#buttonExport').click(function() {
308 var e = document.getElementById("ExportOption");
309 var ExportAs = e.options[e.selectedIndex].value;
310
311 if(ExportAs == 'PNG')
312 {
313 chart.exportChart({type: 'image/png', filename: 'my-png'}, {subtitle: {text:''}});
314 }
315 if(ExportAs == 'JPEG')
316 {
317 chart.exportChart({type: 'image/jpeg', filename: 'my-jpg'}, {subtitle: {text:''}});
318 }
319 if(ExportAs == 'PDF')
320 {
321 chart.exportChart({type: 'application/pdf', filename: 'my-pdf'}, {subtitle: {text:''}});
322 }
323 if(ExportAs == 'SVG')
324 {
325 chart.exportChart({type: 'image/svg+xml', filename: 'my-svg'}, {subtitle: {text:''}});
326 }
327 });
328
329 $('#buttonPrint').click(function() {
330 chart.setTitle(null, { text: ' ' });
331 chart.print();
332 chart.setTitle(null, { text: '' });
333 });
334 });
335
336
337 </script>
338 <script src="../gui/js/chart/highcharts.js"></script>
339 <script src="../gui/js/chart/exporting.js"></script>
340 <script>
341 $("#select_option").change(function (){
342 var device_code = $(this).val();
343 $('.sensor_name').hide();
344 $('.'+device_code).show();
345
346 });
347
348 </script>
349 <div class="table" id='block'>
350 <div id="container" style="min-width: 400px; height: 600px; margin: 0 auto"></div>
351 </div>
352 </div>
353 </div> <!-- /content -->
354
355 </div> <!-- /cols -->
samples/_JSON_angularGauge.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/gauge.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12
13 var chart = AmCharts.makeChart("chartdiv", {
14 type: "gauge",
15 titles: [{
16 "text": "Speedometer",
17 "size": 15
18 }],
19
20 axes: [{
21 startValue: 0,
22 axisThickness: 1,
23 endValue: 220,
24 valueInterval: 10,
25 bottomTextYOffset: -20,
26 bottomText: "0 km/h",
27
28 bands: [{
29 startValue: 0,
30 endValue: 90,
31 color: "#00CC00"
32 },
33
34 {
35 startValue: 90,
36 endValue: 130,
37 color: "#ffac29"
38 },
39
40 {
41 startValue: 130,
42 endValue: 220,
43 color: "#ea3838",
44 innerRadius: "95%"
45 }
46 ]
47 }],
48
49 arrows: [{}]
50 });
51
52 setInterval(randomValue, 2000);
53
54 // set random value
55 function randomValue() {
56 var value = Math.round(Math.random() * 200);
57 chart.arrows[0].setValue(value);
58 chart.axes[0].setBottomText(value + " km/h");
59 }
60 </script>
61 </head>
62
63 <body>
64 <div id="chartdiv" style="width:500px; height:400px;"></div>
65 </body>
66
67 </html>
samples/_JSON_areaStacked.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10 <script type="text/javascript">
11
12 // this chart is exactly the same as in areaStacked.html, only made using JSON except JavaScript API
13
14 var chartData = [{
15 "year": 2000,
16 "cars": 1587,
17 "motorcycles": 650,
18 "bicycles": 121
19 }, {
20 "year": 1995,
21 "cars": 1567,
22 "motorcycles": 683,
23 "bicycles": 146
24 }, {
25 "year": 1996,
26 "cars": 1617,
27 "motorcycles": 691,
28 "bicycles": 138
29 }, {
30 "year": 1997,
31 "cars": 1630,
32 "motorcycles": 642,
33 "bicycles": 127
34 }, {
35 "year": 1998,
36 "cars": 1660,
37 "motorcycles": 699,
38 "bicycles": 105
39 }, {
40 "year": 1999,
41 "cars": 1683,
42 "motorcycles": 721,
43 "bicycles": 109
44 }, {
45 "year": 2000,
46 "cars": 1691,
47 "motorcycles": 737,
48 "bicycles": 112
49 }, {
50 "year": 2001,
51 "cars": 1298,
52 "motorcycles": 680,
53 "bicycles": 101
54 }, {
55 "year": 2002,
56 "cars": 1275,
57 "motorcycles": 664,
58 "bicycles": 97
59 }, {
60 "year": 2003,
61 "cars": 1246,
62 "motorcycles": 648,
63 "bicycles": 93
64 }, {
65 "year": 2004,
66 "cars": 1218,
67 "motorcycles": 637,
68 "bicycles": 101
69 }, {
70 "year": 2005,
71 "cars": 1213,
72 "motorcycles": 633,
73 "bicycles": 87
74 }, {
75 "year": 2006,
76 "cars": 1199,
77 "motorcycles": 621,
78 "bicycles": 79
79 }, {
80 "year": 2007,
81 "cars": 1110,
82 "motorcycles": 210,
83 "bicycles": 81
84 }, {
85 "year": 2008,
86 "cars": 1165,
87 "motorcycles": 232,
88 "bicycles": 75
89 }, {
90 "year": 2009,
91 "cars": 1145,
92 "motorcycles": 219,
93 "bicycles": 88
94 }, {
95 "year": 2010,
96 "cars": 1163,
97 "motorcycles": 201,
98 "bicycles": 82
99 }, {
100 "year": 2011,
101 "cars": 1180,
102 "motorcycles": 285,
103 "bicycles": 87
104 }, {
105 "year": 2012,
106 "cars": 1159,
107 "motorcycles": 277,
108 "bicycles": 71
109 }];
110
111 AmCharts.makeChart("chartdiv", {
112 type: "serial",
113 pathToImages: "../amcharts/images/",
114 dataProvider: chartData,
115 marginTop: 10,
116 categoryField: "year",
117 categoryAxis: {
118 gridAlpha: 0.07,
119 axisColor: "#DADADA",
120 startOnAxis: true,
121 guides: [{
122 category: "2001",
123 lineColor: "#CC0000",
124 lineAlpha: 1,
125 dashLength: 2,
126 inside: true,
127 labelRotation: 90,
128 label: "fines for speeding increased"
129 }, {
130 category: "2007",
131 lineColor: "#CC0000",
132 lineAlpha: 1,
133 dashLength: 2,
134 inside: true,
135 labelRotation: 90,
136 label: "motorcycle maintenance fee introduced"
137 }]
138 },
139 valueAxes: [{
140 stackType: "regular",
141 gridAlpha: 0.07,
142 title: "Traffic incidents"
143 }],
144
145 graphs: [{
146 type: "line",
147 title: "Cars",
148 hidden: true,
149 valueField: "cars",
150 lineAlpha: 0,
151 fillAlphas: 0.6,
152 balloonText: "<img src='images/car.png' style='vertical-align:bottom; margin-right: 10px; width:28px; height:21px;'><span style='font-size:14px; color:#000000;'><b>[[value]]</b></span>"
153 }, {
154 type: "line",
155 title: "Motorcycles",
156 valueField: "motorcycles",
157 lineAlpha: 0,
158 fillAlphas: 0.6,
159 balloonText: "<img src='images/motorcycle.png' style='vertical-align:bottom; margin-right: 10px; width:28px; height:21px;'><span style='font-size:14px; color:#000000;'><b>[[value]]</b></span>"
160 }, {
161 type: "line",
162 title: "Bicycles",
163 valueField: "bicycles",
164 lineAlpha: 0,
165 fillAlphas: 0.6,
166 balloonText: "<img src='images/bicycle.png' style='vertical-align:bottom; margin-right: 10px; width:28px; height:21px;'><span style='font-size:14px; color:#000000;'><b>[[value]]</b></span>"
167 }],
168 legend: {
169 position: "bottom",
170 valueText: "[[value]]",
171 valueWidth: 100,
172 valueAlign: "left",
173 equalWidths: false,
174 periodValueText: "total: [[value.sum]]"
175 },
176 chartCursor: {
177 cursorAlpha: 0
178 },
179 chartScrollbar: {
180 color: "FFFFFF"
181 }
182
183 });
184
185 </script>
186 </head>
187
188 <body>
189 <div id="chartdiv" style="width:100%; height:400px;"></div>
190 </body>
191
192 </html>
samples/_JSON_barAndLineMix.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10 <script src="../amcharts/themes/dark.js" type="text/javascript"></script>
11
12 <script type="text/javascript">
13 AmCharts.makeChart("chartdiv", {
14 type: "serial",
15 theme: "dark",
16 dataProvider: [{
17 "year": 2005,
18 "income": 23.5,
19 "expenses": 18.1
20 }, {
21 "year": 2006,
22 "income": 26.2,
23 "expenses": 22.8
24 }, {
25 "year": 2007,
26 "income": 30.1,
27 "expenses": 23.9
28 }, {
29 "year": 2008,
30 "income": 29.5,
31 "expenses": 25.1
32 }, {
33 "year": 2009,
34 "income": 24.6,
35 "expenses": 25
36 }],
37 categoryField: "year",
38 startDuration: 1,
39 rotate: true,
40
41 categoryAxis: {
42 gridPosition: "start"
43 },
44 valueAxes: [{
45 position: "top",
46 title: "Million USD",
47 minorGridEnabled: true
48 }],
49 graphs: [{
50 type: "column",
51 title: "Income",
52 valueField: "income",
53 fillAlphas:1,
54 balloonText: "<span style='font-size:13px;'>[[title]] in [[category]]:<b>[[value]]</b></span>"
55 }, {
56 type: "line",
57 title: "Expenses",
58 valueField: "expenses",
59 lineThickness: 2,
60 bullet: "round",
61 balloonText: "<span style='font-size:13px;'>[[title]] in [[category]]:<b>[[value]]</b></span>"
62 }],
63 legend: {
64 useGraphSettings: true
65 },
66
67 creditsPosition:"top-right"
68
69 });
70
71
72 </script>
73 </head>
74
75 <body style="background-color:#282828;">
76 <div id="chartdiv" style="width: 500px; height: 600px;"></div>
77 </body>
78
79 </html>
samples/_JSON_lineWithFilledValueRanges.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10 <script src="../amcharts/themes/dark.js" type="text/javascript"></script>
11
12 <script type="text/javascript">
13 var chart = AmCharts.makeChart("chartdiv", {
14 "type": "serial",
15 "theme": "dark",
16 "dataDateFormat": "YYYY-MM-DD",
17 "pathToImages": "../amcharts/images/",
18 "dataProvider": [{
19 "date": "2013-11-30",
20 "value": 104
21 }, {
22 "date": "2013-12-01",
23 "value": 108
24 }, {
25 "date": "2013-12-02",
26 "value": 103
27 }, {
28 "date": "2013-12-03",
29 "value": 105
30 }, {
31 "date": "2013-12-04",
32 "value": 136
33 }, {
34 "date": "2013-12-05",
35 "value": 138
36 }, {
37 "date": "2013-12-06",
38 "value": 113
39 }, {
40 "date": "2013-12-07",
41 "value": 131
42 }, {
43 "date": "2013-12-08",
44 "value": 114
45 }, {
46 "date": "2013-12-09",
47 "value": 124
48 }],
49 "valueAxes": [{
50 "maximum": 140,
51 "minimum": 100,
52 "axisAlpha": 0,
53 "guides": [{
54 "fillAlpha": 0.1,
55 "fillColor": "#CC0000",
56 "lineAlpha": 0,
57 "toValue": 120,
58 "value": 0
59 }, {
60 "fillAlpha": 0.1,
61 "fillColor": "#0000cc",
62 "lineAlpha": 0,
63 "toValue": 200,
64 "value": 120
65 }]
66 }],
67 "graphs": [{
68 "bullet": "round",
69 "dashLength": 4,
70 "valueField": "value"
71 }],
72 "chartCursor": {
73 "cursorAlpha": 0
74 },
75 "categoryField": "date",
76 "categoryAxis": {
77 "parseDates": true
78 }
79 });
80 </script>
81 </head>
82
83 <body style="background-color:#3f3f4f;">
84 <div id="chartdiv" style="width: 100%; height: 400px;"></div>
85 </body>
86
87 </html>
samples/_JSON_lineWithScrollAndZoom.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12
13 var chartData = [];
14 generateChartData();
15
16 var chart = AmCharts.makeChart("chartdiv", {
17 type: "serial",
18 pathToImages: "../amcharts/images/",
19 dataProvider: chartData,
20 categoryField: "date",
21 categoryAxis: {
22 parseDates: true,
23 gridAlpha: 0.15,
24 minorGridEnabled: true,
25 axisColor: "#DADADA"
26 },
27 valueAxes: [{
28 axisAlpha: 0.2,
29 id: "v1"
30 }],
31 graphs: [{
32 title: "red line",
33 id: "g1",
34 valueAxis: "v1",
35 valueField: "visits",
36 bullet: "round",
37 bulletBorderColor: "#FFFFFF",
38 bulletBorderAlpha: 1,
39 lineThickness: 2,
40 lineColor: "#b5030d",
41 negativeLineColor: "#0352b5",
42 balloonText: "[[category]]<br><b><span style='font-size:14px;'>value: [[value]]</span></b>"
43 }],
44 chartCursor: {
45 fullWidth:true,
46 cursorAlpha:0.1
47 },
48 chartScrollbar: {
49 scrollbarHeight: 40,
50 color: "#FFFFFF",
51 autoGridCount: true,
52 graph: "g1"
53 },
54
55 mouseWheelZoomEnabled:true
56 });
57
58 chart.addListener("dataUpdated", zoomChart);
59
60
61 // generate some random data, quite different range
62 function generateChartData() {
63 var firstDate = new Date();
64 firstDate.setDate(firstDate.getDate() - 500);
65
66 for (var i = 0; i < 500; i++) {
67 // we create date objects here. In your data, you can have date strings
68 // and then set format of your dates using chart.dataDateFormat property,
69 // however when possible, use date objects, as this will speed up chart rendering.
70 var newDate = new Date(firstDate);
71 newDate.setDate(newDate.getDate() + i);
72
73 var visits = Math.round(Math.random() * 40) - 20;
74
75 chartData.push({
76 date: newDate,
77 visits: visits
78 });
79 }
80 }
81
82 // this method is called when chart is first inited as we listen for "dataUpdated" event
83 function zoomChart() {
84 // different zoom methods can be used - zoomToIndexes, zoomToDates, zoomToCategoryValues
85 chart.zoomToIndexes(chartData.length - 40, chartData.length - 1);
86 }
87
88 // changes cursor mode from pan to select
89 function setPanSelect() {
90 var chartCursor = chart.chartCursor;
91
92 if (document.getElementById("rb1").checked) {
93 chartCursor.pan = false;
94 chartCursor.zoomable = true;
95
96 } else {
97 chartCursor.pan = true;
98 }
99 chart.validateNow();
100 }
101 </script>
102 </head>
103
104 <body>
105 <div id="chartdiv" style="width: 100%; height: 400px;"></div>
106 <div style="margin-left:35px;">
107 <input type="radio" checked="true" name="group" id="rb1" onclick="setPanSelect()">Select
108 <input type="radio" name="group" id="rb2" onclick="setPanSelect()">Pan
109 </div>
110 </body>
111
112 </html>
samples/_JSON_lineWithTrendLines.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12
13 AmCharts.makeChart("chartdiv", {
14
15 type: "serial",
16 dataProvider: [{
17 "date": "2012-01-01",
18 "value": 8
19 }, {
20 "date": "2012-01-01",
21 "value": 8
22 }, {
23 "date": "2012-01-02",
24 "value": 10
25 }, {
26 "date": "2012-01-03",
27 "value": 12
28 }, {
29 "date": "2012-01-04",
30 "value": 14
31 }, {
32 "date": "2012-01-05",
33 "value": 11
34 }, {
35 "date": "2012-01-06",
36 "value": 6
37 }, {
38 "date": "2012-01-07",
39 "value": 7
40 }, {
41 "date": "2012-01-08",
42 "value": 9
43 }, {
44 "date": "2012-01-09",
45 "value": 13
46 }, {
47 "date": "2012-01-10",
48 "value": 15
49 }, {
50 "date": "2012-01-11",
51 "value": 19
52 }, {
53 "date": "2012-01-12",
54 "value": 21
55 }, {
56 "date": "2012-01-13",
57 "value": 22
58 }, {
59 "date": "2012-01-14",
60 "value": 20
61 }, {
62 "date": "2012-01-15",
63 "value": 18
64 }, {
65 "date": "2012-01-16",
66 "value": 14
67 }, {
68 "date": "2012-01-17",
69 "value": 16
70 }, {
71 "date": "2012-01-18",
72 "value": 18
73 }, {
74 "date": "2012-01-19",
75 "value": 17
76 }, {
77 "date": "2012-01-20",
78 "value": 15
79 }, {
80 "date": "2012-01-21",
81 "value": 12
82 }, {
83 "date": "2012-01-22",
84 "value": 10
85 }, {
86 "date": "2012-01-23",
87 "value": 8
88 }],
89
90 pathToImages: "../amcharts/images/",
91
92 dataDateFormat: "YYYY-MM-DD",
93 categoryField: "date",
94
95
96 categoryAxis: {
97 parseDates: true,
98 minPeriod: "DD",
99 gridAlpha: 0.1,
100 minorGridAlpha: 0.1,
101 axisAlpha: 0,
102 minorGridEnabled: true,
103 inside: true
104 },
105
106 valueAxes: [{
107
108 tickLength: 0,
109 axisAlpha: 0,
110 showFirstLabel: false,
111 showLastLabel: false,
112
113 guides: [{
114 value: 10,
115 toValue: 20,
116 fillColor: "#00CC00",
117 inside: true,
118 fillAlpha: 0.2,
119 lineAlpha: 0
120 }]
121
122 }],
123
124
125 graphs: [{
126 lineColor: "#00CC00",
127 valueField: "value",
128 dashLength: 3,
129 bullet: "round",
130 balloonText: "[[category]]<br><b><span style='font-size:14px;'>value:[[value]]</span></b>"
131 }],
132
133 chartCursor: {},
134 chartScrollbar: {},
135
136 mouseWheelZoomEnabled:true,
137
138 trendLines: [{
139 initialDate: new Date(2012, 0, 2, 12),
140 finalDate: new Date(2012, 0, 11, 12),
141 initialValue: 10,
142 finalValue: 19,
143 lineColor: "#CC0000"
144 },
145 {
146 initialDate: new Date(2012, 0, 17, 12),
147 finalDate: new Date(2012, 0, 22, 12),
148 initialValue: 16,
149 finalValue: 10,
150 lineColor: "#CC0000"
151 }]
152 });
153 </script>
154 </head>
155
156 <body>
157 <div id="chartdiv" style="width: 100%; height: 400px;"></div>
158 </body>
159
160 </html>
samples/_JSON_pieWithLegend.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/pie.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12
13 AmCharts.makeChart("chartdiv", {
14 "type": "pie",
15 "dataProvider": [{
16 "country": "Czech Republic",
17 "litres": 156.9
18 }, {
19 "country": "Ireland",
20 "litres": 131.1
21 }, {
22 "country": "Germany",
23 "litres": 115.8
24 }, {
25 "country": "Australia",
26 "litres": 109.9
27 }, {
28 "country": "Austria",
29 "litres": 108.3
30 }, {
31 "country": "UK",
32 "litres": 65
33 }, {
34 "country": "Belgium",
35 "litres": 50
36 }],
37 "titleField": "country",
38 "valueField": "litres",
39 "balloonText": "[[title]]<br><span style='font-size:14px'><b>[[value]]</b> ([[percents]]%)</span>",
40 "legend": {
41 "align": "center",
42 "markerType": "circle"
43 }
44
45 });
46
47 </script>
48 </head>
49
50 <body>
51 <div id="chartdiv" style="width: 100%; height: 400px;"></div>
52 </body>
53
54 </html>
samples/_JSON_radarSimple.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/radar.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart = AmCharts.makeChart("chartdiv", {
13 type: "radar",
14 dataProvider: [{
15 "country": "Czech Republic",
16 "litres": 156.9
17 }, {
18 "country": "Ireland",
19 "litres": 131.1
20 }, {
21 "country": "Germany",
22 "litres": 115.8
23 }, {
24 "country": "Australia",
25 "litres": 109.9
26 }, {
27 "country": "Austria",
28 "litres": 108.3
29 }, {
30 "country": "UK",
31 "litres": 99
32 }],
33
34
35 categoryField: "country",
36 startDuration: 2,
37
38
39 valueAxes: [{
40 axisAlpha: 0.15,
41 minimum: 0,
42 dashLength: 3,
43 axisTitleOffset: 20,
44 gridCount: 5
45 }],
46
47 graphs: [{
48
49 valueField: "litres",
50
51 bullet: "round",
52 balloonText: "[[value]] litres of beer per year"
53 }]
54
55 });
56 </script>
57 </head>
58
59 <body>
60 <div id="chartdiv" style="width:600px; height:400px;"></div>
61 </body>
62
63 </html>
samples/_JSON_usingDifferentLanguage.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10 <script src="../amcharts/lang/de.js" type="text/javascript"></script>
11
12 <script type="text/javascript">
13
14 var chartData = [];
15 generateChartData();
16
17 var chart = AmCharts.makeChart("chartdiv", {
18 type: "serial",
19
20 // setting language to German
21 language: "de",
22
23 pathToImages: "../amcharts/images/",
24 dataProvider: chartData,
25 categoryField: "date",
26 categoryAxis: {
27 parseDates: true,
28 gridAlpha: 0.15,
29 minorGridEnabled: true,
30 axisColor: "#DADADA"
31 },
32 valueAxes: [{
33 axisAlpha: 0.2,
34 id: "v1"
35 }],
36 graphs: [{
37 title: "red line",
38 id: "g1",
39 valueAxis: "v1",
40 valueField: "visits",
41 bullet: "round",
42 bulletBorderColor: "#FFFFFF",
43 bulletBorderAlpha: 1,
44 lineThickness: 2,
45 lineColor: "#b5030d",
46 negativeLineColor: "#0352b5",
47 balloonText: "[[category]]<br><b><span style='font-size:14px;'>value: [[value]]</span></b>"
48 }],
49 chartCursor: {
50 fullWidth:true,
51 cursorAlpha:0.1
52 },
53 chartScrollbar: {
54 scrollbarHeight: 40,
55 color: "#FFFFFF",
56 autoGridCount: true,
57 graph: "g1"
58 }
59 });
60
61 chart.addListener("dataUpdated", zoomChart);
62
63
64 // generate some random data, quite different range
65 function generateChartData() {
66 var firstDate = new Date();
67 firstDate.setDate(firstDate.getDate() - 500);
68
69 for (var i = 0; i < 500; i++) {
70 // we create date objects here. In your data, you can have date strings
71 // and then set format of your dates using chart.dataDateFormat property,
72 // however when possible, use date objects, as this will speed up chart rendering.
73 var newDate = new Date(firstDate);
74 newDate.setDate(newDate.getDate() + i);
75
76 var visits = Math.round(Math.random() * 40) - 20;
77
78 chartData.push({
79 date: newDate,
80 visits: visits
81 });
82 }
83 }
84
85 // this method is called when chart is first inited as we listen for "dataUpdated" event
86 function zoomChart() {
87 // different zoom methods can be used - zoomToIndexes, zoomToDates, zoomToCategoryValues
88 chart.zoomToIndexes(chartData.length - 40, chartData.length - 1);
89 }
90
91 // changes cursor mode from pan to select
92 function setPanSelect() {
93 var chartCursor = chart.chartCursor;
94
95 if (document.getElementById("rb1").checked) {
96 chartCursor.pan = false;
97 chartCursor.zoomable = true;
98
99 } else {
100 chartCursor.pan = true;
101 }
102 chart.validateNow();
103 }
104 </script>
105 </head>
106
107 <body>
108 <div id="chartdiv" style="width: 100%; height: 400px;"></div>
109 <div style="margin-left:35px;">
110 <input type="radio" checked="true" name="group" id="rb1" onclick="setPanSelect()">Select
111 <input type="radio" name="group" id="rb2" onclick="setPanSelect()">Pan
112 </div>
113 </body>
114
115 </html>
samples/_JSON_xyBubbleWithZoom.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/xy.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart = AmCharts.makeChart("chartdiv", {
13 "type": "xy",
14 "startDuration": 1.5,
15 "pathToImages": "../amcharts/images/",
16 "chartCursor": {},
17 "chartScrollbar": {},
18 "trendLines": [],
19 "graphs": [
20 {
21 "balloonText": "x:<b>[[x]]</b> y:<b>[[y]]</b><br>value:<b>[[value]]</b>",
22 "bullet": "bubble",
23 "id": "AmGraph-3",
24 "lineAlpha": 0,
25 "lineColor": "#b0de09",
26 "valueField": "value",
27 "xField": "x",
28 "yField": "y"
29 },
30 {
31 "balloonText": "x:<b>[[x]]</b> y:<b>[[y]]</b><br>value:<b>[[value]]</b>",
32 "bullet": "bubble",
33 "id": "AmGraph-4",
34 "lineAlpha": 0,
35 "lineColor": "#fcd202",
36 "valueField": "value2",
37 "xField": "x2",
38 "yField": "y2"
39 }
40 ],
41 "guides": [],
42 "valueAxes": [
43 {
44 "id": "ValueAxis-2",
45 "axisAlpha": 0
46 },
47 {
48 "id": "ValueAxis-3",
49 "axisAlpha": 0,
50 "position": "left"
51 }
52 ],
53 "allLabels": [],
54 "balloon": {},
55 "titles": [],
56 "dataProvider": [
57 {
58 "y": 10,
59 "x": 14,
60 "value": 59,
61 "y2": -5,
62 "x2": -3,
63 "value2": 44
64 },
65 {
66 "y": 5,
67 "x": 3,
68 "value": 50,
69 "y2": -15,
70 "x2": -8,
71 "value2": 12
72 },
73 {
74 "y": -10,
75 "x": -3,
76 "value": 19,
77 "y2": -4,
78 "x2": 6,
79 "value2": 35
80 },
81 {
82 "y": -6,
83 "x": 5,
84 "value": 65,
85 "y2": -5,
86 "x2": -6,
87 "value2": 168
88 },
89 {
90 "y": 15,
91 "x": -4,
92 "value": 92,
93 "y2": -10,
94 "x2": -8,
95 "value2": 102
96 },
97 {
98 "y": 13,
99 "x": 1,
100 "value": 8,
101 "y2": -2,
102 "x2": -3,
103 "value2": 41
104 },
105 {
106 "y": 1,
107 "x": 6,
108 "value": 35,
109 "y2": 0,
110 "x2": -3,
111 "value2": 16
112 }
113 ]
114 });
115
116 </script>
117 </head>
118
119 <body>
120 <div id="chartdiv" style="width: 600px; height: 400px;"></div>
121 </body>
122
123 </html>
samples/_JSON_xyWithGuides.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/xy.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart = AmCharts.makeChart("chartdiv", {
13 "type": "xy",
14 "startDuration": 1.5,
15 "trendLines": [],
16 "graphs": [
17 {
18 "balloonText": "x:<b>[[x]]</b> y:<b>[[y]]</b><br>value:<b>[[value]]</b>",
19 "bullet": "diamond",
20 "id": "AmGraph-1",
21 "lineAlpha": 0,
22 "lineColor": "#b0de09",
23 "valueField": "value",
24 "xField": "x",
25 "yField": "y"
26 },
27 {
28 "balloonText": "x:<b>[[x]]</b> y:<b>[[y]]</b><br>value:<b>[[value]]</b>",
29 "bullet": "round",
30 "id": "AmGraph-2",
31 "lineAlpha": 0,
32 "lineColor": "#fcd202",
33 "valueField": "value2",
34 "xField": "x2",
35 "yField": "y2"
36 }
37 ],
38 "guides": [
39 {
40 "fillAlpha": 0.3,
41 "fillColor": "#ff8000",
42 "id": "Guide-1",
43 "toValue": -2,
44 "value": -8,
45 "valueAxis": "ValueAxis-2"
46 }
47 ],
48 "valueAxes": [
49 {
50 "id": "ValueAxis-1",
51 "axisAlpha": 0
52 },
53 {
54 "id": "ValueAxis-2",
55 "axisAlpha": 0,
56 "position": "bottom"
57 }
58 ],
59 "allLabels": [],
60 "balloon": {},
61 "titles": [],
62 "dataProvider": [
63 {
64 "y": 10,
65 "x": 14,
66 "value": 59,
67 "y2": -5,
68 "x2": -3,
69 "value2": 44
70 },
71 {
72 "y": 5,
73 "x": 3,
74 "value": 50,
75 "y2": -15,
76 "x2": -8,
77 "value2": 12
78 },
79 {
80 "y": -10,
81 "x": -3,
82 "value": 19,
83 "y2": -4,
84 "x2": 6,
85 "value2": 35
86 },
87 {
88 "y": -6,
89 "x": 5,
90 "value": 65,
91 "y2": -5,
92 "x2": -6,
93 "value2": 168
94 },
95 {
96 "y": 15,
97 "x": -4,
98 "value": 92,
99 "y2": -10,
100 "x2": -8,
101 "value2": 102
102 },
103 {
104 "y": 13,
105 "x": 1,
106 "value": 8,
107 "y2": -2,
108 "x2": -3,
109 "value2": 41
110 },
111 {
112 "y": 1,
113 "x": 6,
114 "value": 35,
115 "y2": 0,
116 "x2": -3,
117 "value2": 16
118 }
119 ]
120 });
121
122 </script>
123 </head>
124
125 <body>
126 <div id="chartdiv" style="width: 600px; height: 400px;"></div>
127 </body>
128
129 </html>
samples/_exporting_to_multiple_formats.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10
11 <!-- scripts for exporting chart as an image -->
12 <!-- Exporting to image works on all modern browsers except IE9 (IE10 works fine) -->
13 <!-- Note, the exporting will work only if you view the file from web server -->
14 <!--[if (!IE) | (gte IE 10)]> -->
15 <script src="../amcharts/exporting/amexport.js" type="text/javascript"></script>
16 <script src="../amcharts/exporting/rgbcolor.js" type="text/javascript"></script>
17 <script src="../amcharts/exporting/canvg.js" type="text/javascript"></script>
18 <script src="../amcharts/exporting/jspdf.js" type="text/javascript"></script>
19 <script src="../amcharts/exporting/filesaver.js" type="text/javascript"></script>
20 <script src="../amcharts/exporting/jspdf.plugin.addimage.js" type="text/javascript"></script>
21 <!-- <![endif]-->
22
23 <script type="text/javascript">
24 var chart;
25
26 var chartData = [{
27 "country": "USA",
28 "visits": 4025,
29 "color": "#FF0F00"
30 }, {
31 "country": "China",
32 "visits": 1882,
33 "color": "#FF6600"
34 }, {
35 "country": "Japan",
36 "visits": 1809,
37 "color": "#FF9E01"
38 }, {
39 "country": "Germany",
40 "visits": 1322,
41 "color": "#FCD202"
42 }, {
43 "country": "UK",
44 "visits": 1122,
45 "color": "#F8FF01"
46 }, {
47 "country": "France",
48 "visits": 1114,
49 "color": "#B0DE09"
50 }, {
51 "country": "India",
52 "visits": 984,
53 "color": "#04D215"
54 }, {
55 "country": "Spain",
56 "visits": 711,
57 "color": "#0D8ECF"
58 }, {
59 "country": "Netherlands",
60 "visits": 665,
61 "color": "#0D52D1"
62 }, {
63 "country": "Russia",
64 "visits": 580,
65 "color": "#2A0CD0"
66 }, {
67 "country": "South Korea",
68 "visits": 443,
69 "color": "#8A0CCF"
70 }, {
71 "country": "Canada",
72 "visits": 441,
73 "color": "#CD0D74"
74 }, {
75 "country": "Brazil",
76 "visits": 395,
77 "color": "#754DEB"
78 }, {
79 "country": "Italy",
80 "visits": 386,
81 "color": "#DDDDDD"
82 }, {
83 "country": "Australia",
84 "visits": 384,
85 "color": "#999999"
86 }, {
87 "country": "Taiwan",
88 "visits": 338,
89 "color": "#333333"
90 }, {
91 "country": "Poland",
92 "visits": 328,
93 "color": "#000000"
94 }];
95
96
97 var chart = AmCharts.makeChart("chartdiv", {
98 type: "serial",
99 dataProvider: chartData,
100 categoryField: "country",
101 pathToImages:"../amcharts/images/",
102 depth3D: 20,
103 angle: 30,
104
105 categoryAxis: {
106 labelRotation: 90,
107 gridPosition: "start"
108 },
109
110 valueAxes: [{
111 title: "Visitors"
112 }],
113
114 graphs: [{
115
116 valueField: "visits",
117 colorField: "color",
118 type: "column",
119 lineAlpha: 0,
120 fillAlphas: 1
121 }],
122
123 chartCursor: {
124 cursorAlpha: 0,
125 zoomable: false,
126 categoryBalloonEnabled: false
127 },
128
129 amExport: {
130 top: 21,
131 right: 21,
132 buttonColor: '#EFEFEF',
133 buttonRollOverColor:'#DDDDDD',
134 exportPNG:true,
135 exportJPG:true,
136 exportPDF:true,
137 exportSVG:true
138 }
139 });
140 </script>
141 </head>
142
143 <body>
144 <span style="font-family: Arial; font-size: 10; color: #CC0000;">
145 <p>Warning! Exporting to image works only if you view this file from web server. Exporting works with all modern browsers except IE9 (works fine with IE10)</p>
146 </span>
147 <div id="chartdiv" style="width: 100%; height: 400px;"></div>
148 </body>
149
150 </html>
samples/_exporting_to_png.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10
11 <!-- scripts for exporting chart as an image -->
12 <!-- Note, the exporting will work only if you view the file from web server -->
13 <!-- Exporting to image works on all modern browsers except IE9 (IE10 works fine) -->
14 <!--[if (!IE) | (gte IE 10)]> -->
15 <script src="../amcharts/exporting/amexport.js" type="text/javascript"></script>
16 <script src="../amcharts/exporting/rgbcolor.js" type="text/javascript"></script>
17 <script src="../amcharts/exporting/canvg.js" type="text/javascript"></script>
18 <script src="../amcharts/exporting/filesaver.js" type="text/javascript"></script>
19 <!-- <![endif]-->
20 <script type="text/javascript">
21 var chart;
22
23 var chartData = [{
24 "country": "USA",
25 "visits": 4025,
26 "color": "#FF0F00"
27 }, {
28 "country": "China",
29 "visits": 1882,
30 "color": "#FF6600"
31 }, {
32 "country": "Japan",
33 "visits": 1809,
34 "color": "#FF9E01"
35 }, {
36 "country": "Germany",
37 "visits": 1322,
38 "color": "#FCD202"
39 }, {
40 "country": "UK",
41 "visits": 1122,
42 "color": "#F8FF01"
43 }, {
44 "country": "France",
45 "visits": 1114,
46 "color": "#B0DE09"
47 }, {
48 "country": "India",
49 "visits": 984,
50 "color": "#04D215"
51 }, {
52 "country": "Spain",
53 "visits": 711,
54 "color": "#0D8ECF"
55 }, {
56 "country": "Netherlands",
57 "visits": 665,
58 "color": "#0D52D1"
59 }, {
60 "country": "Russia",
61 "visits": 580,
62 "color": "#2A0CD0"
63 }, {
64 "country": "South Korea",
65 "visits": 443,
66 "color": "#8A0CCF"
67 }, {
68 "country": "Canada",
69 "visits": 441,
70 "color": "#CD0D74"
71 }, {
72 "country": "Brazil",
73 "visits": 395,
74 "color": "#754DEB"
75 }, {
76 "country": "Italy",
77 "visits": 386,
78 "color": "#DDDDDD"
79 }, {
80 "country": "Australia",
81 "visits": 384,
82 "color": "#999999"
83 }, {
84 "country": "Taiwan",
85 "visits": 338,
86 "color": "#333333"
87 }, {
88 "country": "Poland",
89 "visits": 328,
90 "color": "#000000"
91 }];
92
93
94 var chart = AmCharts.makeChart("chartdiv", {
95 type: "serial",
96 dataProvider: chartData,
97 pathToImages: "../amcharts/images/",
98 categoryField: "country",
99 depth3D: 20,
100 angle: 30,
101
102 categoryAxis: {
103 labelRotation: 90,
104 gridPosition: "start"
105 },
106
107 valueAxes: [{
108 title: "Visitors"
109 }],
110
111 graphs: [{
112
113 valueField: "visits",
114 colorField: "color",
115 type: "column",
116 lineAlpha: 0,
117 fillAlphas: 1
118 }],
119
120 chartCursor: {
121 cursorAlpha: 0,
122 zoomable: false,
123 categoryBalloonEnabled: false
124 },
125
126 amExport: {
127 top: 21,
128 right: 21
129 }
130 });
131 </script>
132 </head>
133
134 <body>
135 <span style="font-family: Arial; font-size: 10; color: #CC0000;">
136 <p>Warning! Exporting to image works only if you view this file from web server. Exporting works with all modern browsers except IE9 (works fine with IE10)</p>
137 </span>
138 <div id="chartdiv" style="width: 100%; height: 400px;"></div>
139 </body>
140
141 </html>
samples/_usingThemes.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10 <script src="../amcharts/pie.js" type="text/javascript"></script>
11 <!-- theme files. you only need to include the theme you use.
12 feel free to modify themes and create your own themes -->
13 <script src="../amcharts/themes/light.js" type="text/javascript"></script>
14 <script src="../amcharts/themes/dark.js" type="text/javascript"></script>
15 <script src="../amcharts/themes/black.js" type="text/javascript"></script>
16 <script src="../amcharts/themes/chalk.js" type="text/javascript"></script>
17 <script src="../amcharts/themes/patterns.js" type="text/javascript"></script>
18 <script type="text/javascript">
19
20 // in order to set theme for a chart, all you need to include theme file
21 // located in amcharts/themes folder and set theme property for the chart.
22
23 var chart1;
24 var chart2;
25
26 makeCharts("light", "#FFFFFF");
27
28 // Theme can only be applied when creating chart instance - this means
29 // that if you need to change theme at run time, youhave to create whole
30 // chart object once again.
31
32 function makeCharts(theme, bgColor, bgImage){
33
34 if(chart1){
35 chart1.clear();
36 }
37 if(chart2){
38 chart2.clear();
39 }
40
41 // background
42 if(document.body){
43 document.body.style.backgroundColor = bgColor;
44 document.body.style.backgroundImage = "url(" + bgImage + ")";
45 }
46
47 // column chart
48 chart1 = AmCharts.makeChart("chartdiv1", {
49 type: "serial",
50 theme:theme,
51 dataProvider: [{
52 "year": 2005,
53 "income": 23.5,
54 "expenses": 18.1
55 }, {
56 "year": 2006,
57 "income": 26.2,
58 "expenses": 22.8
59 }, {
60 "year": 2007,
61 "income": 30.1,
62 "expenses": 23.9
63 }, {
64 "year": 2008,
65 "income": 29.5,
66 "expenses": 25.1
67 }, {
68 "year": 2009,
69 "income": 24.6,
70 "expenses": 25
71 }],
72 categoryField: "year",
73 startDuration: 1,
74
75 categoryAxis: {
76 gridPosition: "start"
77 },
78 valueAxes: [{
79 title: "Million USD"
80 }],
81 graphs: [{
82 type: "column",
83 title: "Income",
84 valueField: "income",
85 lineAlpha: 0,
86 fillAlphas: 0.8,
87 balloonText: "[[title]] in [[category]]:<b>[[value]]</b>"
88 }, {
89 type: "line",
90 title: "Expenses",
91 valueField: "expenses",
92 lineThickness: 2,
93 fillAlphas: 0,
94 bullet: "round",
95 balloonText: "[[title]] in [[category]]:<b>[[value]]</b>"
96 }],
97 legend: {
98 useGraphSettings: true
99 }
100
101 });
102
103 // pie chart
104 chart2 = AmCharts.makeChart("chartdiv2", {
105 type: "pie",
106 theme: theme,
107 dataProvider: [{
108 "country": "Czech Republic",
109 "litres": 156.9
110 }, {
111 "country": "Ireland",
112 "litres": 131.1
113 }, {
114 "country": "Germany",
115 "litres": 115.8
116 }, {
117 "country": "Australia",
118 "litres": 109.9
119 }, {
120 "country": "Austria",
121 "litres": 108.3
122 }, {
123 "country": "UK",
124 "litres": 65
125 }, {
126 "country": "Belgium",
127 "litres": 50
128 }],
129 titleField: "country",
130 valueField: "litres",
131 balloonText: "[[title]]<br><b>[[value]]</b> ([[percents]]%)",
132 legend: {
133 align: "center",
134 markerType: "circle"
135 }
136 });
137
138 }
139
140
141 </script>
142 </head>
143
144 <body style="font-size:15px;">Select theme:
145 <a href="#" onclick="makeCharts('light', '#ffffff');">Light</a> |
146 <a href="#" onclick="makeCharts('dark', '#282828')">Dark</a> |
147 <a href="#" onclick="makeCharts('black', '#222222')">Black</a> |
148 <a href="#" onclick="makeCharts('patterns', '#ffffff')">Patterns</a> |
149 <a href="#" onclick="makeCharts('chalk', '#282828', 'images/board.jpg')">Chalk</a>
150 <div id="chartdiv1" style="width: 600px; height: 400px;"></div>
151 <div id="chartdiv2" style="width: 600px; height: 400px;"></div>
152 </body>
153
154 </html>
samples/angularGauge.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/gauge.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart;
13 var arrow;
14 var axis;
15
16 AmCharts.ready(function () {
17 // create angular gauge
18 chart = new AmCharts.AmAngularGauge();
19 chart.addTitle("Speedometer");
20
21 // create axis
22 axis = new AmCharts.GaugeAxis();
23 axis.startValue = 0;
24 axis.axisThickness = 1;
25 axis.valueInterval = 10;
26 axis.endValue = 220;
27 // color bands
28 var band1 = new AmCharts.GaugeBand();
29 band1.startValue = 0;
30 band1.endValue = 90;
31 band1.color = "#00CC00";
32
33 var band2 = new AmCharts.GaugeBand();
34 band2.startValue = 90;
35 band2.endValue = 130;
36 band2.color = "#ffac29";
37
38 var band3 = new AmCharts.GaugeBand();
39 band3.startValue = 130;
40 band3.endValue = 220;
41 band3.color = "#ea3838";
42 band3.innerRadius = "95%";
43
44 axis.bands = [band1, band2, band3];
45
46 // bottom text
47 axis.bottomTextYOffset = -20;
48 axis.setBottomText("0 km/h");
49 chart.addAxis(axis);
50
51 // gauge arrow
52 arrow = new AmCharts.GaugeArrow();
53 chart.addArrow(arrow);
54
55 chart.write("chartdiv");
56 // change value every 2 seconds
57 setInterval(randomValue, 2000);
58 });
59
60 // set random value
61 function randomValue() {
62 var value = Math.round(Math.random() * 200);
63 arrow.setValue(value);
64 axis.setBottomText(value + " km/h");
65 }
66
67 </script>
68 </head>
69
70 <body>
71 <div id="chartdiv" style="width:500px; height:400px;"></div>
72 </body>
73
74 </html>
samples/angularGaugeWithTwoAxes.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/gauge.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart;
13 var arrow;
14 var axisKM;
15 var axisMiles;
16
17 AmCharts.ready(function () {
18
19 // create angular gauge
20 chart = new AmCharts.AmAngularGauge();
21 chart.radius = "45%";
22
23 // kilometers axis
24 axisKM = new AmCharts.GaugeAxis();
25 axisKM.startValue = 0;
26 axisKM.endValue = 240;
27 axisKM.radius = "100%";
28 axisKM.inside = false;
29 axisKM.gridInside = false;
30 axisKM.axisColor = "#94dca0";
31 axisKM.tickColor = "#94dca0";
32 axisKM.axisThickness = 3;
33 axisKM.valueInterval = 20;
34 chart.addAxis(axisKM);
35
36 // miles axis
37 axisMiles = new AmCharts.GaugeAxis();
38 axisMiles.startValue = 0;
39 axisMiles.endValue = 160;
40 axisMiles.radius = "80%";
41 axisMiles.axisColor = "#bebd61";
42 axisMiles.tickColor = "#bebd61";
43 axisMiles.axisThickness = 3;
44 axisMiles.valueInterval = 20;
45 chart.addAxis(axisMiles);
46
47 // arrow
48 arrow = new AmCharts.GaugeArrow();
49 arrow.radius = "85%";
50 arrow.color = "#8ec487";
51 arrow.innerRadius = 50;
52 arrow.nailRadius = 0;
53 chart.addArrow(arrow);
54
55 chart.write("chartdiv");
56 // update value every 2 seconds
57 setInterval(randomValue, 2000);
58 });
59
60 // set random value
61 function randomValue() {
62 var value = Math.round(Math.random() * 240);
63 arrow.setValue(value);
64 }
65
66
67 </script>
68 </head>
69
70 <body>
71 <div id="chartdiv" style="width:400px; height:400px;"></div>
72 </body>
73
74 </html>
samples/area100PercentStacked.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10 <script type="text/javascript">
11 var chart;
12
13 var chartData = [
14 {
15 "year": "1995",
16 "cars": 1567,
17 "motorcycles": 683,
18 "bicycles": 146
19 },
20 {
21 "year": "1996",
22 "cars": 1617,
23 "motorcycles": 691,
24 "bicycles": 138
25 },
26 {
27 "year": "1997",
28 "cars": 1630,
29 "motorcycles": 642,
30 "bicycles": 127
31 },
32 {
33 "year": "1998",
34 "cars": 1660,
35 "motorcycles": 699,
36 "bicycles": 105
37 },
38 {
39 "year": "1999",
40 "cars": 1683,
41 "motorcycles": 721,
42 "bicycles": 109
43 },
44 {
45 "year": "2000",
46 "cars": 1691,
47 "motorcycles": 737,
48 "bicycles": 112
49 },
50 {
51 "year": "2001",
52 "cars": 1298,
53 "motorcycles": 680,
54 "bicycles": 101
55 },
56 {
57 "year": "2002",
58 "cars": 1275,
59 "motorcycles": 664,
60 "bicycles": 97
61 },
62 {
63 "year": "2003",
64 "cars": 1246,
65 "motorcycles": 648,
66 "bicycles": 93
67 },
68 {
69 "year": "2004",
70 "cars": 1218,
71 "motorcycles": 637,
72 "bicycles": 101
73 },
74 {
75 "year": "2005",
76 "cars": 1213,
77 "motorcycles": 633,
78 "bicycles": 87
79 },
80 {
81 "year": "2006",
82 "cars": 1199,
83 "motorcycles": 621,
84 "bicycles": 79
85 },
86 {
87 "year": "2007",
88 "cars": 1110,
89 "motorcycles": 210,
90 "bicycles": 81
91 },
92 {
93 "year": "2008",
94 "cars": 1165,
95 "motorcycles": 232,
96 "bicycles": 75
97 },
98 {
99 "year": "2009",
100 "cars": 1145,
101 "motorcycles": 219,
102 "bicycles": 88
103 },
104 {
105 "year": "2010",
106 "cars": 1163,
107 "motorcycles": 201,
108 "bicycles": 82
109 },
110 {
111 "year": "2011",
112 "cars": 1180,
113 "motorcycles": 285,
114 "bicycles": 87
115 },
116 {
117 "year": "2012",
118 "cars": 1159,
119 "motorcycles": 277,
120 "bicycles": 71
121 }
122 ];
123
124 AmCharts.ready(function () {
125 // SERIAL CHART
126 chart = new AmCharts.AmSerialChart();
127 chart.pathToImages = "../amcharts/images/";
128 chart.dataProvider = chartData;
129 chart.categoryField = "year";
130
131 chart.addTitle("Traffic incidents per year", 15);
132
133 // AXES
134 // Category
135 var categoryAxis = chart.categoryAxis;
136 categoryAxis.gridAlpha = 0.07;
137 categoryAxis.axisColor = "#DADADA";
138 categoryAxis.startOnAxis = true;
139
140 // Value
141 var valueAxis = new AmCharts.ValueAxis();
142 valueAxis.title = "percent"; // this line makes the chart "stacked"
143 valueAxis.stackType = "100%";
144 valueAxis.gridAlpha = 0.07;
145 chart.addValueAxis(valueAxis);
146
147 // GRAPHS
148 // first graph
149 var graph = new AmCharts.AmGraph();
150 graph.type = "line"; // it's simple line graph
151 graph.title = "Cars";
152 graph.valueField = "cars";
153 graph.lineAlpha = 0;
154 graph.fillAlphas = 0.6; // setting fillAlphas to > 0 value makes it area graph
155 graph.balloonText = "<img src='images/car.png' style='vertical-align:bottom; margin-right: 10px; width:28px; height:21px;'><span style='font-size:14px; color:#000000;'><b>[[value]]</b></span>";
156 chart.addGraph(graph);
157
158 // second graph
159 graph = new AmCharts.AmGraph();
160 graph.type = "line";
161 graph.title = "Motorcycles";
162 graph.valueField = "motorcycles";
163 graph.lineAlpha = 0;
164 graph.fillAlphas = 0.6;
165 graph.balloonText = "<img src='images/motorcycle.png' style='vertical-align:bottom; margin-right: 10px; width:28px; height:21px;'><span style='font-size:14px; color:#000000;'><b>[[value]]</b></span>";
166 chart.addGraph(graph);
167
168 // third graph
169 graph = new AmCharts.AmGraph();
170 graph.type = "line";
171 graph.title = "Bicycles";
172 graph.valueField = "bicycles";
173 graph.lineAlpha = 0;
174 graph.fillAlphas = 0.6;
175 graph.balloonText = "<img src='images/bicycle.png' style='vertical-align:bottom; margin-right: 10px; width:28px; height:21px;'><span style='font-size:14px; color:#000000;'><b>[[value]]</b></span>";
176 chart.addGraph(graph);
177
178 // LEGEND
179 var legend = new AmCharts.AmLegend();
180 legend.align = "center";
181 legend.valueText = "[[value]] ([[percents]]%)";
182 legend.valueWidth = 100;
183 legend.valueAlign = "left";
184 legend.equalWidths = false;
185 legend.periodValueText = "total: [[value.sum]]"; // this is displayed when mouse is not over the chart.
186 chart.addLegend(legend);
187
188 // CURSOR
189 var chartCursor = new AmCharts.ChartCursor();
190 chartCursor.zoomable = false; // as the chart displayes not too many values, we disabled zooming
191 chartCursor.cursorAlpha = 0;
192 chart.addChartCursor(chartCursor);
193
194 // WRITE
195 chart.write("chartdiv");
196 });
197 </script>
198 </head>
199
200 <body>
201 <div id="chartdiv" style="width:100%; height:400px;"></div>
202 </body>
203
204 </html>
samples/areaStacked.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10 <script type="text/javascript">
11 var chart;
12
13 var chartData = [
14 {
15 "year": 1995,
16 "cars": 1567,
17 "motorcycles": 683,
18 "bicycles": 146
19 },
20 {
21 "year": 1996,
22 "cars": 1617,
23 "motorcycles": 691,
24 "bicycles": 138
25 },
26 {
27 "year": 1997,
28 "cars": 1630,
29 "motorcycles": 642,
30 "bicycles": 127
31 },
32 {
33 "year": 1998,
34 "cars": 1660,
35 "motorcycles": 699,
36 "bicycles": 105
37 },
38 {
39 "year": 1999,
40 "cars": 1683,
41 "motorcycles": 721,
42 "bicycles": 109
43 },
44 {
45 "year": 2000,
46 "cars": 1691,
47 "motorcycles": 737,
48 "bicycles": 112
49 },
50 {
51 "year": 2001,
52 "cars": 1298,
53 "motorcycles": 680,
54 "bicycles": 101
55 },
56 {
57 "year": 2002,
58 "cars": 1275,
59 "motorcycles": 664,
60 "bicycles": 97
61 },
62 {
63 "year": 2003,
64 "cars": 1246,
65 "motorcycles": 648,
66 "bicycles": 93
67 },
68 {
69 "year": 2004,
70 "cars": 1218,
71 "motorcycles": 637,
72 "bicycles": 101
73 },
74 {
75 "year": 2005,
76 "cars": 1213,
77 "motorcycles": 633,
78 "bicycles": 87
79 },
80 {
81 "year": 2006,
82 "cars": 1199,
83 "motorcycles": 621,
84 "bicycles": 79
85 },
86 {
87 "year": 2007,
88 "cars": 1110,
89 "motorcycles": 210,
90 "bicycles": 81
91 },
92 {
93 "year": 2008,
94 "cars": 1165,
95 "motorcycles": 232,
96 "bicycles": 75
97 },
98 {
99 "year": 2009,
100 "cars": 1145,
101 "motorcycles": 219,
102 "bicycles": 88
103 },
104 {
105 "year": 2010,
106 "cars": 1163,
107 "motorcycles": 201,
108 "bicycles": 82
109 },
110 {
111 "year": 2011,
112 "cars": 1180,
113 "motorcycles": 285,
114 "bicycles": 87
115 },
116 {
117 "year": 2012,
118 "cars": 1159,
119 "motorcycles": 277,
120 "bicycles": 71
121 }
122 ];
123
124 AmCharts.ready(function () {
125 // SERIAL CHART
126 chart = new AmCharts.AmSerialChart();
127 chart.pathToImages = "../amcharts/images/";
128 chart.dataProvider = chartData;
129 chart.marginTop = 10;
130 chart.categoryField = "year";
131
132 // AXES
133 // Category
134 var categoryAxis = chart.categoryAxis;
135 categoryAxis.gridAlpha = 0.07;
136 categoryAxis.axisColor = "#DADADA";
137 categoryAxis.startOnAxis = true;
138
139 // Value
140 var valueAxis = new AmCharts.ValueAxis();
141 valueAxis.stackType = "regular"; // this line makes the chart "stacked"
142 valueAxis.gridAlpha = 0.07;
143 valueAxis.title = "Traffic incidents";
144 chart.addValueAxis(valueAxis);
145
146 // GUIDES are vertical (can also be horizontal) lines (or areas) marking some event.
147 // first guide
148 var guide1 = new AmCharts.Guide();
149 guide1.category = "2001";
150 guide1.lineColor = "#CC0000";
151 guide1.lineAlpha = 1;
152 guide1.dashLength = 2;
153 guide1.inside = true;
154 guide1.labelRotation = 90;
155 guide1.label = "fines for speeding increased";
156 categoryAxis.addGuide(guide1);
157
158 // second guide
159 var guide2 = new AmCharts.Guide();
160 guide2.category = "2007";
161 guide2.lineColor = "#CC0000";
162 guide2.lineAlpha = 1;
163 guide2.dashLength = 2;
164 guide2.inside = true;
165 guide2.labelRotation = 90;
166 guide2.label = "motorcycle maintenance fee introduced";
167 categoryAxis.addGuide(guide2);
168
169
170 // GRAPHS
171 // first graph
172 var graph = new AmCharts.AmGraph();
173 graph.type = "line"; // it's simple line graph
174 graph.title = "Cars";
175 graph.valueField = "cars";
176 graph.lineAlpha = 0;
177 graph.fillAlphas = 0.6; // setting fillAlphas to > 0 value makes it area graph
178 graph.balloonText = "<img src='images/car.png' style='vertical-align:bottom; margin-right: 10px; width:28px; height:21px;'><span style='font-size:14px; color:#000000;'><b>[[value]]</b></span>";
179 graph.hidden = true;
180 chart.addGraph(graph);
181
182 // second graph
183 graph = new AmCharts.AmGraph();
184 graph.type = "line";
185 graph.title = "Motorcycles";
186 graph.valueField = "motorcycles";
187 graph.lineAlpha = 0;
188 graph.fillAlphas = 0.6;
189 graph.balloonText = "<img src='images/motorcycle.png' style='vertical-align:bottom; margin-right: 10px; width:28px; height:21px;'><span style='font-size:14px; color:#000000;'><b>[[value]]</b></span>";
190 chart.addGraph(graph);
191
192 // third graph
193 graph = new AmCharts.AmGraph();
194 graph.type = "line";
195 graph.title = "Bicycles";
196 graph.valueField = "bicycles";
197 graph.lineAlpha = 0;
198 graph.fillAlphas = 0.6;
199 graph.balloonText = "<img src='images/bicycle.png' style='vertical-align:bottom; margin-right: 10px; width:28px; height:21px;'><span style='font-size:14px; color:#000000;'><b>[[value]]</b></span>";
200 chart.addGraph(graph);
201
202 // LEGEND
203 var legend = new AmCharts.AmLegend();
204 legend.position = "top";
205 legend.valueText = "[[value]]";
206 legend.valueWidth = 100;
207 legend.valueAlign = "left";
208 legend.equalWidths = false;
209 legend.periodValueText = "total: [[value.sum]]"; // this is displayed when mouse is not over the chart.
210 chart.addLegend(legend);
211
212 // CURSOR
213 var chartCursor = new AmCharts.ChartCursor();
214 chartCursor.cursorAlpha = 0;
215 chart.addChartCursor(chartCursor);
216
217 // SCROLLBAR
218 var chartScrollbar = new AmCharts.ChartScrollbar();
219 chartScrollbar.color = "#FFFFFF";
220 chart.addChartScrollbar(chartScrollbar);
221
222 // WRITE
223 chart.write("chartdiv");
224 });
225 </script>
226 </head>
227
228 <body>
229 <div id="chartdiv" style="width:100%; height:400px;"></div>
230 </body>
231
232 </html>
samples/areaWithTimeBasedData.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10 <script type="text/javascript">
11 var chart;
12
13 var chartData = [];
14
15 AmCharts.ready(function () {
16 // first we generate some random data
17 generateChartData();
18
19 // SERIAL CHART
20 chart = new AmCharts.AmSerialChart();
21 chart.pathToImages = "../amcharts/images/";
22 chart.dataProvider = chartData;
23 chart.categoryField = "date";
24
25 // data updated event will be fired when chart is first displayed,
26 // also when data will be updated. We'll use it to set some
27 // initial zoom
28 chart.addListener("dataUpdated", zoomChart);
29
30 // AXES
31 // Category
32 var categoryAxis = chart.categoryAxis;
33 categoryAxis.parseDates = true; // in order char to understand dates, we should set parseDates to true
34 categoryAxis.minPeriod = "mm"; // as we have data with minute interval, we have to set "mm" here.
35 categoryAxis.gridAlpha = 0.07;
36 categoryAxis.axisColor = "#DADADA";
37
38 // Value
39 var valueAxis = new AmCharts.ValueAxis();
40 valueAxis.gridAlpha = 0.07;
41 valueAxis.title = "Unique visitors";
42 chart.addValueAxis(valueAxis);
43
44 // GRAPH
45 var graph = new AmCharts.AmGraph();
46 graph.type = "line"; // try to change it to "column"
47 graph.title = "red line";
48 graph.valueField = "visits";
49 graph.lineAlpha = 1;
50 graph.lineColor = "#d1cf2a";
51 graph.fillAlphas = 0.3; // setting fillAlphas to > 0 value makes it area graph
52 chart.addGraph(graph);
53
54 // CURSOR
55 var chartCursor = new AmCharts.ChartCursor();
56 chartCursor.cursorPosition = "mouse";
57 chartCursor.categoryBalloonDateFormat = "JJ:NN, DD MMMM";
58 chart.addChartCursor(chartCursor);
59
60 // SCROLLBAR
61 var chartScrollbar = new AmCharts.ChartScrollbar();
62
63 chart.addChartScrollbar(chartScrollbar);
64
65 // WRITE
66 chart.write("chartdiv");
67 });
68
69 // generate some random data, quite different range
70 function generateChartData() {
71 // current date
72 var firstDate = new Date();
73 // now set 1000 minutes back
74 firstDate.setMinutes(firstDate.getDate() - 1000);
75
76 // and generate 1000 data items
77 for (var i = 0; i < 1000; i++) {
78 var newDate = new Date(firstDate);
79 // each time we add one minute
80 newDate.setMinutes(newDate.getMinutes() + i);
81 // some random number
82 var visits = Math.round(Math.random() * 40) + 10;
83 // add data item to the array
84 chartData.push({
85 date: newDate,
86 visits: visits
87 });
88 }
89 }
90
91 // this method is called when chart is first inited as we listen for "dataUpdated" event
92 function zoomChart() {
93 // different zoom methods can be used - zoomToIndexes, zoomToDates, zoomToCategoryValues
94 chart.zoomToIndexes(chartData.length - 40, chartData.length - 1);
95 }
96 </script>
97 </head>
98
99 <body>
100 <div id="chartdiv" style="width:100%; height:400px;"></div>
101 </body>
102
103 </html>
samples/bar3D.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10 <script type="text/javascript">
11 var chart;
12
13 var chartData = [
14 {
15 "year": 2005,
16 "income": 23.5
17 },
18 {
19 "year": 2006,
20 "income": 26.2
21 },
22 {
23 "year": 2007,
24 "income": 30.1
25 },
26 {
27 "year": 2008,
28 "income": 29.5
29 },
30 {
31 "year": 2009,
32 "income": 24.6
33 }
34 ];
35
36
37 AmCharts.ready(function () {
38 // SERIAL CHART
39 chart = new AmCharts.AmSerialChart();
40 chart.dataProvider = chartData;
41 chart.categoryField = "year";
42 // this single line makes the chart a bar chart,
43 // try to set it to false - your bars will turn to columns
44 chart.rotate = true;
45 // the following two lines makes chart 3D
46 chart.depth3D = 20;
47 chart.angle = 30;
48
49 // AXES
50 // Category
51 var categoryAxis = chart.categoryAxis;
52 categoryAxis.gridPosition = "start";
53 categoryAxis.axisColor = "#DADADA";
54 categoryAxis.fillAlpha = 1;
55 categoryAxis.gridAlpha = 0;
56 categoryAxis.fillColor = "#FAFAFA";
57
58 // value
59 var valueAxis = new AmCharts.ValueAxis();
60 valueAxis.axisColor = "#DADADA";
61 valueAxis.title = "Income in millions, USD";
62 valueAxis.gridAlpha = 0.1;
63 chart.addValueAxis(valueAxis);
64
65 // GRAPH
66 var graph = new AmCharts.AmGraph();
67 graph.title = "Income";
68 graph.valueField = "income";
69 graph.type = "column";
70 graph.balloonText = "Income in [[category]]:[[value]]";
71 graph.lineAlpha = 0;
72 graph.fillColors = "#bf1c25";
73 graph.fillAlphas = 1;
74 chart.addGraph(graph);
75
76 chart.creditsPosition = "top-right";
77
78 // WRITE
79 chart.write("chartdiv");
80 });
81 </script>
82 </head>
83
84 <body>
85 <div id="chartdiv" style="width: 500px; height: 600px;"></div>
86 </body>
87
88 </html>
samples/barAndLineMix.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10 <script type="text/javascript">
11 var chart;
12
13 var chartData = [
14 {
15 "year": 2005,
16 "income": 23.5,
17 "expenses": 18.1
18 },
19 {
20 "year": 2006,
21 "income": 26.2,
22 "expenses": 22.8
23 },
24 {
25 "year": 2007,
26 "income": 30.1,
27 "expenses": 23.9
28 },
29 {
30 "year": 2008,
31 "income": 29.5,
32 "expenses": 25.1
33 },
34 {
35 "year": 2009,
36 "income": 24.6,
37 "expenses": 25
38 }
39 ];
40
41
42 AmCharts.ready(function () {
43 // SERIAL CHART
44 chart = new AmCharts.AmSerialChart();
45 chart.dataProvider = chartData;
46 chart.categoryField = "year";
47 chart.startDuration = 1;
48 chart.rotate = true;
49
50 // AXES
51 // category
52 var categoryAxis = chart.categoryAxis;
53 categoryAxis.gridPosition = "start";
54 categoryAxis.axisColor = "#DADADA";
55 categoryAxis.dashLength = 3;
56
57 // value
58 var valueAxis = new AmCharts.ValueAxis();
59 valueAxis.dashLength = 3;
60 valueAxis.axisAlpha = 0.2;
61 valueAxis.position = "top";
62 valueAxis.title = "Million USD";
63 valueAxis.minorGridEnabled = true;
64 valueAxis.minorGridAlpha = 0.08;
65 valueAxis.gridAlpha = 0.15;
66 chart.addValueAxis(valueAxis);
67
68 // GRAPHS
69 // column graph
70 var graph1 = new AmCharts.AmGraph();
71 graph1.type = "column";
72 graph1.title = "Income";
73 graph1.valueField = "income";
74 graph1.lineAlpha = 0;
75 graph1.fillColors = "#ADD981";
76 graph1.fillAlphas = 0.8;
77 graph1.balloonText = "<span style='font-size:13px;'>[[title]] in [[category]]:<b>[[value]]</b></span>";
78 chart.addGraph(graph1);
79
80 // line graph
81 var graph2 = new AmCharts.AmGraph();
82 graph2.type = "line";
83 graph2.lineColor = "#27c5ff";
84 graph2.bulletColor = "#FFFFFF";
85 graph2.bulletBorderColor = "#27c5ff";
86 graph2.bulletBorderThickness = 2;
87 graph2.bulletBorderAlpha = 1;
88 graph2.title = "Expenses";
89 graph2.valueField = "expenses";
90 graph2.lineThickness = 2;
91 graph2.bullet = "round";
92 graph2.fillAlphas = 0;
93 graph2.balloonText = "<span style='font-size:13px;'>[[title]] in [[category]]:<b>[[value]]</b></span>";
94 chart.addGraph(graph2);
95
96 // LEGEND
97 var legend = new AmCharts.AmLegend();
98 legend.useGraphSettings = true;
99 chart.addLegend(legend);
100
101 chart.creditsPosition = "top-right";
102
103 // WRITE
104 chart.write("chartdiv");
105 });
106 </script>
107 </head>
108
109 <body>
110 <div id="chartdiv" style="width: 500px; height: 600px;"></div>
111 </body>
112
113 </html>
samples/barClustered.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10 <script type="text/javascript">
11 var chart;
12
13 var chartData = [
14 {
15 "year": 2005,
16 "income": 23.5,
17 "expenses": 18.1
18 },
19 {
20 "year": 2006,
21 "income": 26.2,
22 "expenses": 22.8
23 },
24 {
25 "year": 2007,
26 "income": 30.1,
27 "expenses": 23.9
28 },
29 {
30 "year": 2008,
31 "income": 29.5,
32 "expenses": 25.1
33 },
34 {
35 "year": 2009,
36 "income": 24.6,
37 "expenses": 25
38 }
39 ];
40
41
42 AmCharts.ready(function () {
43 // SERIAL CHART
44 chart = new AmCharts.AmSerialChart();
45 chart.dataProvider = chartData;
46 chart.categoryField = "year";
47 chart.startDuration = 1;
48 chart.plotAreaBorderColor = "#DADADA";
49 chart.plotAreaBorderAlpha = 1;
50 // this single line makes the chart a bar chart
51 chart.rotate = true;
52
53 // AXES
54 // Category
55 var categoryAxis = chart.categoryAxis;
56 categoryAxis.gridPosition = "start";
57 categoryAxis.gridAlpha = 0.1;
58 categoryAxis.axisAlpha = 0;
59
60 // Value
61 var valueAxis = new AmCharts.ValueAxis();
62 valueAxis.axisAlpha = 0;
63 valueAxis.gridAlpha = 0.1;
64 valueAxis.position = "top";
65 chart.addValueAxis(valueAxis);
66
67 // GRAPHS
68 // first graph
69 var graph1 = new AmCharts.AmGraph();
70 graph1.type = "column";
71 graph1.title = "Income";
72 graph1.valueField = "income";
73 graph1.balloonText = "Income:[[value]]";
74 graph1.lineAlpha = 0;
75 graph1.fillColors = "#ADD981";
76 graph1.fillAlphas = 1;
77 chart.addGraph(graph1);
78
79 // second graph
80 var graph2 = new AmCharts.AmGraph();
81 graph2.type = "column";
82 graph2.title = "Expenses";
83 graph2.valueField = "expenses";
84 graph2.balloonText = "Expenses:[[value]]";
85 graph2.lineAlpha = 0;
86 graph2.fillColors = "#81acd9";
87 graph2.fillAlphas = 1;
88 chart.addGraph(graph2);
89
90 // LEGEND
91 var legend = new AmCharts.AmLegend();
92 chart.addLegend(legend);
93
94 chart.creditsPosition = "top-right";
95
96 // WRITE
97 chart.write("chartdiv");
98 });
99 </script>
100 </head>
101
102 <body>
103 <div id="chartdiv" style="width:500px; height:600px;"></div>
104 </body>
105
106 </html>
samples/barFloating.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10 <script type="text/javascript">
11 var chart;
12
13 var chartData = [
14 {
15 "name": "John",
16 "startTime": 8,
17 "endTime": 11,
18 "color": "#FF0F00"
19 },
20 {
21 "name": "Joe",
22 "startTime": 10,
23 "endTime": 13,
24 "color": "#FF9E01"
25 },
26 {
27 "name": "Susan",
28 "startTime": 11,
29 "endTime": 18,
30 "color": "#F8FF01"
31 },
32 {
33 "name": "Eaton",
34 "startTime": 15,
35 "endTime": 19,
36 "color": "#04D215"
37 }
38 ];
39
40
41 AmCharts.ready(function () {
42 // SERIAL CHART
43 chart = new AmCharts.AmSerialChart();
44 chart.dataProvider = chartData;
45 chart.categoryField = "name";
46 chart.rotate = true;
47 chart.columnWidth = 0.9;
48 chart.startDuration = 1;
49
50 // AXES
51 // Category
52 var categoryAxis = chart.categoryAxis;
53 categoryAxis.gridAlpha = 0.1;
54 categoryAxis.axisAlpha = 0;
55 categoryAxis.gridPosition = "start";
56
57 // Value
58 var valueAxis = new AmCharts.ValueAxis();
59 valueAxis.gridAlpha = 0.1;
60 valueAxis.axisAlpha = 0;
61 valueAxis.unit = ":00";
62 chart.addValueAxis(valueAxis);
63
64 // GRAPH
65 var graph = new AmCharts.AmGraph();
66 graph.valueField = "endTime";
67 graph.openField = "startTime";
68 graph.type = "column";
69 graph.lineAlpha = 0;
70 graph.colorField = "color";
71 graph.fillAlphas = 0.8;
72 graph.balloonText = "<b>[[category]]</b><br>starts at [[startTime]]:00<br>ends at [[endTime]]:00";
73 chart.addGraph(graph);
74
75 chart.creditsPosition = "top-right";
76
77 // WRITE
78 chart.write("chartdiv");
79 });
80 </script>
81 </head>
82
83 <body>
84 <div id="chartdiv" style="width: 100%; height: 400px;"></div>
85 </body>
86
87 </html>
samples/barStacked.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10 <script type="text/javascript">
11 var chart;
12
13 var chartData = [
14 {
15 "year": 2003,
16 "europe": 2.5,
17 "namerica": 2.5,
18 "asia": 2.1,
19 "lamerica": 0.3,
20 "meast": 0.2,
21 "africa": 0.1
22 },
23 {
24 "year": 2004,
25 "europe": 2.6,
26 "namerica": 2.7,
27 "asia": 2.2,
28 "lamerica": 0.3,
29 "meast": 0.3,
30 "africa": 0.1
31 },
32 {
33 "year": 2005,
34 "europe": 2.8,
35 "namerica": 2.9,
36 "asia": 2.4,
37 "lamerica": 0.3,
38 "meast": 0.3,
39 "africa": 0.1
40 }
41 ];
42
43 AmCharts.ready(function () {
44 // SERIALL CHART
45 chart = new AmCharts.AmSerialChart();
46 chart.dataProvider = chartData;
47 chart.categoryField = "year";
48 chart.plotAreaBorderAlpha = 0.2;
49 chart.rotate = true;
50
51 // AXES
52 // Category
53 var categoryAxis = chart.categoryAxis;
54 categoryAxis.gridAlpha = 0.1;
55 categoryAxis.axisAlpha = 0;
56 categoryAxis.gridPosition = "start";
57
58 // value
59 var valueAxis = new AmCharts.ValueAxis();
60 valueAxis.stackType = "regular";
61 valueAxis.gridAlpha = 0.1;
62 valueAxis.axisAlpha = 0;
63 chart.addValueAxis(valueAxis);
64
65 // GRAPHS
66 // firstgraph
67 var graph = new AmCharts.AmGraph();
68 graph.title = "Europe";
69 graph.labelText = "[[value]]";
70 graph.valueField = "europe";
71 graph.type = "column";
72 graph.lineAlpha = 0;
73 graph.fillAlphas = 1;
74 graph.lineColor = "#C72C95";
75 graph.balloonText = "<b><span style='color:#C72C95'>[[title]]</b></span><br><span style='font-size:14px'>[[category]]: <b>[[value]]</b></span>";
76 chart.addGraph(graph);
77
78 // second graph
79 graph = new AmCharts.AmGraph();
80 graph.title = "North America";
81 graph.labelText = "[[value]]";
82 graph.valueField = "namerica";
83 graph.type = "column";
84 graph.lineAlpha = 0;
85 graph.fillAlphas = 1;
86 graph.lineColor = "#D8E0BD";
87 graph.balloonText = "<b><span style='color:#afbb86'>[[title]]</b></span><br><span style='font-size:14px'>[[category]]: <b>[[value]]</b></span>";
88 chart.addGraph(graph);
89
90 // third graph
91 graph = new AmCharts.AmGraph();
92 graph.title = "Asia-Pacific";
93 graph.labelText = "[[value]]";
94 graph.valueField = "asia";
95 graph.type = "column";
96 graph.lineAlpha = 0;
97 graph.fillAlphas = 1;
98 graph.lineColor = "#B3DBD4";
99 graph.balloonText = "<b><span style='color:#74bdb0'>[[title]]</b></span><br><span style='font-size:14px'>[[category]]: <b>[[value]]</b></span>";
100 chart.addGraph(graph);
101
102 // fourth graph
103 graph = new AmCharts.AmGraph();
104 graph.title = "Latin America";
105 graph.labelText = "[[value]]";
106 graph.valueField = "lamerica";
107 graph.type = "column";
108 graph.lineAlpha = 0;
109 graph.fillAlphas = 1;
110 graph.lineColor = "#69A55C";
111 graph.balloonText = "<b><span style='color:#69A55C'>[[title]]</b></span><br><span style='font-size:14px'>[[category]]: <b>[[value]]</b></span>";
112 chart.addGraph(graph);
113
114 // fifth graph
115 graph = new AmCharts.AmGraph();
116 graph.title = "Middle-East";
117 graph.labelText = "[[value]]";
118 graph.valueField = "meast";
119 graph.type = "column";
120 graph.lineAlpha = 0;
121 graph.fillAlphas = 1;
122 graph.lineColor = "#B5B8D3";
123 graph.balloonText = "<b><span style='color:#7a81be'>[[title]]</b></span><br><span style='font-size:14px'>[[category]]: <b>[[value]]</b></span>";
124 chart.addGraph(graph);
125
126 // sixth graph
127 graph = new AmCharts.AmGraph();
128 graph.title = "Africa";
129 graph.labelText = "[[value]]";
130 graph.valueField = "africa";
131 graph.type = "column";
132 graph.lineAlpha = 0;
133 graph.fillAlphas = 1;
134 graph.lineColor = "#F4E23B";
135 graph.balloonText = "<b><span style='color:#c3b218'>[[title]]</b></span><br><span style='font-size:14px'>[[category]]: <b>[[value]]</b></span>";
136 chart.addGraph(graph);
137
138 // LEGEND
139 var legend = new AmCharts.AmLegend();
140 legend.position = "right";
141 legend.borderAlpha = 0.3;
142 legend.horizontalGap = 10;
143 legend.switchType = "v";
144 chart.addLegend(legend);
145
146 chart.creditsPosition = "top-right";
147
148 // WRITE
149 chart.write("chartdiv");
150 });
151
152 // Make chart 2D/3D
153 function setDepth() {
154 if (document.getElementById("rb1").checked) {
155 chart.depth3D = 0;
156 chart.angle = 0;
157 } else {
158 chart.depth3D = 20;
159 chart.angle = 30;
160 }
161 chart.validateNow();
162 }
163 </script>
164 </head>
165
166 <body>
167 <div id="chartdiv" style="width: 100%; height: 400px;"></div>
168 <div style="margin-left:40px;">
169 <input type="radio" checked="true" name="group" id="rb1" onclick="setDepth()">2D
170 <input type="radio" name="group" id="rb2" onclick="setDepth()">3D
171 </div>
172 </body>
173
174 </html>
samples/barWithBackgroundImage.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
8 <script src="../amcharts/serial.js" type="text/javascript"></script>
9
10 <script type="text/javascript">
11 var chart;
12
13 var chartData = [
14 {
15 "country": "Czech Republic",
16 "litres": 156.9,
17 "short": "CZ"
18 },
19 {
20 "country": "Ireland",
21 "litres": 131.1,
22 "short": "IR"
23 },
24 {
25 "country": "Germany",
26 "litres": 115.8,
27 "short": "DE"
28 },
29 {
30 "country": "Australia",
31 "litres": 109.9,
32 "short": "AU"
33 },
34 {
35 "country": "Austria",
36 "litres": 108.3,
37 "short": "AT"
38 },
39 {
40 "country": "UK",
41 "litres": 99,
42 "short": "UK"
43 },
44 {
45 "country": "Belgium",
46 "litres": 93,
47 "short": "BE"
48 }
49 ];
50
51 AmCharts.ready(function () {
52 // SERIAL CHART
53 var chart = new AmCharts.AmSerialChart();
54 chart.dataProvider = chartData;
55 chart.categoryField = "country";
56 chart.rotate = true;
57 chart.color = "#FFFFFF";
58 chart.handDrawn = true;
59 chart.handDrawScatter = 4;
60
61 // this line makes the chart to show image in the background
62 chart.backgroundImage = "images/bg.jpg";
63
64 // sometimes we need to set margins manually
65 // autoMargins should be set to false in order chart to use custom margin values
66 chart.autoMargins = false;
67 chart.marginTop = 100;
68 chart.marginLeft = 50;
69 chart.marginRight = 30;
70 chart.startDuration = 2;
71
72 // AXES
73 // category
74 var categoryAxis = chart.categoryAxis;
75 categoryAxis.gridAlpha = 0;
76 categoryAxis.axisAlpha = 0;
77 categoryAxis.labelsEnabled = false;
78
79 // value
80 var valueAxis = new AmCharts.ValueAxis();
81 valueAxis.gridAlpha = 0;
82 valueAxis.axisAlpha = 0;
83 valueAxis.labelsEnabled = false;
84 valueAxis.minimum = 0;
85 chart.addValueAxis(valueAxis);
86
87 // GRAPH
88 var graph = new AmCharts.AmGraph();
89 graph.balloonText = "[[category]]: [[value]]";
90 graph.valueField = "litres";
91 graph.type = "column";
92 graph.lineAlpha = 0;
93 graph.fillAlphas = 0.5;
94 // you can pass any number of colors in array to create more fancy gradients
95 graph.fillColors = ["#000000", "#FF6600"];
96 graph.gradientOrientation = "horizontal";
97 graph.labelPosition = "bottom";
98 graph.labelText = "[[category]]: [[value]] Litres";
99 graph.balloonText = "[[category]]: [[value]] Litres";
100 chart.addGraph(graph);
101
102 // LABEL
103 chart.addLabel(50, 40, "Beer Consumption by country", "left", 15, "#000000", 0, 1, true);
104
105 chart.creditsPosition = "bottom-right";
106
107 // WRITE
108 chart.write("chartdiv");
109 });
110 </script>
111 </head>
112
113 <body>
114 <div id="chartdiv" style="width: 520px; height: 400px;"></div>
115 </body>
116
117 </html>
samples/bulletChart.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart;
13
14 var chartData = [
15 {
16 "category": "Evaluation",
17 "excelent": 20,
18 "good": 20,
19 "average": 20,
20 "poor": 20,
21 "bad": 20,
22 "limit": 78,
23 "full": 100,
24 "bullet": 65
25 }
26 ];
27
28
29 AmCharts.ready(function () {
30
31 // FIRST BULLET CHART
32 // bullet chart is a simple serial chart
33 chart = new AmCharts.AmSerialChart();
34 chart.dataProvider = chartData;
35 chart.categoryField = "category";
36 chart.rotate = true; // if you want vertical bullet chart, set rotate to false
37 chart.columnWidth = 1;
38 chart.startDuration = 1;
39
40 // AXES
41 // category
42 var categoryAxis = chart.categoryAxis;
43 categoryAxis.gridAlpha = 0;
44
45 // value
46 var valueAxis = new AmCharts.ValueAxis();
47 valueAxis.maximum = 100;
48 valueAxis.axisAlpha = 1;
49 valueAxis.gridAlpha = 0;
50 valueAxis.stackType = "regular"; // we use stacked graphs to make color fills
51 chart.addValueAxis(valueAxis);
52
53 // this graph displays the short dash, which usually indicates maximum value reached.
54 var graph = new AmCharts.AmGraph();
55 graph.valueField = "limit";
56 graph.lineColor = "#000000";
57 // it's a step line with no risers
58 graph.type = "step";
59 graph.noStepRisers = true;
60 graph.lineAlpha = 1;
61 graph.lineThickness = 3;
62 graph.columnWidth = 0.5; // change this if you want wider dash
63 graph.stackable = false; // this graph shouldn't be stacked
64 chart.addGraph(graph);
65
66 // The following graphs produce color bands
67 graph = new AmCharts.AmGraph();
68 graph.valueField = "excelent";
69 graph.lineColor = "#19d228";
70 graph.showBalloon = false;
71 graph.type = "column";
72 graph.fillAlphas = 0.8;
73 chart.addGraph(graph);
74
75 graph = new AmCharts.AmGraph();
76 graph.valueField = "good";
77 graph.lineColor = "#b4dd1e";
78 graph.showBalloon = false;
79 graph.type = "column";
80 graph.fillAlphas = 0.8;
81 chart.addGraph(graph);
82
83 graph = new AmCharts.AmGraph();
84 graph.valueField = "average";
85 graph.lineColor = "#f4fb16";
86 graph.showBalloon = false;
87 graph.type = "column";
88 graph.fillAlphas = 0.8;
89 chart.addGraph(graph);
90
91 graph = new AmCharts.AmGraph();
92 graph.valueField = "poor";
93 graph.lineColor = "#f6d32b";
94 graph.showBalloon = false;
95 graph.type = "column";
96 graph.fillAlphas = 0.8;
97 chart.addGraph(graph);
98
99 graph = new AmCharts.AmGraph();
100 graph.valueField = "bad";
101 graph.lineColor = "#fb7116";
102 graph.showBalloon = false;
103 graph.type = "column";
104 graph.fillAlphas = 0.8;
105 chart.addGraph(graph);
106
107 // this is the "bullet" graph - black bar showing current value
108 graph = new AmCharts.AmGraph();
109 graph.valueField = "bullet";
110 graph.lineColor = "#000000";
111 graph.type = "column";
112 graph.lineAlpha = 1;
113 graph.fillAlphas = 1;
114 graph.columnWidth = 0.3; // this makes it narrower than color graphs
115 graph.stackable = false; // bullet graph should not stack
116 graph.clustered = false; // this makes the trick - one column above another
117 chart.addGraph(graph);
118
119 // WRITE
120 chart.write("chartdiv");
121
122
123
124 // SECOND BULLET CHART
125 // bullet chart is a simple serial chart
126 chart = new AmCharts.AmSerialChart();
127 chart.dataProvider = chartData;
128 chart.categoryField = "category";
129 chart.rotate = false; // if you want horizontal bullet chart, set rotate to true
130 chart.columnWidth = 1;
131 chart.startDuration = 1;
132
133
134 // AXES
135 // category
136 categoryAxis = chart.categoryAxis;
137 categoryAxis.gridAlpha = 0;
138
139 // value
140 valueAxis = new AmCharts.ValueAxis();
141 valueAxis.maximum = 100;
142 valueAxis.minimum = 0;
143 valueAxis.axisAlpha = 1;
144 valueAxis.gridAlpha = 0;
145 chart.addValueAxis(valueAxis);
146
147
148
149 // this graph displays the short dash, which usually indicates maximum value reached.
150 graph = new AmCharts.AmGraph();
151 graph.valueField = "limit";
152 graph.lineColor = "#000000";
153 graph.type = "step";
154 graph.noStepRisers = true;
155 graph.lineAlpha = 1;
156 graph.lineThickness = 3;
157 graph.columnWidth = 0.5;
158 graph.stackable = false;
159 chart.addGraph(graph);
160
161 // this is the color range graph.
162 // we use only one graph here (not like in the first example, and set gradient fill)
163 graph = new AmCharts.AmGraph();
164 graph.valueField = "full";
165 graph.showBalloon = false;
166 graph.type = "column";
167 graph.lineAlpha = 0;
168 graph.fillAlphas = 0.8;
169 graph.fillColors = ["#19d228", "#f6d32b", "#fb2316"];
170 graph.gradientOrientation = "vertical";
171 chart.addGraph(graph);
172
173 // this is the "bullet" graph - black bar showing current value
174 graph = new AmCharts.AmGraph();
175 graph.valueField = "bullet";
176 graph.lineColor = "#000000";
177 graph.type = "column";
178 graph.lineAlpha = 1;
179 graph.fillAlphas = 1;
180 graph.columnWidth = 0.3; // this makes it narrower than color graph
181 graph.clustered = false; // this makes the trick - one column above another
182 chart.addGraph(graph);
183
184 // WRITE
185 chart.write("chartdiv2");
186
187 });
188 </script>
189 </head>
190
191 <body>
192 <div id="chartdiv" style="width: 600px; height: 100px;"></div>
193 <div id="chartdiv2" style="width: 120px; height: 600px;"></div>
194 </body>
195 </html>
samples/candleStick.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart;
13 var graph;
14 var graphType = "candlestick";
15 var maxCandlesticks = 100;
16
17 var dataString = "2008-05-02,180.19,181.92,178.55,180.94\n2008-05-01,174.96,180.00,174.86,180.00\n2008-04-30,176.19,180.00,172.92,173.95\n2008-04-29,171.11,175.66,170.25,175.05\n2008-04-28,169.75,173.75,169.13,172.24\n2008-04-25,170.70,171.10,166.42,169.73\n2008-04-24,165.34,169.98,159.19,168.94\n2008-04-23,164.05,164.84,161.08,162.89\n2008-04-22,167.40,168.00,158.09,160.20\n2008-04-21,162.21,168.50,161.76,168.16\n2008-04-18,159.12,162.26,158.38,161.04\n2008-04-17,154.17,156.00,153.35,154.49\n2008-04-16,151.72,154.10,150.62,153.70\n2008-04-15,149.40,149.72,145.72,148.38\n2008-04-14,146.77,149.25,144.54,147.78\n2008-04-11,152.72,153.30,146.40,147.14\n2008-04-10,151.13,155.42,150.60,154.55\n2008-04-09,153.31,153.89,150.46,151.44\n2008-04-08,153.55,156.45,152.32,152.84\n2008-04-07,156.13,159.69,155.11,155.89\n2008-04-04,152.19,154.71,150.75,153.08\n2008-04-03,147.06,153.63,147.00,151.61\n2008-04-02,148.78,151.20,145.85,147.49\n2008-04-01,146.30,149.66,143.61,149.53\n2008-03-31,143.27,145.71,142.52,143.50\n2008-03-28,141.80,144.65,141.60,143.01\n2008-03-27,144.95,145.31,139.99,140.25\n2008-03-26,140.87,145.74,140.64,145.06\n2008-03-25,139.96,143.10,137.33,140.98\n2008-03-24,134.01,140.85,133.64,139.53\n2008-03-20,131.12,133.29,129.18,133.27\n2008-03-19,133.12,134.29,129.67,129.67\n2008-03-18,129.18,133.00,128.67,132.82\n2008-03-17,122.55,128.59,122.55,126.73\n2008-03-14,129.88,130.30,124.20,126.61\n2008-03-13,124.10,129.50,123.00,127.94\n2008-03-12,127.04,128.68,125.17,126.03\n2008-03-11,124.10,127.48,122.00,127.35\n2008-03-10,121.98,123.46,119.37,119.69\n2008-03-07,120.41,122.98,119.05,122.25\n2008-03-06,124.61,127.50,120.81,120.93\n2008-03-05,123.58,125.14,122.25,124.49\n2008-03-04,121.99,124.88,120.40,124.62\n2008-03-03,124.44,125.98,118.00,121.73\n2008-02-29,129.29,130.21,124.80,125.02\n2008-02-28,127.20,132.20,125.77,129.91\n2008-02-27,118.23,123.05,118.09,122.96\n2008-02-26,117.64,121.09,115.44,119.15\n2008-02-25,118.59,120.17,116.66,119.74\n2008-02-22,122.48,122.51,115.87,119.46\n2008-02-21,126.05,126.47,120.86,121.54\n2008-02-20,122.20,124.60,121.68,123.82\n2008-02-19,125.99,126.75,121.44,122.18\n2008-02-15,126.27,127.08,124.06,124.63\n2008-02-14,129.40,130.80,127.01,127.46\n2008-02-13,126.68,129.78,125.63,129.40\n2008-02-12,130.70,131.00,123.62,124.86\n2008-02-11,128.01,129.98,127.20,129.45\n2008-02-08,122.08,125.70,121.60,125.48\n2008-02-07,119.97,124.78,117.27,121.24\n2008-02-06,130.83,131.92,121.77,122.00\n2008-02-05,130.43,134.00,128.90,129.36\n2008-02-04,134.21,135.90,131.42,131.65\n2008-02-01,136.24,136.59,132.18,133.75\n2008-01-31,129.45,136.65,129.40,135.36\n2008-01-30,131.37,135.45,130.00,132.18\n2008-01-29,131.15,132.79,129.05,131.54\n2008-01-28,128.16,133.20,126.45,130.01\n2008-01-25,138.99,139.09,129.61,130.01\n2008-01-24,139.99,140.70,132.01,135.60\n2008-01-23,136.19,140.00,126.14,139.07\n2008-01-22,148.06,159.98,146.00,155.64\n2008-01-18,161.71,165.75,159.61,161.36\n2008-01-17,161.51,165.36,158.42,160.89\n2008-01-16,165.23,169.01,156.70,159.64\n2008-01-15,177.72,179.22,164.66,169.04\n2008-01-14,177.52,179.42,175.17,178.78\n2008-01-11,176.00,177.85,170.00,172.69\n2008-01-10,177.58,181.00,175.41,178.02\n2008-01-09,171.30,179.50,168.30,179.40\n2008-01-08,180.14,182.46,170.80,171.25\n2008-01-07,181.25,183.60,170.23,177.64\n2008-01-04,191.45,193.00,178.89,180.05\n2008-01-03,195.41,197.39,192.69,194.93\n2008-01-02,199.27,200.26,192.55,194.84\n2007-12-31,199.50,200.50,197.75,198.08\n2007-12-28,200.59,201.56,196.88,199.83\n2007-12-27,198.95,202.96,197.80,198.57\n2007-12-26,199.01,200.96,196.82,198.95\n2007-12-24,195.03,199.33,194.79,198.80\n2007-12-21,190.12,193.91,189.89,193.91\n2007-12-20,185.43,187.83,183.33,187.21\n2007-12-19,182.98,184.64,180.90,183.12\n2007-12-18,186.52,187.33,178.60,182.98\n2007-12-17,190.72,192.65,182.98,184.40\n2007-12-14,190.37,193.20,189.54,190.39\n2007-12-13,190.19,192.12,187.82,191.83\n2007-12-12,193.44,194.48,185.76,190.86\n2007-12-11,194.75,196.83,187.39,188.54\n2007-12-10,193.59,195.66,192.69,194.21\n2007-12-07,190.54,194.99,188.04,194.30\n2007-12-06,186.19,190.10,186.12,189.95\n2007-12-05,182.89,186.00,182.41,185.50\n2007-12-04,177.15,180.90,176.99,179.81\n2007-12-03,181.86,184.14,177.70,178.86\n2007-11-30,187.34,187.70,179.70,182.22\n2007-11-29,179.43,185.17,179.15,184.29\n2007-11-28,176.82,180.60,175.35,180.22\n2007-11-27,175.22,175.79,170.01,174.81\n2007-11-26,173.59,177.27,172.35,172.54\n2007-11-23,172.00,172.05,169.75,171.54\n2007-11-21,165.84,172.35,164.67,168.46\n2007-11-20,165.67,171.79,163.53,168.85\n2007-11-19,166.10,168.20,162.10,163.95\n2007-11-16,165.30,167.02,159.33,166.39\n2007-11-15,166.39,169.59,160.30,164.30\n2007-11-14,177.16,177.57,163.74,166.11\n2007-11-13,160.85,170.98,153.76,169.96\n2007-11-12,165.28,167.70,150.63,153.76\n2007-11-09,171.15,175.12,165.21,165.37\n2007-11-08,186.67,186.90,167.77,175.47\n2007-11-07,190.61,192.68,186.13,186.30\n2007-11-06,187.05,192.00,185.27,191.79\n2007-11-05,185.29,188.96,184.24,186.18\n2007-11-02,189.21,189.44,183.49,187.87\n2007-11-01,188.60,190.10,180.00,187.44\n2007-10-31,187.63,190.12,184.95,189.95\n2007-10-30,186.18,189.37,184.73,187.00\n2007-10-29,185.45,186.59,184.70,185.09\n2007-10-26,185.29,185.37,182.88,184.70\n2007-10-25,184.87,185.90,181.66,182.78\n2007-10-24,185.81,187.21,179.24,185.93\n2007-10-23,188.56,188.60,182.76,186.16\n2007-10-22,170.35,174.90,169.96,174.36\n2007-10-19,174.24,174.63,170.00,170.42\n2007-10-18,171.50,174.19,171.05,173.50\n2007-10-17,172.69,173.04,169.18,172.75\n2007-10-16,165.54,170.18,165.15,169.58\n2007-10-15,167.98,169.57,163.50,166.98\n2007-10-12,163.01,167.28,161.80,167.25\n2007-10-11,169.49,171.88,153.21,162.23\n2007-10-10,167.55,167.88,165.60,166.79\n2007-10-09,170.20,171.11,166.68,167.86\n2007-10-08,163.49,167.91,162.97,167.91\n2007-10-05,158.37,161.58,157.70,161.45\n2007-10-04,158.00,158.08,153.50,156.24\n2007-10-03,157.78,159.18,157.01,157.92\n2007-10-02,156.55,158.59,155.89,158.45\n2007-10-01,154.63,157.41,152.93,156.34\n2007-09-28,153.44,154.60,152.75,153.47\n2007-09-27,153.77,154.52,152.32,154.50\n2007-09-26,154.47,155.00,151.25,152.77\n2007-09-25,146.84,153.22,146.82,153.18\n2007-09-24,146.73,149.85,146.65,148.28\n2007-09-21,141.14,144.65,140.31,144.15\n2007-09-20,140.15,141.79,139.32,140.31\n2007-09-19,143.02,143.16,139.40,140.77\n2007-09-18,139.06,142.85,137.83,140.92\n2007-09-17,138.99,140.59,137.60,138.41\n2007-09-14,136.57,138.98,136.20,138.81\n2007-09-13,138.83,139.00,136.65,137.20\n2007-09-12,135.99,139.40,135.75,136.85\n2007-09-11,137.90,138.30,133.75,135.49\n2007-09-10,136.99,138.04,133.95,136.71\n2007-09-07,132.01,132.30,130.00,131.77\n2007-09-06,135.56,137.57,132.71,135.01\n2007-09-05,144.97,145.84,136.10,136.76\n2007-09-04,139.94,145.73,139.84,144.16\n2007-08-31,139.49,139.65,137.41,138.48\n2007-08-30,132.67,138.25,132.30,136.25\n2007-08-29,129.88,134.18,129.54,134.08\n2007-08-28,130.99,132.41,126.63,126.82\n2007-08-27,133.39,134.66,132.10,132.25\n2007-08-24,130.53,135.37,129.81,135.30\n2007-08-23,133.09,133.34,129.76,131.07\n2007-08-22,131.22,132.75,130.33,132.51\n2007-08-21,122.21,128.96,121.00,127.57\n2007-08-20,123.96,124.50,120.50,122.22\n2007-08-17,122.01,123.50,119.82,122.06\n2007-08-16,117.01,118.50,111.62,117.05\n2007-08-15,122.74,124.86,119.65,119.90\n2007-08-14,128.29,128.30,123.71,124.03\n2007-08-13,128.32,129.35,126.50,127.79\n2007-08-10,123.12,127.75,120.30,125.00\n2007-08-09,131.11,133.00,125.09,126.39\n2007-08-08,136.76,136.86,132.00,134.01\n2007-08-07,134.94,137.24,132.63,135.03\n2007-08-06,132.90,135.27,128.30,135.25\n2007-08-03,135.26,135.95,131.50,131.85\n2007-08-02,136.65,136.96,134.15,136.49";
18 var chartData = [];
19
20 AmCharts.ready(function () {
21 // first parse data string
22 parseData();
23
24 // SERIAL CHART
25 chart = new AmCharts.AmSerialChart();
26 chart.pathToImages = "../amcharts/images/";
27 chart.dataProvider = chartData;
28 chart.categoryField = "date";
29 // listen for dataUpdated event ad call "zoom" method then it happens
30 chart.addListener('dataUpdated', zoomChart);
31 // listen for zoomed event andcall "handleZoom" method then it happens
32 chart.addListener('zoomed', handleZoom);
33
34 // AXES
35 // category
36 var categoryAxis = chart.categoryAxis;
37 categoryAxis.parseDates = true; // as our data is date-based, we set this to true
38 categoryAxis.minPeriod = "DD"; // our data is daily, so we set minPeriod to "DD"
39 categoryAxis.dashLength = 1;
40 categoryAxis.tickLenght = 0;
41 categoryAxis.inside = true;
42
43 // value
44 var valueAxis = new AmCharts.ValueAxis();
45 valueAxis.dashLength = 1;
46 valueAxis.axisAlpha = 0;
47 chart.addValueAxis(valueAxis);
48
49 // GRAPH
50 graph = new AmCharts.AmGraph();
51 graph.title = "Price:";
52 // as candlestick graph looks bad when there are a lot of candlesticks, we set initial type to "line"
53 graph.type = "line";
54 // graph colors
55 graph.lineColor = "#7f8da9";
56 graph.fillColors = "#7f8da9";
57 graph.negativeLineColor = "#db4c3c";
58 graph.negativeFillColors = "#db4c3c";
59 graph.fillAlphas = 1;
60 // candlestick graph has 4 fields - open, low, high, close
61 graph.openField = "open";
62 graph.highField = "high";
63 graph.lowField = "low";
64 graph.closeField = "close";
65 graph.balloonText = "Open:<b>[[open]]</b><br>Low:<b>[[low]]</b><br>High:<b>[[high]]</b><br>Close:<b>[[close]]</b><br>";
66 // this one is for "line" graph type
67 graph.valueField = "close";
68
69 chart.addGraph(graph);
70
71 // CURSOR
72 var chartCursor = new AmCharts.ChartCursor();
73 chart.addChartCursor(chartCursor);
74
75 // SCROLLBAR
76 var chartScrollbar = new AmCharts.ChartScrollbar();
77 chartScrollbar.scrollbarHeight = 30;
78 chartScrollbar.graph = graph; // as we want graph to be displayed in the scrollbar, we set graph here
79 chartScrollbar.graphType = "line"; // we don't want candlesticks to be displayed in the scrollbar
80 chartScrollbar.gridCount = 4;
81 chartScrollbar.color = "#FFFFFF";
82 chart.addChartScrollbar(chartScrollbar);
83
84 // WRITE
85 chart.write("chartdiv");
86 });
87
88
89 // this method is called when chart is first inited as we listen for "dataUpdated" event
90 function zoomChart() {
91 // different zoom methods can be used - zoomToIndexes, zoomToDates, zoomToCategoryValues
92 chart.zoomToIndexes(chartData.length - 7, chartData.length - 1);
93 }
94
95 // this methid is called each time the selected period of the chart is changed
96 function handleZoom(event) {
97 var startDate = event.startDate;
98 var endDate = event.endDate;
99 document.getElementById("startDate").value = AmCharts.formatDate(startDate, "DD/MM/YYYY");
100 document.getElementById("endDate").value = AmCharts.formatDate(endDate, "DD/MM/YYYY");
101
102 // as we also want to change graph type depending on the selected period, we call this method
103 changeGraphType(event);
104 }
105
106 // changes graph type to line/candlestick, depending on the selected range
107 function changeGraphType(event) {
108 var startIndex = event.startIndex;
109 var endIndex = event.endIndex;
110
111 if (endIndex - startIndex > maxCandlesticks) {
112 // change graph type
113 if (graph.type != "line") {
114 graph.type = "line";
115 graph.fillAlphas = 0;
116 chart.validateNow();
117 }
118 } else {
119 // change graph type
120 if (graph.type != graphType) {
121 graph.type = graphType;
122 graph.fillAlphas = 1;
123 chart.validateNow();
124 }
125 }
126 }
127
128 // Parse data
129 function parseData() {
130 // split data string into array
131 var rowArray = dataString.split("\n");
132 // loop through this array and create data items
133 for (var i = rowArray.length - 1; i > -1; i--) {
134 var row = rowArray[i].split(",");
135 var dateArray = row[0].split("-");
136 // we have to subtract 1 from month, as months in javascript are zero-based
137 var date = new Date(Number(dateArray[0]), Number(dateArray[1]) - 1, Number(dateArray[2]));
138 var open = row[1];
139 var high = row[2];
140 var low = row[3];
141 var close = row[4];
142
143 chartData.push({
144 date: date,
145 open: open,
146 high: high,
147 low: low,
148 close: close
149 });
150 }
151 }
152
153 // this method converts string from input fields to date object
154 function stringToDate(str) {
155 var dArr = str.split("/");
156 var date = new Date(Number(dArr[2]), Number(dArr[1]) - 1, dArr[0]);
157 return date;
158 }
159
160 // this method is called when user changes dates in the input field
161 function changeZoomDates() {
162 var startDateString = document.getElementById("startDate").value;
163 var endDateString = document.getElementById("endDate").value;
164 var startDate = stringToDate(startDateString);
165 var endDate = stringToDate(endDateString);
166 chart.zoomToDates(startDate, endDate);
167 }
168 </script>
169 </head>
170
171 <body>
172 <div id="chartdiv" style="width:100%; height:400px;"></div>
173 <div style="float:right;margin-right:20px;">
174 <input onChange="changeZoomDates()" style="width:100px; text-align:center"
175 type="text" id="startDate">-
176 <input onChange="changeZoomDates()" style="width:100px; text-align:center"
177 type="text" id="endDate"></div>
178 </body>
179
180 </html>
samples/clock.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/gauge.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart;
13 var sArrow;
14 var mArrow;
15 var hArrow;
16
17 AmCharts.ready(function () {
18
19 // clock is just an angular gauge with three arrows
20 chart = new AmCharts.AmAngularGauge();
21 chart.startDuration = 0.3;
22
23 // for simplicyty, we use only one axis
24 var axis = new AmCharts.GaugeAxis();
25 axis.startValue = 0;
26 axis.endValue = 12;
27 axis.valueInterval = 1;
28 axis.minorTickInterval = 0.2;
29 axis.showFirstLabel = false;
30 axis.startAngle = 0;
31 axis.endAngle = 360;
32 axis.axisAlpha = 0.3;
33 chart.addAxis(axis);
34
35 // hour arrow
36 hArrow = new AmCharts.GaugeArrow();
37 hArrow.radius = "50%";
38 hArrow.clockWiseOnly = true;
39
40 // minutes arrow
41 mArrow = new AmCharts.GaugeArrow();
42 mArrow.radius = "80%";
43 mArrow.startWidth = 6;
44 mArrow.nailRadius = 0;
45 mArrow.clockWiseOnly = true;
46
47 // seconds arrow
48 sArrow = new AmCharts.GaugeArrow();
49 sArrow.radius = "90%";
50 sArrow.startWidth = 3;
51 sArrow.nailRadius = 4;
52 sArrow.color = "#CC0000";
53 sArrow.clockWiseOnly = true;
54
55 // update clock before adding arrows to avoid initial animation
56 updateClock();
57
58 // add arrows
59 chart.addArrow(hArrow);
60 chart.addArrow(mArrow);
61 chart.addArrow(sArrow);
62
63 chart.write("chartdiv");
64
65 // update each second
66 setInterval(updateClock, 1000);
67 });
68
69 // update clock
70 function updateClock() {
71 // get current date
72 var date = new Date();
73 var hours = date.getHours();
74 var minutes = date.getMinutes();
75 var seconds = date.getSeconds();
76
77 // set hours
78 hArrow.setValue(hours + minutes / 60);
79 // set minutes
80 mArrow.setValue(12 * (minutes + seconds / 60) / 60);
81 // set seconds
82 sArrow.setValue(12 * date.getSeconds() / 60);
83 }
84
85
86 </script>
87 </head>
88
89 <body>
90 <div id="chartdiv" style="width:300px; height:250px;"></div>
91 </body>
92
93 </html>
samples/clockWithTwoFaces.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/gauge.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12
13 var chart;
14 var sArrow;
15 var mArrow;
16 var hArrow;
17 var axis;
18
19 AmCharts.ready(function () {
20 // clock is just an angular gauge with three arrows
21 chart = new AmCharts.AmAngularGauge();
22 chart.startDuration = 0.3;
23
24 // main face
25 axis = new AmCharts.GaugeAxis();
26 axis.startValue = 0;
27 axis.endValue = 12;
28 axis.valueInterval = 1;
29 axis.minorTickInterval = 0.2;
30 axis.showFirstLabel = false;
31 axis.startAngle = 0;
32 axis.endAngle = 360;
33 axis.axisAlpha = 0.3;
34 chart.addAxis(axis);
35
36 // seconds face
37 var axis2 = new AmCharts.GaugeAxis();
38 axis2.startValue = 0;
39 axis2.endValue = 60;
40 axis2.valueInterval = 15;
41 axis2.minorTickInterval = 1;
42 axis2.showFirstLabel = false;
43 axis2.startAngle = 0;
44 axis2.endAngle = 360;
45 axis2.radius = 40;
46 axis2.centerY = 80;
47 axis2.inside = false;
48 axis2.axisAlpha = 0.3;
49 chart.addAxis(axis2);
50
51 // hour arrow
52 hArrow = new AmCharts.GaugeArrow();
53 hArrow.radius = "50%";
54 hArrow.clockWiseOnly = true;
55
56 // minutes arrow
57 mArrow = new AmCharts.GaugeArrow();
58 mArrow.radius = "90%";
59 mArrow.startWidth = 6;
60 mArrow.nailRadius = 0;
61 mArrow.clockWiseOnly = true;
62
63 // seconds arrow
64 sArrow = new AmCharts.GaugeArrow();
65 sArrow.axis = axis2; // this arrow uses different axis
66 sArrow.startWidth = 3;
67 sArrow.nailRadius = 4;
68 sArrow.color = "#CC0000";
69 sArrow.clockWiseOnly = true;
70
71
72 // update clock before adding arrows to avoid initial animation
73 updateClock();
74
75 // add arrows
76 chart.addArrow(hArrow);
77 chart.addArrow(mArrow);
78 chart.addArrow(sArrow);
79
80 chart.write("chartdiv");
81
82 // update clock every second
83 setInterval(updateClock, 1000);
84 });
85
86 // update clock
87 function updateClock() {
88 // get date
89 var date = new Date();
90 var hours = date.getHours();
91 var minutes = date.getMinutes();
92 var seconds = date.getSeconds();
93
94 // update hours
95 hArrow.setValue(hours + minutes / 60);
96 // update minutes
97 mArrow.setValue(12 * (minutes + seconds / 60) / 60);
98 // update seconds
99 sArrow.setValue(date.getSeconds());
100
101 // update date
102 var dateString = AmCharts.formatDate(date, "DD MMM, EEE");
103 axis.setTopText(dateString);
104 }
105
106
107 </script>
108 </head>
109
110 <body>
111 <div id="chartdiv" style="width:400px; height:400px;"></div>
112 </body>
113 </html>
samples/column100PercentStacked.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10 <script type="text/javascript">
11 var chart;
12
13 var chartData = [
14 {
15 "year": "2003",
16 "europe": 2.5,
17 "namerica": 2.5,
18 "asia": 2.1,
19 "lamerica": 0.3,
20 "meast": 0.2,
21 "africa": 0.1
22 },
23 {
24 "year": "2004",
25 "europe": 2.6,
26 "namerica": 2.7,
27 "asia": 2.2,
28 "lamerica": 0.3,
29 "meast": 0.3,
30 "africa": 0.1
31 },
32 {
33 "year": "2005",
34 "europe": 2.8,
35 "namerica": 2.9,
36 "asia": 2.4,
37 "lamerica": 0.3,
38 "meast": 0.3,
39 "africa": 0.1
40 }
41 ];
42
43 AmCharts.ready(function () {
44 // SERIAL CHART
45 chart = new AmCharts.AmSerialChart();
46 chart.dataProvider = chartData;
47 chart.categoryField = "year";
48
49 // sometimes we need to set margins manually
50 // autoMargins should be set to false in order chart to use custom margin values
51 chart.autoMargins = false;
52 chart.marginLeft = 0;
53 chart.marginRight = 0;
54 chart.marginTop = 30;
55 chart.marginBottom = 40;
56
57 // AXES
58 // category
59 var categoryAxis = chart.categoryAxis;
60 categoryAxis.gridAlpha = 0;
61 categoryAxis.axisAlpha = 0;
62 categoryAxis.gridPosition = "start";
63
64 // value
65 var valueAxis = new AmCharts.ValueAxis();
66 valueAxis.stackType = "100%"; // this line makes the chart 100% stacked
67 valueAxis.gridAlpha = 0;
68 valueAxis.axisAlpha = 0;
69 valueAxis.labelsEnabled = false;
70 chart.addValueAxis(valueAxis);
71
72 // GRAPHS
73 // first graph
74 var graph = new AmCharts.AmGraph();
75 graph.title = "Europe";
76 graph.labelText = "[[percents]]%";
77 graph.balloonText = "[[title]], [[category]]<br><span style='font-size:14px;'><b>[[value]]</b> ([[percents]]%)</span>";
78 graph.valueField = "europe";
79 graph.type = "column";
80 graph.lineAlpha = 0;
81 graph.fillAlphas = 1;
82 graph.lineColor = "#C72C95";
83 chart.addGraph(graph);
84
85 // second graph
86 graph = new AmCharts.AmGraph();
87 graph.title = "North America";
88 graph.labelText = "[[percents]]%";
89 graph.balloonText = "[[title]], [[category]]<br><span style='font-size:14px;'><b>[[value]]</b> ([[percents]]%)</span>";
90 graph.valueField = "namerica";
91 graph.type = "column";
92 graph.lineAlpha = 0;
93 graph.fillAlphas = 1;
94 graph.lineColor = "#D8E0BD";
95 chart.addGraph(graph);
96
97 // third graph
98 graph = new AmCharts.AmGraph();
99 graph.title = "Asia-Pacific";
100 graph.labelText = "[[percents]]%";
101 graph.balloonText = "[[title]], [[category]]<br><span style='font-size:14px;'><b>[[value]]</b> ([[percents]]%)</span>";
102 graph.valueField = "asia";
103 graph.type = "column";
104 graph.lineAlpha = 0;
105 graph.fillAlphas = 1;
106 graph.lineColor = "#B3DBD4";
107 chart.addGraph(graph);
108
109 // fourth graph
110 graph = new AmCharts.AmGraph();
111 graph.title = "Latin America";
112 graph.labelText = "[[percents]]%";
113 graph.balloonText = "[[title]], [[category]]<br><span style='font-size:14px;'><b>[[value]]</b> ([[percents]]%)</span>";
114 graph.valueField = "lamerica";
115 graph.type = "column";
116 graph.lineAlpha = 0;
117 graph.fillAlphas = 1;
118 graph.lineColor = "#69A55C";
119 chart.addGraph(graph);
120
121 // fifth graph
122 graph = new AmCharts.AmGraph();
123 graph.title = "Middle-East";
124 graph.labelText = "[[percents]]%";
125 graph.balloonText = "[[title]], [[category]]<br><span style='font-size:14px;'><b>[[value]]</b> ([[percents]]%)</span>";
126 graph.valueField = "meast";
127 graph.type = "column";
128 graph.lineAlpha = 0;
129 graph.fillAlphas = 1;
130 graph.lineColor = "#B5B8D3";
131 chart.addGraph(graph);
132
133 // sixth graph
134 graph = new AmCharts.AmGraph();
135 graph.title = "Africa";
136 graph.labelText = "[[percents]]%";
137 graph.balloonText = "[[title]], [[category]]<br><span style='font-size:14px;'><b>[[value]]</b> ([[percents]]%)</span>";
138 graph.valueField = "africa";
139 graph.type = "column";
140 graph.lineAlpha = 0;
141 graph.fillAlphas = 1;
142 graph.lineColor = "#F4E23B";
143 chart.addGraph(graph);
144
145 // LEGEND
146 var legend = new AmCharts.AmLegend();
147 legend.borderAlpha = 0.2;
148 legend.horizontalGap = 10;
149 legend.autoMargins = false;
150 legend.marginLeft = 20;
151 legend.marginRight = 20;
152 chart.addLegend(legend);
153
154 // WRITE
155 chart.write("chartdiv");
156 });
157
158 // this method makes chart 2D/3D
159 function setDepth() {
160 if (document.getElementById("rb1").checked) {
161 chart.depth3D = 0;
162 chart.angle = 0;
163 } else {
164 chart.depth3D = 25;
165 chart.angle = 30;
166 }
167 chart.validateNow();
168 }
169 </script>
170 </head>
171
172 <body>
173 <div id="chartdiv" style="width: 600px; height: 400px;"></div>
174 <div id="chartdiv" style="margin-left:15px; margin-top:10px;">
175 <input type="radio" checked="true" name="group" id="rb1" onclick="setDepth()">2D
176 <input type="radio" name="group" id="rb2" onclick="setDepth()">3D</div>
177 </body>
178
179 </html>
samples/column3D.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart;
13
14 var chartData = [
15 {
16 "country": "USA",
17 "visits": 4025,
18 "color": "#FF0F00"
19 },
20 {
21 "country": "China",
22 "visits": 1882,
23 "color": "#FF6600"
24 },
25 {
26 "country": "Japan",
27 "visits": 1809,
28 "color": "#FF9E01"
29 },
30 {
31 "country": "Germany",
32 "visits": 1322,
33 "color": "#FCD202"
34 },
35 {
36 "country": "UK",
37 "visits": 1122,
38 "color": "#F8FF01"
39 },
40 {
41 "country": "France",
42 "visits": 1114,
43 "color": "#B0DE09"
44 },
45 {
46 "country": "India",
47 "visits": 984,
48 "color": "#04D215"
49 },
50 {
51 "country": "Spain",
52 "visits": 711,
53 "color": "#0D8ECF"
54 },
55 {
56 "country": "Netherlands",
57 "visits": 665,
58 "color": "#0D52D1"
59 },
60 {
61 "country": "Russia",
62 "visits": 580,
63 "color": "#2A0CD0"
64 },
65 {
66 "country": "South Korea",
67 "visits": 443,
68 "color": "#8A0CCF"
69 },
70 {
71 "country": "Canada",
72 "visits": 441,
73 "color": "#CD0D74"
74 },
75 {
76 "country": "Brazil",
77 "visits": 395,
78 "color": "#754DEB"
79 },
80 {
81 "country": "Italy",
82 "visits": 386,
83 "color": "#DDDDDD"
84 },
85 {
86 "country": "Australia",
87 "visits": 384,
88 "color": "#999999"
89 },
90 {
91 "country": "Taiwan",
92 "visits": 338,
93 "color": "#333333"
94 },
95 {
96 "country": "Poland",
97 "visits": 328,
98 "color": "#000000"
99 }
100 ];
101
102
103 AmCharts.ready(function () {
104 // SERIAL CHART
105 chart = new AmCharts.AmSerialChart();
106 chart.dataProvider = chartData;
107 chart.categoryField = "country";
108 // the following two lines makes chart 3D
109 chart.depth3D = 20;
110 chart.angle = 30;
111
112 // AXES
113 // category
114 var categoryAxis = chart.categoryAxis;
115 categoryAxis.labelRotation = 90;
116 categoryAxis.dashLength = 5;
117 categoryAxis.gridPosition = "start";
118
119 // value
120 var valueAxis = new AmCharts.ValueAxis();
121 valueAxis.title = "Visitors";
122 valueAxis.dashLength = 5;
123 chart.addValueAxis(valueAxis);
124
125 // GRAPH
126 var graph = new AmCharts.AmGraph();
127 graph.valueField = "visits";
128 graph.colorField = "color";
129 graph.balloonText = "<span style='font-size:14px'>[[category]]: <b>[[value]]</b></span>";
130 graph.type = "column";
131 graph.lineAlpha = 0;
132 graph.fillAlphas = 1;
133 chart.addGraph(graph);
134
135 // CURSOR
136 var chartCursor = new AmCharts.ChartCursor();
137 chartCursor.cursorAlpha = 0;
138 chartCursor.zoomable = false;
139 chartCursor.categoryBalloonEnabled = false;
140 chart.addChartCursor(chartCursor);
141
142 chart.creditsPosition = "top-right";
143
144
145 // WRITE
146 chart.write("chartdiv");
147 });
148 </script>
149 </head>
150
151 <body>
152 <div id="chartdiv" style="width: 100%; height: 400px;"></div>
153 </body>
154
155 </html>
samples/column3DStacked.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart;
13
14 var chartData = [
15 {
16 "country": "USA",
17 "year2004": 3.5,
18 "year2005": 4.2
19 },
20 {
21 "country": "UK",
22 "year2004": 1.7,
23 "year2005": 3.1
24 },
25 {
26 "country": "Canada",
27 "year2004": 2.8,
28 "year2005": 2.9
29 },
30 {
31 "country": "Japan",
32 "year2004": 2.6,
33 "year2005": 2.3
34 },
35 {
36 "country": "France",
37 "year2004": 1.4,
38 "year2005": 2.1
39 },
40 {
41 "country": "Brazil",
42 "year2004": 2.6,
43 "year2005": 4.9
44 },
45 {
46 "country": "Russia",
47 "year2004": 6.4,
48 "year2005": 7.2
49 },
50 {
51 "country": "India",
52 "year2004": 8,
53 "year2005": 7.1
54 },
55 {
56 "country": "China",
57 "year2004": 9.9,
58 "year2005": 10.1
59 }
60 ];
61
62
63 AmCharts.ready(function () {
64 // SERIAL CHART
65 chart = new AmCharts.AmSerialChart();
66 chart.dataProvider = chartData;
67 chart.categoryField = "country";
68 chart.color = "#FFFFFF";
69 chart.fontSize = 14;
70 chart.startDuration = 1;
71 chart.plotAreaFillAlphas = 0.2;
72 // the following two lines makes chart 3D
73 chart.angle = 30;
74 chart.depth3D = 60;
75
76 // AXES
77 // category
78 var categoryAxis = chart.categoryAxis;
79 categoryAxis.gridAlpha = 0.2;
80 categoryAxis.gridPosition = "start";
81 categoryAxis.gridColor = "#FFFFFF";
82 categoryAxis.axisColor = "#FFFFFF";
83 categoryAxis.axisAlpha = 0.5;
84 categoryAxis.dashLength = 5;
85
86 // value
87 var valueAxis = new AmCharts.ValueAxis();
88 valueAxis.stackType = "3d"; // This line makes chart 3D stacked (columns are placed one behind another)
89 valueAxis.gridAlpha = 0.2;
90 valueAxis.gridColor = "#FFFFFF";
91 valueAxis.axisColor = "#FFFFFF";
92 valueAxis.axisAlpha = 0.5;
93 valueAxis.dashLength = 5;
94 valueAxis.title = "GDP growth rate";
95 valueAxis.titleColor = "#FFFFFF";
96 valueAxis.unit = "%";
97 chart.addValueAxis(valueAxis);
98
99 // GRAPHS
100 // first graph
101 var graph1 = new AmCharts.AmGraph();
102 graph1.title = "2004";
103 graph1.valueField = "year2004";
104 graph1.type = "column";
105 graph1.lineAlpha = 0;
106 graph1.lineColor = "#D2CB00";
107 graph1.fillAlphas = 1;
108 graph1.balloonText = "GDP grow in [[category]] (2004): <b>[[value]]</b>";
109 chart.addGraph(graph1);
110
111 // second graph
112 var graph2 = new AmCharts.AmGraph();
113 graph2.title = "2005";
114 graph2.valueField = "year2005";
115 graph2.type = "column";
116 graph2.lineAlpha = 0;
117 graph2.lineColor = "#BEDF66";
118 graph2.fillAlphas = 1;
119 graph2.balloonText = "GDP grow in [[category]] (2005): <b>[[value]]</b>";
120 chart.addGraph(graph2);
121
122 chart.write("chartdiv");
123 });
124 </script>
125 </head>
126
127 <body style="background-color:#000000;">
128 <div id="chartdiv" style="width: 100%; height: 400px;"></div>
129 </body>
130
131 </html>
samples/columnAndLineMix.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart;
13 var chartData = [
14 {
15 "year": 2009,
16 "income": 23.5,
17 "expenses": 18.1
18 },
19 {
20 "year": 2010,
21 "income": 26.2,
22 "expenses": 22.8
23 },
24 {
25 "year": 2011,
26 "income": 30.1,
27 "expenses": 23.9
28 },
29 {
30 "year": 2012,
31 "income": 29.5,
32 "expenses": 25.1
33 },
34 {
35 "year": 2013,
36 "income": 30.6,
37 "expenses": 27.2,
38 "dashLengthLine": 5
39 },
40 {
41 "year": 2014,
42 "income": 34.1,
43 "expenses": 29.9,
44 "dashLengthColumn": 5,
45 "alpha":0.2,
46 "additional":"(projection)"
47 }
48
49 ];
50
51
52 AmCharts.ready(function () {
53 // SERIAL CHART
54 chart = new AmCharts.AmSerialChart();
55 chart.pathToImages = "../amcharts/images/";
56 chart.dataProvider = chartData;
57 chart.categoryField = "year";
58 chart.startDuration = 1;
59
60 chart.handDrawn = true;
61 chart.handDrawnScatter = 3;
62
63 // AXES
64 // category
65 var categoryAxis = chart.categoryAxis;
66 categoryAxis.gridPosition = "start";
67
68 // value
69 var valueAxis = new AmCharts.ValueAxis();
70 valueAxis.axisAlpha = 0;
71 chart.addValueAxis(valueAxis);
72
73 // GRAPHS
74 // column graph
75 var graph1 = new AmCharts.AmGraph();
76 graph1.type = "column";
77 graph1.title = "Income";
78 graph1.lineColor = "#a668d5";
79 graph1.valueField = "income";
80 graph1.lineAlpha = 1;
81 graph1.fillAlphas = 1;
82 graph1.dashLengthField = "dashLengthColumn";
83 graph1.alphaField = "alpha";
84 graph1.balloonText = "<span style='font-size:13px;'>[[title]] in [[category]]:<b>[[value]]</b> [[additional]]</span>";
85 chart.addGraph(graph1);
86
87 // line
88 var graph2 = new AmCharts.AmGraph();
89 graph2.type = "line";
90 graph2.title = "Expenses";
91 graph2.lineColor = "#fcd202";
92 graph2.valueField = "expenses";
93 graph2.lineThickness = 3;
94 graph2.bullet = "round";
95 graph2.bulletBorderThickness = 3;
96 graph2.bulletBorderColor = "#fcd202";
97 graph2.bulletBorderAlpha = 1;
98 graph2.bulletColor = "#ffffff";
99 graph2.dashLengthField = "dashLengthLine";
100 graph2.balloonText = "<span style='font-size:13px;'>[[title]] in [[category]]:<b>[[value]]</b> [[additional]]</span>";
101 chart.addGraph(graph2);
102
103 // LEGEND
104 var legend = new AmCharts.AmLegend();
105 legend.useGraphSettings = true;
106 chart.addLegend(legend);
107
108 // WRITE
109 chart.write("chartdiv");
110 });
111 </script>
112 </head>
113
114 <body>
115 <div id="chartdiv" style="width:600px; height:400px;"></div>
116 </body>
117
118 </html>
samples/columnRotatedSeries.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart;
13
14 var chartData = [
15 {
16 "country": "USA",
17 "visits": 3025,
18 "color": "#FF0F00"
19 },
20 {
21 "country": "China",
22 "visits": 1882,
23 "color": "#FF6600"
24 },
25 {
26 "country": "Japan",
27 "visits": 1809,
28 "color": "#FF9E01"
29 },
30 {
31 "country": "Germany",
32 "visits": 1322,
33 "color": "#FCD202"
34 },
35 {
36 "country": "UK",
37 "visits": 1122,
38 "color": "#F8FF01"
39 },
40 {
41 "country": "France",
42 "visits": 1114,
43 "color": "#B0DE09"
44 },
45 {
46 "country": "India",
47 "visits": 984,
48 "color": "#04D215"
49 },
50 {
51 "country": "Spain",
52 "visits": 711,
53 "color": "#0D8ECF"
54 },
55 {
56 "country": "Netherlands",
57 "visits": 665,
58 "color": "#0D52D1"
59 },
60 {
61 "country": "Russia",
62 "visits": 580,
63 "color": "#2A0CD0"
64 },
65 {
66 "country": "South Korea",
67 "visits": 443,
68 "color": "#8A0CCF"
69 },
70 {
71 "country": "Canada",
72 "visits": 441,
73 "color": "#CD0D74"
74 }
75 ];
76
77
78 AmCharts.ready(function () {
79 // SERIAL CHART
80 chart = new AmCharts.AmSerialChart();
81 chart.dataProvider = chartData;
82 chart.categoryField = "country";
83 chart.startDuration = 1;
84
85 // AXES
86 // category
87 var categoryAxis = chart.categoryAxis;
88 categoryAxis.labelRotation = 45; // this line makes category values to be rotated
89 categoryAxis.gridAlpha = 0;
90 categoryAxis.fillAlpha = 1;
91 categoryAxis.fillColor = "#FAFAFA";
92 categoryAxis.gridPosition = "start";
93
94 // value
95 var valueAxis = new AmCharts.ValueAxis();
96 valueAxis.dashLength = 5;
97 valueAxis.title = "Visitors from country";
98 valueAxis.axisAlpha = 0;
99 chart.addValueAxis(valueAxis);
100
101 // GRAPH
102 var graph = new AmCharts.AmGraph();
103 graph.valueField = "visits";
104 graph.colorField = "color";
105 graph.balloonText = "<b>[[category]]: [[value]]</b>";
106 graph.type = "column";
107 graph.lineAlpha = 0;
108 graph.fillAlphas = 1;
109 chart.addGraph(graph);
110
111 // CURSOR
112 var chartCursor = new AmCharts.ChartCursor();
113 chartCursor.cursorAlpha = 0;
114 chartCursor.zoomable = false;
115 chartCursor.categoryBalloonEnabled = false;
116 chart.addChartCursor(chartCursor);
117
118 chart.creditsPosition = "top-right";
119
120 // WRITE
121 chart.write("chartdiv");
122 });
123 </script>
124 </head>
125
126 <body>
127 <div id="chartdiv" style="width: 600px; height: 400px;"></div>
128 </body>
129
130 </html>
samples/columnSimple.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart;
13
14 var chartData = [
15 {
16 "country": "USA",
17 "visits": 4025
18 },
19 {
20 "country": "China",
21 "visits": 1882
22 },
23 {
24 "country": "Japan",
25 "visits": 1809
26 },
27 {
28 "country": "Germany",
29 "visits": 1322
30 },
31 {
32 "country": "UK",
33 "visits": 1122
34 },
35 {
36 "country": "France",
37 "visits": 1114
38 },
39 {
40 "country": "India",
41 "visits": 984
42 },
43 {
44 "country": "Spain",
45 "visits": 711
46 },
47 {
48 "country": "Netherlands",
49 "visits": 665
50 },
51 {
52 "country": "Russia",
53 "visits": 580
54 },
55 {
56 "country": "South Korea",
57 "visits": 443
58 },
59 {
60 "country": "Canada",
61 "visits": 441
62 },
63 {
64 "country": "Brazil",
65 "visits": 395
66 },
67 {
68 "country": "Italy",
69 "visits": 386
70 },
71 {
72 "country": "Australia",
73 "visits": 384
74 },
75 {
76 "country": "Taiwan",
77 "visits": 338
78 },
79 {
80 "country": "Poland",
81 "visits": 328
82 }
83 ];
84
85
86 AmCharts.ready(function () {
87 // SERIAL CHART
88 chart = new AmCharts.AmSerialChart();
89 chart.dataProvider = chartData;
90 chart.categoryField = "country";
91 chart.startDuration = 1;
92
93 // AXES
94 // category
95 var categoryAxis = chart.categoryAxis;
96 categoryAxis.labelRotation = 90;
97 categoryAxis.gridPosition = "start";
98
99 // value
100 // in case you don't want to change default settings of value axis,
101 // you don't need to create it, as one value axis is created automatically.
102
103 // GRAPH
104 var graph = new AmCharts.AmGraph();
105 graph.valueField = "visits";
106 graph.balloonText = "[[category]]: <b>[[value]]</b>";
107 graph.type = "column";
108 graph.lineAlpha = 0;
109 graph.fillAlphas = 0.8;
110 chart.addGraph(graph);
111
112 // CURSOR
113 var chartCursor = new AmCharts.ChartCursor();
114 chartCursor.cursorAlpha = 0;
115 chartCursor.zoomable = false;
116 chartCursor.categoryBalloonEnabled = false;
117 chart.addChartCursor(chartCursor);
118
119 chart.creditsPosition = "top-right";
120
121 chart.write("chartdiv");
122 });
123 </script>
124 </head>
125
126 <body>
127 <div id="chartdiv" style="width: 100%; height: 400px;"></div>
128 </body>
129
130 </html>
samples/columnStacked.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart;
13
14 var chartData = [
15 {
16 "year": "2003",
17 "europe": 2.5,
18 "namerica": 2.5,
19 "asia": 2.1,
20 "lamerica": 0.3,
21 "meast": 0.2,
22 "africa": 0.1
23 },
24 {
25 "year": "2004",
26 "europe": 2.6,
27 "namerica": 2.7,
28 "asia": 2.2,
29 "lamerica": 0.3,
30 "meast": 0.3,
31 "africa": 0.1
32 },
33 {
34 "year": "2005",
35 "europe": 2.8,
36 "namerica": 2.9,
37 "asia": 2.4,
38 "lamerica": 0.3,
39 "meast": 0.3,
40 "africa": 0.1
41 }
42 ];
43
44 AmCharts.ready(function () {
45 // SERIAL CHART
46 chart = new AmCharts.AmSerialChart();
47 chart.dataProvider = chartData;
48 chart.categoryField = "year";
49 chart.plotAreaBorderAlpha = 0.2;
50
51 // AXES
52 // category
53 var categoryAxis = chart.categoryAxis;
54 categoryAxis.gridAlpha = 0.1;
55 categoryAxis.axisAlpha = 0;
56 categoryAxis.gridPosition = "start";
57
58 // value
59 var valueAxis = new AmCharts.ValueAxis();
60 valueAxis.stackType = "regular";
61 valueAxis.gridAlpha = 0.1;
62 valueAxis.axisAlpha = 0;
63 chart.addValueAxis(valueAxis);
64
65 // GRAPHS
66 // first graph
67 var graph = new AmCharts.AmGraph();
68 graph.title = "Europe";
69 graph.labelText = "[[value]]";
70 graph.valueField = "europe";
71 graph.type = "column";
72 graph.lineAlpha = 0;
73 graph.fillAlphas = 1;
74 graph.lineColor = "#C72C95";
75 graph.balloonText = "<span style='color:#555555;'>[[category]]</span><br><span style='font-size:14px'>[[title]]:<b>[[value]]</b></span>";
76 chart.addGraph(graph);
77
78 // second graph
79 graph = new AmCharts.AmGraph();
80 graph.title = "North America";
81 graph.labelText = "[[value]]";
82 graph.valueField = "namerica";
83 graph.type = "column";
84 graph.lineAlpha = 0;
85 graph.fillAlphas = 1;
86 graph.lineColor = "#D8E0BD";
87 graph.balloonText = "<span style='color:#555555;'>[[category]]</span><br><span style='font-size:14px'>[[title]]:<b>[[value]]</b></span>";
88 chart.addGraph(graph);
89
90 // third graph
91 graph = new AmCharts.AmGraph();
92 graph.title = "Asia-Pacific";
93 graph.labelText = "[[value]]";
94 graph.valueField = "asia";
95 graph.type = "column";
96 graph.lineAlpha = 0;
97 graph.fillAlphas = 1;
98 graph.lineColor = "#B3DBD4";
99 graph.balloonText = "<span style='color:#555555;'>[[category]]</span><br><span style='font-size:14px'>[[title]]:<b>[[value]]</b></span>";
100 chart.addGraph(graph);
101
102 // fourth graph
103 graph = new AmCharts.AmGraph();
104 graph.title = "Latin America";
105 graph.labelText = "[[value]]";
106 graph.valueField = "lamerica";
107 graph.type = "column";
108 graph.lineAlpha = 0;
109 graph.fillAlphas = 1;
110 graph.lineColor = "#69A55C";
111 graph.balloonText = "<span style='color:#555555;'>[[category]]</span><br><span style='font-size:14px'>[[title]]:<b>[[value]]</b></span>";
112 chart.addGraph(graph);
113
114 // fifth graph
115 graph = new AmCharts.AmGraph();
116 graph.title = "Middle-East";
117 graph.labelText = "[[value]]";
118 graph.valueField = "meast";
119 graph.type = "column";
120 graph.lineAlpha = 0;
121 graph.fillAlphas = 1;
122 graph.lineColor = "#B5B8D3";
123 graph.balloonText = "<span style='color:#555555;'>[[category]]</span><br><span style='font-size:14px'>[[title]]:<b>[[value]]</b></span>";
124 chart.addGraph(graph);
125
126 // sixth graph
127 graph = new AmCharts.AmGraph();
128 graph.title = "Africa";
129 graph.labelText = "[[value]]";
130 graph.valueField = "africa";
131 graph.type = "column";
132 graph.lineAlpha = 0;
133 graph.fillAlphas = 1;
134 graph.lineColor = "#F4E23B";
135 graph.balloonText = "<span style='color:#555555;'>[[category]]</span><br><span class='font-size:14px'>[[title]]:<b>[[value]]</b></span>";
136 chart.addGraph(graph);
137
138 // LEGEND
139 var legend = new AmCharts.AmLegend();
140 legend.borderAlpha = 0.2;
141 legend.horizontalGap = 10;
142 chart.addLegend(legend);
143
144 // WRITE
145 chart.write("chartdiv");
146 });
147
148 // this method sets chart 2D/3D
149 function setDepth() {
150 if (document.getElementById("rb1").checked) {
151 chart.depth3D = 0;
152 chart.angle = 0;
153 } else {
154 chart.depth3D = 25;
155 chart.angle = 30;
156 }
157 chart.validateNow();
158 }
159 </script>
160 </head>
161
162 <body>
163 <div id="chartdiv" style="width: 600px; height: 400px;"></div>
164 <div style="margin-left:30px;">
165 <input type="radio" checked="true" name="group" id="rb1" onclick="setDepth()">2D
166 <input type="radio" name="group" id="rb2" onclick="setDepth()">3D
167 </div>
168 </body>
169
170 </html>
samples/columnStackedAndClustered.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart;
13
14 var chartData = [
15 {
16 "year": "2003",
17 "europe": 2.5,
18 "namerica": 2.5,
19 "asia": 2.1,
20 "lamerica": 1.3,
21 "meast": 1.2,
22 "africa": 0.3
23 },
24 {
25 "year": "2004",
26 "europe": 2.6,
27 "namerica": 2.7,
28 "asia": 2.2,
29 "lamerica": 1.3,
30 "meast": 1.3,
31 "africa": 0.4
32 },
33 {
34 "year": "2005",
35 "europe": 2.8,
36 "namerica": 2.9,
37 "asia": 2.4,
38 "lamerica": 1.3,
39 "meast": 1.3,
40 "africa": 0.5
41 }
42 ];
43
44 AmCharts.ready(function () {
45 // SERIAL CHART
46 chart = new AmCharts.AmSerialChart();
47 chart.dataProvider = chartData;
48 chart.categoryField = "year";
49 chart.plotAreaBorderAlpha = 0.2;
50
51 // AXES
52 // category
53 var categoryAxis = chart.categoryAxis;
54 categoryAxis.gridAlpha = 0.1;
55 categoryAxis.axisAlpha = 0;
56 categoryAxis.gridPosition = "start";
57
58 // value
59 var valueAxis = new AmCharts.ValueAxis();
60 valueAxis.stackType = "regular";
61 valueAxis.gridAlpha = 0.1;
62 valueAxis.axisAlpha = 0;
63 chart.addValueAxis(valueAxis);
64
65 // GRAPHS
66 // first graph
67 var graph = new AmCharts.AmGraph();
68 graph.title = "Europe";
69 graph.labelText = "[[value]]";
70 graph.valueField = "europe";
71 graph.type = "column";
72 graph.lineAlpha = 0;
73 graph.fillAlphas = 1;
74 graph.lineColor = "#C72C95";
75 graph.balloonText = "<span style='color:#555555;'>[[category]]</span><br><span style='font-size:14px'>[[title]]:<b>[[value]]</b></span>";
76 chart.addGraph(graph);
77
78 // second graph
79 graph = new AmCharts.AmGraph();
80 graph.title = "North America";
81 graph.labelText = "[[value]]";
82 graph.valueField = "namerica";
83 graph.type = "column";
84 graph.lineAlpha = 0;
85 graph.fillAlphas = 1;
86 graph.lineColor = "#D8E0BD";
87 graph.balloonText = "<span style='color:#555555;'>[[category]]</span><br><span style='font-size:14px'>[[title]]:<b>[[value]]</b></span>";
88 chart.addGraph(graph);
89
90 // third graph
91 graph = new AmCharts.AmGraph();
92 graph.title = "Asia-Pacific";
93 graph.labelText = "[[value]]";
94 graph.valueField = "asia";
95 graph.type = "column";
96 graph.newStack = true; // this line starts new stack
97 graph.lineAlpha = 0;
98 graph.fillAlphas = 1;
99 graph.lineColor = "#B3DBD4";
100 graph.balloonText = "<span style='color:#555555;'>[[category]]</span><br><span style='font-size:14px'>[[title]]:<b>[[value]]</b></span>";
101 chart.addGraph(graph);
102
103 // fourth graph
104 graph = new AmCharts.AmGraph();
105 graph.title = "Latin America";
106 graph.labelText = "[[value]]";
107 graph.valueField = "lamerica";
108 graph.type = "column";
109 graph.lineAlpha = 0;
110 graph.fillAlphas = 1;
111 graph.lineColor = "#69A55C";
112 graph.balloonText = "<span style='color:#555555;'>[[category]]</span><br><span style='font-size:14px'>[[title]]:<b>[[value]]</b></span>";
113 chart.addGraph(graph);
114
115 // fifth graph
116 graph = new AmCharts.AmGraph();
117 graph.title = "Middle-East";
118 graph.labelText = "[[value]]";
119 graph.valueField = "meast";
120 graph.type = "column";
121 graph.lineAlpha = 0;
122 graph.fillAlphas = 1;
123 graph.lineColor = "#B5B8D3";
124 graph.balloonText = "<span style='color:#555555;'>[[category]]</span><br><span style='font-size:14px'>[[title]]:<b>[[value]]</b></span>";
125 chart.addGraph(graph);
126
127 // sixth graph
128 graph = new AmCharts.AmGraph();
129 graph.title = "Africa";
130 graph.labelText = "[[value]]";
131 graph.valueField = "africa";
132 graph.type = "column";
133 graph.lineAlpha = 0;
134 graph.fillAlphas = 1;
135 graph.lineColor = "#F4E23B";
136 graph.balloonText = "<span style='color:#555555;'>[[category]]</span><br><span class='font-size:14px'>[[title]]:<b>[[value]]</b></span>";
137 chart.addGraph(graph);
138
139 // LEGEND
140 var legend = new AmCharts.AmLegend();
141 legend.borderAlpha = 0.2;
142 legend.horizontalGap = 10;
143 chart.addLegend(legend);
144
145 // WRITE
146 chart.write("chartdiv");
147 });
148
149 // this method sets chart 2D/3D
150 function setDepth() {
151 if (document.getElementById("rb1").checked) {
152 chart.depth3D = 0;
153 chart.angle = 0;
154 } else {
155 chart.depth3D = 25;
156 chart.angle = 30;
157 }
158 chart.validateNow();
159 }
160 </script>
161 </head>
162
163 <body>
164 <div id="chartdiv" style="width: 600px; height: 400px;"></div>
165 <div style="margin-left:30px;">
166 <input type="radio" checked="true" name="group" id="rb1" onclick="setDepth()">2D
167 <input type="radio" name="group" id="rb2" onclick="setDepth()">3D
168 </div>
169 </body>
170
171 </html>
samples/columnWithGradientFills.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
8 <script src="../amcharts/serial.js" type="text/javascript"></script>
9
10 <script type="text/javascript">
11 var chart;
12
13 var chartData = [
14 {
15 "country": "Czech Republic",
16 "litres": 156.9,
17 "short": "CZ"
18 },
19 {
20 "country": "Ireland",
21 "litres": 131.1,
22 "short": "IR"
23 },
24 {
25 "country": "Germany",
26 "litres": 115.8,
27 "short": "DE"
28 },
29 {
30 "country": "Australia",
31 "litres": 109.9,
32 "short": "AU"
33 },
34 {
35 "country": "Austria",
36 "litres": 108.3,
37 "short": "AT"
38 },
39 {
40 "country": "UK",
41 "litres": 99,
42 "short": "UK"
43 },
44 {
45 "country": "Belgium",
46 "litres": 93,
47 "short": "BE"
48 }
49 ];
50
51 AmCharts.ready(function () {
52 // SERIAL CHART
53 var chart = new AmCharts.AmSerialChart();
54 chart.dataProvider = chartData;
55 chart.categoryField = "country";
56 chart.startDuration = 2;
57 // change balloon text color
58 chart.balloon.color = "#000000";
59
60 // AXES
61 // category
62 var categoryAxis = chart.categoryAxis;
63 categoryAxis.gridAlpha = 0;
64 categoryAxis.axisAlpha = 0;
65 categoryAxis.labelsEnabled = false;
66
67 // value
68 var valueAxis = new AmCharts.ValueAxis();
69 valueAxis.gridAlpha = 0;
70 valueAxis.axisAlpha = 0;
71 valueAxis.labelsEnabled = false;
72 valueAxis.minimum = 0;
73 chart.addValueAxis(valueAxis);
74
75 // GRAPH
76 var graph = new AmCharts.AmGraph();
77 graph.balloonText = "[[category]]: [[value]]";
78 graph.valueField = "litres";
79 graph.descriptionField = "short";
80 graph.type = "column";
81 graph.lineAlpha = 0;
82 graph.fillAlphas = 1;
83 graph.fillColors = ["#ffe78e", "#bf1c25"];
84 graph.labelText = "[[description]]";
85 graph.balloonText = "[[category]]: [[value]] Litres";
86 chart.addGraph(graph);
87
88 chart.creditsPosition = "top-right";
89
90 // WRITE
91 chart.write("chartdiv");
92 });
93 </script>
94 </head>
95
96 <body>
97 <div id="chartdiv" style="width: 520px; height: 400px;"></div>
98 </body>
99
100 </html>
samples/columnWithImages.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 // note, each data item has "bullet" field.
13 var columnChartData = [
14 {
15 "name": "John",
16 "points": 35654,
17 "color": "#7F8DA9",
18 "bullet": "images/0.gif"
19 },
20 {
21 "name": "Damon",
22 "points": 65456,
23 "color": "#FEC514",
24 "bullet": "images/1.gif"
25 },
26 {
27 "name": "Patrick",
28 "points": 45724,
29 "color": "#DB4C3C",
30 "bullet": "images/2.gif"
31 },
32 {
33 "name": "Mark",
34 "points": 13654,
35 "color": "#DAF0FD",
36 "bullet": "images/3.gif"
37 }
38 ];
39
40
41 AmCharts.ready(function () {
42 // SERIAL CHART
43 var chart = new AmCharts.AmSerialChart();
44 chart.dataProvider = columnChartData;
45 chart.categoryField = "name";
46 chart.startDuration = 1;
47 // sometimes we need to set margins manually
48 // autoMargins should be set to false in order chart to use custom margin values
49 chart.autoMargins = false;
50 chart.marginRight = 0;
51 chart.marginLeft = 0;
52 chart.marginBottom = 0;
53 chart.marginTop = 0;
54
55 // AXES
56 // category
57 var categoryAxis = chart.categoryAxis;
58 categoryAxis.inside = true;
59 categoryAxis.axisAlpha = 0;
60 categoryAxis.gridAlpha = 0;
61 categoryAxis.tickLength = 0;
62
63 // value
64 var valueAxis = new AmCharts.ValueAxis();
65 valueAxis.minimum = 0;
66 valueAxis.axisAlpha = 0;
67 valueAxis.maximum = 80000;
68 valueAxis.dashLength = 4;
69 chart.addValueAxis(valueAxis);
70
71 // GRAPH
72 var graph = new AmCharts.AmGraph();
73 graph.valueField = "points";
74 graph.customBulletField = "bullet"; // field of the bullet in data provider
75 graph.bulletOffset = 16; // distance from the top of the column to the bullet
76 graph.colorField = "color";
77 graph.bulletSize = 34; // bullet image should be rectangle (width = height)
78 graph.type = "column";
79 graph.fillAlphas = 0.8;
80 graph.cornerRadiusTop = 8;
81 graph.lineAlpha = 0;
82 graph.balloonText = "<span style='font-size:13px;'>[[category]]: <b>[[value]]</b></span>";
83 chart.addGraph(graph);
84
85 // WRITE
86 chart.write("chartdiv");
87 });
88 </script>
89 </head>
90
91 <body>
92 <div id="chartdiv" style="width: 520px; height: 400px;"></div>
93 </body>
94
95 </html>
samples/columnWithPatterns.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart;
13
14 var chartData = [
15 {
16 "country": "USA",
17 "visits": 4025,
18 "pattern": {"url":"../amcharts/patterns/black/pattern21.png", "width":4, "height":4, "color":"#CC0000"}
19 },
20 {
21 "country": "China",
22 "visits": 1882,
23 "pattern": {"url":"../amcharts/patterns/black/pattern20.png", "width":4, "height":4}
24 },
25 {
26 "country": "Japan",
27 "visits": 1809,
28 "pattern": {"url":"../amcharts/patterns/black/pattern19.png", "width":4, "height":4}
29 },
30 {
31 "country": "Germany",
32 "visits": 1322,
33 "pattern": {"url":"../amcharts/patterns/black/pattern18.png", "width":4, "height":4}
34 },
35 {
36 "country": "UK",
37 "visits": 1122,
38 "pattern": {"url":"../amcharts/patterns/black/pattern17.png", "width":4, "height":4}
39 },
40 {
41 "country": "France",
42 "visits": 1114,
43 "pattern": {"url":"../amcharts/patterns/black/pattern16.png", "width":4, "height":4}
44 },
45 {
46 "country": "India",
47 "visits": 984,
48 "pattern": {"url":"../amcharts/patterns/black/pattern15.png", "width":4, "height":4}
49 },
50 {
51 "country": "Spain",
52 "visits": 711,
53 "pattern": {"url":"../amcharts/patterns/black/pattern14.png", "width":4, "height":4}
54 }
55 ];
56
57
58 AmCharts.ready(function () {
59 // SERIAL CHART
60 chart = new AmCharts.AmSerialChart();
61 chart.dataProvider = chartData;
62 chart.categoryField = "country";
63
64 // AXES
65 // category
66 var categoryAxis = chart.categoryAxis;
67 categoryAxis.gridAlpha = 0;
68 categoryAxis.axisAlpha = 0;
69 categoryAxis.gridPosition = "start";
70
71 // value
72 var valueAxis = new AmCharts.ValueAxis();
73 valueAxis.axisAlpha = 0;
74 valueAxis.gridAlpha = 0;
75 chart.addValueAxis(valueAxis);
76
77 // GRAPH
78 var graph = new AmCharts.AmGraph();
79 graph.valueField = "visits";
80 graph.balloonText = "[[category]]: <b>[[value]]</b>";
81 graph.type = "column";
82 graph.lineAlpha = 0;
83 graph.lineColor = "#000000";
84 graph.fillAlphas = 0.8;
85 graph.patternField = "pattern";
86 chart.addGraph(graph);
87
88 // CURSOR
89 var chartCursor = new AmCharts.ChartCursor();
90 chartCursor.cursorAlpha = 0;
91 chartCursor.zoomable = false;
92 chartCursor.categoryBalloonEnabled = false;
93 chart.addChartCursor(chartCursor);
94
95 chart.creditsPosition = "top-right";
96
97 chart.write("chartdiv");
98 });
99 </script>
100 </head>
101
102 <body>
103 <div id="chartdiv" style="width: 100%; height: 400px;"></div>
104 </body>
105
106 </html>
samples/errorChart.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart;
13 var chartData = [
14 {
15 "year": 2005,
16 "value": 11.5,
17 "error": 5
18 },
19 {
20 "year": 2006,
21 "value": 26.2,
22 "error": 5
23 },
24 {
25 "year": 2007,
26 "value": 30.1,
27 "error": 5
28 },
29 {
30 "year": 2008,
31 "value": 29.5,
32 "error": 7
33 },
34 {
35 "year": 2009,
36 "value": 24.6,
37 "error": 10
38 }
39 ];
40
41
42 AmCharts.ready(function () {
43 // SERIAL CHART
44 chart = new AmCharts.AmSerialChart();
45 chart.pathToImages = "../amcharts/images/";
46 chart.dataProvider = chartData;
47 chart.categoryField = "year";
48 chart.startDuration = 1;
49 chart.balloon.textAlign = "left";
50
51 // AXES
52 // category
53 var categoryAxis = chart.categoryAxis;
54 categoryAxis.gridPosition = "start";
55 categoryAxis.dashLength = 3;
56 categoryAxis.axisAlpha = 0;
57
58 // value
59 var valueAxis = new AmCharts.ValueAxis();
60 valueAxis.axisAlpha = 0;
61 valueAxis.dashLength = 3;
62 chart.addValueAxis(valueAxis);
63
64 // GRAPHS
65 var graph1 = new AmCharts.AmGraph();
66 graph1.valueField = "value";
67 graph1.lineColor = "#ff339d";
68 graph1.lineThickness = 2;
69 graph1.bullet = "yError";
70 graph1.errorField = "error";
71 graph1.bulletSize = 10; // when bulletAxis is set, this property affects only width of error bar
72 graph1.bulletAxis = valueAxis;
73 graph1.balloonText = "value:<b>[[value]]</b><br>error:<b>[[error]]</b>";
74 chart.addGraph(graph1);
75
76 // one more graph added for circle bullets, as onew graph can show one bullet type only
77 var graph2 = new AmCharts.AmGraph();
78 graph2.valueField = "value";
79 graph2.lineColor = "#ff339d";
80 graph2.lineThickness = 2;
81 graph2.lineAlpha = 0;
82 graph2.bullet = "round";
83 graph2.bulletBorderThickness = 2;
84 graph2.bulletBorderColor = "#FFFFFF";
85 graph2.bulletBorderAlpha = 1;
86 graph2.showBalloon = false;
87 chart.addGraph(graph2);
88
89 // CURSOR
90 var chartCursor = new AmCharts.ChartCursor();
91 chartCursor.cursorAlpha = 0;
92 chartCursor.zoomable = false;
93 chartCursor.cursorPosition = "mouse";
94 chartCursor.graphBulletSize = 1;
95 chart.addChartCursor(chartCursor);
96
97 // WRITE
98 chart.write("chartdiv");
99 });
100 </script>
101 </head>
102
103 <body>
104 <div id="chartdiv" style="width:700px; height:400px;"></div>
105 </body>
106
107 </html>
samples/fillBetweenTwoLines.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 // since v3, chart can accept data in JSON format
13 // if your category axis parses dates, you should only
14 // set date format of your data (dataDateFormat property of AmSerialChart)
15 var chartData = [
16 {
17 "date": "2009-10-02",
18 "value": 5
19 },
20 {
21 "date": "2009-10-03",
22 "value": 15
23 },
24 {
25 "date": "2009-10-04",
26 "value": 13
27 },
28 {
29 "date": "2009-10-05",
30 "value": 17
31 },
32 {
33 "date": "2009-10-06",
34 "value": 15
35 },
36 {
37 "date": "2009-10-09",
38 "value": 19
39 },
40 {
41 "date": "2009-10-10",
42 "value": 21
43 },
44 {
45 "date": "2009-10-11",
46 "value": 20
47 },
48 {
49 "date": "2009-10-12",
50 "value": 20
51 },
52 {
53 "date": "2009-10-13",
54 "value": 19
55 },
56 {
57 "date": "2009-10-16",
58 "value": 25
59 },
60 {
61 "date": "2009-10-17",
62 "value": 24
63 },
64 {
65 "date": "2009-10-18",
66 "value": 26
67 },
68 {
69 "date": "2009-10-19",
70 "value": 27
71 },
72 {
73 "date": "2009-10-20",
74 "value": 25
75 },
76 {
77 "date": "2009-10-23",
78 "value": 29
79 },
80 {
81 "date": "2009-10-24",
82 "value": 28
83 },
84 {
85 "date": "2009-10-25",
86 "value": 30
87 },
88 {
89 "date": "2009-10-26",
90 "value": 72
91 },
92 {
93 "date": "2009-10-27",
94 "value": 43
95 },
96 {
97 "date": "2009-10-30",
98 "value": 31
99 },
100 {
101 "date": "2009-11-01",
102 "value": 30
103 },
104 {
105 "date": "2009-11-02",
106 "value": 29
107 },
108 {
109 "date": "2009-11-03",
110 "value": 27
111 },
112 {
113 "date": "2009-11-04",
114 "value": 26
115 }
116 ];
117
118 createFromToFields();
119
120 // create from/to field values programatically
121 function createFromToFields(){
122 for(var i = 0; i < chartData.length; i++){
123 var value = chartData[i].value;
124 chartData[i].fromValue = value - value * 0.2;
125 chartData[i].toValue = value + value * 0.2;
126 }
127 }
128
129
130 AmCharts.ready(function () {
131 var chart = new AmCharts.AmSerialChart();
132 chart.dataProvider = chartData;
133 chart.pathToImages = "../amcharts/images/";
134 chart.categoryField = "date";
135 chart.dataDateFormat = "YYYY-MM-DD";
136
137 // AXES
138 // category
139 var categoryAxis = chart.categoryAxis;
140 categoryAxis.parseDates = true; // as our data is date-based, we set parseDates to true
141 categoryAxis.minPeriod = "DD"; // our data is daily, so we set minPeriod to DD
142 categoryAxis.gridAlpha = 0;
143 categoryAxis.tickLength = 0;
144 categoryAxis.axisAlpha = 0;
145
146 // value
147 var valueAxis = new AmCharts.ValueAxis();
148 valueAxis.dashLength = 4;
149 valueAxis.axisAlpha = 0;
150 chart.addValueAxis(valueAxis);
151
152
153 // FROM GRAPH
154 var fromGraph = new AmCharts.AmGraph();
155 fromGraph.type = "line";
156 fromGraph.valueField = "fromValue";
157 fromGraph.lineAlpha = 0;
158 fromGraph.showBalloon = false;
159 chart.addGraph(fromGraph);
160
161 // TO GRAPH
162 var toGraph = new AmCharts.AmGraph();
163 toGraph.type = "line";
164 toGraph.valueField = "toValue";
165 toGraph.lineAlpha = 0;
166 toGraph.fillAlphas = 0.2;
167 toGraph.fillToGraph = fromGraph;
168 toGraph.showBalloon = false;
169 chart.addGraph(toGraph);
170
171
172 // GRAPH
173 var graph = new AmCharts.AmGraph();
174 graph.type = "line";
175 graph.valueField = "value";
176 graph.lineColor = "#000000";
177 chart.addGraph(graph);
178
179 // CURSOR
180 var chartCursor = new AmCharts.ChartCursor();
181 chart.addChartCursor(chartCursor);
182
183 chart.creditsPosition = "top-right";
184
185 // WRITE
186 chart.write("chartdiv");
187 });
188 </script>
189 </head>
190
191 <body>
192 <div id="chartdiv" style="width:100%; height:400px;"></div>
193 </body>
194
195 </html>
samples/funnelChart.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/funnel.js" type="text/javascript"></script>
10 <script type="text/javascript">
11
12 var chart;
13 var data = [
14 {
15 "title": "Website visits",
16 "value": 300
17 },
18 {
19 "title": "Downloads",
20 "value": 123
21 },
22 {
23 "title": "Requested price list",
24 "value": 98
25 },
26 {
27 "title": "Contaced for more info",
28 "value": 72
29 },
30 {
31 "title": "Purchased",
32 "value": 35
33 },
34 {
35 "title": "Contacted for support",
36 "value": 15
37 },
38 {
39 "title": "Purchased additional products",
40 "value": 8
41 }
42 ];
43
44 AmCharts.ready(function () {
45
46 chart = new AmCharts.AmFunnelChart();
47 chart.titleField = "title";
48 chart.balloon.cornerRadius = 0;
49 chart.marginRight = 220;
50 chart.marginLeft = 15;
51 chart.labelPosition = "right";
52 chart.funnelAlpha = 0.9;
53 chart.valueField = "value";
54 chart.dataProvider = data;
55 chart.startX = 0;
56 chart.balloon.animationTime = 0.2;
57 chart.neckWidth = "40%";
58 chart.startAlpha = 0;
59 chart.neckHeight = "30%";
60 chart.balloonText = "[[title]]:<b>[[value]]</b>";
61
62 chart.creditsPosition = "top-right";
63 chart.write("chartdiv");
64 });
65 </script>
66 </head>
67
68 <body>
69 <div id="chartdiv" style="width: 500px; height: 300px;"></div>
70 </body>
71
72 </html>
samples/handDrawnChart.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 AmCharts.ready(function () {
13 makeLineChart();
14 makeBarChart();
15 });
16
17
18 //// BAR CHART
19
20 var barChartData = [{
21 "continent": "Australia",
22 "river": "Darling",
23 "length": 2739
24 }, {
25 "continent": "Europe",
26 "river": "Volga",
27 "length": 3692
28 }, {
29 "continent": "North America",
30 "river": "Mississippi",
31 "length": 6275
32 }, {
33 "continent": "Asia",
34 "river": "Yangtze",
35 "length": 6300
36 }, {
37 "continent": "South America",
38 "river": "Amazon",
39 "length": 6400
40 }, {
41 "continent": "Africa",
42 "river": "Nile",
43 "length": 6650
44 }];
45
46 function makeBarChart() {
47 // SERIAL CHART
48 var chart = new AmCharts.AmSerialChart();
49 chart.dataProvider = barChartData;
50 chart.rotate = true;
51 chart.fontSize = 18;
52 chart.fontFamily = 'Covered By Your Grace';
53 chart.color = "#FFFFFF";
54 chart.categoryField = "continent";
55 chart.startDuration = 0;
56 chart.handDrawScatter = 3;
57 chart.columnWidth = 0.5;
58 chart.handDrawn = true;
59
60 var balloon = chart.balloon;
61 balloon.adjustBorderColor = false;
62 balloon.borderColor = "#000000";
63 balloon.fillColor = "#FFFFFF";
64 balloon.verticalPadding = 0;
65
66 var valueAxis = new AmCharts.ValueAxis();
67 valueAxis.minimum = 0;
68 valueAxis.axisColor = "#FFFFFF";
69 valueAxis.gridColor = "#FFFFFF";
70 chart.addValueAxis(valueAxis);
71
72 // AXES
73 // category
74 var categoryAxis = chart.categoryAxis;
75 categoryAxis.labelRotation = 90;
76 categoryAxis.gridPosition = "start";
77 categoryAxis.axisColor = "#FFFFFF";
78 categoryAxis.gridColor = "#FFFFFF";
79 categoryAxis.gridAlpha = 0;
80
81 // GRAPH
82 var graph = new AmCharts.AmGraph();
83 graph.valueField = "length";
84 graph.type = "column";
85 graph.balloonText = "<span style='font-size:14px'>[[category]]</span><br>[[river]]: [[value]] km.";
86 graph.lineAlpha = 0;
87 graph.lineColor = "#FFFFFF";
88 graph.fillAlphas = 0.8;
89 graph.lineThickness = 1;
90 graph.pattern = {
91 url: "../amcharts/patterns/chalk/pattern1.jpg",
92 width: 600,
93 height: 600,
94 randomY: 300
95 };
96 chart.addGraph(graph);
97
98 // CURSOR
99 var chartCursor = new AmCharts.ChartCursor();
100 chartCursor.cursorAlpha = 0;
101 chartCursor.zoomable = false;
102 chartCursor.categoryBalloonEnabled = false;
103 chart.addChartCursor(chartCursor);
104
105 chart.creditsPosition = "top-right";
106
107 chart.write("columnChartDiv");
108 }
109
110 function randomizeX() {
111 return Math.random() * 200;
112 }
113
114
115
116 //// LINE CHART
117
118 var lineChartData = [{
119 "continent": "Australia",
120 "mountain": "Kosciusko",
121 "height": 2228
122 }, {
123 "continent": "Africa",
124 "mountain": "Kilimanjaro",
125 "height": 5895
126 }, {
127 "continent": "Antarctica",
128 "mountain": "Aconcagua",
129 "height": 4897
130 },
131
132 {
133 "continent": "Europe",
134 "mountain": "Elbrus",
135 "height": 5642
136 }, {
137 "continent": "Asia",
138 "mountain": "Everest",
139 "height": 8850
140 },
141
142 {
143 "continent": "South America",
144 "mountain": "Aconcagua",
145 "height": 6960
146 }, {
147 "continent": "North America",
148 "mountain": "McKinley",
149 "height": 6194
150 }];
151
152
153 function makeLineChart() {
154 // SERIAL CHART
155 var lineChart = new AmCharts.AmSerialChart();
156 lineChart.dataProvider = lineChartData;
157 lineChart.fontSize = 18;
158 lineChart.fontFamily = 'Covered By Your Grace';
159 lineChart.color = "#FFFFFF";
160 lineChart.categoryField = "continent";
161 lineChart.marginLeft = 117;
162 lineChart.startDuration = 0;
163 lineChart.handDrawn = true;
164
165 lineChart.backgroundColor = "#2d2b2c";
166
167 var balloon = lineChart.balloon;
168 balloon.adjustBorderColor = false;
169 balloon.borderColor = "#000000";
170 balloon.fillColor = "#FFFFFF";
171 balloon.verticalPadding = 0;
172
173 var valueAxis = new AmCharts.ValueAxis();
174 valueAxis.minimum = 0;
175 valueAxis.ignoreAxisWidth = true;
176 valueAxis.axisColor = "#FFFFFF";
177 valueAxis.gridColor = "#FFFFFF";
178 lineChart.addValueAxis(valueAxis);
179
180 // AXES
181 // category
182 var categoryAxis = lineChart.categoryAxis;
183 categoryAxis.labelRotation = 90;
184 categoryAxis.gridPosition = "start";
185 categoryAxis.axisColor = "#FFFFFF";
186 categoryAxis.labelRotation = 45;
187 categoryAxis.gridAlpha = 0;
188
189 // GRAPH
190 var graph = new AmCharts.AmGraph();
191 graph.valueField = "height";
192 graph.balloonText = "<span style='font-size:14px'>[[category]]</span><br>[[mountain]]: [[value]] m.";
193 graph.lineAlpha = 1;
194 graph.lineColor = "#FFFFFF";
195 graph.fillAlphas = 0.8;
196 graph.lineThickness = 4;
197 graph.bullet = "round";
198 graph.pattern = {
199 url: "../amcharts/patterns/chalk/pattern2.jpg",
200 width: 600,
201 height: 600
202 };
203 lineChart.addGraph(graph);
204
205 // CURSOR
206 var chartCursor = new AmCharts.ChartCursor();
207 chartCursor.cursorAlpha = 0;
208 chartCursor.zoomable = false;
209 chartCursor.categoryBalloonEnabled = false;
210 lineChart.addChartCursor(chartCursor);
211
212 lineChart.write("lineChartDiv");
213
214 }
215
216
217 </script>
218 </head>
219
220 <body style="background-image: url('images/board.jpg')">
221 <div id="lineChartDiv" style="position:absolute;top:100px;left:0px; width:550px; height:350px;"></div>
222 <div id="columnChartDiv" style="position:absolute;top:100px;left:550px; width:550px; height:308px;"></div>
223 </body>
224
225 </html>
samples/images/0.gif

742 Bytes

samples/images/1.gif

369 Bytes

samples/images/2.gif

582 Bytes

samples/images/3.gif

753 Bytes

samples/images/bg.jpg

62.9 KB

samples/images/bgSky.jpg

27.1 KB

samples/images/bicycle.png

1.15 KB

samples/images/board.jpg

82 KB

samples/images/car.png

759 Bytes

samples/images/motorcycle.png

1020 Bytes

samples/images/redstar.png

596 Bytes

samples/images/star.png

595 Bytes

samples/lineSmoothed.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart;
13 var graph;
14
15 var chartData = [
16 {
17 "year": "1950",
18 "value": -0.307
19 },
20 {
21 "year": "1951",
22 "value": -0.168
23 },
24 {
25 "year": "1952",
26 "value": -0.073
27 },
28 {
29 "year": "1953",
30 "value": -0.027
31 },
32 {
33 "year": "1954",
34 "value": -0.251
35 },
36 {
37 "year": "1955",
38 "value": -0.281
39 },
40 {
41 "year": "1956",
42 "value": -0.348
43 },
44 {
45 "year": "1957",
46 "value": -0.074
47 },
48 {
49 "year": "1958",
50 "value": -0.011
51 },
52 {
53 "year": "1959",
54 "value": -0.074
55 },
56 {
57 "year": "1960",
58 "value": -0.124
59 },
60 {
61 "year": "1961",
62 "value": -0.024
63 },
64 {
65 "year": "1962",
66 "value": -0.022
67 },
68 {
69 "year": "1963",
70 "value": 0
71 },
72 {
73 "year": "1964",
74 "value": -0.296
75 },
76 {
77 "year": "1965",
78 "value": -0.217
79 },
80 {
81 "year": "1966",
82 "value": -0.147
83 },
84 {
85 "year": "1967",
86 "value": -0.15
87 },
88 {
89 "year": "1968",
90 "value": -0.16
91 },
92 {
93 "year": "1969",
94 "value": -0.011
95 },
96 {
97 "year": "1970",
98 "value": -0.068
99 },
100 {
101 "year": "1971",
102 "value": -0.19
103 },
104 {
105 "year": "1972",
106 "value": -0.056
107 },
108 {
109 "year": "1973",
110 "value": 0.077
111 },
112 {
113 "year": "1974",
114 "value": -0.213
115 },
116 {
117 "year": "1975",
118 "value": -0.17
119 },
120 {
121 "year": "1976",
122 "value": -0.254
123 },
124 {
125 "year": "1977",
126 "value": 0.019
127 },
128 {
129 "year": "1978",
130 "value": -0.063
131 },
132 {
133 "year": "1979",
134 "value": 0.05
135 },
136 {
137 "year": "1980",
138 "value": 0.077
139 },
140 {
141 "year": "1981",
142 "value": 0.12
143 },
144 {
145 "year": "1982",
146 "value": 0.011
147 },
148 {
149 "year": "1983",
150 "value": 0.177
151 },
152 {
153 "year": "1984",
154 "value": -0.021
155 },
156 {
157 "year": "1985",
158 "value": -0.037
159 },
160 {
161 "year": "1986",
162 "value": 0.03
163 },
164 {
165 "year": "1987",
166 "value": 0.179
167 },
168 {
169 "year": "1988",
170 "value": 0.18
171 },
172 {
173 "year": "1989",
174 "value": 0.104
175 },
176 {
177 "year": "1990",
178 "value": 0.255
179 },
180 {
181 "year": "1991",
182 "value": 0.21
183 },
184 {
185 "year": "1992",
186 "value": 0.065
187 },
188 {
189 "year": "1993",
190 "value": 0.11
191 },
192 {
193 "year": "1994",
194 "value": 0.172
195 },
196 {
197 "year": "1995",
198 "value": 0.269
199 },
200 {
201 "year": "1996",
202 "value": 0.141
203 },
204 {
205 "year": "1997",
206 "value": 0.353
207 },
208 {
209 "year": "1998",
210 "value": 0.548
211 },
212 {
213 "year": "1999",
214 "value": 0.298
215 },
216 {
217 "year": "2000",
218 "value": 0.267
219 },
220 {
221 "year": "2001",
222 "value": 0.411
223 },
224 {
225 "year": "2002",
226 "value": 0.462
227 },
228 {
229 "year": "2003",
230 "value": 0.47
231 },
232 {
233 "year": "2004",
234 "value": 0.445
235 },
236 {
237 "year": "2005",
238 "value": 0.47
239 }
240 ];
241
242
243 AmCharts.ready(function () {
244 // SERIAL CHART
245 chart = new AmCharts.AmSerialChart();
246 chart.pathToImages = "../amcharts/images/";
247 chart.dataProvider = chartData;
248 chart.marginLeft = 10;
249 chart.categoryField = "year";
250 chart.dataDateFormat = "YYYY";
251
252 // listen for "dataUpdated" event (fired when chart is inited) and call zoomChart method when it happens
253 chart.addListener("dataUpdated", zoomChart);
254
255 // AXES
256 // category
257 var categoryAxis = chart.categoryAxis;
258 categoryAxis.parseDates = true; // as our data is date-based, we set parseDates to true
259 categoryAxis.minPeriod = "YYYY"; // our data is yearly, so we set minPeriod to YYYY
260 categoryAxis.dashLength = 3;
261 categoryAxis.minorGridEnabled = true;
262 categoryAxis.minorGridAlpha = 0.1;
263
264 // value
265 var valueAxis = new AmCharts.ValueAxis();
266 valueAxis.axisAlpha = 0;
267 valueAxis.inside = true;
268 valueAxis.dashLength = 3;
269 chart.addValueAxis(valueAxis);
270
271 // GRAPH
272 graph = new AmCharts.AmGraph();
273 graph.type = "smoothedLine"; // this line makes the graph smoothed line.
274 graph.lineColor = "#d1655d";
275 graph.negativeLineColor = "#637bb6"; // this line makes the graph to change color when it drops below 0
276 graph.bullet = "round";
277 graph.bulletSize = 8;
278 graph.bulletBorderColor = "#FFFFFF";
279 graph.bulletBorderAlpha = 1;
280 graph.bulletBorderThickness = 2;
281 graph.lineThickness = 2;
282 graph.valueField = "value";
283 graph.balloonText = "[[category]]<br><b><span style='font-size:14px;'>[[value]]</span></b>";
284 chart.addGraph(graph);
285
286 // CURSOR
287 var chartCursor = new AmCharts.ChartCursor();
288 chartCursor.cursorAlpha = 0;
289 chartCursor.cursorPosition = "mouse";
290 chartCursor.categoryBalloonDateFormat = "YYYY";
291 chart.addChartCursor(chartCursor);
292
293 // SCROLLBAR
294 var chartScrollbar = new AmCharts.ChartScrollbar();
295 chart.addChartScrollbar(chartScrollbar);
296
297 chart.creditsPosition = "bottom-right";
298
299 // WRITE
300 chart.write("chartdiv");
301 });
302
303 // this method is called when chart is first inited as we listen for "dataUpdated" event
304 function zoomChart() {
305 // different zoom methods can be used - zoomToIndexes, zoomToDates, zoomToCategoryValues
306 chart.zoomToDates(new Date(1972, 0), new Date(1984, 0));
307 }
308 </script>
309 </head>
310
311 <body>
312 <div id="chartdiv" style="width:100%; height:400px;"></div>
313 </body>
314
315 </html>
samples/lineStep.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart;
13 var graph;
14
15 // months in JS are zero-based, 0 means January
16 var chartData = [
17 {
18 "year": "1950",
19 "value": -0.307
20 },
21 {
22 "year": "1951",
23 "value": -0.168
24 },
25 {
26 "year": "1952",
27 "value": -0.073
28 },
29 {
30 "year": "1953",
31 "value": -0.027
32 },
33 {
34 "year": "1954",
35 "value": -0.251
36 },
37 {
38 "year": "1955",
39 "value": -0.281
40 },
41 {
42 "year": "1956",
43 "value": -0.348
44 },
45 {
46 "year": "1957",
47 "value": -0.074
48 },
49 {
50 "year": "1958",
51 "value": -0.011
52 },
53 {
54 "year": "1959",
55 "value": -0.074
56 },
57 {
58 "year": "1960",
59 "value": -0.124
60 },
61 {
62 "year": "1961",
63 "value": -0.024
64 },
65 {
66 "year": "1962",
67 "value": -0.022
68 },
69 {
70 "year": "1963",
71 "value": 0
72 },
73 {
74 "year": "1964",
75 "value": -0.296
76 },
77 {
78 "year": "1965",
79 "value": -0.217
80 },
81 {
82 "year": "1966",
83 "value": -0.147
84 },
85 {
86 "year": "1967",
87 "value": -0.15
88 },
89 {
90 "year": "1968",
91 "value": -0.16
92 },
93 {
94 "year": "1969",
95 "value": -0.011
96 },
97 {
98 "year": "1970",
99 "value": -0.068
100 },
101 {
102 "year": "1971",
103 "value": -0.19
104 },
105 {
106 "year": "1972",
107 "value": -0.056
108 },
109 {
110 "year": "1973",
111 "value": 0.077
112 },
113 {
114 "year": "1974",
115 "value": -0.213
116 },
117 {
118 "year": "1975",
119 "value": -0.17
120 },
121 {
122 "year": "1976",
123 "value": -0.254
124 },
125 {
126 "year": "1977",
127 "value": 0.019
128 },
129 {
130 "year": "1978",
131 "value": -0.063
132 },
133 {
134 "year": "1979",
135 "value": 0.05
136 },
137 {
138 "year": "1980",
139 "value": 0.077
140 },
141 {
142 "year": "1981",
143 "value": 0.12
144 },
145 {
146 "year": "1982",
147 "value": 0.011
148 },
149 {
150 "year": "1983",
151 "value": 0.177
152 },
153 {
154 "year": "1984",
155 "value": -0.021
156 },
157 {
158 "year": "1985",
159 "value": -0.037
160 },
161 {
162 "year": "1986",
163 "value": 0.03
164 },
165 {
166 "year": "1987",
167 "value": 0.179
168 },
169 {
170 "year": "1988",
171 "value": 0.18
172 },
173 {
174 "year": "1989",
175 "value": 0.104
176 },
177 {
178 "year": "1990",
179 "value": 0.255
180 },
181 {
182 "year": "1991",
183 "value": 0.21
184 },
185 {
186 "year": "1992",
187 "value": 0.065
188 },
189 {
190 "year": "1993",
191 "value": 0.11
192 },
193 {
194 "year": "1994",
195 "value": 0.172
196 },
197 {
198 "year": "1995",
199 "value": 0.269
200 },
201 {
202 "year": "1996",
203 "value": 0.141
204 },
205 {
206 "year": "1997",
207 "value": 0.353
208 },
209 {
210 "year": "1998",
211 "value": 0.548
212 },
213 {
214 "year": "1999",
215 "value": 0.298
216 },
217 {
218 "year": "2000",
219 "value": 0.267
220 },
221 {
222 "year": "2001",
223 "value": 0.411
224 },
225 {
226 "year": "2002",
227 "value": 0.462
228 },
229 {
230 "year": "2003",
231 "value": 0.47
232 },
233 {
234 "year": "2004",
235 "value": 0.445
236 },
237 {
238 "year": "2005",
239 "value": 0.47
240 }
241 ];
242
243
244 AmCharts.ready(function () {
245 // SERIAL CHART
246 chart = new AmCharts.AmSerialChart();
247 chart.pathToImages = "../amcharts/images/";
248 chart.marginRight = 10;
249 chart.dataProvider = chartData;
250 chart.categoryField = "year";
251 chart.dataDateFormat = "YYYY";
252
253 // AXES
254 // Category
255 var categoryAxis = chart.categoryAxis;
256 categoryAxis.parseDates = true; // as our data is date-based, we set parseDates to true
257 categoryAxis.minPeriod = "YYYY"; // our data is yearly, so we set minPeriod to YYYY
258 categoryAxis.minorGridEnabled = true;
259 categoryAxis.minorGridAlpha = 0.15;
260
261 // VALUE
262 var valueAxis = new AmCharts.ValueAxis();
263 valueAxis.gridAlpha = 0;
264 valueAxis.axisAlpha = 0;
265 valueAxis.fillColor = "#000000";
266 valueAxis.fillAlpha = 0.05;
267 valueAxis.inside = true;
268 chart.addValueAxis(valueAxis);
269
270 // GRAPH
271 graph = new AmCharts.AmGraph();
272 graph.type = "step"; // this line makes step graph
273 graph.valueField = "value";
274 graph.lineColor = "#000000";
275 graph.balloonText = "[[category]]<br><b><span style='font-size:14px;'>[[value]] C</span></b>";
276 chart.addGraph(graph);
277
278 // CURSOR
279 var chartCursor = new AmCharts.ChartCursor();
280 chartCursor.cursorAlpha = 0;
281 chartCursor.cursorPosition = "mouse";
282 chartCursor.categoryBalloonDateFormat = "YYYY";
283 chart.addChartCursor(chartCursor);
284
285 // SCROLLBAR
286 var chartScrollbar = new AmCharts.ChartScrollbar();
287 chart.addChartScrollbar(chartScrollbar);
288
289 chart.creditsPosition = "bottom-right";
290
291 // WRITE
292 chart.write("chartdiv");
293 });
294 </script>
295 </head>
296
297 <body>
298 <div id="chartdiv" style="width:100%; height:400px;"></div>
299 </body>
300
301 </html>
samples/lineStepNoRisers.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart;
13 var graph;
14
15 var chartData = [
16 {
17 "year": "1950",
18 "value": 0.22
19 },
20 {
21 "year": "1951",
22 "value": 0.168
23 },
24 {
25 "year": "1952",
26 "value": 0.103
27 },
28 {
29 "year": "1953",
30 "value": 0.067
31 },
32 {
33 "year": "1954",
34 "value": 0.151
35 },
36 {
37 "year": "1955",
38 "value": 0.281
39 },
40 {
41 "year": "1956",
42 "value": 0.348
43 },
44 {
45 "year": "1957",
46 "value": 0.274
47 },
48 {
49 "year": "1958",
50 "value": 0.211
51 },
52 {
53 "year": "1959",
54 "value": 0.174
55 },
56 {
57 "year": "1960",
58 "value": 0.124
59 },
60 {
61 "year": "1961",
62 "value": 0.064
63 },
64 {
65 "year": "1962",
66 "value": 0.032
67 },
68 {
69 "year": "1963",
70 "value": 0.05
71 },
72 {
73 "year": "1964",
74 "value": 0.106
75 }
76 ];
77
78
79 AmCharts.ready(function () {
80 // SERIAL CHART
81 chart = new AmCharts.AmSerialChart();
82 chart.pathToImages = "../amcharts/images/";
83 chart.marginRight = 0;
84 chart.marginTop = 0;
85 chart.dataProvider = chartData;
86 chart.categoryField = "year";
87 chart.dataDateFormat = "YYYY";
88 chart.color = "#FFFFFF";
89
90 chart.backgroundImage = "images/bgSky.jpg";
91
92 // AXES
93 // Category
94 var categoryAxis = chart.categoryAxis;
95 categoryAxis.parseDates = true; // as our data is date-based, we set parseDates to true
96 categoryAxis.minPeriod = "YYYY"; // our data is yearly, so we set minPeriod to YYYY
97 categoryAxis.gridCount = 20;
98 categoryAxis.autoGridCount = false;
99 categoryAxis.axisAlpha = 0.3;
100 categoryAxis.axisColor = "#FFFFFF";
101 categoryAxis.gridAlpha = 0.05;
102
103 // VALUE
104 var valueAxis = new AmCharts.ValueAxis();
105 valueAxis.gridAlpha = 0;
106 valueAxis.axisAlpha = 0.3;
107 valueAxis.axisColor = "#FFFFFF";
108 valueAxis.showLastLabel = false;
109 chart.addValueAxis(valueAxis);
110
111 // GRAPH
112 graph = new AmCharts.AmGraph();
113 graph.type = "step"; // this line makes step graph
114 graph.noStepRisers = true;
115 graph.valueField = "value";
116 graph.lineColor = "#FFFFFF";
117 graph.lineThickness = 1;
118 graph.balloonText = "[[category]]<br><b><span style='font-size:14px;'>[[value]]</span></b>";
119 chart.addGraph(graph);
120
121 // CURSOR
122 var chartCursor = new AmCharts.ChartCursor();
123 chartCursor.cursorAlpha = 0;
124 chartCursor.cursorPosition = "mouse";
125 chartCursor.categoryBalloonDateFormat = "YYYY";
126 chart.addChartCursor(chartCursor);
127
128 chart.creditsPosition = "top-right";
129
130 // WRITE
131 chart.write("chartdiv");
132 });
133 </script>
134 </head>
135
136 <body>
137 <div id="chartdiv" style="width: 800px; height: 500px;"></div>
138 </body>
139
140 </html>
samples/lineWithChangingColor.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12
13 // since v3, chart can accept data in JSON format
14 // if your category axis parses dates, you should only
15 // set date format of your data (dataDateFormat property of AmSerialChart)
16 var chartData = [
17 {
18 "lineColor": "#ffc321",
19 "date": "2012-01-01",
20 "duration": 408
21 },
22 {
23 "date": "2012-01-02",
24 "duration": 482
25 },
26 {
27 "date": "2012-01-03",
28 "duration": 562
29 },
30 {
31 "date": "2012-01-04",
32 "duration": 379
33 },
34 {
35 "lineColor": "#fd813c",
36 "date": "2012-01-05",
37 "duration": 501
38 },
39 {
40 "date": "2012-01-06",
41 "duration": 443
42 },
43 {
44 "date": "2012-01-07",
45 "duration": 405
46 },
47 {
48 "date": "2012-01-08",
49 "duration": 309,
50 "lineColor": "#CC0000"
51 },
52 {
53 "date": "2012-01-09",
54 "duration": 287
55 },
56 {
57 "date": "2012-01-10",
58 "duration": 485
59 },
60 {
61 "date": "2012-01-11",
62 "duration": 890
63 },
64 {
65 "date": "2012-01-12",
66 "duration": 810
67 }
68 ];
69 var chart;
70
71 AmCharts.ready(function () {
72 // SERIAL CHART
73 chart = new AmCharts.AmSerialChart();
74 chart.dataProvider = chartData;
75 chart.pathToImages = "../amcharts/images/";
76 chart.categoryField = "date";
77 chart.dataDateFormat = "YYYY-MM-DD";
78
79 var balloon = chart.balloon;
80 balloon.cornerRadius = 6;
81 balloon.adjustBorderColor = false;
82 balloon.horizontalPadding = 10;
83 balloon.verticalPadding = 10;
84
85 // AXES
86 // category axis
87 var categoryAxis = chart.categoryAxis;
88 categoryAxis.parseDates = true; // as our data is date-based, we set parseDates to true
89 categoryAxis.minPeriod = "DD"; // our data is daily, so we set minPeriod to DD
90 categoryAxis.autoGridCount = false;
91 categoryAxis.gridCount = 50;
92 categoryAxis.gridAlpha = 0;
93 categoryAxis.gridColor = "#000000";
94 categoryAxis.axisColor = "#555555";
95 // we want custom date formatting, so we change it in next line
96 categoryAxis.dateFormats = [{
97 period: 'DD',
98 format: 'DD'
99 }, {
100 period: 'WW',
101 format: 'MMM DD'
102 }, {
103 period: 'MM',
104 format: 'MMM'
105 }, {
106 period: 'YYYY',
107 format: 'YYYY'
108 }];
109
110 // as we have data of different units, we create two different value axes
111 // Duration value axis
112 var durationAxis = new AmCharts.ValueAxis();
113 durationAxis.gridAlpha = 0.05;
114 durationAxis.axisAlpha = 0;
115 // the following line makes this value axis to convert values to duration
116 // it tells the axis what duration unit it should use. mm - minute, hh - hour...
117 durationAxis.duration = "mm";
118 durationAxis.durationUnits = {
119 DD: "d. ",
120 hh: "h ",
121 mm: "min",
122 ss: ""
123 };
124 chart.addValueAxis(durationAxis);
125
126
127 // GRAPHS
128 // duration graph
129 var durationGraph = new AmCharts.AmGraph();
130 durationGraph.title = "duration";
131 durationGraph.valueField = "duration";
132 durationGraph.type = "line";
133 durationGraph.valueAxis = durationAxis; // indicate which axis should be used
134 durationGraph.lineColorField = "lineColor";
135 durationGraph.fillColorsField = "lineColor";
136 durationGraph.fillAlphas = 0.3;
137 durationGraph.balloonText = "[[value]]";
138 durationGraph.lineThickness = 1;
139 durationGraph.legendValueText = "[[value]]";
140 durationGraph.bullet = "square";
141 durationGraph.bulletBorderThickness = 1;
142 durationGraph.bulletBorderAlpha = 1;
143 chart.addGraph(durationGraph);
144
145 // CURSOR
146 var chartCursor = new AmCharts.ChartCursor();
147 chartCursor.zoomable = false;
148 chartCursor.categoryBalloonDateFormat = "YYYY MMM DD";
149 chartCursor.cursorAlpha = 0;
150 chart.addChartCursor(chartCursor);
151
152
153 var chartScrollbar = new AmCharts.ChartScrollbar();
154 chart.addChartScrollbar(chartScrollbar);
155
156 // WRITE
157 chart.write("chartdiv");
158 });
159 </script>
160 </head>
161
162 <body>
163 <div id="chartdiv" style="width:100%; height:400px;"></div>
164 </body>
165
166 </html>
samples/lineWithCustomBullets.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 // since v3, chart can accept data in JSON format
13 // if your category axis parses dates, you should only
14 // set date format of your data (dataDateFormat property of AmSerialChart)
15 var lineChartData = [
16 {
17 "date": "2009-10-02",
18 "value": 5
19 },
20 {
21 "date": "2009-10-03",
22 "value": 15
23 },
24 {
25 "date": "2009-10-04",
26 "value": 13
27 },
28 {
29 "date": "2009-10-05",
30 "value": 17
31 },
32 {
33 "date": "2009-10-06",
34 "value": 15
35 },
36 {
37 "date": "2009-10-09",
38 "value": 19
39 },
40 {
41 "date": "2009-10-10",
42 "value": 21
43 },
44 {
45 "date": "2009-10-11",
46 "value": 20
47 },
48 {
49 "date": "2009-10-12",
50 "value": 20
51 },
52 {
53 "date": "2009-10-13",
54 "value": 19
55 },
56 {
57 "date": "2009-10-16",
58 "value": 25
59 },
60 {
61 "date": "2009-10-17",
62 "value": 24
63 },
64 {
65 "date": "2009-10-18",
66 "value": 26
67 },
68 {
69 "date": "2009-10-19",
70 "value": 27
71 },
72 {
73 "date": "2009-10-20",
74 "value": 25
75 },
76 {
77 "date": "2009-10-23",
78 "value": 29
79 },
80 {
81 "date": "2009-10-24",
82 "value": 28
83 },
84 {
85 "date": "2009-10-25",
86 "value": 30
87 },
88 {
89 "date": "2009-10-26",
90 "value": 72,
91 "customBullet": "images/redstar.png"
92 },
93 {
94 "date": "2009-10-27",
95 "value": 43
96 },
97 {
98 "date": "2009-10-30",
99 "value": 31
100 },
101 {
102 "date": "2009-11-01",
103 "value": 30
104 },
105 {
106 "date": "2009-11-02",
107 "value": 29
108 },
109 {
110 "date": "2009-11-03",
111 "value": 27
112 },
113 {
114 "date": "2009-11-04",
115 "value": 26
116 }
117 ];
118
119 AmCharts.ready(function () {
120 var chart = new AmCharts.AmSerialChart();
121 chart.dataProvider = lineChartData;
122 chart.pathToImages = "../amcharts/images/";
123 chart.categoryField = "date";
124 chart.dataDateFormat = "YYYY-MM-DD";
125
126 // sometimes we need to set margins manually
127 // autoMargins should be set to false in order chart to use custom margin values
128 chart.autoMargins = false;
129 chart.marginRight = 0;
130 chart.marginLeft = 0;
131 chart.marginBottom = 0;
132 chart.marginTop = 0;
133
134 // AXES
135 // category
136 var categoryAxis = chart.categoryAxis;
137 categoryAxis.parseDates = true; // as our data is date-based, we set parseDates to true
138 categoryAxis.minPeriod = "DD"; // our data is daily, so we set minPeriod to DD
139 categoryAxis.inside = true;
140 categoryAxis.gridAlpha = 0;
141 categoryAxis.tickLength = 0;
142 categoryAxis.axisAlpha = 0;
143
144 // value
145 var valueAxis = new AmCharts.ValueAxis();
146 valueAxis.dashLength = 4;
147 valueAxis.axisAlpha = 0;
148 chart.addValueAxis(valueAxis);
149
150 // GRAPH
151 var graph = new AmCharts.AmGraph();
152 graph.type = "line";
153 graph.valueField = "value";
154 graph.lineColor = "#D8E63C";
155 graph.customBullet = "images/star.png"; // bullet for all data points
156 graph.bulletSize = 14; // bullet image should be a rectangle (width = height)
157 graph.customBulletField = "customBullet"; // this will make the graph to display custom bullet (red star)
158 chart.addGraph(graph);
159
160 // CURSOR
161 var chartCursor = new AmCharts.ChartCursor();
162 chart.addChartCursor(chartCursor);
163
164 // WRITE
165 chart.write("chartdiv");
166 });
167 </script>
168 </head>
169
170 <body>
171 <div id="chartdiv" style="width:100%; height:400px;"></div>
172 </body>
173
174 </html>
samples/lineWithDataGaps.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart;
13 var graph;
14
15 // note, some of tada points don't have value field
16 var chartData = [
17 {
18 "year": "1950",
19 "value": -0.307
20 },
21 {
22 "year": "1951",
23 "value": -0.168
24 },
25 {
26 "year": "1952",
27 "value": -0.073
28 },
29 {
30 "year": "1953",
31 "value": -0.027
32 },
33 {
34 "year": "1954",
35 "value": -0.251
36 },
37 {
38 "year": "1955",
39 "value": -0.281
40 },
41 {
42 "year": "1956",
43 "value": -0.348
44 },
45 {
46 "year": "1957",
47 "value": -0.074
48 },
49 {
50 "year": "1958",
51 "value": -0.011
52 },
53 {
54 "year": "1959",
55 "value": -0.074
56 },
57 {
58 "year": "1960",
59 "value": -0.124
60 },
61 {
62 "year": "1961",
63 "value": -0.024
64 },
65 {
66 "year": "1962",
67 "value": -0.022
68 },
69 {
70 "year": "1963",
71 "value": 0
72 },
73 {
74 "year": "1964",
75 "value": -0.296
76 },
77 {
78 "year": "1965",
79 "value": -0.217
80 },
81 {
82 "year": "1966",
83 "value": -0.147
84 },
85 {
86 "year": "1967"
87 },
88 {
89 "year": "1968"
90 },
91 {
92 "year": "1969"
93 },
94 {
95 "year": "1970"
96 },
97 {
98 "year": "1971",
99 "value": -0.19
100 },
101 {
102 "year": "1972",
103 "value": -0.056
104 },
105 {
106 "year": "1973",
107 "value": 0.077
108 },
109 {
110 "year": "1974",
111 "value": -0.213
112 },
113 {
114 "year": "1975",
115 "value": -0.17
116 },
117 {
118 "year": "1976",
119 "value": -0.254
120 },
121 {
122 "year": "1977",
123 "value": 0.019
124 },
125 {
126 "year": "1978",
127 "value": -0.063
128 },
129 {
130 "year": "1979",
131 "value": 0.05
132 },
133 {
134 "year": "1980",
135 "value": 0.077
136 },
137 {
138 "year": "1981",
139 "value": 0.12
140 },
141 {
142 "year": "1982",
143 "value": 0.011
144 },
145 {
146 "year": "1983",
147 "value": 0.177
148 },
149 {
150 "year": "1984"
151 },
152 {
153 "year": "1985"
154 },
155 {
156 "year": "1986"
157 },
158 {
159 "year": "1987"
160 },
161 {
162 "year": "1988"
163 },
164 {
165 "year": "1989",
166 "value": 0.104
167 },
168 {
169 "year": "1990",
170 "value": 0.255
171 },
172 {
173 "year": "1991",
174 "value": 0.21
175 },
176 {
177 "year": "1992",
178 "value": 0.065
179 },
180 {
181 "year": "1993",
182 "value": 0.11
183 },
184 {
185 "year": "1994",
186 "value": 0.172
187 },
188 {
189 "year": "1995",
190 "value": 0.269
191 },
192 {
193 "year": "1996",
194 "value": 0.141
195 },
196 {
197 "year": "1997",
198 "value": 0.353
199 },
200 {
201 "year": "1998",
202 "value": 0.548
203 },
204 {
205 "year": "1999",
206 "value": 0.298
207 },
208 {
209 "year": "2000",
210 "value": 0.267
211 },
212 {
213 "year": "2001",
214 "value": 0.411
215 },
216 {
217 "year": "2002",
218 "value": 0.462
219 },
220 {
221 "year": "2003",
222 "value": 0.47
223 },
224 {
225 "year": "2004",
226 "value": 0.445
227 },
228 {
229 "year": "2005",
230 "value": 0.47
231 }
232 ];
233
234
235 AmCharts.ready(function () {
236 // SERIAL CHART
237 chart = new AmCharts.AmSerialChart();
238 chart.pathToImages = "../amcharts/images/";
239 chart.marginTop = 0;
240 chart.marginRight = 0;
241 chart.dataProvider = chartData;
242 chart.categoryField = "year";
243 chart.dataDateFormat = "YYYY";
244 chart.balloon.cornerRadius = 6;
245
246 // AXES
247 // category
248 var categoryAxis = chart.categoryAxis;
249 categoryAxis.parseDates = true; // as our data is date-based, we set parseDates to true
250 categoryAxis.minPeriod = "YYYY"; // our data is yearly, so we set minPeriod to YYYY
251 categoryAxis.dashLength = 1;
252 categoryAxis.minorGridEnabled = true;
253 categoryAxis.axisColor = "#DADADA";
254
255 // value
256 var valueAxis = new AmCharts.ValueAxis();
257 valueAxis.axisAlpha = 0;
258 valueAxis.dashLength = 1;
259 valueAxis.inside = true;
260 chart.addValueAxis(valueAxis);
261
262 // GRAPH
263 graph = new AmCharts.AmGraph();
264 graph.lineColor = "#b6d278";
265 graph.negativeLineColor = "#487dac"; // this line makes the graph to change color when it drops below 0
266 graph.bullet = "round";
267 graph.bulletSize = 8;
268 graph.bulletBorderColor = "#FFFFFF";
269
270 graph.bulletBorderThickness = 2;
271 graph.bulletBorderAlpha = 1;
272 graph.connect = false; // this makes the graph not to connect data points if data is missing
273 graph.lineThickness = 2;
274 graph.valueField = "value";
275 graph.balloonText = "[[category]]<br><b><span style='font-size:14px;'>[[value]] C</span></b>";
276 chart.addGraph(graph);
277
278 // CURSOR
279 var chartCursor = new AmCharts.ChartCursor();
280 chartCursor.cursorAlpha = 0;
281 chartCursor.cursorPosition = "mouse";
282 chartCursor.categoryBalloonDateFormat = "YYYY";
283 chartCursor.graphBulletSize = 2;
284 chart.addChartCursor(chartCursor);
285
286 chart.creditsPosition = "bottom-right";
287
288 // WRITE
289 chart.write("chartdiv");
290 });
291 </script>
292 </head>
293
294 <body>
295 <div id="chartdiv" style="width:100%; height:400px;"></div>
296 </body>
297
298 </html>
samples/lineWithDateBasedData.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10 <script type="text/javascript">
11 var chart;
12 var chartData = [];
13 var chartCursor;
14
15
16
17 AmCharts.ready(function () {
18 // generate some data first
19 generateChartData();
20
21 // SERIAL CHART
22 chart = new AmCharts.AmSerialChart();
23 chart.pathToImages = "../amcharts/images/";
24 chart.dataProvider = chartData;
25 chart.categoryField = "date";
26 chart.balloon.bulletSize = 5;
27
28 // listen for "dataUpdated" event (fired when chart is rendered) and call zoomChart method when it happens
29 chart.addListener("dataUpdated", zoomChart);
30
31 // AXES
32 // category
33 var categoryAxis = chart.categoryAxis;
34 categoryAxis.parseDates = true; // as our data is date-based, we set parseDates to true
35 categoryAxis.minPeriod = "DD"; // our data is daily, so we set minPeriod to DD
36 categoryAxis.dashLength = 1;
37 categoryAxis.minorGridEnabled = true;
38 categoryAxis.twoLineMode = true;
39 categoryAxis.dateFormats = [{
40 period: 'fff',
41 format: 'JJ:NN:SS'
42 }, {
43 period: 'ss',
44 format: 'JJ:NN:SS'
45 }, {
46 period: 'mm',
47 format: 'JJ:NN'
48 }, {
49 period: 'hh',
50 format: 'JJ:NN'
51 }, {
52 period: 'DD',
53 format: 'DD'
54 }, {
55 period: 'WW',
56 format: 'DD'
57 }, {
58 period: 'MM',
59 format: 'MMM'
60 }, {
61 period: 'YYYY',
62 format: 'YYYY'
63 }];
64
65 categoryAxis.axisColor = "#DADADA";
66
67 // value
68 var valueAxis = new AmCharts.ValueAxis();
69 valueAxis.axisAlpha = 0;
70 valueAxis.dashLength = 1;
71 chart.addValueAxis(valueAxis);
72
73 // GRAPH
74 var graph = new AmCharts.AmGraph();
75 graph.title = "red line";
76 graph.valueField = "visits";
77 graph.bullet = "round";
78 graph.bulletBorderColor = "#FFFFFF";
79 graph.bulletBorderThickness = 2;
80 graph.bulletBorderAlpha = 1;
81 graph.lineThickness = 2;
82 graph.lineColor = "#5fb503";
83 graph.negativeLineColor = "#efcc26";
84 graph.hideBulletsCount = 50; // this makes the chart to hide bullets when there are more than 50 series in selection
85 chart.addGraph(graph);
86
87 // CURSOR
88 chartCursor = new AmCharts.ChartCursor();
89 chartCursor.cursorPosition = "mouse";
90 chartCursor.pan = true; // set it to fals if you want the cursor to work in "select" mode
91 chart.addChartCursor(chartCursor);
92
93 // SCROLLBAR
94 var chartScrollbar = new AmCharts.ChartScrollbar();
95 chart.addChartScrollbar(chartScrollbar);
96
97 chart.creditsPosition = "bottom-right";
98
99 // WRITE
100 chart.write("chartdiv");
101 });
102
103 // generate some random data, quite different range
104 function generateChartData() {
105 var firstDate = new Date();
106 firstDate.setDate(firstDate.getDate() - 500);
107
108 for (var i = 0; i < 500; i++) {
109 // we create date objects here. In your data, you can have date strings
110 // and then set format of your dates using chart.dataDateFormat property,
111 // however when possible, use date objects, as this will speed up chart rendering.
112 var newDate = new Date(firstDate);
113 newDate.setDate(newDate.getDate() + i);
114
115 var visits = Math.round(Math.random() * 40) - 20;
116
117 chartData.push({
118 date: newDate,
119 visits: visits
120 });
121 }
122 }
123
124 // this method is called when chart is first inited as we listen for "dataUpdated" event
125 function zoomChart() {
126 // different zoom methods can be used - zoomToIndexes, zoomToDates, zoomToCategoryValues
127 chart.zoomToIndexes(chartData.length - 40, chartData.length - 1);
128 }
129
130 // changes cursor mode from pan to select
131 function setPanSelect() {
132 if (document.getElementById("rb1").checked) {
133 chartCursor.pan = false;
134 chartCursor.zoomable = true;
135 } else {
136 chartCursor.pan = true;
137 }
138 chart.validateNow();
139 }
140
141 </script>
142 </head>
143
144 <body>
145 <div id="chartdiv" style="width: 100%; height: 400px;"></div>
146 <div style="margin-left:35px;">
147 <input type="radio" name="group" id="rb1" onclick="setPanSelect()">Select
148 <input type="radio" checked="true" name="group" id="rb2" onclick="setPanSelect()">Pan
149 </div>
150 </body>
151
152 </html>
samples/lineWithDifferentBulletSizes.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 // note, we have townName field with a name specified for each datapoint and townName2 with only some of the names specified.
13 // we use townName2 to display town names next to the bullet. And as these names would overlap if displayed next to each bullet,
14 // we created this townName2 field and set only some of the names for this purpse.
15 var chartData = [
16 {
17 "date": "2012-01-01",
18 "distance": 227,
19 "townName": "New York",
20 "townName2": "New York",
21 "townSize": 25,
22 "latitude": 40.71,
23 "duration": 408
24 },
25 {
26 "date": "2012-01-02",
27 "distance": 371,
28 "townName": "Washington",
29 "townSize": 14,
30 "latitude": 38.89,
31 "duration": 482
32 },
33 {
34 "date": "2012-01-03",
35 "distance": 433,
36 "townName": "Wilmington",
37 "townSize": 6,
38 "latitude": 34.22,
39 "duration": 562
40 },
41 {
42 "date": "2012-01-04",
43 "distance": 345,
44 "townName": "Jacksonville",
45 "townSize": 7,
46 "latitude": 30.35,
47 "duration": 379
48 },
49 {
50 "date": "2012-01-05",
51 "distance": 480,
52 "townName": "Miami",
53 "townName2": "Miami",
54 "townSize": 10,
55 "latitude": 25.83,
56 "duration": 501
57 },
58 {
59 "date": "2012-01-06",
60 "distance": 386,
61 "townName": "Tallahassee",
62 "townSize": 7,
63 "latitude": 30.46,
64 "duration": 443
65 },
66 {
67 "date": "2012-01-07",
68 "distance": 348,
69 "townName": "New Orleans",
70 "townSize": 10,
71 "latitude": 29.94,
72 "duration": 405
73 },
74 {
75 "date": "2012-01-08",
76 "distance": 238,
77 "townName": "Houston",
78 "townName2": "Houston",
79 "townSize": 16,
80 "latitude": 29.76,
81 "duration": 309
82 },
83 {
84 "date": "2012-01-09",
85 "distance": 218,
86 "townName": "Dalas",
87 "townSize": 17,
88 "latitude": 32.8,
89 "duration": 287
90 },
91 {
92 "date": "2012-01-10",
93 "distance": 349,
94 "townName": "Oklahoma City",
95 "townSize": 11,
96 "latitude": 35.49,
97 "duration": 485
98 },
99 {
100 "date": "2012-01-11",
101 "distance": 603,
102 "townName": "Kansas City",
103 "townSize": 10,
104 "latitude": 39.1,
105 "duration": 890
106 },
107 {
108 "date": "2012-01-12",
109 "distance": 534,
110 "townName": "Denver",
111 "townName2": "Denver",
112 "townSize": 18,
113 "latitude": 39.74,
114 "duration": 810
115 },
116 {
117 "date": "2012-01-13",
118 "townName": "Salt Lake City",
119 "townSize": 12,
120 "distance": 425,
121 "duration": 670,
122 "latitude": 40.75,
123 "dashLength": 8,
124 "alpha":0.4
125 },
126 {
127 "date": "2012-01-14",
128 "latitude": 36.1,
129 "duration": 470,
130 "townName": "Las Vegas",
131 "townName2": "Las Vegas"
132 },
133 {
134 "date": "2012-01-15"
135 },
136 {
137 "date": "2012-01-16"
138 },
139 {
140 "date": "2012-01-17"
141 },
142 {
143 "date": "2012-01-18"
144 },
145 {
146 "date": "2012-01-19"
147 }
148 ];
149 var chart;
150
151 AmCharts.ready(function () {
152 // SERIAL CHART
153 chart = new AmCharts.AmSerialChart();
154 chart.dataProvider = chartData;
155 chart.categoryField = "date";
156 chart.dataDateFormat = "YYYY-MM-DD";
157 chart.color = "#FFFFFF";
158 chart.marginLeft = 0;
159
160 // AXES
161 // category
162 var categoryAxis = chart.categoryAxis;
163 categoryAxis.parseDates = true; // as our data is date-based, we set parseDates to true
164 categoryAxis.minPeriod = "DD"; // our data is daily, so we set minPeriod to DD
165 categoryAxis.autoGridCount = false;
166 categoryAxis.gridCount = 50;
167 categoryAxis.gridAlpha = 0.1;
168 categoryAxis.gridColor = "#FFFFFF";
169 categoryAxis.axisColor = "#555555";
170 // we want custom date formatting, so we change it in next line
171 categoryAxis.dateFormats = [{
172 period: 'DD',
173 format: 'DD'
174 }, {
175 period: 'WW',
176 format: 'MMM DD'
177 }, {
178 period: 'MM',
179 format: 'MMM'
180 }, {
181 period: 'YYYY',
182 format: 'YYYY'
183 }];
184
185 // as we have data of different units, we create three different value axes
186 // Distance value axis
187 var distanceAxis = new AmCharts.ValueAxis();
188 distanceAxis.title = "distance";
189 distanceAxis.gridAlpha = 0;
190 distanceAxis.axisAlpha = 0;
191 chart.addValueAxis(distanceAxis);
192
193 // latitude value axis
194 var latitudeAxis = new AmCharts.ValueAxis();
195 latitudeAxis.gridAlpha = 0;
196 latitudeAxis.axisAlpha = 0;
197 latitudeAxis.labelsEnabled = false;
198 latitudeAxis.position = "right";
199 chart.addValueAxis(latitudeAxis);
200
201 // duration value axis
202 var durationAxis = new AmCharts.ValueAxis();
203 durationAxis.title = "duration";
204 // the following line makes this value axis to convert values to duration
205 // it tells the axis what duration unit it should use. mm - minute, hh - hour...
206 durationAxis.duration = "mm";
207 durationAxis.durationUnits = {
208 DD: "d. ",
209 hh: "h ",
210 mm: "min",
211 ss: ""
212 };
213 durationAxis.gridAlpha = 0;
214 durationAxis.axisAlpha = 0;
215 durationAxis.inside = true;
216 durationAxis.position = "right";
217 chart.addValueAxis(durationAxis);
218
219 // GRAPHS
220 // distance graph
221 var distanceGraph = new AmCharts.AmGraph();
222 distanceGraph.valueField = "distance";
223 distanceGraph.title = "distance";
224 distanceGraph.type = "column";
225 distanceGraph.fillAlphas = 0.9;
226 distanceGraph.valueAxis = distanceAxis; // indicate which axis should be used
227 distanceGraph.balloonText = "[[value]] miles";
228 distanceGraph.legendValueText = "[[value]] mi";
229 distanceGraph.legendPeriodValueText = "total: [[value.sum]] mi";
230 distanceGraph.lineColor = "#263138";
231 distanceGraph.dashLengthField = "dashLength";
232 distanceGraph.alphaField = "alpha";
233 chart.addGraph(distanceGraph);
234
235 // latitude graph
236 var latitudeGraph = new AmCharts.AmGraph();
237 latitudeGraph.valueField = "latitude";
238 latitudeGraph.title = "latitude/city";
239 latitudeGraph.type = "line";
240 latitudeGraph.valueAxis = latitudeAxis; // indicate which axis should be used
241 latitudeGraph.lineColor = "#786c56";
242 latitudeGraph.lineThickness = 1;
243 latitudeGraph.legendValueText = "[[description]]/[[value]]";
244 latitudeGraph.descriptionField = "townName";
245 latitudeGraph.bullet = "round";
246 latitudeGraph.bulletSizeField = "townSize"; // indicate which field should be used for bullet size
247 latitudeGraph.bulletBorderColor = "#786c56";
248 latitudeGraph.bulletBorderAlpha = 1;
249 latitudeGraph.bulletBorderThickness = 2;
250 latitudeGraph.bulletColor = "#000000";
251 latitudeGraph.labelText = "[[townName2]]"; // not all data points has townName2 specified, that's why labels are displayed only near some of the bullets.
252 latitudeGraph.labelPosition = "right";
253 latitudeGraph.balloonText = "latitude:[[value]]";
254 latitudeGraph.showBalloon = true;
255 latitudeGraph.dashLengthField = "dashLength";
256 chart.addGraph(latitudeGraph);
257
258 // duration graph
259 var durationGraph = new AmCharts.AmGraph();
260 durationGraph.title = "duration";
261 durationGraph.valueField = "duration";
262 durationGraph.type = "line";
263 durationGraph.valueAxis = durationAxis; // indicate which axis should be used
264 durationGraph.lineColor = "#ff5755";
265 durationGraph.balloonText = "[[value]]";
266 durationGraph.lineThickness = 1;
267 durationGraph.legendValueText = "[[value]]";
268 durationGraph.bullet = "square";
269 durationGraph.bulletBorderColor = "#ff5755";
270 durationGraph.bulletBorderThickness = 1;
271 durationGraph.bulletBorderAlpha = 1;
272 durationGraph.dashLengthField = "dashLength";
273 chart.addGraph(durationGraph);
274
275 // CURSOR
276 var chartCursor = new AmCharts.ChartCursor();
277 chartCursor.zoomable = false;
278 chartCursor.categoryBalloonDateFormat = "DD";
279 chartCursor.cursorAlpha = 0;
280 chartCursor.valueBalloonsEnabled = false;
281 chart.addChartCursor(chartCursor);
282
283 // LEGEND
284 var legend = new AmCharts.AmLegend();
285 legend.bulletType = "round";
286 legend.equalWidths = false;
287 legend.valueWidth = 120;
288 legend.useGraphSettings = true;
289 legend.color = "#FFFFFF";
290 chart.addLegend(legend);
291
292 // WRITE
293 chart.write("chartdiv");
294 });
295 </script>
296 </head>
297
298 <body style="background-color:#161616">
299 <div id="chartdiv" style="width:100%; height:400px;"></div>
300 </body>
301
302 </html>
samples/lineWithDurationOnValueAxis.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chartData = [
13 {
14 "date": "2012-01-01",
15 "distance": 227,
16 "duration": 408
17 },
18 {
19 "date": "2012-01-02",
20 "distance": 371,
21 "duration": 482
22 },
23 {
24 "date": "2012-01-03",
25 "distance": 433,
26 "duration": 562
27 },
28 {
29 "date": "2012-01-04",
30 "distance": 345,
31 "duration": 379
32 },
33 {
34 "date": "2012-01-05",
35 "distance": 480,
36 "duration": 501
37 },
38 {
39 "date": "2012-01-06",
40 "distance": 386,
41 "duration": 443
42 },
43 {
44 "date": "2012-01-07",
45 "distance": 348,
46 "duration": 405
47 },
48 {
49 "date": "2012-01-08",
50 "distance": 238,
51 "duration": 309
52 },
53 {
54 "date": "2012-01-09",
55 "distance": 218,
56 "duration": 287
57 },
58 {
59 "date": "2012-01-10",
60 "distance": 349,
61 "duration": 485
62 },
63 {
64 "date": "2012-01-11",
65 "distance": 603,
66 "duration": 890
67 },
68 {
69 "date": "2012-01-12",
70 "distance": 534,
71 "duration": 810
72 }
73 ];
74 var chart;
75
76 AmCharts.ready(function () {
77 // SERIAL CHART
78 chart = new AmCharts.AmSerialChart();
79 chart.dataProvider = chartData;
80 chart.categoryField = "date";
81 chart.dataDateFormat = "YYYY-MM-DD";
82 chart.marginTop = 0;
83
84 // AXES
85 // category axis
86 var categoryAxis = chart.categoryAxis;
87 categoryAxis.parseDates = true; // as our data is date-based, we set parseDates to true
88 categoryAxis.minPeriod = "DD"; // our data is daily, so we set minPeriod to DD
89 categoryAxis.autoGridCount = false;
90 categoryAxis.gridCount = 50;
91 categoryAxis.gridAlpha = 0;
92 categoryAxis.gridColor = "#000000";
93 categoryAxis.axisColor = "#555555";
94 // we want custom date formatting, so we change it in next line
95 categoryAxis.dateFormats = [{
96 period: 'DD',
97 format: 'DD'
98 }, {
99 period: 'WW',
100 format: 'MMM DD'
101 }, {
102 period: 'MM',
103 format: 'MMM'
104 }, {
105 period: 'YYYY',
106 format: 'YYYY'
107 }];
108
109 // as we have data of different units, we create two different value axes
110 // Duration value axis
111 var durationAxis = new AmCharts.ValueAxis();
112 durationAxis.title = "duration";
113 durationAxis.gridAlpha = 0.05;
114 durationAxis.axisAlpha = 0;
115 durationAxis.inside = true;
116 // the following line makes this value axis to convert values to duration
117 // it tells the axis what duration unit it should use. mm - minute, hh - hour...
118 durationAxis.duration = "mm";
119 durationAxis.durationUnits = {
120 DD: "d. ",
121 hh: "h ",
122 mm: "min",
123 ss: ""
124 };
125 chart.addValueAxis(durationAxis);
126
127 // Distance value axis
128 var distanceAxis = new AmCharts.ValueAxis();
129 distanceAxis.title = "distance";
130 distanceAxis.gridAlpha = 0;
131 distanceAxis.position = "right";
132 distanceAxis.inside = true;
133 distanceAxis.unit = "mi";
134 distanceAxis.axisAlpha = 0;
135 chart.addValueAxis(distanceAxis);
136
137 // GRAPHS
138 // duration graph
139 var durationGraph = new AmCharts.AmGraph();
140 durationGraph.title = "duration";
141 durationGraph.valueField = "duration";
142 durationGraph.type = "line";
143 durationGraph.valueAxis = durationAxis; // indicate which axis should be used
144 durationGraph.lineColor = "#CC0000";
145 durationGraph.balloonText = "[[value]]";
146 durationGraph.lineThickness = 1;
147 durationGraph.legendValueText = "[[value]]";
148 durationGraph.bullet = "square";
149 durationGraph.bulletBorderColor = "#CC0000";
150 durationGraph.bulletBorderAlpha = 1;
151 durationGraph.bulletBorderThickness = 1;
152 chart.addGraph(durationGraph);
153
154 // distance graph
155 var distanceGraph = new AmCharts.AmGraph();
156 distanceGraph.valueField = "distance";
157 distanceGraph.title = "distance";
158 distanceGraph.type = "column";
159 distanceGraph.fillAlphas = 0.1;
160 distanceGraph.valueAxis = distanceAxis; // indicate which axis should be used
161 distanceGraph.balloonText = "[[value]] miles";
162 distanceGraph.legendValueText = "[[value]] mi";
163 distanceGraph.legendPeriodValueText = "total: [[value.sum]] mi";
164 distanceGraph.lineColor = "#000000";
165 distanceGraph.lineAlpha = 0;
166 chart.addGraph(distanceGraph);
167
168 // CURSOR
169 var chartCursor = new AmCharts.ChartCursor();
170 chartCursor.zoomable = false;
171 chartCursor.categoryBalloonDateFormat = "DD";
172 chartCursor.cursorAlpha = 0;
173 chart.addChartCursor(chartCursor);
174
175 // LEGEND
176 var legend = new AmCharts.AmLegend();
177 legend.bulletType = "round";
178 legend.equalWidths = false;
179 legend.valueWidth = 120;
180 legend.color = "#000000";
181 legend.useGraphSettings = true;
182 chart.addLegend(legend);
183
184 // WRITE
185 chart.write("chartdiv");
186 });
187 </script>
188 </head>
189
190 <body>
191 <div id="chartdiv" style="width:100%; height:400px;"></div>
192 </body>
193
194 </html>
samples/lineWithFilledValueRanges.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart;
13
14 var chartData = [];
15
16 AmCharts.ready(function () {
17 // generate some random data first
18 generateChartData();
19
20 // SERIAL CHART
21 chart = new AmCharts.AmSerialChart();
22 chart.pathToImages = "../amcharts/images/";
23 chart.marginLeft = 0;
24 chart.marginRight = 0;
25 chart.marginTop = 0;
26 chart.dataProvider = chartData;
27 chart.categoryField = "date";
28
29 // AXES
30 // category
31 var categoryAxis = chart.categoryAxis;
32 categoryAxis.parseDates = true; // as our data is date-based, we set parseDates to true
33 categoryAxis.minPeriod = "DD"; // our data is daily, so we set minPeriod to DD
34 // value axis
35 var valueAxis = new AmCharts.ValueAxis();
36 valueAxis.inside = true;
37 valueAxis.tickLength = 0;
38 valueAxis.axisAlpha = 0;
39 valueAxis.minimum = 100;
40 valueAxis.maximum = 140;
41 chart.addValueAxis(valueAxis);
42
43 // GRAPH
44 var graph = new AmCharts.AmGraph();
45 graph.dashLength = 3;
46 graph.lineColor = "#7717D7";
47 graph.valueField = "visits";
48 graph.dashLength = 3;
49 graph.bullet = "round";
50 chart.addGraph(graph);
51
52 // CURSOR
53 var chartCursor = new AmCharts.ChartCursor();
54 chartCursor.cursorAlpha = 0;
55 chart.addChartCursor(chartCursor);
56
57 // GUIDES are used to create horizontal range fills
58 var guide = new AmCharts.Guide();
59 guide.value = 0;
60 guide.toValue = 105;
61 guide.fillColor = "#CC0000";
62 guide.fillAlpha = 0.2;
63 guide.lineAlpha = 0;
64 valueAxis.addGuide(guide);
65
66 var guide = new AmCharts.Guide();
67 guide.value = 105;
68 guide.toValue = 110;
69 guide.fillColor = "#CC0000";
70 guide.fillAlpha = 0.15;
71 guide.lineAlpha = 0;
72 valueAxis.addGuide(guide);
73
74 var guide = new AmCharts.Guide();
75 guide.value = 110;
76 guide.toValue = 115;
77 guide.fillColor = "#CC0000";
78 guide.fillAlpha = 0.1;
79 guide.lineAlpha = 0;
80 valueAxis.addGuide(guide);
81
82 var guide = new AmCharts.Guide();
83 guide.value = 115;
84 guide.toValue = 120;
85 guide.fillColor = "#CC0000";
86 guide.fillAlpha = 0.05;
87 guide.lineAlpha = 0;
88 valueAxis.addGuide(guide);
89
90 var guide = new AmCharts.Guide();
91 guide.value = 120;
92 guide.toValue = 125;
93 guide.fillColor = "#0000cc";
94 guide.fillAlpha = 0.05;
95 guide.lineAlpha = 0;
96 valueAxis.addGuide(guide);
97
98 var guide = new AmCharts.Guide();
99 guide.value = 125;
100 guide.toValue = 130;
101 guide.fillColor = "#0000cc";
102 guide.fillAlpha = 0.1;
103 guide.lineAlpha = 0;
104 valueAxis.addGuide(guide);
105
106 var guide = new AmCharts.Guide();
107 guide.value = 130;
108 guide.toValue = 135;
109 guide.fillColor = "#0000cc";
110 guide.fillAlpha = 0.15;
111 guide.lineAlpha = 0;
112 valueAxis.addGuide(guide);
113
114 var guide = new AmCharts.Guide();
115 guide.value = 135;
116 guide.toValue = 140;
117 guide.fillColor = "#0000cc";
118 guide.fillAlpha = 0.2;
119 guide.lineAlpha = 0;
120 valueAxis.addGuide(guide);
121
122 // WRITE
123 chart.write("chartdiv");
124 });
125
126 // generate some random data
127 function generateChartData() {
128 var firstDate = new Date();
129 firstDate.setDate(firstDate.getDate() - 10);
130
131 for (var i = 0; i < 10; i++) {
132 // we create date objects here. In your data, you can have date strings
133 // and then set format of your dates using chart.dataDateFormat property,
134 // however when possible, use date objects, as this will speed up chart rendering.
135 var newDate = new Date(firstDate);
136 newDate.setDate(newDate.getDate() + i);
137
138 var visits = Math.round(Math.random() * 40) + 100;
139
140 chartData.push({
141 date: newDate,
142 visits: visits
143 });
144 }
145 }
146 </script>
147 </head>
148
149 <body>
150 <div id="chartdiv" style="width: 100%; height: 400px;"></div>
151 </body>
152
153 </html>
samples/lineWithLogarithmicValueAxis.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart;
13 var chartData = [
14 {
15 "date": "2012-03-01",
16 "price": 20
17 },
18 {
19 "date": "2012-03-02",
20 "price": 75
21 },
22 {
23 "date": "2012-03-03",
24 "price": 15
25 },
26 {
27 "date": "2012-03-04",
28 "price": 75
29 },
30 {
31 "date": "2012-03-05",
32 "price": 158
33 },
34 {
35 "date": "2012-03-06",
36 "price": 57
37 },
38 {
39 "date": "2012-03-07",
40 "price": 107
41 },
42 {
43 "date": "2012-03-08",
44 "price": 89
45 },
46 {
47 "date": "2012-03-09",
48 "price": 75
49 },
50 {
51 "date": "2012-03-10",
52 "price": 132
53 },
54 {
55 "date": "2012-03-11",
56 "price": 158
57 },
58 {
59 "date": "2012-03-12",
60 "price": 56
61 },
62 {
63 "date": "2012-03-13",
64 "price": 169
65 },
66 {
67 "date": "2012-03-14",
68 "price": 24
69 },
70 {
71 "date": "2012-03-15",
72 "price": 147
73 }
74 ];
75
76 var average = 90.4;
77
78 AmCharts.ready(function () {
79
80 // SERIAL CHART
81 chart = new AmCharts.AmSerialChart();
82 chart.pathToImages = "../amcharts/images/";
83 chart.dataProvider = chartData;
84 chart.categoryField = "date";
85 chart.dataDateFormat = "YYYY-MM-DD";
86
87 // AXES
88 // category
89 var categoryAxis = chart.categoryAxis;
90 categoryAxis.parseDates = true; // as our data is date-based, we set parseDates to true
91 categoryAxis.minPeriod = "DD"; // our data is daily, so we set minPeriod to DD
92 categoryAxis.dashLength = 1;
93 categoryAxis.gridAlpha = 0.15;
94 categoryAxis.axisColor = "#DADADA";
95
96 // value
97 var valueAxis = new AmCharts.ValueAxis();
98 valueAxis.axisColor = "#DADADA";
99 valueAxis.dashLength = 1;
100 valueAxis.logarithmic = true; // this line makes axis logarithmic
101 chart.addValueAxis(valueAxis);
102
103 // GUIDE for average
104 var guide = new AmCharts.Guide();
105 guide.value = average;
106 guide.lineColor = "#CC0000";
107 guide.dashLength = 4;
108 guide.label = "average";
109 guide.inside = true;
110 guide.lineAlpha = 1;
111 valueAxis.addGuide(guide);
112
113
114 // GRAPH
115 var graph = new AmCharts.AmGraph();
116 graph.type = "smoothedLine";
117 graph.bullet = "round";
118 graph.bulletColor = "#FFFFFF";
119 graph.useLineColorForBulletBorder = true;
120 graph.bulletBorderAlpha = 1;
121 graph.bulletBorderThickness = 2;
122 graph.bulletSize = 7;
123 graph.title = "Price";
124 graph.valueField = "price";
125 graph.lineThickness = 2;
126 graph.lineColor = "#00BBCC";
127 chart.addGraph(graph);
128
129 // CURSOR
130 var chartCursor = new AmCharts.ChartCursor();
131 chartCursor.cursorPosition = "mouse";
132 chart.addChartCursor(chartCursor);
133
134 // SCROLLBAR
135 var chartScrollbar = new AmCharts.ChartScrollbar();
136 chartScrollbar.graph = graph;
137 chartScrollbar.scrollbarHeight = 30;
138 chart.addChartScrollbar(chartScrollbar);
139
140 chart.creditsPosition = "bottom-right";
141
142 // WRITE
143 chart.write("chartdiv");
144 });
145 </script>
146 </head>
147
148 <body>
149 <div id="chartdiv" style="width: 100%; height: 400px;"></div>
150 </body>
151
152 </html>
samples/lineWithMultipleValueAxes.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart;
13 var chartData = [];
14
15 AmCharts.ready(function () {
16 // generate some random data first
17 generateChartData();
18
19 // SERIAL CHART
20 chart = new AmCharts.AmSerialChart();
21 chart.pathToImages = "../amcharts/images/";
22 chart.dataProvider = chartData;
23 chart.categoryField = "date";
24
25 // listen for "dataUpdated" event (fired when chart is inited) and call zoomChart method when it happens
26 chart.addListener("dataUpdated", zoomChart);
27
28 // AXES
29 // category
30 var categoryAxis = chart.categoryAxis;
31 categoryAxis.parseDates = true; // as our data is date-based, we set parseDates to true
32 categoryAxis.minPeriod = "DD"; // our data is daily, so we set minPeriod to DD
33 categoryAxis.minorGridEnabled = true;
34 categoryAxis.axisColor = "#DADADA";
35 categoryAxis.twoLineMode = true;
36 categoryAxis.dateFormats = [{
37 period: 'fff',
38 format: 'JJ:NN:SS'
39 }, {
40 period: 'ss',
41 format: 'JJ:NN:SS'
42 }, {
43 period: 'mm',
44 format: 'JJ:NN'
45 }, {
46 period: 'hh',
47 format: 'JJ:NN'
48 }, {
49 period: 'DD',
50 format: 'DD'
51 }, {
52 period: 'WW',
53 format: 'DD'
54 }, {
55 period: 'MM',
56 format: 'MMM'
57 }, {
58 period: 'YYYY',
59 format: 'YYYY'
60 }];
61
62 // first value axis (on the left)
63 var valueAxis1 = new AmCharts.ValueAxis();
64 valueAxis1.axisColor = "#FF6600";
65 valueAxis1.axisThickness = 2;
66 valueAxis1.gridAlpha = 0;
67 chart.addValueAxis(valueAxis1);
68
69 // second value axis (on the right)
70 var valueAxis2 = new AmCharts.ValueAxis();
71 valueAxis2.position = "right"; // this line makes the axis to appear on the right
72 valueAxis2.axisColor = "#FCD202";
73 valueAxis2.gridAlpha = 0;
74 valueAxis2.axisThickness = 2;
75 chart.addValueAxis(valueAxis2);
76
77 // third value axis (on the left, detached)
78 valueAxis3 = new AmCharts.ValueAxis();
79 valueAxis3.offset = 50; // this line makes the axis to appear detached from plot area
80 valueAxis3.gridAlpha = 0;
81 valueAxis3.axisColor = "#B0DE09";
82 valueAxis3.axisThickness = 2;
83 chart.addValueAxis(valueAxis3);
84
85 // GRAPHS
86 // first graph
87 var graph1 = new AmCharts.AmGraph();
88 graph1.valueAxis = valueAxis1; // we have to indicate which value axis should be used
89 graph1.title = "red line";
90 graph1.valueField = "visits";
91 graph1.bullet = "round";
92 graph1.hideBulletsCount = 30;
93 graph1.bulletBorderThickness = 1;
94 chart.addGraph(graph1);
95
96 // second graph
97 var graph2 = new AmCharts.AmGraph();
98 graph2.valueAxis = valueAxis2; // we have to indicate which value axis should be used
99 graph2.title = "yellow line";
100 graph2.valueField = "hits";
101 graph2.bullet = "square";
102 graph2.hideBulletsCount = 30;
103 graph2.bulletBorderThickness = 1;
104 chart.addGraph(graph2);
105
106 // third graph
107 var graph3 = new AmCharts.AmGraph();
108 graph3.valueAxis = valueAxis3; // we have to indicate which value axis should be used
109 graph3.valueField = "views";
110 graph3.title = "green line";
111 graph3.bullet = "triangleUp";
112 graph3.hideBulletsCount = 30;
113 graph3.bulletBorderThickness = 1;
114 chart.addGraph(graph3);
115
116 // CURSOR
117 var chartCursor = new AmCharts.ChartCursor();
118 chartCursor.cursorAlpha = 0.1;
119 chartCursor.fullWidth = true;
120 chart.addChartCursor(chartCursor);
121
122 // SCROLLBAR
123 var chartScrollbar = new AmCharts.ChartScrollbar();
124 chart.addChartScrollbar(chartScrollbar);
125
126 // LEGEND
127 var legend = new AmCharts.AmLegend();
128 legend.marginLeft = 110;
129 legend.useGraphSettings = true;
130 chart.addLegend(legend);
131
132 // WRITE
133 chart.write("chartdiv");
134 });
135
136 // generate some random data, quite different range
137 function generateChartData() {
138 var firstDate = new Date();
139 firstDate.setDate(firstDate.getDate() - 50);
140
141 for (var i = 0; i < 50; i++) {
142 // we create date objects here. In your data, you can have date strings
143 // and then set format of your dates using chart.dataDateFormat property,
144 // however when possible, use date objects, as this will speed up chart rendering.
145 var newDate = new Date(firstDate);
146 newDate.setDate(newDate.getDate() + i);
147
148 var visits = Math.round(Math.random() * 40) + 100;
149 var hits = Math.round(Math.random() * 80) + 500;
150 var views = Math.round(Math.random() * 6000);
151
152 chartData.push({
153 date: newDate,
154 visits: visits,
155 hits: hits,
156 views: views
157 });
158 }
159 }
160
161 // this method is called when chart is first inited as we listen for "dataUpdated" event
162 function zoomChart() {
163 // different zoom methods can be used - zoomToIndexes, zoomToDates, zoomToCategoryValues
164 chart.zoomToIndexes(10, 20);
165 }
166 </script>
167 </head>
168
169 <body>
170 <div id="chartdiv" style="width: 100%; height: 400px;"></div>
171 </body>
172
173 </html>
samples/lineWithReversedValueAxis.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart;
13
14 var chartData = [
15 {
16 "year": 1930,
17 "italy": 1,
18 "germany": 5,
19 "uk": 3
20 },
21 {
22 "year": 1934,
23 "italy": 1,
24 "germany": 2,
25 "uk": 6
26 },
27 {
28 "year": 1938,
29 "italy": 2,
30 "germany": 3,
31 "uk": 1
32 },
33 {
34 "year": 1950,
35 "italy": 3,
36 "germany": 4,
37 "uk": 1
38 },
39 {
40 "year": 1954,
41 "italy": 5,
42 "germany": 1,
43 "uk": 2
44 },
45 {
46 "year": 1958,
47 "italy": 3,
48 "germany": 2,
49 "uk": 1
50 },
51 {
52 "year": 1962,
53 "italy": 1,
54 "germany": 2,
55 "uk": 3
56 },
57 {
58 "year": 1966,
59 "italy": 2,
60 "germany": 1,
61 "uk": 5
62 },
63 {
64 "year": 1970,
65 "italy": 3,
66 "germany": 5,
67 "uk": 2
68 },
69 {
70 "year": 1974,
71 "italy": 4,
72 "germany": 3,
73 "uk": 6
74 },
75 {
76 "year": 1978,
77 "italy": 1,
78 "germany": 2,
79 "uk": 4
80 }
81 ];
82
83
84 AmCharts.ready(function () {
85 // SERIAL CHART
86 chart = new AmCharts.AmSerialChart();
87 chart.dataProvider = chartData;
88 chart.categoryField = "year";
89 chart.startDuration = 0.5;
90 chart.balloon.color = "#000000";
91
92 // AXES
93 // category
94 var categoryAxis = chart.categoryAxis;
95 categoryAxis.fillAlpha = 1;
96 categoryAxis.fillColor = "#FAFAFA";
97 categoryAxis.gridAlpha = 0;
98 categoryAxis.axisAlpha = 0;
99 categoryAxis.gridPosition = "start";
100 categoryAxis.position = "top";
101
102 // value
103 var valueAxis = new AmCharts.ValueAxis();
104 valueAxis.title = "Place taken";
105 valueAxis.dashLength = 5;
106 valueAxis.axisAlpha = 0;
107 valueAxis.minimum = 1;
108 valueAxis.maximum = 6;
109 valueAxis.integersOnly = true;
110 valueAxis.gridCount = 10;
111 valueAxis.reversed = true; // this line makes the value axis reversed
112 chart.addValueAxis(valueAxis);
113
114 // GRAPHS
115 // Italy graph
116 var graph = new AmCharts.AmGraph();
117 graph.title = "Italy";
118 graph.valueField = "italy";
119 graph.hidden = true; // this line makes the graph initially hidden
120 graph.balloonText = "place taken by Italy in [[category]]: [[value]]";
121 graph.lineAlpha = 1;
122 graph.bullet = "round";
123 chart.addGraph(graph);
124
125 // Germany graph
126 var graph = new AmCharts.AmGraph();
127 graph.title = "Germany";
128 graph.valueField = "germany";
129 graph.balloonText = "place taken by Germany in [[category]]: [[value]]";
130 graph.bullet = "round";
131 chart.addGraph(graph);
132
133 // United Kingdom graph
134 var graph = new AmCharts.AmGraph();
135 graph.title = "United Kingdom";
136 graph.valueField = "uk";
137 graph.balloonText = "place taken by UK in [[category]]: [[value]]";
138 graph.bullet = "round";
139 chart.addGraph(graph);
140
141 // CURSOR
142 var chartCursor = new AmCharts.ChartCursor();
143 chartCursor.cursorPosition = "mouse";
144 chartCursor.zoomable = false;
145 chartCursor.cursorAlpha = 0;
146 chart.addChartCursor(chartCursor);
147
148 // LEGEND
149 var legend = new AmCharts.AmLegend();
150 legend.useGraphSettings = true;
151 chart.addLegend(legend);
152
153 // WRITE
154 chart.write("chartdiv");
155 });
156 </script>
157 </head>
158
159 <body>
160 <div id="chartdiv" style="width: 100%; height: 400px;"></div>
161 </body>
162
163 </html>
samples/lineWithTrendLines.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart;
13
14 var chartData = [
15 {
16 "date": "2012-01-01",
17 "value": 8
18 },
19 {
20 "date": "2012-01-01",
21 "value": 8
22 },
23 {
24 "date": "2012-01-02",
25 "value": 10
26 },
27 {
28 "date": "2012-01-03",
29 "value": 12
30 },
31 {
32 "date": "2012-01-04",
33 "value": 14
34 },
35 {
36 "date": "2012-01-05",
37 "value": 11
38 },
39 {
40 "date": "2012-01-06",
41 "value": 6
42 },
43 {
44 "date": "2012-01-07",
45 "value": 7
46 },
47 {
48 "date": "2012-01-08",
49 "value": 9
50 },
51 {
52 "date": "2012-01-09",
53 "value": 13
54 },
55 {
56 "date": "2012-01-10",
57 "value": 15
58 },
59 {
60 "date": "2012-01-11",
61 "value": 19
62 },
63 {
64 "date": "2012-01-12",
65 "value": 21
66 },
67 {
68 "date": "2012-01-13",
69 "value": 22
70 },
71 {
72 "date": "2012-01-14",
73 "value": 20
74 },
75 {
76 "date": "2012-01-15",
77 "value": 18
78 },
79 {
80 "date": "2012-01-16",
81 "value": 14
82 },
83 {
84 "date": "2012-01-17",
85 "value": 16
86 },
87 {
88 "date": "2012-01-18",
89 "value": 18
90 },
91 {
92 "date": "2012-01-19",
93 "value": 17
94 },
95 {
96 "date": "2012-01-20",
97 "value": 15
98 },
99 {
100 "date": "2012-01-21",
101 "value": 12
102 },
103 {
104 "date": "2012-01-22",
105 "value": 10
106 },
107 {
108 "date": "2012-01-23",
109 "value": 8
110 }
111 ];
112
113
114 AmCharts.ready(function () {
115 // SERIAL CHART
116 chart = new AmCharts.AmSerialChart();
117 chart.pathToImages = "../amcharts/images/";
118 chart.dataProvider = chartData;
119 chart.dataDateFormat = "YYYY-MM-DD";
120 chart.categoryField = "date";
121
122
123 // AXES
124 // category
125 var categoryAxis = chart.categoryAxis;
126 categoryAxis.parseDates = true; // as our data is date-based, we set parseDates to true
127 categoryAxis.minPeriod = "DD"; // our data is daily, so we set minPeriod to DD
128 categoryAxis.gridAlpha = 0.1;
129 categoryAxis.minorGridAlpha = 0.1;
130 categoryAxis.axisAlpha = 0;
131 categoryAxis.minorGridEnabled = true;
132 categoryAxis.inside = true;
133
134 // value
135 var valueAxis = new AmCharts.ValueAxis();
136 valueAxis.tickLength = 0;
137 valueAxis.axisAlpha = 0;
138 valueAxis.showFirstLabel = false;
139 valueAxis.showLastLabel = false;
140 chart.addValueAxis(valueAxis);
141
142 // GRAPH
143 var graph = new AmCharts.AmGraph();
144 graph.dashLength = 3;
145 graph.lineColor = "#00CC00";
146 graph.valueField = "value";
147 graph.dashLength = 3;
148 graph.bullet = "round";
149 graph.balloonText = "[[category]]<br><b><span style='font-size:14px;'>value:[[value]]</span></b>";
150 chart.addGraph(graph);
151
152 // CURSOR
153 var chartCursor = new AmCharts.ChartCursor();
154 chart.addChartCursor(chartCursor);
155
156 // SCROLLBAR
157 var chartScrollbar = new AmCharts.ChartScrollbar();
158 chart.addChartScrollbar(chartScrollbar);
159
160 // HORIZONTAL GREEN RANGE
161 var guide = new AmCharts.Guide();
162 guide.value = 10;
163 guide.toValue = 20;
164 guide.fillColor = "#00CC00";
165 guide.inside = true;
166 guide.fillAlpha = 0.2;
167 guide.lineAlpha = 0;
168 valueAxis.addGuide(guide);
169
170 // TREND LINES
171 // first trend line
172 var trendLine = new AmCharts.TrendLine();
173 // note,when creating date objects 0 month is January, as months are zero based in JavaScript.
174 trendLine.initialDate = new Date(2012, 0, 2, 12); // 12 is hour - to start trend line in the middle of the day
175 trendLine.finalDate = new Date(2012, 0, 11, 12);
176 trendLine.initialValue = 10;
177 trendLine.finalValue = 19;
178 trendLine.lineColor = "#CC0000";
179 chart.addTrendLine(trendLine);
180
181 // second trend line
182 trendLine = new AmCharts.TrendLine();
183 trendLine.initialDate = new Date(2012, 0, 17, 12);
184 trendLine.finalDate = new Date(2012, 0, 22, 12);
185 trendLine.initialValue = 16;
186 trendLine.finalValue = 10;
187 trendLine.lineColor = "#CC0000";
188 chart.addTrendLine(trendLine);
189
190 // WRITE
191 chart.write("chartdiv");
192 });
193 </script>
194 </head>
195
196 <body>
197 <div id="chartdiv" style="width: 100%; height: 400px;"></div>
198 </body>
199
200 </html>
samples/microCharts.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10 <script src="../amcharts/pie.js" type="text/javascript"></script>
11
12 <script type="text/javascript">
13
14 AmCharts.ready(function () {
15
16 // line chart, with a bullet at the end
17 var chart = new AmCharts.AmSerialChart();
18 chart.dataProvider = [{
19 "day": 1,
20 "value": 120
21 }, {
22 "day": 2,
23 "value": 124
24 }, {
25 "day": 3,
26 "value": 127
27 }, {
28 "day": 4,
29 "value": 122
30 }, {
31 "day": 5,
32 "value": 121
33 }, {
34 "day": 6,
35 "value": 123
36 }, {
37 "day": 7,
38 "value": 118
39 }, {
40 "day": 8,
41 "value": 113
42 }, {
43 "day": 9,
44 "value": 122
45 }, {
46 "day": 10,
47 "value": 125,
48 bullet: "round"
49 }];
50 chart.categoryField = "day";
51 chart.autoMargins = false;
52 chart.marginLeft = 0;
53 chart.marginRight = 5;
54 chart.marginTop = 0;
55 chart.marginBottom = 0;
56
57 var graph = new AmCharts.AmGraph();
58 graph.valueField = "value";
59 graph.bulletField = "bullet";
60 graph.showBalloon = false;
61 graph.lineColor = "#a9ec49";
62 chart.addGraph(graph);
63
64 var valueAxis = new AmCharts.ValueAxis();
65 valueAxis.gridAlpha = 0;
66 valueAxis.axisAlpha = 0;
67 chart.addValueAxis(valueAxis);
68
69 var categoryAxis = chart.categoryAxis;
70 categoryAxis.gridAlpha = 0;
71 categoryAxis.axisAlpha = 0;
72 categoryAxis.startOnAxis = true;
73 chart.write("line1");
74
75
76 // small column chart
77 chart = new AmCharts.AmSerialChart();
78 chart.dataProvider = [{
79 "day": 1,
80 "value": -5
81 }, {
82 "day": 2,
83 "value": 3
84 }, {
85 "day": 3,
86 "value": 7
87 }, {
88 "day": 4,
89 "value": -3
90 }, {
91 "day": 5,
92 "value": 3
93 }, {
94 "day": 6,
95 "value": 4
96 }, {
97 "day": 7,
98 "value": 6
99 }, {
100 "day": 8,
101 "value": -3
102 }, {
103 "day": 9,
104 "value": -2
105 }, {
106 "day": 10,
107 "value": 6
108 }];
109 chart.categoryField = "day";
110 chart.autoMargins = false;
111 chart.marginLeft = 0;
112 chart.marginRight = 0;
113 chart.marginTop = 0;
114 chart.marginBottom = 0;
115
116 graph = new AmCharts.AmGraph();
117 graph.valueField = "value";
118 graph.type = "column";
119 graph.fillAlphas = 1;
120 graph.lineColor = "#a9ec49";
121 graph.showBalloon = false;
122 chart.addGraph(graph);
123
124 valueAxis = new AmCharts.ValueAxis();
125 valueAxis.gridAlpha = 0;
126 valueAxis.axisAlpha = 0;
127 chart.addValueAxis(valueAxis);
128
129 categoryAxis = chart.categoryAxis;
130 categoryAxis.gridAlpha = 0;
131 categoryAxis.axisAlpha = 0;
132 chart.write("column1");
133
134
135 // line chart, with different line color below zero
136 chart = new AmCharts.AmSerialChart();
137 chart.dataProvider = [{
138 "day": 1,
139 "value": 120
140 }, {
141 "day": 2,
142 "value": 54
143 }, {
144 "day": 3,
145 "value": -18
146 }, {
147 "day": 4,
148 "value": -12
149 }, {
150 "day": 5,
151 "value": -51
152 }, {
153 "day": 6,
154 "value": 12
155 }, {
156 "day": 7,
157 "value": 56
158 }, {
159 "day": 8,
160 "value": 113
161 }, {
162 "day": 9,
163 "value": 142
164 }, {
165 "day": 10,
166 "value": 125
167 }];
168 chart.categoryField = "day";
169 chart.autoMargins = false;
170 chart.marginLeft = 0;
171 chart.marginRight = 5;
172 chart.marginTop = 0;
173 chart.marginBottom = 0;
174
175 graph = new AmCharts.AmGraph();
176 graph.valueField = "value";
177 graph.showBalloon = false;
178 graph.lineColor = "#ffbf63";
179 graph.negativeLineColor = "#289eaf";
180 chart.addGraph(graph);
181
182 valueAxis = new AmCharts.ValueAxis();
183 valueAxis.gridAlpha = 0;
184 valueAxis.axisAlpha = 0;
185 chart.addValueAxis(valueAxis);
186
187 categoryAxis = chart.categoryAxis;
188 categoryAxis.gridAlpha = 0;
189 categoryAxis.axisAlpha = 0;
190 categoryAxis.startOnAxis = true;
191
192 // using guide to show 0 grid
193 var guide = new AmCharts.Guide();
194 guide.value = 0;
195 guide.lineAlpha = 0.1;
196 valueAxis.addGuide(guide);
197 chart.write("line2");
198
199
200 // column chart with different negative colors
201 chart = new AmCharts.AmSerialChart();
202 chart.dataProvider = [{
203 "day": 1,
204 "value": -5
205 }, {
206 "day": 2,
207 "value": 3
208 }, {
209 "day": 3,
210 "value": 7
211 }, {
212 "day": 4,
213 "value": -3
214 }, {
215 "day": 5,
216 "value": 3
217 }, {
218 "day": 6,
219 "value": 4
220 }, {
221 "day": 7,
222 "value": 6
223 }, {
224 "day": 8,
225 "value": -3
226 }, {
227 "day": 9,
228 "value": -2
229 }, {
230 "day": 10,
231 "value": 6
232 }];
233 chart.categoryField = "day";
234 chart.autoMargins = false;
235 chart.marginLeft = 0;
236 chart.marginRight = 0;
237 chart.marginTop = 0;
238 chart.marginBottom = 0;
239
240 graph = new AmCharts.AmGraph();
241 graph.valueField = "value";
242 graph.type = "column";
243 graph.fillAlphas = 1;
244 graph.showBalloon = false;
245 graph.lineColor = "#ffbf63";
246 graph.negativeFillColors = "#289eaf";
247 graph.negativeLineColor = "#289eaf";
248 chart.addGraph(graph);
249
250 valueAxis = new AmCharts.ValueAxis();
251 valueAxis.gridAlpha = 0;
252 valueAxis.axisAlpha = 0;
253 chart.addValueAxis(valueAxis);
254
255 categoryAxis = chart.categoryAxis;
256 categoryAxis.gridAlpha = 0;
257 categoryAxis.axisAlpha = 0;
258 chart.write("column2");
259
260
261 // column chart (thermometer)
262 chart = new AmCharts.AmSerialChart();
263 chart.dataProvider = [{
264 x: 1,
265 y: 100
266 }];
267 chart.categoryField = "x";
268 chart.rotate = true;
269 chart.autoMargins = false;
270 chart.marginLeft = 0;
271 chart.marginRight = 0;
272 chart.marginTop = 0;
273 chart.marginBottom = 0;
274
275 graph = new AmCharts.AmGraph();
276 graph.valueField = "y";
277 graph.type = "column";
278 graph.fillAlphas = 1;
279 graph.fillColors = ["#49cbec", "#f73838"];
280 graph.gradientOrientation = "horizontal";
281 graph.lineColor = "#FFFFFF";
282 graph.showBalloon = false;
283 chart.addGraph(graph);
284
285 valueAxis = new AmCharts.ValueAxis();
286 valueAxis.gridAlpha = 0;
287 valueAxis.axisAlpha = 0;
288 valueAxis.stackType = "100%"; // this is set to achieve that column would occupie 100% of the chart area
289 chart.addValueAxis(valueAxis);
290
291 categoryAxis = chart.categoryAxis;
292 categoryAxis.gridAlpha = 0;
293 categoryAxis.axisAlpha = 0;
294
295 // guide to show position
296 guide = new AmCharts.Guide();
297 guide.value = 66;
298 guide.lineAlpha = 1;
299 guide.above = true;
300 valueAxis.addGuide(guide);
301 chart.write("thermometer1");
302
303
304
305 // column chart (thermometer)
306 chart = new AmCharts.AmSerialChart();
307 chart.dataProvider = [{
308 "x": 1,
309 "y": 100
310 }];
311 chart.categoryField = "x";
312 chart.rotate = true;
313 chart.autoMargins = false;
314 chart.marginLeft = 0;
315 chart.marginRight = 0;
316 chart.marginTop = 0;
317 chart.marginBottom = 0;
318
319 graph = new AmCharts.AmGraph();
320 graph.valueField = "y";
321 graph.type = "column";
322 graph.fillAlphas = 1;
323 graph.fillColors = ["#49cbec", "#f73838"];
324 graph.gradientOrientation = "horizontal";
325 graph.lineColor = "#FFFFFF";
326 graph.showBalloon = false;
327 chart.addGraph(graph);
328
329 valueAxis = new AmCharts.ValueAxis();
330 valueAxis.gridAlpha = 0;
331 valueAxis.axisAlpha = 0;
332 valueAxis.stackType = "100%"; // this is set to achieve that column would occupie 100% of the chart area
333 chart.addValueAxis(valueAxis);
334
335 categoryAxis = chart.categoryAxis;
336 categoryAxis.gridAlpha = 0;
337 categoryAxis.axisAlpha = 0;
338
339 // guide to show position
340 guide = new AmCharts.Guide();
341 guide.value = 29;
342 guide.lineAlpha = 1;
343 guide.above = true;
344 valueAxis.addGuide(guide);
345 chart.write("thermometer2");
346
347
348
349
350 // percent chart
351 chart = new AmCharts.AmSerialChart();
352 chart.dataProvider = [{
353 "x": 1,
354 "y1": 66,
355 "y2": 34
356 }];
357 chart.categoryField = "x";
358 chart.rotate = true;
359 chart.autoMargins = false;
360 chart.marginLeft = 0;
361 chart.marginRight = 0;
362 chart.marginTop = 0;
363 chart.marginBottom = 0;
364
365 graph = new AmCharts.AmGraph();
366 graph.valueField = "y1";
367 graph.type = "column";
368 graph.fillAlphas = 0.6;
369 graph.fillColors = "#000000";
370 graph.gradientOrientation = "horizontal";
371 graph.lineColor = "#FFFFFF";
372 graph.showBalloon = false;
373 chart.addGraph(graph);
374
375 var graph2 = new AmCharts.AmGraph();
376 graph2.valueField = "y2";
377 graph2.type = "column";
378 graph2.fillAlphas = 0.2;
379 graph2.fillColors = "#000000";
380 graph2.lineColor = "#FFFFFF";
381 graph2.showBalloon = false;
382 chart.addGraph(graph2);
383
384 valueAxis = new AmCharts.ValueAxis();
385 valueAxis.gridAlpha = 0;
386 valueAxis.axisAlpha = 0;
387 valueAxis.stackType = "100%"; // this is set to achieve that column would occupie 100% of the chart area
388 chart.addValueAxis(valueAxis);
389
390 categoryAxis = chart.categoryAxis;
391 categoryAxis.gridAlpha = 0;
392 categoryAxis.axisAlpha = 0;
393
394 chart.write("percent1");
395
396
397 // percent chart
398 chart = new AmCharts.AmSerialChart();
399 chart.dataProvider = [{
400 "x": 1,
401 "y1": 29,
402 "y2": 71
403 }];
404 chart.categoryField = "x";
405 chart.rotate = true;
406 chart.autoMargins = false;
407 chart.marginLeft = 0;
408 chart.marginRight = 0;
409 chart.marginTop = 0;
410 chart.marginBottom = 0;
411
412 graph = new AmCharts.AmGraph();
413 graph.valueField = "y1";
414 graph.type = "column";
415 graph.fillAlphas = 0.6;
416 graph.fillColors = "#000000";
417 graph.gradientOrientation = "horizontal";
418 graph.lineColor = "#FFFFFF";
419 graph.showBalloon = false;
420 chart.addGraph(graph);
421
422 graph2 = new AmCharts.AmGraph();
423 graph2.valueField = "y2";
424 graph2.type = "column";
425 graph2.fillAlphas = 0.2;
426 graph2.fillColors = "#000000";
427 graph2.lineColor = "#FFFFFF";
428 graph2.showBalloon = false;
429 chart.addGraph(graph2);
430
431 valueAxis = new AmCharts.ValueAxis();
432 valueAxis.gridAlpha = 0;
433 valueAxis.axisAlpha = 0;
434 valueAxis.stackType = "100%"; // this is set to achieve that column would occupie 100% of the chart area
435 chart.addValueAxis(valueAxis);
436
437 categoryAxis = chart.categoryAxis;
438 categoryAxis.gridAlpha = 0;
439 categoryAxis.axisAlpha = 0;
440 chart.write("percent2");
441
442 // small pie chart
443 chart = new AmCharts.AmPieChart();
444 chart.dataProvider = [{
445 "x": 1,
446 "value": 29
447 }, {
448 "x": 2,
449 "value": 71
450 }];
451 chart.labelField = "x";
452 chart.valueField = "value";
453 chart.labelsEnabled = false;
454 chart.balloonText = undefined;
455 chart.valueText = undefined;
456 chart.radius = 10; // half of a width of a div
457 chart.colors = ["#DADADA", "#777777"];
458 chart.startDuration = 0;
459 chart.write("pie1");
460
461 // small pie chart
462 chart = new AmCharts.AmPieChart();
463 chart.dataProvider = [{
464 "x": 1,
465 "value": 45
466 }, {
467 "x": 2,
468 "value": 55
469 }];
470 chart.labelField = "x";
471 chart.balloonText = undefined;
472 chart.valueField = "value";
473 chart.labelsEnabled = false;
474 chart.valueText = undefined;
475 chart.radius = 10;
476 chart.colors = ["#DADADA", "#777777"];
477 chart.startDuration = 0;
478 chart.write("pie2");
479
480 });
481
482 </script>
483 </head>
484
485 <body>
486
487 <!-- first chart group -->
488 <div class="chart-block">
489 <p><b>Some simple sparklines and micro column chart:</b></p>
490 Alaska, 120 <div id="line1" style="vertical-align: middle; display: inline-block; width: 100px; height: 30px;"></div> 6% <div id="column1" style="vertical-align: middle;display: inline-block; width: 110px; height: 30px;"></div>
491 </div>
492
493 <!-- second chart group -->
494 <div class="chart-block">
495 <p><b>More advanced, with different line and fill colors:</b></p>
496 Alaska, 120 <div id="line2" style="vertical-align: middle; display: inline-block; width: 100px; height: 30px;"></div> 6% <div id="column2" style="vertical-align: middle;display: inline-block; width: 110px; height: 30px;"></div>
497 </div>
498
499 <!-- third chart group -->
500 <div class="chart-block">
501 <p><b>Thermometer example:</b></p>
502 Alaska, 66% <div id="thermometer1" style="vertical-align: middle; display: inline-block; width: 100px; height: 20px;"></div><br />
503 Alabama, 39% <div id="thermometer2" style="vertical-align: middle;display: inline-block; width: 100px; height: 20px"></div>
504 </div>
505
506 <!-- fourth chart group -->
507 <div class="chart-block">
508 <p><b>Simple percent chart example:</b></p>
509 Alaska, 66% <div id="percent1" style="vertical-align: middle; display: inline-block; width: 100px; height: 20px;"></div><br />
510 Alabama, 39% <div id="percent2" style="vertical-align: middle;display: inline-block; width: 100px; height: 20px;"></div>
511 </div>
512
513 <!-- fifth chart group -->
514 <div class="chart-block">
515 <p><b>Simple percent chart example:</b></p>
516 Alaska, 71% <div id="pie1" style="vertical-align: middle; display: inline-block; width: 20px; height: 20px;"></div><br />
517 Alabama, 45% <div id="pie2" style="vertical-align: middle; display: inline-block; width: 20px; height: 20px;"></div>
518 </div>
519
520 <p>Please note that sparkline charts are NOT usable with the free version of JavaScript Charts due to branding link taking up most of the plot area. Please consider <a href="http://shop.amcharts.com/">acquiring a commercial license</a>. (licenses starting as low as 99 Euro)</p>
521
522 </html>
samples/ohlc.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart;
13
14 var dataString = "2012-02-13,126.68,129.78,125.63,129.40\n2012-02-12,130.70,131.00,123.62,124.86\n2012-02-11,128.01,129.98,127.20,129.45\n2012-02-08,122.08,125.70,121.60,125.48\n2012-02-07,119.97,124.78,117.27,121.24\n2012-02-06,130.83,131.92,121.77,122.00\n2012-02-05,130.43,134.00,128.90,129.36\n2012-02-04,134.21,135.90,131.42,131.65\n2012-02-01,136.24,136.59,132.18,133.75\n2012-01-31,129.45,136.65,129.40,135.36\n2012-01-30,131.37,135.45,130.00,132.18\n2012-01-29,131.15,132.79,129.05,131.54\n2012-01-28,128.16,133.20,126.45,130.01\n2012-01-25,138.99,139.09,129.61,130.01\n2012-01-24,139.99,140.70,132.01,135.60\n2012-01-23,136.19,140.00,126.14,139.07\n2012-01-22,148.06,159.98,146.00,155.64\n2012-01-18,161.71,165.75,159.61,161.36\n2012-01-17,161.51,165.36,158.42,160.89\n2012-01-16,165.23,169.01,156.70,159.64\n2012-01-15,177.72,179.22,164.66,169.04\n2012-01-14,177.52,179.42,175.17,178.78\n2012-01-11,176.00,177.85,170.00,172.69\n2012-01-10,177.58,181.00,175.41,178.02\n2012-01-09,171.30,179.50,168.30,179.40\n2012-01-08,180.14,182.46,170.80,171.25\n2012-01-07,181.25,183.60,170.23,177.64\n2012-01-04,191.45,193.00,178.89,180.05\n2012-01-03,195.41,197.39,192.69,194.93\n2012-01-02,199.27,200.26,192.55,194.84\n2011-12-31,199.50,200.50,197.75,198.08\n2011-12-28,200.59,201.56,196.88,199.83\n2011-12-27,198.95,202.96,197.80,198.57\n2011-12-26,199.01,200.96,196.82,198.95\n2011-12-24,195.03,199.33,194.79,198.80\n2011-12-21,190.12,193.91,189.89,193.91\n2011-12-20,185.43,187.83,183.33,187.21\n2011-12-19,182.98,184.64,180.90,183.12\n2011-12-18,186.52,187.33,178.60,182.98\n2011-12-17,190.72,192.65,182.98,184.40\n2011-12-14,190.37,193.20,189.54,190.39\n2011-12-13,190.19,192.12,187.82,191.83\n2011-12-12,193.44,194.48,185.76,190.86\n2011-12-11,194.75,196.83,187.39,188.54\n2011-12-10,193.59,195.66,192.69,194.21\n2011-12-07,190.54,194.99,188.04,194.30\n2011-12-06,186.19,190.10,186.12,189.95\n2011-12-05,182.89,186.00,182.41,185.50\n2011-12-04,177.15,180.90,176.99,179.81\n2011-12-03,181.86,184.14,177.70,178.86\n2011-11-30,187.34,187.70,179.70,182.22\n2011-11-29,179.43,185.17,179.15,184.29\n2011-11-28,176.82,180.60,175.35,180.22\n2011-11-27,175.22,175.79,170.01,174.81\n2011-11-26,173.59,177.27,172.35,172.54\n2011-11-23,172.00,172.05,169.75,171.54\n2011-11-21,165.84,172.35,164.67,168.46\n2011-11-20,165.67,171.79,163.53,168.85\n2011-11-19,166.10,168.20,162.10,163.95\n2011-11-16,165.30,167.02,159.33,166.39\n2011-11-15,166.39,169.59,160.30,164.30\n2011-11-14,177.16,177.57,163.74,166.11\n2011-11-13,160.85,170.98,153.76,169.96\n2011-11-12,165.28,167.70,150.63,153.76\n2011-11-09,171.15,175.12,165.21,165.37\n2011-11-08,186.67,186.90,167.77,175.47\n2011-11-07,190.61,192.68,186.13,186.30\n2011-11-06,187.05,192.00,185.27,191.79\n2011-11-05,185.29,188.96,184.24,186.18\n2011-11-02,189.21,189.44,183.49,187.87\n2011-11-01,188.60,190.10,180.00,187.44\n2011-10-31,187.63,190.12,184.95,189.95\n2011-10-30,186.18,189.37,184.73,187.00\n2011-10-29,185.45,186.59,184.70,185.09\n2011-10-26,185.29,185.37,182.88,184.70\n2011-10-25,184.87,185.90,181.66,182.78\n2011-10-24,185.81,187.21,179.24,185.93\n2011-10-23,188.56,188.60,182.76,186.16\n2011-10-22,170.35,174.90,169.96,174.36\n2011-10-19,174.24,174.63,170.00,170.42\n2011-10-18,171.50,174.19,171.05,173.50\n2011-10-17,172.69,173.04,169.18,172.75\n2011-10-16,165.54,170.18,165.15,169.58\n2011-10-15,167.98,169.57,163.50,166.98\n2011-10-12,163.01,167.28,161.80,167.25\n2011-10-11,169.49,171.88,153.21,162.23\n2011-10-10,167.55,167.88,165.60,166.79\n2011-10-09,170.20,171.11,166.68,167.86\n2011-10-08,163.49,167.91,162.97,167.91\n2011-10-05,158.37,161.58,157.70,161.45\n2011-10-04,158.00,158.08,153.50,156.24\n2011-10-03,157.78,159.18,157.01,157.92\n2011-10-02,156.55,158.59,155.89,158.45\n2011-10-01,154.63,157.41,152.93,156.34\n2011-09-28,153.44,154.60,152.75,153.47\n2011-09-27,153.77,154.52,152.32,154.50\n2011-09-26,154.47,155.00,151.25,152.77\n2011-09-25,146.84,153.22,146.82,153.18\n2011-09-24,146.73,149.85,146.65,148.28\n2011-09-21,141.14,144.65,140.31,144.15\n2011-09-20,140.15,141.79,139.32,140.31\n2011-09-19,143.02,143.16,139.40,140.77\n2011-09-18,139.06,142.85,137.83,140.92\n2011-09-17,138.99,140.59,137.60,138.41\n2011-09-14,136.57,138.98,136.20,138.81\n2011-09-13,138.83,139.00,136.65,137.20\n2011-09-12,135.99,139.40,135.75,136.85\n2011-09-11,137.90,138.30,133.75,135.49\n2011-09-10,136.99,138.04,133.95,136.71\n2011-09-07,132.01,132.30,130.00,131.77\n2011-09-06,135.56,137.57,132.71,135.01\n2011-09-05,144.97,145.84,136.10,136.76\n2011-09-04,139.94,145.73,139.84,144.16\n2011-08-31,139.49,139.65,137.41,138.48\n2011-08-30,132.67,138.25,132.30,136.25\n2011-08-29,129.88,134.18,129.54,134.08\n2011-08-28,130.99,132.41,126.63,126.82\n2011-08-27,133.39,134.66,132.10,132.25\n2011-08-24,130.53,135.37,129.81,135.30\n2011-08-23,133.09,133.34,129.76,131.07\n2011-08-22,131.22,132.75,130.33,132.51\n2011-08-21,122.21,128.96,121.00,127.57\n2011-08-20,123.96,124.50,120.50,122.22\n2011-08-17,122.01,123.50,119.82,122.06\n2011-08-16,117.01,118.50,111.62,117.05\n2011-08-15,122.74,124.86,119.65,119.90\n2011-08-14,128.29,128.30,123.71,124.03\n2011-08-13,128.32,129.35,126.50,127.79\n2011-08-10,123.12,127.75,120.30,125.00\n2011-08-09,131.11,133.00,125.09,126.39\n2011-08-08,136.76,136.86,132.00,134.01\n2011-08-07,134.94,137.24,132.63,135.03\n2011-08-06,132.90,135.27,128.30,135.25\n2011-08-03,135.26,135.95,131.50,131.85\n2011-08-02,136.65,136.96,134.15,136.49";
15 var chartData = [];
16
17 AmCharts.ready(function () {
18 // parse data string first
19 parseData();
20
21 // SERIAL CHART
22 chart = new AmCharts.AmSerialChart();
23 chart.pathToImages = "../amcharts/images/";
24 chart.dataProvider = chartData;
25 chart.plotAreaBorderColor = "#000000";
26 chart.plotAreaBorderAlpha = 1;
27 chart.categoryField = "date";
28
29 // AXES
30 // Category
31 var categoryAxis = chart.categoryAxis;
32 categoryAxis.parseDates = true; // as our data is date-based, we set parseDates to true
33 categoryAxis.minPeriod = "DD"; // our data is daily, so we set minPeriod to DD
34 categoryAxis.tickLenght = 0;
35
36 // value
37 // in case you don't want to change default settings of value axis,
38 // you don't need to create it, as one value axis is created automatically.
39 // GRAPH
40 graph = new AmCharts.AmGraph();
41 graph.title = "Price:";
42 graph.type = "ohlc";
43 graph.lineColor = "#7f8da9";
44 graph.fillColors = "#7f8da9";
45 graph.negativeLineColor = "#db4c3c";
46 graph.negativeFillColors = "#db4c3c";
47 // candlestick graph has 4 fields - open, low, high, close
48 graph.openField = "open";
49 graph.highField = "high";
50 graph.lowField = "low";
51 graph.closeField = "close";
52 // this will be used by scrollbar's graph, as we force it to "line" type
53 graph.valueField = "close";
54 graph.balloonText = "Open:<b>[[open]]</b><br>Low:<b>[[low]]</b><br>High:<b>[[high]]</b><br>Close:<b>[[close]]</b><br>";
55 chart.addGraph(graph);
56
57 // CURSOR
58 var chartCursor = new AmCharts.ChartCursor();
59 chart.addChartCursor(chartCursor);
60
61 // SCROLLBAR
62 var chartScrollbar = new AmCharts.ChartScrollbar();
63 chartScrollbar.scrollbarHeight = 30;
64 chartScrollbar.graph = graph;
65 chartScrollbar.graphType = "line";
66 chartScrollbar.gridCount = 4;
67 chartScrollbar.color = "#FFFFFF";
68 chart.addChartScrollbar(chartScrollbar);
69
70 // WRITE
71 chart.write("chartdiv");
72 });
73
74 // Parse data
75 function parseData() {
76 // split data string into array
77 var rowArray = dataString.split("\n");
78 // loop through this array and create data items
79 for (var i = rowArray.length - 1; i > -1; i--) {
80 var row = rowArray[i].split(",");
81 var dateArray = row[0].split("-");
82 // we have to subtract 1 from month, as months in javascript are zero-based
83 var date = new Date(Number(dateArray[0]), Number(dateArray[1]) - 1, Number(dateArray[2]));
84 var open = row[1];
85 var high = row[2];
86 var low = row[3];
87 var close = row[4];
88
89 chartData.push({
90 date: date,
91 open: open,
92 high: high,
93 low: low,
94 close: close
95 });
96 }
97 }
98 </script>
99 </head>
100
101 <body>
102 <div id="chartdiv" style="width:100%; height:400px;"></div>
103 </body>
104
105 </html>
samples/pie3D.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/pie.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart;
13 var legend;
14
15 var chartData = [
16 {
17 "country": "Lithuania",
18 "value": 260
19 },
20 {
21 "country": "Ireland",
22 "value": 201
23 },
24 {
25 "country": "Germany",
26 "value": 65
27 },
28 {
29 "country": "Australia",
30 "value": 39
31 },
32 {
33 "country": "UK",
34 "value": 19
35 },
36 {
37 "country": "Latvia",
38 "value": 10
39 }
40 ];
41
42 AmCharts.ready(function () {
43 // PIE CHART
44 chart = new AmCharts.AmPieChart();
45 chart.dataProvider = chartData;
46 chart.titleField = "country";
47 chart.valueField = "value";
48 chart.outlineColor = "#FFFFFF";
49 chart.outlineAlpha = 0.8;
50 chart.outlineThickness = 2;
51 chart.balloonText = "[[title]]<br><span style='font-size:14px'><b>[[value]]</b> ([[percents]]%)</span>";
52 // this makes the chart 3D
53 chart.depth3D = 15;
54 chart.angle = 30;
55
56 // WRITE
57 chart.write("chartdiv");
58 });
59 </script>
60 </head>
61
62 <body>
63 <div id="chartdiv" style="width: 100%; height: 400px;"></div>
64 </body>
65
66 </html>
samples/pieDonut3D.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/pie.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart;
13
14 var chartData = [
15 {
16 "country": "United States",
17 "visits": 9252
18 },
19 {
20 "country": "China",
21 "visits": 1882
22 },
23 {
24 "country": "Japan",
25 "visits": 1809
26 },
27 {
28 "country": "Germany",
29 "visits": 1322
30 },
31 {
32 "country": "United Kingdom",
33 "visits": 1122
34 },
35 {
36 "country": "France",
37 "visits": 1114
38 },
39 {
40 "country": "India",
41 "visits": 984
42 },
43 {
44 "country": "Spain",
45 "visits": 711
46 }
47 ];
48
49
50 AmCharts.ready(function () {
51 // PIE CHART
52 chart = new AmCharts.AmPieChart();
53
54 // title of the chart
55 chart.addTitle("Visitors countries", 16);
56
57 chart.dataProvider = chartData;
58 chart.titleField = "country";
59 chart.valueField = "visits";
60 chart.sequencedAnimation = true;
61 chart.startEffect = "elastic";
62 chart.innerRadius = "30%";
63 chart.startDuration = 2;
64 chart.labelRadius = 15;
65 chart.balloonText = "[[title]]<br><span style='font-size:14px'><b>[[value]]</b> ([[percents]]%)</span>";
66 // the following two lines makes the chart 3D
67 chart.depth3D = 10;
68 chart.angle = 15;
69
70 // WRITE
71 chart.write("chartdiv");
72 });
73 </script>
74 </head>
75
76 <body>
77 <div id="chartdiv" style="width:600px; height:400px;"></div>
78 </body>
79
80 </html>
samples/pieSimple.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/pie.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart;
13 var legend;
14
15 var chartData = [{
16 country: "Czech Republic",
17 litres: 301.90
18 }, {
19 country: "Ireland",
20 litres: 201.10
21 }, {
22 country: "Germany",
23 litres: 165.80
24 }, {
25 country: "Australia",
26 litres: 139.90
27 }, {
28 country: "Austria",
29 litres: 128.30
30 }, {
31 country: "UK",
32 litres: 99.00
33 }, {
34 country: "Belgium",
35 litres: 60.00
36 }];
37
38 AmCharts.ready(function () {
39 // PIE CHART
40 chart = new AmCharts.AmPieChart();
41 chart.dataProvider = chartData;
42 chart.titleField = "country";
43 chart.valueField = "litres";
44 chart.outlineColor = "#FFFFFF";
45 chart.outlineAlpha = 0.8;
46 chart.outlineThickness = 2;
47
48 // WRITE
49 chart.write("chartdiv");
50 });
51 </script>
52 </head>
53
54 <body>
55 <div id="chartdiv" style="width: 100%; height: 400px;"></div>
56 </body>
57
58 </html>
samples/pieWithLegend.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/pie.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart;
13 var legend;
14
15 var chartData = [
16 {
17 "country": "Czech Republic",
18 "litres": 156.9
19 },
20 {
21 "country": "Ireland",
22 "litres": 131.1
23 },
24 {
25 "country": "Germany",
26 "litres": 115.8
27 },
28 {
29 "country": "Australia",
30 "litres": 109.9
31 },
32 {
33 "country": "Austria",
34 "litres": 108.3
35 },
36 {
37 "country": "UK",
38 "litres": 65
39 },
40 {
41 "country": "Belgium",
42 "litres": 50
43 }
44 ];
45
46 AmCharts.ready(function () {
47 // PIE CHART
48 chart = new AmCharts.AmPieChart();
49 chart.dataProvider = chartData;
50 chart.titleField = "country";
51 chart.valueField = "litres";
52
53 // LEGEND
54 legend = new AmCharts.AmLegend();
55 legend.align = "center";
56 legend.markerType = "circle";
57 chart.balloonText = "[[title]]<br><span style='font-size:14px'><b>[[value]]</b> ([[percents]]%)</span>";
58 chart.addLegend(legend);
59
60 // WRITE
61 chart.write("chartdiv");
62 });
63
64 // changes label position (labelRadius)
65 function setLabelPosition() {
66 if (document.getElementById("rb1").checked) {
67 chart.labelRadius = 30;
68 chart.labelText = "[[title]]: [[value]]";
69 } else {
70 chart.labelRadius = -30;
71 chart.labelText = "[[percents]]%";
72 }
73 chart.validateNow();
74 }
75
76
77 // makes chart 2D/3D
78 function set3D() {
79 if (document.getElementById("rb3").checked) {
80 chart.depth3D = 10;
81 chart.angle = 10;
82 } else {
83 chart.depth3D = 0;
84 chart.angle = 0;
85 }
86 chart.validateNow();
87 }
88
89 // changes switch of the legend (x or v)
90 function setSwitch() {
91 if (document.getElementById("rb5").checked) {
92 legend.switchType = "x";
93 } else {
94 legend.switchType = "v";
95 }
96 legend.validateNow();
97 }
98 </script>
99 </head>
100
101 <body>
102 <div id="chartdiv" style="width: 100%; height: 400px;"></div>
103 <table align="center" cellspacing="20">
104 <tr>
105 <td>
106 <input type="radio" checked="true" name="group" id="rb1" onclick="setLabelPosition()">labels outside
107 <input type="radio" name="group" id="rb2" onclick="setLabelPosition()">labels inside</td>
108 <td>
109 <input type="radio" name="group2" id="rb3" onclick="set3D()">3D
110 <input type="radio" checked="true" name="group2" id="rb4" onclick="set3D()">2D</td>
111 <td>Legend switch type:
112 <input type="radio" checked="true" name="group3" id="rb5"
113 onclick="setSwitch()">x
114 <input type="radio" name="group3" id="rb6" onclick="setSwitch()">v</td>
115 </tr>
116 </table>
117 </body>
118
119 </html>
samples/pieWithPatterns.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/pie.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart;
13
14 var chartData = [
15 {
16 "country": "Czech Republic",
17 "litres": 301.9,
18 "pattern": {"url":"../amcharts/patterns/black/pattern1.png", "width":4, "height":4, "color":"#cc0000"}
19 },
20 {
21 "country": "Ireland",
22 "litres": 201.1,
23 "pattern": {"url":"../amcharts/patterns/black/pattern2.png", "width":4, "height":4}
24 },
25 {
26 "country": "Germany",
27 "litres": 165.8,
28 "pattern": {"url":"../amcharts/patterns/black/pattern3.png", "width":4, "height":4}
29 },
30 {
31 "country": "Australia",
32 "litres": 139.9,
33 "pattern": {"url":"../amcharts/patterns/black/pattern4.png", "width":4, "height":4}
34 },
35 {
36 "country": "Austria",
37 "litres": 128.3,
38 "pattern": {"url":"../amcharts/patterns/black/pattern5.png", "width":4, "height":4}
39 },
40 {
41 "country": "UK",
42 "litres": 99,
43 "pattern": {"url":"../amcharts/patterns/black/pattern6.png", "width":4, "height":4}
44 },
45 {
46 "country": "Belgium",
47 "litres": 60,
48 "pattern": {"url":"../amcharts/patterns/black/pattern7.png", "width":4, "height":4}
49 }
50 ];
51
52 AmCharts.ready(function () {
53 // PIE CHART
54 chart = new AmCharts.AmPieChart();
55 chart.dataProvider = chartData;
56 chart.titleField = "country";
57 chart.valueField = "litres";
58 chart.patternField = "pattern";
59 chart.outlineColor = "#000000";
60 chart.outlineAlpha = 0.6;
61 chart.balloonText = "[[title]]<br><span style='font-size:14px'><b>[[value]]</b> ([[percents]]%)</span>";
62
63 var legend = new AmCharts.AmLegend();
64 legend.markerBorderColor = "#000000";
65 legend.switchType = undefined;
66 legend.align = "center";
67 chart.addLegend(legend);
68
69 // WRITE
70 chart.write("chartdiv");
71 });
72 </script>
73 </head>
74
75 <body>
76 <div id="chartdiv" style="width: 100%; height: 400px;"></div>
77 </body>
78
79 </html>
samples/pyramidChart.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/funnel.js" type="text/javascript"></script>
10 <script type="text/javascript">
11
12 var chart;
13 var data = [
14 {
15 "title": "Website visits",
16 "value": 300
17 },
18 {
19 "title": "Downloads",
20 "value": 123
21 },
22 {
23 "title": "Requested price list",
24 "value": 98
25 },
26 {
27 "title": "Contaced for more info",
28 "value": 72
29 },
30 {
31 "title": "Purchased",
32 "value": 35
33 },
34 {
35 "title": "Contacted for support",
36 "value": 15
37 },
38 {
39 "title": "Purchased additional products",
40 "value": 8
41 }
42 ];
43
44 AmCharts.ready(function () {
45
46 chart = new AmCharts.AmFunnelChart();
47 chart.rotate = true;
48 chart.titleField = "title";
49 chart.balloon.fixedPosition = true;
50 chart.marginRight = 210;
51 chart.marginLeft = 15;
52 chart.labelPosition = "right";
53 chart.funnelAlpha = 0.9;
54 chart.valueField = "value";
55 chart.startX = -500;
56 chart.dataProvider = data;
57 chart.startAlpha = 0;
58 chart.write("chartdiv");
59 });
60 </script>
61 </head>
62
63 <body>
64 <div id="chartdiv" style="width: 500px; height: 300px;"></div>
65 </body>
66
67 </html>
samples/radarPolar.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/radar.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart;
13
14 var chartData = [
15 {
16 "direction": "N",
17 "value": 8
18 },
19 {
20 "direction": "NE",
21 "value": 9
22 },
23 {
24 "direction": "E",
25 "value": 4.5
26 },
27 {
28 "direction": "SE",
29 "value": 3.5
30 },
31 {
32 "direction": "S",
33 "value": 9.2
34 },
35 {
36 "direction": "SW",
37 "value": 8.4
38 },
39 {
40 "direction": "W",
41 "value": 11.1
42 },
43 {
44 "direction": "NW",
45 "value": 10
46 }
47 ];
48
49
50 AmCharts.ready(function () {
51 // RADAR CHART
52 chart = new AmCharts.AmRadarChart();
53 chart.dataProvider = chartData;
54 chart.categoryField = "direction";
55 chart.startDuration = 1;
56
57 // TITLE
58 chart.addTitle("Prevailing winds", 15);
59
60 // VALUE AXIS
61 var valueAxis = new AmCharts.ValueAxis();
62 valueAxis.gridType = "circles";
63 valueAxis.fillAlpha = 0.05;
64 valueAxis.fillColor = "#000000";
65 valueAxis.axisAlpha = 0.2;
66 valueAxis.gridAlpha = 0;
67 valueAxis.fontWeight = "bold";
68 valueAxis.minimum = 0;
69 chart.addValueAxis(valueAxis);
70
71 // GRAPH
72 var graph = new AmCharts.AmGraph();
73 graph.lineColor = "#FFCC00";
74 graph.fillAlphas = 0.4;
75 graph.bullet = "round";
76 graph.valueField = "value";
77 graph.balloonText = "[[category]]: [[value]] m/s";
78 chart.addGraph(graph);
79
80 // GUIDES
81 // blue fill
82 var guide = new AmCharts.Guide();
83 guide.angle = 225;
84 guide.tickLength = 0;
85 guide.toAngle = 315;
86 guide.value = 0;
87 guide.toValue = 14;
88 guide.fillColor = "#0066CC";
89 guide.fillAlpha = 0.6;
90 valueAxis.addGuide(guide);
91
92 // red fill
93 guide = new AmCharts.Guide();
94 guide.angle = 45;
95 guide.tickLength = 0;
96 guide.toAngle = 135;
97 guide.value = 0;
98 guide.toValue = 14;
99 guide.fillColor = "#CC3333";
100 guide.fillAlpha = 0.6;
101 valueAxis.addGuide(guide);
102
103 // WRITE
104 chart.write("chartdiv");
105 });
106 </script>
107 </head>
108
109 <body>
110 <div id="chartdiv" style="width:600px; height:400px;"></div>
111 </body>
112
113 </html>
samples/radarSimple.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/radar.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart;
13
14 var chartData = [
15 {
16 "country": "Czech Republic",
17 "litres": 156.9
18 },
19 {
20 "country": "Ireland",
21 "litres": 131.1
22 },
23 {
24 "country": "Germany",
25 "litres": 115.8
26 },
27 {
28 "country": "Australia",
29 "litres": 109.9
30 },
31 {
32 "country": "Austria",
33 "litres": 108.3
34 },
35 {
36 "country": "UK",
37 "litres": 99
38 }
39 ];
40
41 AmCharts.ready(function () {
42 // RADAR CHART
43 chart = new AmCharts.AmRadarChart();
44 chart.dataProvider = chartData;
45 chart.categoryField = "country";
46 chart.startDuration = 2;
47
48 // VALUE AXIS
49 var valueAxis = new AmCharts.ValueAxis();
50 valueAxis.axisAlpha = 0.15;
51 valueAxis.minimum = 0;
52 valueAxis.dashLength = 3;
53 valueAxis.axisTitleOffset = 20;
54 valueAxis.gridCount = 5;
55 chart.addValueAxis(valueAxis);
56
57 // GRAPH
58 var graph = new AmCharts.AmGraph();
59 graph.valueField = "litres";
60 graph.bullet = "round";
61 graph.balloonText = "[[value]] litres of beer per year";
62 chart.addGraph(graph);
63
64 // WRITE
65 chart.write("chartdiv");
66 });
67 </script>
68 </head>
69
70 <body>
71 <div id="chartdiv" style="width:600px; height:400px;"></div>
72 </body>
73
74 </html>
samples/style.css
File was created 1 body {
2 font-family: Tahoma,Arial,Verdana;
3 font-size: 12px;
4 color: black;
5 }
6
7 a:link {color: #84c4e2;}
8 a:visited {color:#84c4e2;}
9 a:hover {color: #cd82ad;}
10 a:active {color: #84c4e2;}
samples/waterFallChart.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/serial.js" type="text/javascript"></script>
10 <script type="text/javascript">
11 var chart;
12
13 var chartData = [
14 {
15 "name": "Income A",
16 "open": 0,
17 "close": 11.13,
18 "color": "#54cb6a",
19 "balloonValue": 11.13
20 },
21 {
22 "name": "Income B",
23 "open": 11.13,
24 "close": 15.81,
25 "color": "#54cb6a",
26 "balloonValue": 4.68
27 },
28 {
29 "name": "Total Income",
30 "open": 0,
31 "close": 15.81,
32 "color": "#169b2f",
33 "balloonValue": 15.81
34 },
35 {
36 "name": "Expenses A",
37 "open": 12.92,
38 "close": 15.81,
39 "color": "#cc4b48",
40 "balloonValue": 2.89
41 },
42 {
43 "name": "Expenses B",
44 "open": 8.64,
45 "close": 12.92,
46 "color": "#cc4b48",
47 "balloonValue": 4.24
48 },
49 {
50 "name": "Revenue",
51 "open": 0,
52 "close": 8.64,
53 "color": "#1c8ceb",
54 "balloonValue": 11.13
55 }
56 ];
57
58
59 AmCharts.ready(function () {
60 // Waterfall chart is a simple serial chart with some specific settings
61 chart = new AmCharts.AmSerialChart();
62 chart.dataProvider = chartData;
63 chart.categoryField = "name";
64 chart.columnWidth = 0.6;
65 chart.startDuration = 1;
66
67 // AXES
68 // Category
69 var categoryAxis = chart.categoryAxis;
70 categoryAxis.gridAlpha = 0.1;
71 categoryAxis.axisAlpha = 0;
72 categoryAxis.gridPosition = "start";
73
74 // Value
75 var valueAxis = new AmCharts.ValueAxis();
76 valueAxis.gridAlpha = 0.1;
77 valueAxis.axisAlpha = 0;
78 chart.addValueAxis(valueAxis);
79
80 // GRAPH
81 var graph = new AmCharts.AmGraph();
82 graph.valueField = "close";
83 graph.openField = "open";
84 graph.type = "column";
85 graph.lineAlpha = 1;
86 graph.lineColor = "#BBBBBB";
87 graph.colorField = "color";
88 graph.fillAlphas = 0.8;
89 graph.balloonText = "<span style='color:[[color]]'>[[category]]</span><br><span style='font-size:13px;'><b>$[[balloonValue]] Mln</b></span>";
90 graph.labelText = "$[[balloonValue]]";
91 chart.addGraph(graph);
92
93 // Trend lines used for connectors
94 var trendLine = new AmCharts.TrendLine();
95 trendLine.initialCategory = "Income A";
96 trendLine.finalCategory = "Income B";
97 trendLine.initialValue = 11.13;
98 trendLine.finalValue = 11.13;
99 trendLine.lineColor = "#888888";
100 trendLine.dashLength = 3;
101 chart.addTrendLine(trendLine);
102
103 trendLine = new AmCharts.TrendLine();
104 trendLine.initialCategory = "Income B";
105 trendLine.finalCategory = "Expenses A";
106 trendLine.initialValue = 15.81;
107 trendLine.finalValue = 15.81;
108 trendLine.lineColor = "#888888";
109 trendLine.dashLength = 3;
110 chart.addTrendLine(trendLine);
111
112 trendLine = new AmCharts.TrendLine();
113 trendLine.initialCategory = "Expenses A";
114 trendLine.finalCategory = "Expenses B";
115 trendLine.initialValue = 12.92;
116 trendLine.finalValue = 12.92;
117 trendLine.lineColor = "#888888";
118 trendLine.dashLength = 3;
119 chart.addTrendLine(trendLine);
120
121 trendLine = new AmCharts.TrendLine();
122 trendLine.initialCategory = "Expenses B";
123 trendLine.finalCategory = "Revenue";
124 trendLine.initialValue = 8.64;
125 trendLine.finalValue = 8.64;
126 trendLine.lineColor = "#888888";
127 trendLine.dashLength = 3;
128 chart.addTrendLine(trendLine);
129
130 // WRITE
131 chart.write("chartdiv");
132 });
133 </script>
134 </head>
135
136 <body>
137 <div id="chartdiv" style="width: 600px; height: 400px;"></div>
138 </body>
139
140 </html>
samples/xyBubbleSimple.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/xy.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart;
13
14 var chartData = [
15 {
16 "x": 10,
17 "y": 14,
18 "value": 59
19 },
20 {
21 "x": 5,
22 "y": 3,
23 "value": 50
24 },
25 {
26 "x": -10,
27 "y": -3,
28 "value": 19
29 },
30 {
31 "x": -6,
32 "y": 5,
33 "value": 65
34 },
35 {
36 "x": 15,
37 "y": -4,
38 "value": 92
39 },
40 {
41 "x": 13,
42 "y": 1,
43 "value": 8
44 },
45 {
46 "x": 1,
47 "y": 6,
48 "value": 35
49 }
50 ];
51
52 AmCharts.ready(function () {
53 // XY Chart
54 chart = new AmCharts.AmXYChart();
55 chart.pathToImages = "../amcharts/images/";
56 chart.dataProvider = chartData;
57 chart.startDuration = 1.5;
58
59 // AXES
60 // X
61 var xAxis = new AmCharts.ValueAxis();
62 xAxis.title = "X Axis";
63 xAxis.position = "bottom";
64 xAxis.autoGridCount = true;
65 chart.addValueAxis(xAxis);
66
67 // Y
68 var yAxis = new AmCharts.ValueAxis();
69 yAxis.title = "Y Axis";
70 yAxis.position = "left";
71 yAxis.autoGridCount = true;
72 chart.addValueAxis(yAxis);
73
74 // GRAPH
75 var graph = new AmCharts.AmGraph();
76 graph.valueField = "value"; // valueField responsible for the size of a bullet
77 graph.xField = "x";
78 graph.yField = "y";
79 graph.lineAlpha = 0;
80 graph.bullet = "bubble";
81 graph.balloonText = "x:<b>[[x]]</b> y:<b>[[y]]</b><br>value:<b>[[value]]</b>"
82 chart.addGraph(graph);
83
84 // WRITE
85 chart.write("chartdiv");
86 });
87 </script>
88 </head>
89
90 <body>
91 <div id="chartdiv" style="width: 600px; height: 400px;"></div>
92 </body>
93
94 </html>
samples/xyBubbleWithZoom.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/xy.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart;
13
14 var chartData = [
15 {
16 "y": 10,
17 "x": 14,
18 "value": 59,
19 "y2": -5,
20 "x2": -3,
21 "value2": 44
22 },
23 {
24 "y": 5,
25 "x": 3,
26 "value": 50,
27 "y2": -15,
28 "x2": -8,
29 "value2": 12
30 },
31 {
32 "y": -10,
33 "x": -3,
34 "value": 19,
35 "y2": -4,
36 "x2": 6,
37 "value2": 35
38 },
39 {
40 "y": -6,
41 "x": 5,
42 "value": 65,
43 "y2": -5,
44 "x2": -6,
45 "value2": 168
46 },
47 {
48 "y": 15,
49 "x": -4,
50 "value": 92,
51 "y2": -10,
52 "x2": -8,
53 "value2": 102
54 },
55 {
56 "y": 13,
57 "x": 1,
58 "value": 8,
59 "y2": -2,
60 "x2": -3,
61 "value2": 41
62 },
63 {
64 "y": 1,
65 "x": 6,
66 "value": 35,
67 "y2": 0,
68 "x2": -3,
69 "value2": 16
70 }
71 ];
72
73 AmCharts.ready(function () {
74 // XY Chart
75 chart = new AmCharts.AmXYChart();
76 chart.pathToImages = "../amcharts/images/";
77 chart.dataProvider = chartData;
78 chart.startDuration = 1.5;
79
80 // AXES
81 // X
82 var xAxis = new AmCharts.ValueAxis();
83 xAxis.position = "bottom";
84 xAxis.axisAlpha = 0;
85 xAxis.minMaxMultiplayer = 1.2;
86 chart.addValueAxis(xAxis);
87
88 // Y
89 var yAxis = new AmCharts.ValueAxis();
90 yAxis.position = "left";
91 yAxis.minMaxMultiplier = 1.2;
92 yAxis.axisAlpha = 0;
93 chart.addValueAxis(yAxis);
94
95 // GRAPHS
96 // first graph
97 var graph = new AmCharts.AmGraph();
98 graph.valueField = "value";
99 graph.lineColor = "#b0de09";
100 graph.xField = "x";
101 graph.yField = "y";
102 graph.lineAlpha = 0;
103 graph.bullet = "bubble";
104 graph.balloonText = "x:<b>[[x]]</b> y:<b>[[y]]</b><br>value:<b>[[value]]</b>";
105 chart.addGraph(graph);
106
107 // second graph
108 graph = new AmCharts.AmGraph();
109 graph.valueField = "value2";
110 graph.lineColor = "#fcd202";
111 graph.xField = "x2";
112 graph.yField = "y2";
113 graph.lineAlpha = 0;
114 graph.bullet = "bubble";
115 graph.balloonText = "x:<b>[[x]]</b> y:<b>[[y]]</b><br>value:<b>[[value]]</b>";
116 chart.addGraph(graph);
117
118 // CURSOR
119 var chartCursor = new AmCharts.ChartCursor();
120 chart.addChartCursor(chartCursor);
121
122 // SCROLLBAR
123 var chartScrollbar = new AmCharts.ChartScrollbar();
124 chart.addChartScrollbar(chartScrollbar);
125
126 // WRITE
127 chart.write("chartdiv");
128 });
129 </script>
130 </head>
131
132 <body>
133 <div id="chartdiv" style="width: 600px; height: 400px;"></div>
134 </body>
135
136 </html>
samples/xyError.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/xy.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart;
13
14 var chartData = [{
15 "x": 10,
16 "y": 14,
17 "errorX": 3,
18 "errorY": 4
19 }, {
20 "x": 5,
21 "y": 3,
22 "errorX": 1.52,
23 "errorY": 6.8
24 }, {
25 "x": -10,
26 "y": 3,
27 "errorX": 0.8,
28 "errorY": 3.5
29 }, {
30 "x": -6,
31 "y": 5,
32 "errorX": 1.2,
33 "errorY": 4.2
34 }, {
35 "x": 11,
36 "y": -4,
37 "errorX": 2.4,
38 "errorY": 3.9
39 }, {
40 "x": 13,
41 "y": 1,
42 "errorX": 1.5,
43 "errorY": 3.3
44 }, {
45 "x": 1,
46 "y": 6,
47 "errorX": 2,
48 "errorY": 3.3
49 }];
50
51 AmCharts.ready(function() {
52 // XY Chart
53 chart = new AmCharts.AmXYChart();
54 chart.pathToImages = "../amcharts/images/";
55 chart.dataProvider = chartData;
56
57 // AXES
58 // X
59 var xAxis = new AmCharts.ValueAxis();
60 xAxis.title = "X Axis";
61 xAxis.position = "bottom";
62 xAxis.autoGridCount = true;
63 chart.addValueAxis(xAxis);
64
65 // Y
66 var yAxis = new AmCharts.ValueAxis();
67 yAxis.title = "Y Axis";
68 yAxis.position = "left";
69 yAxis.autoGridCount = true;
70 yAxis.minMaxMultiplier = 1.2;
71 chart.addValueAxis(yAxis);
72
73 // GRAPH
74 var graph = new AmCharts.AmGraph();
75 graph.errorField = "errorX"; // valueField responsible for the size of a bullet
76 graph.xField = "x";
77 graph.yField = "y";
78 graph.lineAlpha = 0;
79 graph.bulletAxis = xAxis;
80 graph.bullet = "xError";
81 graph.balloonText = "x:<b>[[x]]</b> y:<b>[[y]]</b><br>x error:<b>[[errorX]]</b><br>y error:<b>[[errorY]]</b>";
82 chart.addGraph(graph);
83
84 // GRAPH
85 graph = new AmCharts.AmGraph();
86 graph.errorField = "errorY"; // valueField responsible for the size of a bullet
87 graph.xField = "x";
88 graph.yField = "y";
89 graph.lineAlpha = 0;
90 graph.bulletAxis = yAxis;
91 graph.bullet = "yError";
92 graph.balloonText = "x:<b>[[x]]</b> y:<b>[[y]]</b><br>x error:<b>[[errorX]]</b><br>y error:<b>[[errorY]]</b>";
93 chart.addGraph(graph);
94
95 // WRITE
96 chart.write("chartdiv");
97 });
98 </script>
99 </head>
100
101 <body>
102 <div id="chartdiv" style="width: 600px; height: 400px;"></div>
103 </body>
104
105 </html>
samples/xyScatter.html
File was created 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>amCharts examples</title>
7 <link rel="stylesheet" href="style.css" type="text/css">
8 <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9 <script src="../amcharts/xy.js" type="text/javascript"></script>
10
11 <script type="text/javascript">
12 var chart;
13
14 var chartData = [
15 {
16 "ax": 1,
17 "ay": 0.5,
18 "bx": 1,
19 "by": 2.2
20 },
21 {
22 "ax": 2,
23 "ay": 1.3,
24 "bx": 2,
25 "by": 4.9
26 },
27 {
28 "ax": 3,
29 "ay": 2.3,
30 "bx": 3,
31 "by": 5.1
32 },
33 {
34 "ax": 4,
35 "ay": 2.8,
36 "bx": 4,
37 "by": 5.3
38 },
39 {
40 "ax": 5,
41 "ay": 3.5,
42 "bx": 5,
43 "by": 6.1
44 },
45 {
46 "ax": 6,
47 "ay": 5.1,
48 "bx": 6,
49 "by": 8.3
50 },
51 {
52 "ax": 7,
53 "ay": 6.7,
54 "bx": 7,
55 "by": 10.5
56 },
57 {
58 "ax": 8,
59 "ay": 8,
60 "bx": 8,
61 "by": 12.3
62 },
63 {
64 "ax": 9,
65 "ay": 8.9,
66 "bx": 9,
67 "by": 14.5
68 },
69 {
70 "ax": 10,
71 "ay": 9.7,
72 "bx": 10,
73 "by": 15
74 },
75 {
76 "ax": 11,
77 "ay": 10.4,
78 "bx": 11,
79 "by": 18.8
80 },
81 {
82 "ax": 12,
83 "ay": 11.7,
84 "bx": 12,
85 "by": 19
86 }
87 ];
88
89 AmCharts.ready(function () {
90 // XY CHART
91 chart = new AmCharts.AmXYChart();
92 chart.pathToImages = "../amcharts/images/";
93 chart.dataProvider = chartData;
94 chart.startDuration = 1;
95
96 // AXES
97 // X
98 var xAxis = new AmCharts.ValueAxis();
99 xAxis.title = "X Axis";
100 xAxis.position = "bottom";
101 xAxis.dashLength = 1;
102 xAxis.axisAlpha = 0;
103 xAxis.autoGridCount = true;
104 chart.addValueAxis(xAxis);
105
106 // Y
107 var yAxis = new AmCharts.ValueAxis();
108 yAxis.position = "left";
109 yAxis.title = "Y Axis";
110 yAxis.dashLength = 1;
111 yAxis.axisAlpha = 0;
112 yAxis.autoGridCount = true;
113 chart.addValueAxis(yAxis);
114
115 // GRAPHS
116 // triangles up
117 var graph1 = new AmCharts.AmGraph();
118 graph1.lineColor = "#FF6600";
119 graph1.balloonText = "x:[[x]] y:[[y]]";
120 graph1.xField = "ax";
121 graph1.yField = "ay";
122 graph1.lineAlpha = 0;
123 graph1.bullet = "triangleUp";
124 chart.addGraph(graph1);
125
126 // triangles down
127 var graph2 = new AmCharts.AmGraph();
128 graph2.lineColor = "#FCD202";
129 graph2.balloonText = "x:[[x]] y:[[y]]";
130 graph2.xField = "bx";
131 graph2.yField = "by";
132 graph2.lineAlpha = 0;
133 graph2.bullet = "triangleDown";
134 chart.addGraph(graph2);
135
136 // first trend line
137 var trendLine = new AmCharts.TrendLine();
138 trendLine.lineColor = "#FF6600";
139 trendLine.initialXValue = 1;
140 trendLine.initialValue = 2;
141 trendLine.finalXValue = 12;
142 trendLine.finalValue = 11;
143 chart.addTrendLine(trendLine);
144
145 // second trend line
146 trendLine = new AmCharts.TrendLine();
147 trendLine.lineColor = "#FCD202";
148 trendLine.initialXValue = 1;
149 trendLine.initialValue = 1;
150 trendLine.finalXValue = 12;
151 trendLine.finalValue = 19;
152 chart.addTrendLine(trendLine);
153
154 // CURSOR
155 var chartCursor = new AmCharts.ChartCursor();
156 chart.addChartCursor(chartCursor);
157
158 // SCROLLBAR
159
160 var chartScrollbar = new AmCharts.ChartScrollbar();
161 chart.addChartScrollbar(chartScrollbar);
162
163 // WRITE
164 chart.write("chartdiv");
165 });
166 </script>
167 </head>
168
169 <body>
170 <div id="chartdiv" style="width: 600px; height: 400px;"></div>
171 </body>
172
173 </html>
File was created 1 bbbbb
2 frank