[Timeplotter and Distances Worked] Export has been added to the highstock plotting.

这个提交包含在:
Andreas 2020-12-02 14:49:14 +01:00
父节点 9a07722675
当前提交 d1163bc2aa
共有 7 个文件被更改,包括 106 次插入0 次删除

查看文件

@ -1236,6 +1236,9 @@ $(document).ready(function(){
<?php if ($this->uri->segment(1) == "distances") { ?>
<script src="<?php echo base_url(); ?>assets/js/highstock.js"></script>
<script src="<?php echo base_url(); ?>assets/js/highstock/exporting.js"></script>
<script src="<?php echo base_url(); ?>assets/js/highstock/offline-exporting.js"></script>
<script src="<?php echo base_url(); ?>assets/js/highstock/export-data.js"></script>
<script>
var bands_available = <?php echo $bands_available; ?>;
@ -2182,6 +2185,9 @@ $(document).ready(function(){
<?php if ($this->uri->segment(1) == "timeplotter") { ?>
<script src="<?php echo base_url(); ?>assets/js/highstock.js"></script>
<script src="<?php echo base_url(); ?>assets/js/highstock/exporting.js"></script>
<script src="<?php echo base_url(); ?>assets/js/highstock/offline-exporting.js"></script>
<script src="<?php echo base_url(); ?>assets/js/highstock/export-data.js"></script>
<script>
function timeplot(form) {

查看文件

@ -0,0 +1,30 @@
/*
Highcharts JS v8.2.2 (2020-10-22)
Exporting module
(c) 2010-2019 Torstein Honsi
License: www.highcharts.com/license
*/
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/modules/export-data",["highcharts","highcharts/modules/exporting"],function(g){a(g);a.Highcharts=g;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function g(a,b,e,c){a.hasOwnProperty(b)||(a[b]=c.apply(null,e))}a=a?a._modules:{};g(a,"Extensions/DownloadURL.js",[a["Core/Globals.js"]],function(a){var b=a.win,e=b.navigator,c=b.document,
g=b.URL||b.webkitURL||b,v=/Edge\/\d+/.test(e.userAgent),C=a.dataURLtoBlob=function(f){if((f=f.replace(/filename=.*;/,"").match(/data:([^;]*)(;base64)?,([0-9A-Za-z+/]+)/))&&3<f.length&&b.atob&&b.ArrayBuffer&&b.Uint8Array&&b.Blob&&g.createObjectURL){var a=b.atob(f[3]),c=new b.ArrayBuffer(a.length);c=new b.Uint8Array(c);for(var e=0;e<c.length;++e)c[e]=a.charCodeAt(e);f=new b.Blob([c],{type:f[1]});return g.createObjectURL(f)}};a=a.downloadURL=function(a,n){var f=c.createElement("a");if("string"===typeof a||
a instanceof String||!e.msSaveOrOpenBlob){a=""+a;if(v||2E6<a.length)if(a=C(a)||"",!a)throw Error("Failed to convert to blob");if("undefined"!==typeof f.download)f.href=a,f.download=n,c.body.appendChild(f),f.click(),c.body.removeChild(f);else try{var g=b.open(a,"chart");if("undefined"===typeof g||null===g)throw Error("Failed to open window");}catch(F){b.location.href=a}}else e.msSaveOrOpenBlob(a,n)};return{dataURLtoBlob:C,downloadURL:a}});g(a,"Extensions/ExportData.js",[a["Core/Axis/Axis.js"],a["Core/Chart/Chart.js"],
a["Core/Globals.js"],a["Core/Utilities.js"],a["Extensions/DownloadURL.js"]],function(a,b,e,c,g){function v(a,b){var d=n.navigator,f=-1<d.userAgent.indexOf("WebKit")&&0>d.userAgent.indexOf("Chrome"),c=n.URL||n.webkitURL||n;try{if(d.msSaveOrOpenBlob&&n.MSBlobBuilder){var m=new n.MSBlobBuilder;m.append(a);return m.getBlob("image/svg+xml")}if(!f)return c.createObjectURL(new n.Blob(["\ufeff"+a],{type:b}))}catch(N){}}var C=e.doc,f=e.seriesTypes,n=e.win;e=c.addEvent;var J=c.defined,K=c.extend,F=c.find,D=
c.fireEvent,L=c.getOptions,M=c.isNumber,x=c.pick;c=c.setOptions;var G=g.downloadURL;c({exporting:{csv:{annotations:{itemDelimiter:"; ",join:!1},columnHeaderFormatter:null,dateFormat:"%Y-%m-%d %H:%M:%S",decimalPoint:null,itemDelimiter:null,lineDelimiter:"\n"},showTable:!1,useMultiLevelHeaders:!0,useRowspanHeaders:!0},lang:{downloadCSV:"Download CSV",downloadXLS:"Download XLS",exportData:{annotationHeader:"Annotations",categoryHeader:"Category",categoryDatetimeHeader:"DateTime"},viewData:"View data table",
hideData:"Hide data table"}});e(b,"render",function(){this.options&&this.options.exporting&&this.options.exporting.showTable&&!this.options.chart.forExport&&!this.dataTableDiv&&this.viewData()});b.prototype.setUpKeyToAxis=function(){f.arearange&&(f.arearange.prototype.keyToAxis={low:"y",high:"y"});f.gantt&&(f.gantt.prototype.keyToAxis={start:"x",end:"x"})};b.prototype.getDataRows=function(d){var b=this.hasParallelCoordinates,f=this.time,c=this.options.exporting&&this.options.exporting.csv||{},e=this.xAxis,
r={},g=[],n=[],E=[],t;var u=this.options.lang.exportData;var q=u.categoryHeader,y=u.categoryDatetimeHeader,H=function(k,b,f){if(c.columnHeaderFormatter){var h=c.columnHeaderFormatter(k,b,f);if(!1!==h)return h}return k?k instanceof a?k.options.title&&k.options.title.text||(k.dateTime?y:q):d?{columnTitle:1<f?b:k.name,topLevelColumnTitle:k.name}:k.name+(1<f?" ("+b+")":""):q},I=function(k,a,b){var f={},d={};a.forEach(function(a){var c=(k.keyToAxis&&k.keyToAxis[a]||a)+"Axis";c=M(b)?k.chart[c][b]:k[c];
f[a]=c&&c.categories||[];d[a]=c&&c.dateTime});return{categoryMap:f,dateTimeValueAxisMap:d}},z=function(a,b){return a.data.filter(function(a){return"undefined"!==typeof a.y&&a.name}).length&&b&&!b.categories&&!a.keyToAxis?a.pointArrayMap&&a.pointArrayMap.filter(function(a){return"x"===a}).length?(a.pointArrayMap.unshift("x"),a.pointArrayMap):["x","y"]:a.pointArrayMap||["y"]},h=[];var A=0;this.setUpKeyToAxis();this.series.forEach(function(a){var y=a.xAxis,k=a.options.keys||z(a,y),m=k.length,g=!a.requireSorting&&
{},l=e.indexOf(y),w=I(a,k),q;if(!1!==a.options.includeInDataExport&&!a.options.isInternal&&!1!==a.visible){F(h,function(a){return a[0]===l})||h.push([l,A]);for(q=0;q<m;)t=H(a,k[q],k.length),E.push(t.columnTitle||t),d&&n.push(t.topLevelColumnTitle||t),q++;var u={chart:a.chart,autoIncrement:a.autoIncrement,options:a.options,pointArrayMap:a.pointArrayMap};a.options.data.forEach(function(d,h){b&&(w=I(a,k,h));var z={series:u};a.pointClass.prototype.applyOptions.apply(z,[d]);d=z.x;var e=a.data[h]&&a.data[h].name;
q=0;if(!y||"name"===a.exportKey||!b&&y&&y.hasNames&&e)d=e;g&&(g[d]&&(d+="|"+h),g[d]=!0);r[d]||(r[d]=[],r[d].xValues=[]);r[d].x=z.x;r[d].name=e;for(r[d].xValues[l]=z.x;q<m;)h=k[q],e=z[h],r[d][A+q]=x(w.categoryMap[h][e],w.dateTimeValueAxisMap[h]?f.dateFormat(c.dateFormat,e):null,e),q++});A+=q}});for(l in r)Object.hasOwnProperty.call(r,l)&&g.push(r[l]);var l=d?[n,E]:[E];for(A=h.length;A--;){var p=h[A][0];var v=h[A][1];var B=e[p];g.sort(function(a,d){return a.xValues[p]-d.xValues[p]});u=H(B);l[0].splice(v,
0,u);d&&l[1]&&l[1].splice(v,0,u);g.forEach(function(a){var d=a.name;B&&!J(d)&&(B.dateTime?(a.x instanceof Date&&(a.x=a.x.getTime()),d=f.dateFormat(c.dateFormat,a.x)):d=B.categories?x(B.names[a.x],B.categories[a.x],a.x):a.x);a.splice(v,0,d)})}l=l.concat(g);D(this,"exportData",{dataRows:l});return l};b.prototype.getCSV=function(a){var d="",b=this.getDataRows(),c=this.options.exporting.csv,f=x(c.decimalPoint,","!==c.itemDelimiter&&a?(1.1).toLocaleString()[1]:"."),e=x(c.itemDelimiter,","===f?";":","),
g=c.lineDelimiter;b.forEach(function(a,c){for(var m,w=a.length;w--;)m=a[w],"string"===typeof m&&(m='"'+m+'"'),"number"===typeof m&&"."!==f&&(m=m.toString().replace(".",f)),a[w]=m;d+=a.join(e);c<b.length-1&&(d+=g)});return d};b.prototype.getTable=function(a){var b='<table id="highcharts-data-table-'+this.index+'">',d=this.options,c=a?(1.1).toLocaleString()[1]:".",f=x(d.exporting.useMultiLevelHeaders,!0);a=this.getDataRows(f);var e=0,g=f?a.shift():null,n=a.shift(),p=function(a,b,d,f){var e=x(f,"");
b="text"+(b?" "+b:"");"number"===typeof e?(e=e.toString(),","===c&&(e=e.replace(".",c)),b="number"):f||(b="empty");return"<"+a+(d?" "+d:"")+' class="'+b+'">'+e+"</"+a+">"};!1!==d.exporting.tableCaption&&(b+='<caption class="highcharts-table-caption">'+x(d.exporting.tableCaption,d.title.text?d.title.text.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"):"Chart")+"</caption>");for(var t=0,u=a.length;t<u;++t)a[t].length>
e&&(e=a[t].length);b+=function(a,b,c){var e="<thead>",g=0;c=c||b&&b.length;var h,m=0;if(h=f&&a&&b){a:if(h=a.length,b.length===h){for(;h--;)if(a[h]!==b[h]){h=!1;break a}h=!0}else h=!1;h=!h}if(h){for(e+="<tr>";g<c;++g){h=a[g];var l=a[g+1];h===l?++m:m?(e+=p("th","highcharts-table-topheading",'scope="col" colspan="'+(m+1)+'"',h),m=0):(h===b[g]?d.exporting.useRowspanHeaders?(l=2,delete b[g]):(l=1,b[g]=""):l=1,e+=p("th","highcharts-table-topheading",'scope="col"'+(1<l?' valign="top" rowspan="'+l+'"':""),
h))}e+="</tr>"}if(b){e+="<tr>";g=0;for(c=b.length;g<c;++g)"undefined"!==typeof b[g]&&(e+=p("th",null,'scope="col"',b[g]));e+="</tr>"}return e+"</thead>"}(g,n,Math.max(e,n.length));b+="<tbody>";a.forEach(function(a){b+="<tr>";for(var d=0;d<e;d++)b+=p(d?"td":"th",null,d?"":'scope="row"',a[d]);b+="</tr>"});b+="</tbody></table>";a={html:b};D(this,"afterGetTable",a);return a.html};b.prototype.downloadCSV=function(){var a=this.getCSV(!0);G(v(a,"text/csv")||"data:text/csv,\ufeff"+encodeURIComponent(a),this.getFilename()+
".csv")};b.prototype.downloadXLS=function(){var a='<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head>\x3c!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>Ark1</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--\x3e<style>td{border:none;font-family: Calibri, sans-serif;} .number{mso-number-format:"0.00";} .text{ mso-number-format:"@";}</style><meta name=ProgId content=Excel.Sheet><meta charset=UTF-8></head><body>'+
this.getTable(!0)+"</body></html>";G(v(a,"application/vnd.ms-excel")||"data:application/vnd.ms-excel;base64,"+n.btoa(unescape(encodeURIComponent(a))),this.getFilename()+".xls")};b.prototype.viewData=function(){this.dataTableDiv||(this.dataTableDiv=C.createElement("div"),this.dataTableDiv.className="highcharts-data-table",this.renderTo.parentNode.insertBefore(this.dataTableDiv,this.renderTo.nextSibling),this.dataTableDiv.innerHTML=this.getTable());if(""===this.dataTableDiv.style.display||"none"===
this.dataTableDiv.style.display)this.dataTableDiv.style.display="block";this.isDataTableVisible=!0;D(this,"afterViewData",this.dataTableDiv)};b.prototype.hideData=function(){this.dataTableDiv&&"block"===this.dataTableDiv.style.display&&(this.dataTableDiv.style.display="none");this.isDataTableVisible=!1};b.prototype.toggleDataTable=function(){var a=this.exportDivElements,b=this.options.exporting;b=b&&b.buttons&&b.buttons.contextButton.menuItems;var c=this.options.lang;this.isDataTableVisible?this.hideData():
this.viewData();(null===p||void 0===p?0:p.menuItemDefinitions)&&(null===c||void 0===c?0:c.viewData)&&c.hideData&&b&&a&&a.length&&(a[b.indexOf("viewData")].innerHTML=this.isDataTableVisible?c.hideData:c.viewData)};var p=L().exporting;p&&(K(p.menuItemDefinitions,{downloadCSV:{textKey:"downloadCSV",onclick:function(){this.downloadCSV()}},downloadXLS:{textKey:"downloadXLS",onclick:function(){this.downloadXLS()}},viewData:{textKey:"viewData",onclick:function(){this.toggleDataTable()}}}),p.buttons&&p.buttons.contextButton.menuItems.push("separator",
"downloadCSV","downloadXLS","viewData"));f.map&&(f.map.prototype.exportKey="name");f.mapbubble&&(f.mapbubble.prototype.exportKey="name");f.treemap&&(f.treemap.prototype.exportKey="name")});g(a,"masters/modules/export-data.src.js",[],function(){})});
//# sourceMappingURL=export-data.js.map

文件差异因一行或多行过长而隐藏

查看文件

@ -0,0 +1,43 @@
/*
Highcharts JS v8.2.2 (2020-10-22)
Exporting module
(c) 2010-2019 Torstein Honsi
License: www.highcharts.com/license
*/
(function(e){"object"===typeof module&&module.exports?(e["default"]=e,module.exports=e):"function"===typeof define&&define.amd?define("highcharts/modules/exporting",["highcharts"],function(q){e(q);e.Highcharts=q;return e}):e("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(e){function q(e,l,g,k){e.hasOwnProperty(l)||(e[l]=k.apply(null,g))}e=e?e._modules:{};q(e,"Extensions/FullScreen.js",[e["Core/Chart/Chart.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],function(e,l,g){var k=g.addEvent;
g=function(){function e(f){this.chart=f;this.isOpen=!1;f=f.renderTo;this.browserProps||("function"===typeof f.requestFullscreen?this.browserProps={fullscreenChange:"fullscreenchange",requestFullscreen:"requestFullscreen",exitFullscreen:"exitFullscreen"}:f.mozRequestFullScreen?this.browserProps={fullscreenChange:"mozfullscreenchange",requestFullscreen:"mozRequestFullScreen",exitFullscreen:"mozCancelFullScreen"}:f.webkitRequestFullScreen?this.browserProps={fullscreenChange:"webkitfullscreenchange",
requestFullscreen:"webkitRequestFullScreen",exitFullscreen:"webkitExitFullscreen"}:f.msRequestFullscreen&&(this.browserProps={fullscreenChange:"MSFullscreenChange",requestFullscreen:"msRequestFullscreen",exitFullscreen:"msExitFullscreen"}))}e.prototype.close=function(){var f=this.chart;if(this.isOpen&&this.browserProps&&f.container.ownerDocument instanceof Document)f.container.ownerDocument[this.browserProps.exitFullscreen]();this.unbindFullscreenEvent&&this.unbindFullscreenEvent();this.isOpen=!1;
this.setButtonText()};e.prototype.open=function(){var f=this,e=f.chart;if(f.browserProps){f.unbindFullscreenEvent=k(e.container.ownerDocument,f.browserProps.fullscreenChange,function(){f.isOpen?(f.isOpen=!1,f.close()):(f.isOpen=!0,f.setButtonText())});var g=e.renderTo[f.browserProps.requestFullscreen]();if(g)g["catch"](function(){alert("Full screen is not supported inside a frame.")});k(e,"destroy",f.unbindFullscreenEvent)}};e.prototype.setButtonText=function(){var f,e=this.chart,g=e.exportDivElements,
k=e.options.exporting,l=null===(f=null===k||void 0===k?void 0:k.buttons)||void 0===f?void 0:f.contextButton.menuItems;f=e.options.lang;(null===k||void 0===k?0:k.menuItemDefinitions)&&(null===f||void 0===f?0:f.exitFullscreen)&&f.viewFullscreen&&l&&g&&g.length&&(g[l.indexOf("viewFullscreen")].innerHTML=this.isOpen?f.exitFullscreen:k.menuItemDefinitions.viewFullscreen.text||f.viewFullscreen)};e.prototype.toggle=function(){this.isOpen?this.close():this.open()};return e}();l.Fullscreen=g;k(e,"beforeRender",
function(){this.fullscreen=new l.Fullscreen(this)});return l.Fullscreen});q(e,"Mixins/Navigation.js",[],function(){return{initUpdate:function(e){e.navigation||(e.navigation={updates:[],update:function(e,g){this.updates.forEach(function(k){k.update.call(k.context,e,g)})}})},addUpdate:function(e,l){l.navigation||this.initUpdate(l);l.navigation.updates.push({update:e,context:l})}}});q(e,"Extensions/Exporting.js",[e["Core/Chart/Chart.js"],e["Mixins/Navigation.js"],e["Core/Globals.js"],e["Core/Options.js"],
e["Core/Renderer/SVG/SVGRenderer.js"],e["Core/Utilities.js"]],function(e,l,g,k,q,f){var A=g.doc,H=g.isTouchDevice,y=g.win;k=k.defaultOptions;var v=f.addEvent,r=f.css,x=f.createElement,D=f.discardElement,z=f.extend,I=f.find,C=f.fireEvent,J=f.isObject,p=f.merge,E=f.objectEach,t=f.pick,K=f.removeEvent,L=f.uniqueKey,F=y.navigator.userAgent,G=g.Renderer.prototype.symbols,M=/Edge\/|Trident\/|MSIE /.test(F),N=/firefox/i.test(F);z(k.lang,{viewFullscreen:"View in full screen",exitFullscreen:"Exit from full screen",
printChart:"Print chart",downloadPNG:"Download PNG image",downloadJPEG:"Download JPEG image",downloadPDF:"Download PDF document",downloadSVG:"Download SVG vector image",contextButtonTitle:"Chart context menu"});k.navigation||(k.navigation={});p(!0,k.navigation,{buttonOptions:{theme:{},symbolSize:14,symbolX:12.5,symbolY:10.5,align:"right",buttonSpacing:3,height:22,verticalAlign:"top",width:24}});p(!0,k.navigation,{menuStyle:{border:"1px solid #999999",background:"#ffffff",padding:"5px 0"},menuItemStyle:{padding:"0.5em 1em",
color:"#333333",background:"none",fontSize:H?"14px":"11px",transition:"background 250ms, color 250ms"},menuItemHoverStyle:{background:"#335cad",color:"#ffffff"},buttonOptions:{symbolFill:"#666666",symbolStroke:"#666666",symbolStrokeWidth:3,theme:{padding:5}}});k.exporting={type:"image/png",url:"https://export.highcharts.com/",printMaxWidth:780,scale:2,buttons:{contextButton:{className:"highcharts-contextbutton",menuClassName:"highcharts-contextmenu",symbol:"menu",titleKey:"contextButtonTitle",menuItems:"viewFullscreen printChart separator downloadPNG downloadJPEG downloadPDF downloadSVG".split(" ")}},
menuItemDefinitions:{viewFullscreen:{textKey:"viewFullscreen",onclick:function(){this.fullscreen.toggle()}},printChart:{textKey:"printChart",onclick:function(){this.print()}},separator:{separator:!0},downloadPNG:{textKey:"downloadPNG",onclick:function(){this.exportChart()}},downloadJPEG:{textKey:"downloadJPEG",onclick:function(){this.exportChart({type:"image/jpeg"})}},downloadPDF:{textKey:"downloadPDF",onclick:function(){this.exportChart({type:"application/pdf"})}},downloadSVG:{textKey:"downloadSVG",
onclick:function(){this.exportChart({type:"image/svg+xml"})}}}};g.post=function(a,b,c){var d=x("form",p({method:"post",action:a,enctype:"multipart/form-data"},c),{display:"none"},A.body);E(b,function(a,b){x("input",{type:"hidden",name:b,value:a},null,d)});d.submit();D(d)};g.isSafari&&g.win.matchMedia("print").addListener(function(a){g.printingChart&&(a.matches?g.printingChart.beforePrint():g.printingChart.afterPrint())});z(e.prototype,{sanitizeSVG:function(a,b){var c=a.indexOf("</svg>")+6,d=a.substr(c);
a=a.substr(0,c);b&&b.exporting&&b.exporting.allowHTML&&d&&(d='<foreignObject x="0" y="0" width="'+b.chart.width+'" height="'+b.chart.height+'"><body xmlns="http://www.w3.org/1999/xhtml">'+d.replace(/(<(?:img|br).*?(?=>))>/g,"$1 />")+"</body></foreignObject>",a=a.replace("</svg>",d+"</svg>"));a=a.replace(/zIndex="[^"]+"/g,"").replace(/symbolName="[^"]+"/g,"").replace(/jQuery[0-9]+="[^"]+"/g,"").replace(/url\(("|&quot;)(.*?)("|&quot;);?\)/g,"url($2)").replace(/url\([^#]+#/g,"url(#").replace(/<svg /,
'<svg xmlns:xlink="http://www.w3.org/1999/xlink" ').replace(/ (|NS[0-9]+:)href=/g," xlink:href=").replace(/\n/," ").replace(/(fill|stroke)="rgba\(([ 0-9]+,[ 0-9]+,[ 0-9]+),([ 0-9\.]+)\)"/g,'$1="rgb($2)" $1-opacity="$3"').replace(/&nbsp;/g,"\u00a0").replace(/&shy;/g,"\u00ad");this.ieSanitizeSVG&&(a=this.ieSanitizeSVG(a));return a},getChartHTML:function(){this.styledMode&&this.inlineStyles();return this.container.innerHTML},getSVG:function(a){var b,c=p(this.options,a);c.plotOptions=p(this.userOptions.plotOptions,
a&&a.plotOptions);c.time=p(this.userOptions.time,a&&a.time);var d=x("div",null,{position:"absolute",top:"-9999em",width:this.chartWidth+"px",height:this.chartHeight+"px"},A.body);var f=this.renderTo.style.width;var w=this.renderTo.style.height;f=c.exporting.sourceWidth||c.chart.width||/px$/.test(f)&&parseInt(f,10)||(c.isGantt?800:600);w=c.exporting.sourceHeight||c.chart.height||/px$/.test(w)&&parseInt(w,10)||400;z(c.chart,{animation:!1,renderTo:d,forExport:!0,renderer:"SVGRenderer",width:f,height:w});
c.exporting.enabled=!1;delete c.data;c.series=[];this.series.forEach(function(a){b=p(a.userOptions,{animation:!1,enableMouseTracking:!1,showCheckbox:!1,visible:a.visible});b.isInternal||c.series.push(b)});this.axes.forEach(function(a){a.userOptions.internalKey||(a.userOptions.internalKey=L())});var g=new e(c,this.callback);a&&["xAxis","yAxis","series"].forEach(function(b){var d={};a[b]&&(d[b]=a[b],g.update(d))});this.axes.forEach(function(a){var b=I(g.axes,function(b){return b.options.internalKey===
a.userOptions.internalKey}),d=a.getExtremes(),c=d.userMin;d=d.userMax;b&&("undefined"!==typeof c&&c!==b.min||"undefined"!==typeof d&&d!==b.max)&&b.setExtremes(c,d,!0,!1)});f=g.getChartHTML();C(this,"getSVG",{chartCopy:g});f=this.sanitizeSVG(f,c);c=null;g.destroy();D(d);return f},getSVGForExport:function(a,b){var c=this.options.exporting;return this.getSVG(p({chart:{borderRadius:0}},c.chartOptions,b,{exporting:{sourceWidth:a&&a.sourceWidth||c.sourceWidth,sourceHeight:a&&a.sourceHeight||c.sourceHeight}}))},
getFilename:function(){var a=this.userOptions.title&&this.userOptions.title.text,b=this.options.exporting.filename;if(b)return b.replace(/\//g,"-");"string"===typeof a&&(b=a.toLowerCase().replace(/<\/?[^>]+(>|$)/g,"").replace(/[\s_]+/g,"-").replace(/[^a-z0-9\-]/g,"").replace(/^[\-]+/g,"").replace(/[\-]+/g,"-").substr(0,24).replace(/[\-]+$/g,""));if(!b||5>b.length)b="chart";return b},exportChart:function(a,b){b=this.getSVGForExport(a,b);a=p(this.options.exporting,a);g.post(a.url,{filename:a.filename?
a.filename.replace(/\//g,"-"):this.getFilename(),type:a.type,width:a.width||0,scale:a.scale,svg:b},a.formAttributes)},moveContainers:function(a){(this.fixedDiv?[this.fixedDiv,this.scrollingContainer]:[this.container]).forEach(function(b){a.appendChild(b)})},beforePrint:function(){var a=A.body,b=this.options.exporting.printMaxWidth,c={childNodes:a.childNodes,origDisplay:[],resetParams:void 0};this.isPrinting=!0;this.pointer.reset(null,0);C(this,"beforePrint");b&&this.chartWidth>b&&(c.resetParams=[this.options.chart.width,
void 0,!1],this.setSize(b,void 0,!1));[].forEach.call(c.childNodes,function(a,b){1===a.nodeType&&(c.origDisplay[b]=a.style.display,a.style.display="none")});this.moveContainers(a);this.printReverseInfo=c},afterPrint:function(){if(this.printReverseInfo){var a=this.printReverseInfo.childNodes,b=this.printReverseInfo.origDisplay,c=this.printReverseInfo.resetParams;this.moveContainers(this.renderTo);[].forEach.call(a,function(a,c){1===a.nodeType&&(a.style.display=b[c]||"")});this.isPrinting=!1;c&&this.setSize.apply(this,
c);delete this.printReverseInfo;delete g.printingChart;C(this,"afterPrint")}},print:function(){var a=this;a.isPrinting||(g.printingChart=a,g.isSafari||a.beforePrint(),setTimeout(function(){y.focus();y.print();g.isSafari||setTimeout(function(){a.afterPrint()},1E3)},1))},contextMenu:function(a,b,c,d,e,g,k){var h=this,w=h.options.navigation,l=h.chartWidth,B=h.chartHeight,n="cache-"+a,m=h[n],u=Math.max(e,g);if(!m){h.exportContextMenu=h[n]=m=x("div",{className:a},{position:"absolute",zIndex:1E3,padding:u+
"px",pointerEvents:"auto"},h.fixedDiv||h.container);var p=x("ul",{className:"highcharts-menu"},{listStyle:"none",margin:0,padding:0},m);h.styledMode||r(p,z({MozBoxShadow:"3px 3px 10px #888",WebkitBoxShadow:"3px 3px 10px #888",boxShadow:"3px 3px 10px #888"},w.menuStyle));m.hideMenu=function(){r(m,{display:"none"});k&&k.setState(0);h.openMenu=!1;r(h.renderTo,{overflow:"hidden"});f.clearTimeout(m.hideTimer);C(h,"exportMenuHidden")};h.exportEvents.push(v(m,"mouseleave",function(){m.hideTimer=y.setTimeout(m.hideMenu,
500)}),v(m,"mouseenter",function(){f.clearTimeout(m.hideTimer)}),v(A,"mouseup",function(b){h.pointer.inClass(b.target,a)||m.hideMenu()}),v(m,"click",function(){h.openMenu&&m.hideMenu()}));b.forEach(function(a){"string"===typeof a&&(a=h.options.exporting.menuItemDefinitions[a]);if(J(a,!0)){if(a.separator)var b=x("hr",null,null,p);else"viewData"===a.textKey&&h.isDataTableVisible&&(a.textKey="hideData"),b=x("li",{className:"highcharts-menu-item",onclick:function(b){b&&b.stopPropagation();m.hideMenu();
a.onclick&&a.onclick.apply(h,arguments)},innerHTML:a.text||h.options.lang[a.textKey]},null,p),h.styledMode||(b.onmouseover=function(){r(this,w.menuItemHoverStyle)},b.onmouseout=function(){r(this,w.menuItemStyle)},r(b,z({cursor:"pointer"},w.menuItemStyle)));h.exportDivElements.push(b)}});h.exportDivElements.push(p,m);h.exportMenuWidth=m.offsetWidth;h.exportMenuHeight=m.offsetHeight}b={display:"block"};c+h.exportMenuWidth>l?b.right=l-c-e-u+"px":b.left=c-u+"px";d+g+h.exportMenuHeight>B&&"top"!==k.alignOptions.verticalAlign?
b.bottom=B-d-u+"px":b.top=d+g-u+"px";r(m,b);r(h.renderTo,{overflow:""});h.openMenu=!0;C(h,"exportMenuShown")},addButton:function(a){var b=this,c=b.renderer,d=p(b.options.navigation.buttonOptions,a),e=d.onclick,f=d.menuItems,g=d.symbolSize||12;b.btnCount||(b.btnCount=0);b.exportDivElements||(b.exportDivElements=[],b.exportSVGElements=[]);if(!1!==d.enabled){var h=d.theme,k=h.states,l=k&&k.hover;k=k&&k.select;var B;b.styledMode||(h.fill=t(h.fill,"#ffffff"),h.stroke=t(h.stroke,"none"));delete h.states;
e?B=function(a){a&&a.stopPropagation();e.call(b,a)}:f&&(B=function(a){a&&a.stopPropagation();b.contextMenu(n.menuClassName,f,n.translateX,n.translateY,n.width,n.height,n);n.setState(2)});d.text&&d.symbol?h.paddingLeft=t(h.paddingLeft,25):d.text||z(h,{width:d.width,height:d.height,padding:0});b.styledMode||(h["stroke-linecap"]="round",h.fill=t(h.fill,"#ffffff"),h.stroke=t(h.stroke,"none"));var n=c.button(d.text,0,0,B,h,l,k).addClass(a.className).attr({title:t(b.options.lang[d._titleKey||d.titleKey],
"")});n.menuClassName=a.menuClassName||"highcharts-menu-"+b.btnCount++;if(d.symbol){var m=c.symbol(d.symbol,d.symbolX-g/2,d.symbolY-g/2,g,g,{width:g,height:g}).addClass("highcharts-button-symbol").attr({zIndex:1}).add(n);b.styledMode||m.attr({stroke:d.symbolStroke,fill:d.symbolFill,"stroke-width":d.symbolStrokeWidth||1})}n.add(b.exportingGroup).align(z(d,{width:n.width,x:t(d.x,b.buttonOffset)}),!0,"spacingBox");b.buttonOffset+=(n.width+d.buttonSpacing)*("right"===d.align?-1:1);b.exportSVGElements.push(n,
m)}},destroyExport:function(a){var b=a?a.target:this;a=b.exportSVGElements;var c=b.exportDivElements,d=b.exportEvents,e;a&&(a.forEach(function(a,d){a&&(a.onclick=a.ontouchstart=null,e="cache-"+a.menuClassName,b[e]&&delete b[e],b.exportSVGElements[d]=a.destroy())}),a.length=0);b.exportingGroup&&(b.exportingGroup.destroy(),delete b.exportingGroup);c&&(c.forEach(function(a,d){f.clearTimeout(a.hideTimer);K(a,"mouseleave");b.exportDivElements[d]=a.onmouseout=a.onmouseover=a.ontouchstart=a.onclick=null;
D(a)}),c.length=0);d&&(d.forEach(function(a){a()}),d.length=0)}});q.prototype.inlineToAttributes="fill stroke strokeLinecap strokeLinejoin strokeWidth textAnchor x y".split(" ");q.prototype.inlineBlacklist=[/-/,/^(clipPath|cssText|d|height|width)$/,/^font$/,/[lL]ogical(Width|Height)$/,/perspective/,/TapHighlightColor/,/^transition/,/^length$/];q.prototype.unstyledElements=["clipPath","defs","desc"];e.prototype.inlineStyles=function(){function a(a){return a.replace(/([A-Z])/g,function(a,b){return"-"+
b.toLowerCase()})}function b(c){function n(b,g){u=q=!1;if(f){for(r=f.length;r--&&!q;)q=f[r].test(g);u=!q}"transform"===g&&"none"===b&&(u=!0);for(r=e.length;r--&&!u;)u=e[r].test(g)||"function"===typeof b;u||w[g]===b&&"svg"!==c.nodeName||h[c.nodeName][g]===b||(d&&-1===d.indexOf(g)?m+=a(g)+":"+b+";":b&&c.setAttribute(a(g),b))}var m="",u,q,r;if(1===c.nodeType&&-1===g.indexOf(c.nodeName)){var t=y.getComputedStyle(c,null);var w="svg"===c.nodeName?{}:y.getComputedStyle(c.parentNode,null);if(!h[c.nodeName]){k=
l.getElementsByTagName("svg")[0];var v=l.createElementNS(c.namespaceURI,c.nodeName);k.appendChild(v);h[c.nodeName]=p(y.getComputedStyle(v,null));"text"===c.nodeName&&delete h.text.fill;k.removeChild(v)}if(N||M)for(var x in t)n(t[x],x);else E(t,n);m&&(t=c.getAttribute("style"),c.setAttribute("style",(t?t+";":"")+m));"svg"===c.nodeName&&c.setAttribute("stroke-width","1px");"text"!==c.nodeName&&[].forEach.call(c.children||c.childNodes,b)}}var c=this.renderer,d=c.inlineToAttributes,e=c.inlineBlacklist,
f=c.inlineWhitelist,g=c.unstyledElements,h={},k;c=A.createElement("iframe");r(c,{width:"1px",height:"1px",visibility:"hidden"});A.body.appendChild(c);var l=c.contentWindow.document;l.open();l.write('<svg xmlns="http://www.w3.org/2000/svg"></svg>');l.close();b(this.container.querySelector("svg"));k.parentNode.remove();c.remove()};G.menu=function(a,b,c,d){return[["M",a,b+2.5],["L",a+c,b+2.5],["M",a,b+d/2+.5],["L",a+c,b+d/2+.5],["M",a,b+d-1.5],["L",a+c,b+d-1.5]]};G.menuball=function(a,b,c,d){a=[];d=
d/3-2;return a=a.concat(this.circle(c-d,b,d,d),this.circle(c-d,b+d+4,d,d),this.circle(c-d,b+2*(d+4),d,d))};e.prototype.renderExporting=function(){var a=this,b=a.options.exporting,c=b.buttons,d=a.isDirtyExporting||!a.exportSVGElements;a.buttonOffset=0;a.isDirtyExporting&&a.destroyExport();d&&!1!==b.enabled&&(a.exportEvents=[],a.exportingGroup=a.exportingGroup||a.renderer.g("exporting-group").attr({zIndex:3}).add(),E(c,function(b){a.addButton(b)}),a.isDirtyExporting=!1);v(a,"destroy",a.destroyExport)};
v(e,"init",function(){var a=this;a.exporting={update:function(b,c){a.isDirtyExporting=!0;p(!0,a.options.exporting,b);t(c,!0)&&a.redraw()}};l.addUpdate(function(b,c){a.isDirtyExporting=!0;p(!0,a.options.navigation,b);t(c,!0)&&a.redraw()},a)});e.prototype.callbacks.push(function(a){a.renderExporting();v(a,"redraw",a.renderExporting)})});q(e,"masters/modules/exporting.src.js",[],function(){})});
//# sourceMappingURL=exporting.js.map

文件差异因一行或多行过长而隐藏

查看文件

@ -0,0 +1,24 @@
/*
Highcharts JS v8.2.2 (2020-10-22)
Client side exporting module
(c) 2015-2019 Torstein Honsi / Oystein Moseng
License: www.highcharts.com/license
*/
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/modules/offline-exporting",["highcharts","highcharts/modules/exporting"],function(f){a(f);a.Highcharts=f;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function f(a,b,m,e){a.hasOwnProperty(b)||(a[b]=e.apply(null,m))}a=a?a._modules:{};f(a,"Extensions/DownloadURL.js",[a["Core/Globals.js"]],function(a){var b=a.win,m=b.navigator,
e=b.document,f=b.URL||b.webkitURL||b,u=/Edge\/\d+/.test(m.userAgent),D=a.dataURLtoBlob=function(a){if((a=a.replace(/filename=.*;/,"").match(/data:([^;]*)(;base64)?,([0-9A-Za-z+/]+)/))&&3<a.length&&b.atob&&b.ArrayBuffer&&b.Uint8Array&&b.Blob&&f.createObjectURL){var x=b.atob(a[3]),d=new b.ArrayBuffer(x.length);d=new b.Uint8Array(d);for(var k=0;k<d.length;++k)d[k]=x.charCodeAt(k);a=new b.Blob([d],{type:a[1]});return f.createObjectURL(a)}};a=a.downloadURL=function(a,f){var d=e.createElement("a");if("string"===
typeof a||a instanceof String||!m.msSaveOrOpenBlob){a=""+a;if(u||2E6<a.length)if(a=D(a)||"",!a)throw Error("Failed to convert to blob");if("undefined"!==typeof d.download)d.href=a,d.download=f,e.body.appendChild(d),d.click(),e.body.removeChild(d);else try{var k=b.open(a,"chart");if("undefined"===typeof k||null===k)throw Error("Failed to open window");}catch(E){b.location.href=a}}else m.msSaveOrOpenBlob(a,f)};return{dataURLtoBlob:D,downloadURL:a}});f(a,"Extensions/OfflineExporting.js",[a["Core/Chart/Chart.js"],
a["Core/Globals.js"],a["Core/Renderer/SVG/SVGRenderer.js"],a["Core/Utilities.js"],a["Extensions/DownloadURL.js"]],function(a,b,f,e,L){function u(a,d){var g=k.getElementsByTagName("head")[0],c=k.createElement("script");c.type="text/javascript";c.src=a;c.onload=d;c.onerror=function(){F("Error loading script "+a)};g.appendChild(c)}function m(a){var b=-1<v.userAgent.indexOf("WebKit")&&0>v.userAgent.indexOf("Chrome");try{if(!b&&0>v.userAgent.toLowerCase().indexOf("firefox"))return G.createObjectURL(new d.Blob([a],
{type:"image/svg+xml;charset-utf-16"}))}catch(g){}return"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(a)}function x(a,b,g,c,y,n,f,p,l){var h=new d.Image,r=function(){setTimeout(function(){var d=k.createElement("canvas"),n=d.getContext&&d.getContext("2d");try{if(n){d.height=h.height*c;d.width=h.width*c;n.drawImage(h,0,0,d.width,d.height);try{var w=d.toDataURL(b);y(w,b,g,c)}catch(I){q(a,b,g,c)}}else f(a,b,g,c)}finally{l&&l(a,b,g,c)}},M)},e=function(){p(a,b,g,c);l&&l(a,b,g,c)};var q=function(){h=
new d.Image;q=n;h.crossOrigin="Anonymous";h.onload=r;h.onerror=e;h.src=a};h.onload=r;h.onerror=e;h.src=a}function C(a,b,g,c){function f(a,b){var c=a.width.baseVal.value+2*b;b=a.height.baseVal.value+2*b;c=new d.jsPDF(b>c?"p":"l","pt",[c,b]);[].forEach.call(a.querySelectorAll('*[visibility="hidden"]'),function(a){a.parentNode.removeChild(a)});d.svg2pdf(a,c,{removeInvalid:!0});return c.output("datauristring")}function n(){l.innerHTML=a;var b=l.getElementsByTagName("text"),d;[].forEach.call(b,function(a){["font-family",
"font-size"].forEach(function(b){for(var c=a;c&&c!==l;){if(c.style[b]){a.style[b]=c.style[b];break}c=c.parentNode}});a.style["font-family"]=a.style["font-family"]&&a.style["font-family"].split(" ").splice(-1);d=a.getElementsByTagName("title");[].forEach.call(d,function(b){a.removeChild(b)})});b=f(l.firstChild,0);try{z(b,r),c&&c()}catch(N){g(N)}}var e=!0,p=b.libURL||J().exporting.libURL,l=k.createElement("div"),h=b.type||"image/png",r=(b.filename||"chart")+"."+("image/svg+xml"===h?"svg":h.split("/")[1]),
A=b.scale||1;p="/"!==p.slice(-1)?p+"/":p;if("image/svg+xml"===h)try{if("undefined"!==typeof v.msSaveOrOpenBlob){var q=new MSBlobBuilder;q.append(a);var t=q.getBlob("image/svg+xml")}else t=m(a);z(t,r);c&&c()}catch(w){g(w)}else if("application/pdf"===h)d.jsPDF&&d.svg2pdf?n():(e=!0,u(p+"jspdf.js",function(){u(p+"svg2pdf.js",function(){n()})}));else{t=m(a);var H=function(){try{G.revokeObjectURL(t)}catch(w){}};x(t,h,{},A,function(a){try{z(a,r),c&&c()}catch(I){g(I)}},function(){var b=k.createElement("canvas"),
n=b.getContext("2d"),f=a.match(/^<svg[^>]*width\s*=\s*"?(\d+)"?[^>]*>/)[1]*A,y=a.match(/^<svg[^>]*height\s*=\s*"?(\d+)"?[^>]*>/)[1]*A,l=function(){n.drawSvg(a,0,0,f,y);try{z(v.msSaveOrOpenBlob?b.msToBlob():b.toDataURL(h),r),c&&c()}catch(O){g(O)}finally{H()}};b.width=f;b.height=y;d.canvg?l():(e=!0,u(p+"rgbcolor.js",function(){u(p+"canvg.js",function(){l()})}))},g,g,function(){e&&H()})}}var d=b.win,k=b.doc,E=e.addEvent,F=e.error,P=e.extend,J=e.getOptions,K=e.merge,z=L.downloadURL,G=d.URL||d.webkitURL||
d,v=d.navigator,B=/Edge\/|Trident\/|MSIE /.test(v.userAgent),M=B?150:0;b.CanVGRenderer={};a.prototype.getSVGForLocalExport=function(a,b,d,c){var g=this,n=0,f,e,l,h,k=function(){n===q.length&&c(g.sanitizeSVG(f.innerHTML,e))},r=function(a,b,c){++n;c.imageElement.setAttributeNS("http://www.w3.org/1999/xlink","href",a);k()};g.unbindGetSVG=E(g,"getSVG",function(a){e=a.chartCopy.options;f=a.chartCopy.container.cloneNode(!0)});g.getSVGForExport(a,b);var q=f.getElementsByTagName("image");try{if(!q.length){c(g.sanitizeSVG(f.innerHTML,
e));return}var t=0;for(l=q.length;t<l;++t){var m=q[t];(h=m.getAttributeNS("http://www.w3.org/1999/xlink","href"))?x(h,"image/png",{imageElement:m},a.scale,r,d,d,d):(++n,m.parentNode.removeChild(m),k())}}catch(w){d(w)}g.unbindGetSVG()};a.prototype.exportChartLocal=function(a,b){var d=this,c=K(d.options.exporting,a),e=function(a){!1===c.fallbackToExportServer?c.error?c.error(c,a):F(28,!0):d.exportChart(c)};a=function(){return[].some.call(d.container.getElementsByTagName("image"),function(a){a=a.getAttribute("href");
return""!==a&&0!==a.indexOf("data:")})};B&&d.styledMode&&(f.prototype.inlineWhitelist=[/^blockSize/,/^border/,/^caretColor/,/^color/,/^columnRule/,/^columnRuleColor/,/^cssFloat/,/^cursor/,/^fill$/,/^fillOpacity/,/^font/,/^inlineSize/,/^length/,/^lineHeight/,/^opacity/,/^outline/,/^parentRule/,/^rx$/,/^ry$/,/^stroke/,/^textAlign/,/^textAnchor/,/^textDecoration/,/^transform/,/^vectorEffect/,/^visibility/,/^x$/,/^y$/]);B&&("application/pdf"===c.type||d.container.getElementsByTagName("image").length&&
"image/svg+xml"!==c.type)||"application/pdf"===c.type&&a()?e("Image type not supported for this chart/browser."):d.getSVGForLocalExport(c,b,e,function(a){-1<a.indexOf("<foreignObject")&&"image/svg+xml"!==c.type?e("Image type not supportedfor charts with embedded HTML"):C(a,P({filename:d.getFilename()},c),e)})};K(!0,J().exporting,{libURL:"https://code.highcharts.com/8.2.2/lib/",menuItemDefinitions:{downloadPNG:{textKey:"downloadPNG",onclick:function(){this.exportChartLocal()}},downloadJPEG:{textKey:"downloadJPEG",
onclick:function(){this.exportChartLocal({type:"image/jpeg"})}},downloadSVG:{textKey:"downloadSVG",onclick:function(){this.exportChartLocal({type:"image/svg+xml"})}},downloadPDF:{textKey:"downloadPDF",onclick:function(){this.exportChartLocal({type:"application/pdf"})}}}});b.downloadSVGLocal=C});f(a,"masters/modules/offline-exporting.src.js",[],function(){})});
//# sourceMappingURL=offline-exporting.js.map

文件差异因一行或多行过长而隐藏