/** * @license Highcharts JS v2.3.3 (2012-10-04) * Exporting module * * (c) 2010-2011 Torstein Hønsi * * License: www.highcharts.com/license */ !function(){function t(t){for(var e=t.length;e--;)"number"==typeof t[e]&&(t[e]=Math.round(t[e])-.5);return t}var e,o=Highcharts,n=o.Chart,r=o.addEvent,i=o.removeEvent,l=o.createElement,a=o.discardElement,s=o.css,c=o.merge,p=o.each,d=o.extend,u=Math,h=u.max,m=document,g=window,x=void 0!==m.documentElement.ontouchstart,y="M",f="L",b="div",v="hidden",k="none",w="highcharts-",E="absolute",S="px",F=o.getOptions();d(F.lang,{downloadPNG:"Download PNG image",downloadJPEG:"Download JPEG image",downloadPDF:"Download PDF document",downloadSVG:"Download SVG vector image",exportButtonTitle:"Export to raster or vector image",printButtonTitle:"Print the chart"}),F.navigation={menuStyle:{border:"1px solid #A0A0A0",background:"#FFFFFF"},menuItemStyle:{padding:"0 5px",background:k,color:"#303030",fontSize:x?"14px":"11px"},menuItemHoverStyle:{background:"#4572A5",color:"#FFFFFF"},buttonOptions:{align:"right",backgroundColor:{linearGradient:[0,0,0,20],stops:[[.4,"#F7F7F7"],[.6,"#E3E3E3"]]},borderColor:"#B0B0B0",borderRadius:3,borderWidth:1,height:20,hoverBorderColor:"#909090",hoverSymbolFill:"#81A7CF",hoverSymbolStroke:"#4572A5",symbolFill:"#E0E0E0",symbolStroke:"#A0A0A0",symbolX:11.5,symbolY:10.5,verticalAlign:"top",width:24,y:10}},F.exporting={type:"image/png",url:"http://export.highcharts.com/",width:800,buttons:{exportButton:{symbol:"exportIcon",x:-10,symbolFill:"#A8BF77",hoverSymbolFill:"#768F3E",_id:"exportButton",_titleKey:"exportButtonTitle",menuItems:[{textKey:"downloadPNG",onclick:function(){this.exportChart()}},{textKey:"downloadJPEG",onclick:function(){this.exportChart({type:"image/jpeg"})}},{textKey:"downloadPDF",onclick:function(){this.exportChart({type:"application/pdf"})}},{textKey:"downloadSVG",onclick:function(){this.exportChart({type:"image/svg+xml"})}}]},printButton:{symbol:"printIcon",x:-36,symbolFill:"#B5C9DF",hoverSymbolFill:"#779ABF",_id:"printButton",_titleKey:"printButtonTitle",onclick:function(){this.print()}}}},d(n.prototype,{getSVG:function(t){var o,n,r,i,s=this,u=c(s.options,t);return m.createElementNS||(m.createElementNS=function(t,e){return m.createElement(e)}),n=l(b,null,{position:E,top:"-9999em",width:s.chartWidth+S,height:s.chartHeight+S},m.body),d(u.chart,{renderTo:n,forExport:!0}),u.exporting.enabled=!1,u.chart.plotBackgroundImage=null,u.series=[],p(s.series,function(t){i=c(t.options,{animation:!1,showCheckbox:!1,visible:t.visible}),i.isInternal||(i&&i.marker&&/^url\(/.test(i.marker.symbol)&&(i.marker.symbol="circle"),u.series.push(i))}),o=new Highcharts.Chart(u),p(["xAxis","yAxis"],function(t){p(s[t],function(n,r){var i=o[t][r],l=n.getExtremes(),a=l.userMin,s=l.userMax;(a!==e||s!==e)&&i.setExtremes(a,s,!0,!1)})}),r=o.container.innerHTML,u=null,o.destroy(),a(n),r=r.replace(/zIndex="[^"]+"/g,"").replace(/isShadow="[^"]+"/g,"").replace(/symbolName="[^"]+"/g,"").replace(/jQuery[0-9]+="[^"]+"/g,"").replace(/isTracker="[^"]+"/g,"").replace(/url\([^#]+#/g,"url(#").replace(/.*?$/,"").replace(/ /g," ").replace(/­/g,"­").replace(//g,'xlink:href="$1"/>').replace(/id=([^" >]+)/g,'id="$1"').replace(/class=([^" ]+)/g,'class="$1"').replace(/ transform /g," ").replace(/:(path|rect)/g,"$1").replace(/style="([^"]+)"/g,function(t){return t.toLowerCase()}),r=r.replace(/(url\(#highcharts-[0-9]+)"/g,"$1").replace(/"/g,"'"),2===r.match(/ xmlns="/g).length&&(r=r.replace(/xmlns="[^"]+"/,"")),r},exportChart:function(t,e){var o,n=this,r=n.getSVG(c(n.options.exporting.chartOptions,e));t=c(n.options.exporting,t),o=l("form",{method:"post",action:t.url,enctype:"multipart/form-data"},{display:k},m.body),p(["filename","type","width","svg"],function(e){l("input",{type:v,name:e,value:{filename:t.filename||"chart",type:t.type,width:t.width,svg:r}[e]},null,o)}),o.submit(),a(o)},print:function(){var t=this,e=t.container,o=[],n=e.parentNode,r=m.body,i=r.childNodes;t.isPrinting||(t.isPrinting=!0,p(i,function(t,e){1===t.nodeType&&(o[e]=t.style.display,t.style.display=k)}),r.appendChild(e),g.print(),setTimeout(function(){n.appendChild(e),p(i,function(t,e){1===t.nodeType&&(t.style.display=o[e])}),t.isPrinting=!1},1e3))},contextMenu:function(t,e,o,n,i,a){var c,u,m,g=this,y=g.options.navigation,f=y.menuItemStyle,v=g.chartWidth,F=g.chartHeight,B="cache-"+t,C=g[B],G=h(i,a),I="3px 3px 10px #888";C||(g[B]=C=l(b,{className:w+t},{position:E,zIndex:1e3,padding:G+S},g.container),c=l(b,null,d({MozBoxShadow:I,WebkitBoxShadow:I,boxShadow:I},y.menuStyle),C),u=function(){s(C,{display:k})},r(C,"mouseleave",u),p(e,function(t){if(t){var e=l(b,{onmouseover:function(){s(this,y.menuItemHoverStyle)},onmouseout:function(){s(this,f)},innerHTML:t.text||g.options.lang[t.textKey]},d({cursor:"pointer"},f),c);e[x?"ontouchstart":"onclick"]=function(){u(),t.onclick.apply(g,arguments)},g.exportDivElements.push(e)}}),g.exportDivElements.push(c,C),g.exportMenuWidth=C.offsetWidth,g.exportMenuHeight=C.offsetHeight),m={display:"block"},o+g.exportMenuWidth>v?m.right=v-o-i-G+S:m.left=o-G+S,n+a+g.exportMenuHeight>F?m.bottom=F-n-G+S:m.top=n+a-G+S,s(C,m)},addButton:function(t){function e(){n.attr(x),o.attr(g)}var o,n,r,i=this,l=i.renderer,a=c(i.options.navigation.buttonOptions,t),s=a.onclick,p=a.menuItems,u=a.width,h=a.height,m=a.borderWidth,g={stroke:a.borderColor},x={stroke:a.symbolStroke,fill:a.symbolFill},y=a.symbolSize||12;i.exportDivElements||(i.exportDivElements=[],i.exportSVGElements=[]),a.enabled!==!1&&(o=l.rect(0,0,u,h,a.borderRadius,m).align(a,!0).attr(d({fill:a.backgroundColor,"stroke-width":m,zIndex:19},g)).add(),r=l.rect(0,0,u,h,0).align(a).attr({id:a._id,fill:"rgba(255, 255, 255, 0.001)",title:i.options.lang[a._titleKey],zIndex:21}).css({cursor:"pointer"}).on("mouseover",function(){n.attr({stroke:a.hoverSymbolStroke,fill:a.hoverSymbolFill}),o.attr({stroke:a.hoverBorderColor})}).on("mouseout",e).on("click",e).add(),p&&(s=function(){e();var t=r.getBBox();i.contextMenu("export-menu",p,t.x,t.y,u,h)}),r.on("click",function(){s.apply(i,arguments)}),n=l.symbol(a.symbol,a.symbolX-y/2,a.symbolY-y/2,y,y).align(a,!0).attr(d(x,{"stroke-width":a.symbolStrokeWidth||1,zIndex:20})).add(),i.exportSVGElements.push(o,r,n))},destroyExport:function(){var t,e,o=this;for(t=0;t